| Author |
question on a4j:commandButton
|
evelyn ong
Greenhorn
Joined: Aug 03, 2010
Posts: 13
|
|
|
does <a4j:commandButton> navigate to the next view after form submit? i have a form using <a4j:commandButton> as my submit button, but however, when i submit the form, the next view does not change, the action method have been called.
|
 |
Frederic Filiatrault
Ranch Hand
Joined: Jul 12, 2004
Posts: 69
|
|
Stupid question but would you append to have any javascript on the way blocking the form submission?
Try a sniffer to see if any ajax calls are sent. You would be 100% sure in this case.
|
F.<br />SCJP, SCJD, SCWCD, SCBCD<br /> <br />Failure is not an option... It comes with the software bundle.
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14571
|
|
|
If the action method does not return a valid navigation token, the current page is redisplayed. Same as for a normal commandButton.
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
Max Katz
Ranch Hand
Joined: Aug 03, 2009
Posts: 72
|
|
|
a4j:commandButton shouldn't really be used for navigating, it's used to update the same page. If you really need to navigate, then you need to use <redirect/> with your navigation rule.
|
Blog: http://mkblog.exadel.com
HTML Prototypes: http://gotiggr.com
|
 |
evelyn ong
Greenhorn
Joined: Aug 03, 2010
Posts: 13
|
|
Max Katz wrote:a4j:commandButton shouldn't really be used for navigating, it's mean to update the same page. If you really need to navigate, then you need to use <redirect/> with your navigation rule.
I have use <redirect/> on my naviagation rule. when i click on the button, the page is refresh, but view is not change.
|
 |
Max Katz
Ranch Hand
Joined: Aug 03, 2009
Posts: 72
|
|
|
Make sure the navigation rules is correct and the outcome you use. Also, try using a standard button (h:commandButton) to see if it navigates.
|
 |
evelyn ong
Greenhorn
Joined: Aug 03, 2010
Posts: 13
|
|
it navigates when i using <h:commandbutton>.
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14571
|
|
|
You probably should post an example. Some of the JavaScript attributes have an inherent boolean functionality that will cause the submit to be suppressed unless you explicitly return true or false from them as required.
|
 |
 |
|
|
subject: question on a4j:commandButton
|
|
|