• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Navigation Problem

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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>

<h:outputText 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
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I figured out my problem.
 
Your buns are mine! But you can have this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic