• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem regarding the ValueChangeEvent and the commandButton

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 99
MyEclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
MyEclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Btw, just noticed... =) Get the button out of the formpanel.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic