1 Reply Latest reply on Aug 28, 2011 7:45 PM by ssilvert

    jsf 1.2, richfaces 3.3.1

    anthonycrane

      Hi,

       

      I need to develop a left hand side panel that has links to other pages. I created a "LHSPanel.jsp" and entered the command links that i needed. and included this file on all the pages that needed this left hand side panel.

       

      When i do it this way, in faces-config.xml i need to add the <navigation-case> for the commandlinks on all the pages that have the panel included. By doing this,  i am duplicating the <navigation-case> code in all the files rather than having the <navigation-case> in just the  <navigation-rule> of  LHSPanel.jsp.

       

      I have added the code snippet for you to correct m mistake. Please guide me and show me a better way to do this so that i can improve the way i am currently doing it.

       

       

      LHSPanel.jsp Code-

       

      <f:subview id="LHSPanel">

      <h:form>

                 

                  <ul>

                      <li><strong><h:commandLink value="#{lhs.abcd}" action="dcba"/></strong></li>

                      <li><strong><h:commandLink value="#{lhs.efgh}" action="hgfe"/></strong></li>

                      <li><strong><h:commandLink value="#{lhs.ijkl}" action="lkji"/></strong></li>

                      <li><strong><h:commandLink value="#{lhs.mnop}" action="ponm"/></strong></li>

                      <li><strong><h:commandLink value="#{lhs.qrst}" action="tsrq"/></strong></li>

                </ul>

      </h:form>

          </f:subview>

       

      One of the many pages that need the LHSPanel included -

       

      <html>

          <head>

              <title>WelcomePage.jsp</title>

          </head>

          <body>

              <f:view>

              <h:panelGrid columns="2" columnClasses="autosize,autosize" style="cellspacing:0px; cellpadding:0px">

                  <%@ include file="/XXXXX/YYYYYY/LHSPanel.jsp" %>

                  <h:form>

                  XXXXXXXXXX Menu <br/><br/>

                  WelcomePage

                          .........

                          .........

                          .........

                  </h:form>

                  </h:panelGrid>

              </f:view>

          </body>   

      </html> 

       

       

       

      Thanks.....