<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core'%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html'%>
<h:form>
<h:outputText value="#{sms.nombre}" />
<h:inputText value="#{formulario.nombre}"></h:inputText>
<h:commandButton value="#{sms.guardar}" action="guardar"/>
</h:form>
<navigation-rule>
<from-view-id>/jsp/extension/index.jsp</from-view-id>
<navigation-case>
<from-outcome>guardar</from-outcome>
<to-view-id>/jsp/extension/guardar.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<h:commandButton value="#{sms.guardar}" action="guardar"/>
<h:commandButton value="#{sms.guardar}" action="#{claseJava.guardar}"/>
public String guardar(){
String outcome = "guardar";
// … código …
return outcome;
}
<faces-config>
<!– rule to get back to the login page from anywhere –>
<navigation-rule>
<from-view-id>/jsp/*</from-view-id>
<navigation-case>
<from-outcome>logout</from-outcome>
<to-view-id>/jsp/extension/login.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>relogin</from-outcome>
<to-view-id>/jsp/extension/relogin.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>scan</from-outcome>
<to-view-id>/jsp/extension/index.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/jsp/extension/login.jsp</from-view-id>
<navigation-case>
<from-outcome>success</from-outcome>
<to-view-id>/jsp/browse/browse.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/jsp/extension/index.jsp</from-view-id>
<navigation-case>
<from-outcome>guardar</from-outcome>
<to-view-id>/jsp/extension/guardar.jsp</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>
Content from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.