Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 7th, 2012  |  syntax: None  |  size: 2.13 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Facelets: Page Not Getting Rendered
  2. <ui:composition xmlns="http://www.w3.org/1999/xhtml"
  3. xmlns:ui="http://java.sun.com/jsf/facelets"
  4. xmlns:h="http://java.sun.com/jsf/html"
  5. xmlns:f="http://java.sun.com/jsf/core"
  6. xmlns:a4j="http://richfaces.org/a4j"
  7. xmlns:rich="http://richfaces.org/rich">
  8. <style>
  9.     .cols {
  10.         vertical-align: top;
  11.         }
  12. </style>
  13. <h:form id="form">
  14.     <h:panelGrid columns="2" columnClasses="cols,cols" width="400">
  15.         <rich:panelMenu style="width:200px" mode="ajax"
  16.             iconExpandedGroup="disc" iconCollapsedGroup="disc"
  17.             iconExpandedTopGroup="chevronUp" iconGroupTopPosition="right"
  18.             iconCollapsedTopGroup="chevronDown">
  19.             <rich:panelMenuGroup label="Group 1">
  20.                 <rich:panelMenuItem label="Item 1.1"
  21.                     action="#{panelMenu.updateCurrent}">
  22.                     <f:param name="current" value="Item 1.1" />
  23.                 </rich:panelMenuItem>
  24.                 <rich:panelMenuItem label="Item 1.2"
  25.                     action="#{panelMenu.updateCurrent}">
  26.                     <f:param name="current" value="Item 1.2" />
  27.                 </rich:panelMenuItem>
  28.                 <rich:panelMenuItem label="Item 1.3"
  29.                     action="#{panelMenu.updateCurrent}">
  30.                     <f:param name="current" value="Item 1.3" />
  31.                 </rich:panelMenuItem>
  32.             </rich:panelMenuGroup>
  33.         </rich:panelMenu>
  34.         <rich:panel bodyClass="rich-laguna-panel-no-header">
  35.             <a4j:outputPanel ajaxRendered="true">
  36.                 <h:outputText value="#{panelMenu.current} selected" id="current" />
  37.             </a4j:outputPanel>
  38.         </rich:panel>
  39.     </h:panelGrid>
  40. </h:form>
  41.        
  42. <dependency>
  43.   <groupId>javax.faces</groupId>
  44.   <artifactId>javax.faces-api</artifactId>
  45.   <version>2.1</version>
  46.   <scope>provided</scope>
  47.        
  48. <servlet>
  49.  
  50. <servlet-name>Faces Servlet</servlet-name>
  51.  
  52. <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
  53.  
  54. <load-on-startup>1</load-on-startup>
  55.        
  56. <servlet-name>Faces Servlet</servlet-name>
  57.  
  58. <url-pattern>*.jsf</url-pattern>
  59.        
  60. <servlet-name>Faces Servlet</servlet-name>
  61.  
  62. <url-pattern>/*</url-pattern>