Hi,
I'm having a weird issue with "immediate". I have 2 commandLinks. One is
always rendered and one is not. When pressing the link a state is shifted
from "active" to "inative".
Both links are "immediate". My bean is request scope.
For some reason, when pressing the link the first time, everything is
working fine and the link is change from "active" to "inactive"
But when pressing the link the second time, I see validation errors, and all
fields with "required=true" are showing "Field must have value" error
message.
By the way, I check, and the action is simply not called. It is not the
case, when action is called but validation still shows error.
This is the JSF code:
<h:inputHidden id="active" value="#{accountUser.pubUser.isActive}"
converter="BooleanConverter" />
<h:commandLink value="#{bundle['account_user.status.activate']}"
rendered="#{not accountUser.pubUser.isActive}"
action="#{accountUser.setStatusActive}" immediate="true" styleClass="linkor"
/>
<h:commandLink value="#{bundle['account_user.status.inactivate']}"
rendered="#{accountUser.pubUser.isActive}"
action="#{accountUser.setStatusInactive}" immediate="true"
styleClass="linkor" />
This is the code of my bean:
public void setStatusActive()
{
pubUser.setIsActive(true);
FacesUtil.renderResponse();
}
public void setStatusInactive()
{
pubUser.setIsActive(false);
FacesUtil.renderResponse();
}
Anyone has a clue?
Thanks,
Guy.