Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem regarding the ValueChangeEvent and the commandButton

 
Chaitanya Kakarla
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 99
Java MyEclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
Srini Mutpur
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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



 
Akaine Harga
Ranch Hand
Posts: 99
Java MyEclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Btw, just noticed... =) Get the button out of the formpanel.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic