AnsweredAssumed Answered

JSF Navigation, Navigation Rules

Question asked by damiri on Jun 9, 2009
Latest reply on Jun 10, 2009 by jayjayecl
Hi everyone,

i have a simple custom JSF application and one big problem with navigation in Alfresco:

cardform.jsp,


<%@ 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="#{webclient['card.number']}" />
      <h:inputText value="#{CardFormDialogBean.cardNumber}"></h:inputText>

      <h:commandButton action="#{CardFormDialogBean.save}"/>
</h:form>

one managed Bean:

CardFormDialogBean {

   public String save(){
      return "success";
   }
   public String getCardNumber() {
      return cardNumber;
   }
   public void setCardNumber(String cardNumber) {
      this.cardNumber = cardNumber;
   }
private String cardNumber;
}

and  success.jsp :

<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core'%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html'%>
<h:outputText value="SUCCESS"></h:outputText>


faces-config.xml:

<navigation-rule>
  <from-view-id>/jsp/extension/cardform.jsp</from-view-id>
  <navigation-case>
   <from-outcome>success</from-outcome>
   <to-view-id>/jsp/extension/success.jsp</to-view-id>
  </navigation-case>
</navigation-rule>


if I start my application:

cardform.jsp will be shown
if I click "submit" (   <h:commandButton action="#{CardFormDialogBean.save}"/>),
the bean method will be not executed and success.jsp NOT DISPLAYED


Can somebody help me, what must be changed ?
    faces-config-navigation.xml?
    web-client-config-custom.xml?
   any other conf files?

Outcomes