This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JSF and the fly likes How to target result Page in to tab panel. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "How to target result Page in to tab panel." Watch "How to target result Page in to tab panel." New topic
Author

How to target result Page in to tab panel.

Vikas Taank
Greenhorn

Joined: Oct 08, 2008
Posts: 6
Dear Friends , I am new to JSF so it may be a trivial doubt also.

I have one main.jsp
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<html>
<head>
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/css/sjx.css">
</head>
<body class="bodystylemain">
<f:view>
<rich:spacer height="20px"></rich:spacer>
<h:form>

<h anelGrid id="mainpanel" columns="2">
<rich:spacer width="190px"></rich:spacer>
<h anelGrid id="headernav" columns="5">
<rich:spacer width="600px"></rich:spacer>
<h utputText value="Welcome" styleClass="headertext"></h utputText>
<h utputText value="#{saveUserBean.user.email}" styleClass="headertext"></h utputText>
<h:graphicImage url="images/bar.gif"></h:graphicImage>
<h:commandLink value="Logout" action="#{saveUserBean.logout}" styleClass="headertext"></h:commandLink>
</h anelGrid>
</h anelGrid>
</h:form>
<rich:spacer height="200px"></rich:spacer>
<h anelGrid id="contentpanel" columns="2">
<rich:spacer width="100px"></rich:spacer>
<rich:tabPanel switchType="server" height="300px" width="1000px" tabClass="tabs" contentClass="tabcontent" headerAlignment="right" >
<rich:tab label="About Us" id="aboutus">
<jsp:include page="include/aboutus.jsp"></jsp:include>
</rich:tab>
<rich:tab label="Counselor Corner" id="counselor">
<h utputText value="If you have any query , Please write to us , Our experts are here to advise you"></h utputText>
<jsp:include page="include/inquiryform.jsp"></jsp:include>
</rich:tab>
<rich:tab label="Exchange" id="exchange">
Here is tab #3
</rich:tab>
</rich:tabPanel>
</h anelGrid>
<jsp:include page="include/footer.jsp"></jsp:include>
</f:view>

</body>

</html>

I have three tabs in that. I have one form in one tab.
When i do the submit from that tab , my result page is displayed.
The problem is I want my result page to be displayed in the same Tab container from which then form was submitted. What kind of navigation rule i need to give in faces config for this functionality.
The navigation rule is as follows:
<navigation-rule>
<description></description>
<from-view-id>/main.jsp</from-view-id>
<navigation-case>
<from-outcome>logout</from-outcome>
<to-view-id>/mytest.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>result</from-outcome>
<to-view-id>/result.jsp</to-view-id>
<redirect/>
</navigation-case>
</navigation-rule>

the result page is coming but it is coming as a different page and not loading in the tab itself.
Help will be appreciated.
Vikas
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to target result Page in to tab panel.
 
Similar Threads
display in single row
jsp:param not working inside jsp:include and JSF
param needs unique ID even if in different forms?
Display list of item with ajax
RichFaces with TabPanel and selectOneMenu not change the tab