This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSF and the fly likes Ajax behavior/ Conditional rendering Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Ajax behavior/ Conditional rendering" Watch "Ajax behavior/ Conditional rendering" New topic
Author

Ajax behavior/ Conditional rendering

Bishal Ghimire
Greenhorn

Joined: Feb 01, 2011
Posts: 26

Hi all,

I have got an weird problem in the jsf page. I have used ajax:support for h:selectOneMenu to render portion of the page. Based on the logic, it hides and displays different textboxes (available inside ajax:outputPanel, which wraps two or more h:panelGroup where the condition lies). Each textboxes has their own rich:message too, which I haven't put inside outputPanel as I thought those appear based on the input value of associated textboxes.

Now, the problem I am getting is, when I select one item from the ComboBox, ajax resposes well as it hides according to the logic. But, once I enter some text in the newly appeared field, and tab off, they original test boxes reappear and the new ones get lost.

Here is the code also:



Also, when I submit this form, even if bean.someMethod is 'somthing', only the top h:paneGroup gets appeared.

Thank you!
Bishal Ghimire
Greenhorn

Joined: Feb 01, 2011
Posts: 26

I always forget to mention this~~ I am using JSF 1.2 with Richfaces.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Ajax behavior/ Conditional rendering
 
Similar Threads
Problem with h:message and richfaces
File browser button
Problem using valueChangeListener and onchange
<rich:ajaxValidator>
ajax4jsf and h:inputText