| Author |
commandlink not working
|
kahkean chor
Ranch Hand
Joined: Jan 26, 2013
Posts: 41
|
|
<h:panelGrid columns="3" styleClass="loginSignup" rendered="#{member.verify}">
<h:commandLink value="login" action="login"/> <h utputText value="/"/><h:commandLink value="Sign up" action="signup"/>
</h:panelGrid>
<h:panelGrid styleClass="loginSignup" rendered="#{not member.verify}">
<h:commandLink value="Logout" immediate="true" action="#{member.validateLogout()}"/>
</h:panelGrid>
public String validateLogout(){
return "failure";
}
<h:commandLink value="Logout" immediate="true" action="#{member.validateLogout()}"/> <- tis statement is not working!!anyone can help?
|
 |
Greg Charles
Bartender
Joined: Oct 01, 2001
Posts: 2542
|
|
First a couple of suggestions from our FAQ:
ItDoesntWorkIsUseless
UseCodeTags (XML code works well for JSF)
Is that validateLogout() method part of a managed bean named "member"? Does the method not get called? Does it get called, but the navigation doesn't go where you expect?
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14491
|
|
Your action statement isn't working because the action isn't a statement. It's an EL expression that references a backing bean action method, not calls it directly.
Lose the "()".
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
 |
|
|
subject: commandlink not working
|
|
|