Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes JSF and the fly likes Navigation Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Navigation Problem" Watch "Navigation Problem" New topic
Author

Navigation Problem

Ian Dunsirn
Ranch Hand

Joined: May 25, 2006
Posts: 36
Hello,

I am new to JSF and am having a problem with navigation. I have a button on a jsf page defined like so (brackets deliberately left out):

h:commandButton value="Customize View" action="#{issueListener.getViewSettings}"

The method is defined as follows:
public String getViewSettings()
{
log.info("--------------------------------------------------");
log.info("Entering getViewSettings");
log.info("--------------------------------------------------");

return "customView";
}//end getViewSettings method

The navigation rule in faces-config.xml is:
<navigation-case>
<from-outcome>customView</from-outcome>
<to-view-id>/Issue_customview.jsp</to-view-id>
</navigation-case>

What I expect is that the button will call the getViewSettings, which will return the string "customView", which in turn will display the page Issue_customview.jsp.
However, this is not what happens. What happens is I get a blank screen and no error message. If I change the string that is returned in getViewSettings to match a different navigation case, the application will go to that page. I do not understand the problem. Here is the page I am trying to get to (not much to it yet):

<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>

<f:view>
<f:subview id="header">
<jsp:include page="e9000/common/Header.jsp"/>
</f:subview>

<f:subview id="itsmenubar">
<jsp:include page="e9000/common/Itsmenubar.jsp"/>
</f:subview>

<f:subview id="issueMenuBar">
<jsp:include page="e9000/issue/IssueMenuBar.jsp"/>
</f:subview>

<h:form>

<f:verbatim>
<p>  
</f:verbatim>

<hutputText value="Customize View" style="font-weight : bold"/>

<!-- Separator -->
<f:verbatim>
<div id="appFooter"></div>
<br>   
</f:verbatim>
<!-- Separator -->
<f:verbatim>
<div id="appFooter"></div>
<br>   
</f:verbatim>


</h:form>

<f:subview id="footer">
<jsp:include page="e9000/common/Footer.jsp" />
</f:subview>
</f:view>
Ian Dunsirn
Ranch Hand

Joined: May 25, 2006
Posts: 36
I figured out my problem.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Navigation Problem