aspose file tools*
The moose likes JSF and the fly likes Problem regarding the ValueChangeEvent and the commandButton Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Problem regarding the ValueChangeEvent and the commandButton" Watch "Problem regarding the ValueChangeEvent and the commandButton" New topic
Author

Problem regarding the ValueChangeEvent and the commandButton

Chaitanya Kakarla
Greenhorn

Joined: Jun 29, 2007
Posts: 1
Hey Can anyone let me know what I am doing wrong

I have a form which has the h:selectOneMenu and a panelGrid which contains inputText and submit button

Upon selecting a value in the selectOneMenu, the panelgrid has to be rendered, initially it will be rendered as false, So it does not show up.
I wrote a valueChangedListner and it worked fine which sets the rendered flag as true for the panelGrid
But now after rendering the panelGrid, when I click the command button, it does not go the action mehod of the commandButton

Please refer to the code below. Please let me know why it is not going to the action method after it gets rendered.





Please let me know why did does not work.
Akaine Harga
Ranch Hand

Joined: Nov 03, 2009
Posts: 80

I see you use richfaces, this makes thing easier...

instead of h:commandButton try using:And of course you would need to set the flag to true in testAction method to make rerendering take effect...


Wanna install linux on a vacuum cleaner. Could anyone tell me which distro sucks better?
willCodeForFood("Java,PHP,C#,XML,VBS,XHTML,CSS,JavaScript,SQL"); //always looking for job opportunities in AU/NZ/US/CA/Europe :P
Srini Mutpur
Greenhorn

Joined: Mar 29, 2008
Posts: 24

Have rerendered the submit Button panel ? I think rerendering of the submit button panel is not done.

Try to rerender the submit button panel on select box value change using <a4j:support reRender="panelId"/>.

Srini




SCJP 1.5
Akaine Harga
Ranch Hand

Joined: Nov 03, 2009
Posts: 80

Btw, just noticed... =) Get the button out of the formpanel.
 
 
subject: Problem regarding the ValueChangeEvent and the commandButton