JSF Navigation, Navigation Rules
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2009 05:09 AM
Hi everyone,
i have a simple custom JSF application and one big problem with navigation in Alfresco:
cardform.jsp,
one managed Bean:
and success.jsp :
faces-config.xml:
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?
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?
Labels:
- Labels:
-
Archive
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2009 03:24 AM
what you wrote into faces-config.xml must be written in a file called "faces-config-custom.xml", that file has to be located under WEB-INF
<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>
