This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Rich Faces Modal Panel Problem

 
Mahendra Chowdary
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try autosized="true" property of rich:modalpanel
 
Mahendra Chowdary
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't do anything with the width and length oof the modal panel.. keep it default.
 
Mahendra Chowdary
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But then will it expand if i continue to add more components on the modal panel ?
 
Jason Irwin
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic