<h:commandButton ... rendered="#{not empty OrderStatusBean.goBackAction}"/>
does not invoke action even if goBackAction is set.
-------------------------------------------------------------------------------------------------------------------------------
Key: MYFACES-1499
URL: http://issues.apache.org/jira/browse/MYFACES-1499
Project: MyFaces Core
Issue Type: Bug
Affects Versions: 1.1.4
Reporter: Thorbjørn Ravn Andersen
The situation is that I have a button that should only be shown when the
goBackAction field is set in the OrderStatusBean (which is _request_ scoped),
and which is kept as a hidden field in the form. I can print out the field
which has the expected value of "succesfulOrder".
Problematic code:
1)
<h:commandButton action="#{OrderStatusHandler.goBack}"
value="#{msg['go-back']}" rendered="#{not empty OrderStatusBean.goBackAction}"/>
2)
<h:commandButton action="#{OrderStatusHandler.goBack}"
value="#{msg['go-back']}" />
Of these #2 works as expected (but always show the button), and #1 shows as
expected but does not call the listed action.
I tried adding the immediate="true" option to #1, but with no change.
I have not seen any log lines indicating that a navigational choice was made
after pressing the button, so my guess is that the button is considered to be
unavailable at processing time and therefore discarded, so the page is merely
redisplayed.
Is it legal at all to do what I would like to, or should I go for a session
based variable instead?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira