html - Rich faces rich:Panel menu with scrollbar -
i want have scrollbar rich faces panelgroup / panel grid. specifying height in css not helping cause. entire code in file named mysidebar , file included in layout template. attached code
<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich"> <h:outputstylesheet> .cols { vertical-align: top; height: 100px; overflow: auto; } </h:outputstylesheet> <h:form id="form"> <h:panelgrid columns="2" columnclasses="cols,cols" height="300" width="400"> <rich:panelmenu style="width:200px" itemmode="ajax" groupmode="ajax" groupexpandedlefticon="triangleup" groupcollapsedlefticon="triangledown" topgroupexpandedrighticon="chevronup" topgroupcollapsedrighticon="chevrondown" itemlefticon="disc" itemchangelistener="#{panelmenubean.updatecurrent}"> <rich:panelmenugroup label="group 1"> <rich:panelmenuitem label="item 1.1" name="item_1_1" /> <rich:panelmenuitem label="item 1.2" name="item_1_2" /> <rich:panelmenuitem label="item 1.3" name="item_1_3" /> </rich:panelmenugroup> <rich:panelmenugroup label="group 2"> <rich:panelmenuitem label="item 2.1" name="item_2_1" /> <rich:panelmenuitem label="item 2.2" name="item_2_2" /> <rich:panelmenuitem label="item 2.3" name="item_2_3" /> <rich:panelmenugroup label="group 2.4"> <rich:panelmenuitem label="item 2.4.1" name="item_2_4_1" /> <rich:panelmenuitem label="item 2.4.2" name="item_2_4_2" /> <rich:panelmenuitem label="item 2.4.3" name="item_2_4_3" /> </rich:panelmenugroup> <rich:panelmenuitem label="item 2.5" name="item_2_5" /> </rich:panelmenugroup> <rich:panelmenugroup label="group 3" style="cols"> <rich:panelmenuitem label="item 3.1" name="item_3_1" /> <rich:panelmenuitem label="item 3.2" name="item_3_2" /> <rich:panelmenuitem label="item 3.3" name="item_3_3" /> <rich:panelmenuitem label="item 3.3" name="item_3_3" /> <rich:panelmenuitem label="item 3.3" name="item_3_3" /> <rich:panelmenuitem label="item 3.3" name="item_3_3" /> <rich:panelmenuitem label="item 3.3" name="item_3_3" /> <rich:panelmenuitem label="item 3.3" name="item_3_3" /> <rich:panelmenuitem label="item 3.3" name="item_3_3" /> <rich:panelmenuitem label="item 3.3" name="item_3_3" /> <rich:panelmenuitem label="item 3.3" name="item_3_3" /> <rich:panelmenuitem label="item 3.3" name="item_3_3" /> <rich:panelmenuitem label="item 3.3" name="item_3_3" /> <rich:panelmenuitem label="item 3.3" name="item_3_3" /> <rich:panelmenuitem label="item 3.3" name="item_3_3" /> <rich:panelmenuitem label="item 3.3" name="item_3_3" /> <rich:panelmenuitem label="item 3.3" name="item_3_3" /> <rich:panelmenuitem label="item 3.3" name="item_3_3" /> <rich:panelmenuitem label="item 3.3" name="item_3_3" /> <rich:panelmenuitem label="item 3.3" name="item_3_3" /> <rich:panelmenuitem label="item 3.3" name="item_3_3" /> <rich:panelmenuitem label="item 3.3" name="item_3_3" /> <rich:panelmenuitem label="item 3.3" name="item_3_3" /> <rich:panelmenuitem label="item 3.3" name="item_3_3" /> <rich:panelmenuitem label="item 3.3" name="item_3_3" /> <rich:panelmenuitem label="item 3.3" name="item_3_3" /> <rich:panelmenuitem label="item 3.3" name="item_3_3" /> <rich:panelmenuitem label="item 3.3" name="item_3_3" /> <rich:panelmenuitem label="item 3.3" name="item_3_3" /> <rich:panelmenuitem label="item 3.3" name="item_3_3" /> <rich:panelmenuitem label="item 3.3" name="item_3_3" /> <rich:panelmenuitem label="item 3.3" name="item_3_3" /> <rich:panelmenuitem label="item 3.3" name="item_3_3" /> <rich:panelmenuitem label="item 3.3" name="item_3_3" /> <rich:panelmenuitem label="item 3.3" name="item_3_3" /> <rich:panelmenuitem label="item 3.3" name="item_3_3" /> </rich:panelmenugroup> </rich:panelmenu> <a4j:outputpanel ajaxrendered="true"> <rich:panel rendered="#{not empty panelmenubean.current}"> <h:outputtext value="#{panelmenubean.current} selected" id="current" /> </rich:panel> </a4j:outputpanel> </h:panelgrid> </h:form> </ui:composition>
div style="overflow: auto; height: 200px; width: 500px;"
this 1 worked me.
since in html code, panelgrid
giving table tag , panelgroup
span
tag not working these tags
Comments
Post a Comment