0

I have the following a4j:commandbutton that has been working fine when I am on /page.xhtml:

<a4j:commandButton action="#{controller.redirectPage()}"
                   data-theme="b"  value="Review"
                   styleClass="ui-btn"
                   onclick="log('opt')"
                   onbegin="validate(event); $.efc.busy($.efc.messages.loading);"
                   oncomplete="$.efc.busy('', true);" />

However after adding a query param to the URI so its now /page.xhtml?edit=true controller.redirectPage() is never called. Why would the query param break this and how do I fix it?

EDIT

I could not ever figure out how to get the query param to work, but it appears that it had something to do with the post back. On post back the query param was not being sent. When I ended up doing was just putting my edit switch in session and that worked for me. But I would love to know what was wrong in the first scenario.

ferics2
  • 5,241
  • 7
  • 30
  • 46
  • As I understand, the button is on a page `page.xhtml` and works fine, when this page is called without query params. When this page is called with `page.xhtml?edit=true` the commandButton does not work correctly. Are there any changes in the xhtml done through this extra parameter? Can you check e.g. firebug, if there is a JS-error thrown when clicking the button? Does `controller` hold a useful/correct value? What else did you change since your post http://stackoverflow.com/q/22413820/1269441 ? – L-Ray Mar 25 '14 at 11:13
  • This is actually a different scenario than the one referred to in that other post. Basically I have a series of forms and when I get to the end the user can review their answers and hit 'edit' to go back and make changes to one section. The edit query param will allow me to change how portions of the page renders. However, I have not gotten to that point yet. Since adding the query param, the action on the button no longer fires. – ferics2 Mar 25 '14 at 11:34
  • Oh, and I did check the inspector... no javascript errors. – ferics2 Mar 25 '14 at 11:35

0 Answers0