permaculture playing cards*
The moose likes JSF and the fly likes Rich Faces Modal Panel Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Rich Faces Modal Panel Problem " Watch "Rich Faces Modal Panel Problem " New topic
Author

Rich Faces Modal Panel Problem

Mahendra Chowdary
Greenhorn

Joined: Aug 26, 2010
Posts: 25
Hi all ,

I have an issue regarding with the modal panel using the rich faces tag. The problem i am facing here is when i use the modal panel tag , the modal panel generated is not coming in the middle of the webpage in my browser. I am currently using IE 7 . Please let me know the setting so that the modal panel is displayed in the middle of the web page by default ?

Thanks
Mahendra
Sumeet Singh Aryan
Ranch Hand

Joined: Jul 30, 2008
Posts: 43
try autosized="true" property of rich:modalpanel


The woods are lovely, dark and deep, But I have promises to keep; And miles to go before I sleep, And miles to go before I sleep. - Robert Frost
Mahendra Chowdary
Greenhorn

Joined: Aug 26, 2010
Posts: 25
Hi ,

I have tried using autosize="true"

Still i am not getting the desired output ,

Basically i have changed the length and width of the modal panel

is this error arising due to so .?

Thanks
Mahendra
Sumeet Singh Aryan
Ranch Hand

Joined: Jul 30, 2008
Posts: 43
Don't do anything with the width and length oof the modal panel.. keep it default.
Mahendra Chowdary
Greenhorn

Joined: Aug 26, 2010
Posts: 25
But then will it expand if i continue to add more components on the modal panel ?
Jason Irwin
Ranch Hand

Joined: Jun 09, 2009
Posts: 327
I've written a RichFaces application where I dynamically show/hide a modal panel and have it centralised as well. This is the definition I used (JSF 1.2, Richfaces; tested on IE6-8, FireFox [(Windows and Linux], Opera, Chrome[Windows and Linux]).

The "trick" is, I think, to have "left" and "right" set to"auto". I am not running a RichFaces environemtn at the moment, so I cannot test it myself (I have a nasty feeling that this does not re-centre itself if the browser window is resized).
If that does not work for you, your only other option is to use some JS to calculate the required position.
Also, there appears to be some few issues reported on JIRA with regards to the modalPanel (often down to a combination of RichFaces version and browser).


SCJP6
 
 
subject: Rich Faces Modal Panel Problem