Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

problem with h:inputtext in Rich:ModalPanel  RSS feed

 
Mahendra Pratap
Ranch Hand
Posts: 42
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

I am using rich:modalpanel for editing some values so when user clicks on edit the popup will appear with some prefilled values.

For popup i am using ModalPanel, the problem is for the first time it is populating the right values but from second time onwards the input text values are not getting updated. I tried displaying same values using outputtext and then i am getting the correct values.

Any suggestion is welcome!!
 
Ed Burns
author
Ranch Hand
Posts: 82
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mahendra Pratap wrote:hi,

I am using rich:modalpanel for editing some values so when user clicks on edit the popup will appear with some prefilled values.

For popup i am using ModalPanel, the problem is for the first time it is populating the right values but from second time onwards the input text values are not getting updated. I tried displaying same values using outputtext and then i am getting the correct values.

Any suggestion is welcome!!


I didn't bother to include any RichFaces content in my book because Max Katz's excellent Practical RichFaces has all you need:

http://www.amazon.com/Practical-RichFaces-Max-Katz/dp/1430210559/ref=sr_1_1?ie=UTF8&s=books&qid=1265426308&sr=8-1

Ed
 
Max Katz
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, Ed.

When you open the modal panel, you need to rerender the value in the panel. Opening a modal panel is client-side only, it works the first time because you get the value that was rendered when the page was loaded for the first time. Any time you open again, you get the initial rendered value.

Example:

Hope this helps..

Max
http://mkblog.exadel.com
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!