3 Replies Latest reply on Jun 1, 2009 2:05 PM by benziman kirism

    How can i show the other pages into default page.

    benziman kirism Newbie

      Hi all.

      i have the problem to perform the other pages to insert into the default page , and call it when i clicks on the category link on the left side.


      i already create six pages in the project , but i didn't know how to show each pages when i clicks on the each items on the category.

      i create six pages like that : header.html, Menu.jsp, category.jsp, footer.jsp, context_1.jsp , context_2.jsp.

       <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
      <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
      <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
      <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
      <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
      <html>
       <head>
       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
       <title>JSP Page</title>
       </head>
       <body>
       <form
       <f:view>
      
       <h:form>
       <table border="0" cellpadding="0" cellspacing="0" style="left: 102px; width: 820px;
       position: absolute; top: 0px">
       <tr>
       <td colspan="3" style="width: 820px; height: 128px" valign="top">
       <jsp:include page="/pages/header.html" flush="true"/>
       </td>
       </tr>
       <tr>
       <td colspan="3" style="border-top: #ffffff 1px outset; width: 820px;background-color: #ffddcc;" valign="top">
       <jsp:include page="/pages/Menu.jsp" flush="true"/>
       </td>
       </tr>
       <tr>
       <td style="width: 180px; height: 19px ;background-color: #ffffcc;" align="center" valign="top">
      
       <jsp:include page="/pages/category.jsp" flush="true"/>
       </td>
       <td colspan="2" style="width: 640px; height: 19px">
      
       BODY ?
      
       </td>
       </tr>
       <tr>
       <td colspan="3" style="height: 25px" valign="top">
       <jsp:include page="/pages/footer.jsp" flush="true"/>
       </td>
       </tr>
       </table>
       </h:form>
       </f:view>
      
      
       </body>
      </html>



      Here is the category page :


       <body>
       <form id="form1" runat="server">
       <div>
       <div style="text-align: center">
       <table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
      
       <tr>
       <td style="width: 100%; background-image: url(../Images/bg_02.gif); height: 30px;" valign="top">
       List Gold Trades
       </td>
       </tr>
       <tr>
       <td style="width: 100%" valign="top">
      
      
      
       <h:panelGrid columns="2" columnClasses="cols" width="100%">
      
       <rich:panelMenu style="width:200px" mode="ajax"
       iconExpandedGroup="disc" iconCollapsedGroup="disc"
       iconExpandedTopGroup="chevronUp" iconGroupTopPosition="right"
       iconCollapsedTopGroup="chevronDown">
      
      
      
       <rich:panelMenuGroup label="Tradebase Home page">
       <rich:panelMenuItem label="Item 1.1" action="#{panelMenu.updateCurrent}">
       <f:param name="current" value="Item 1.1"/>
       </rich:panelMenuItem>
       <rich:panelMenuItem label="Item 1.2" action="#{panelMenu.updateCurrent}">
       <f:param name="current" value="Item 1.2"/>
       </rich:panelMenuItem>
       <rich:panelMenuItem label="Item 1.3" action="#{panelMenu.updateCurrent}">
       <f:param name="current" value="Item 1.3"/>
       </rich:panelMenuItem>
       </rich:panelMenuGroup>
       <rich:panelMenuGroup label="Positions by Account">
       <rich:panelMenuItem label="Item 2.1" action="#{panelMenu.updateCurrent}">
       <f:param name="current" value="Item 2.1"/>
       </rich:panelMenuItem>
      
       <rich:panelMenuItem label="Item 2.2" action="#{panelMenu.updateCurrent}">
       <f:param name="current" value="Item 2.2"/>
       </rich:panelMenuItem>
       <rich:panelMenuItem label="Item 2.3" action="#{panelMenu.updateCurrent}">
       <f:param name="current" value="Item 2.3"/>
       </rich:panelMenuItem>
       <rich:panelMenuGroup label="Group 2.4">
       <rich:panelMenuItem label="Item 2.4.1" action="#{panelMenu.updateCurrent}">
       <f:param name="current" value="Item 2.4.1"/>
       </rich:panelMenuItem>
       <rich:panelMenuItem label="Item 2.4.2" action="#{panelMenu.updateCurrent}">
       <f:param name="current" value="Item 2.4.2"/>
       </rich:panelMenuItem>
       <rich:panelMenuItem label="Item 2.4.3" action="#{panelMenu.updateCurrent}">
       <f:param name="current" value="Item 2.4.3"/>
       </rich:panelMenuItem>
       </rich:panelMenuGroup>
       <rich:panelMenuItem label="Item 2.5" action="#{panelMenu.updateCurrent}">
       <f:param name="current" value="Item 2.5"/>
       </rich:panelMenuItem>
       </rich:panelMenuGroup>
       <rich:panelMenuGroup label="Show Trade">
       <rich:panelMenuItem label="Item 3.1" action="#{panelMenu.updateCurrent}">
       <f:param name="current" value="Item 3.1"/>
       </rich:panelMenuItem>
       <rich:panelMenuItem label="Item 3.2" action="#{panelMenu.updateCurrent}">
       <f:param name="current" value="Item 3.2"/>
       </rich:panelMenuItem>
       <rich:panelMenuItem label="Item 3.3" action="#{panelMenu.updateCurrent}">
       <f:param name="current" value="Item 3.3"/>
       </rich:panelMenuItem>
       </rich:panelMenuGroup>
       </rich:panelMenu>
      
       </h:panelGrid>
      
       </td>
       </tr>
       </table>
       </div>
      
       </div>
       </form>
       </body>


      My opinion is how to show the context_1.jsp , context_2.jsp pages when i clicks on the Item 1.1 that BODY loads the context_1.jsp , and clicks on the Item 1.2 that BODY displays the context of context_2.jsp .

      Please give me advice .

      Hope that i get help from you.

      thank regards.