0 Replies Latest reply on Jul 29, 2008 1:48 AM by lflqqd

    rich:scrollableDataTable and rich:contextMenu question?

    lflqqd

      1�I want to put two or more rich:scrollableDataTable in a web page ,but these column width is the last rich:scrollableDataTable 's column width,pls any one help me?

      2� rich:contextMenu � rich:tree and rich:panel, when the tree node is expand and the tree's height is more than panel's height,the contextmenu's position is not on the tree node ?


      code:

      1�
      <h:panelGrid >
      <rich:scrollableDataTable rowKeyVar="rkv1" height="400px"
      width="900px" id="table3" rows="20">
      <rich:column id="num" width="40px" sortable="false" rowspan="2">
      <f:facet name="header"><h:outputText styleClass="headerText" value="id" /></f:facet>
      </rich:column>

      <rich:column id="quotaid" width="80px" sortable="false" rowspan="2">
      <f:facet name="header"><h:outputText styleClass="headerText" value="quotaid" /></f:facet>
      </rich:column>

      <rich:column id="quotaname" width="350px" sortable="false" rowspan="2">
      <f:facet name="header"><h:outputText styleClass="headerText" value="quotaname" /></f:facet>
      </rich:column>

      <rich:column id="quotaunit" width="60px" sortable="false" rowspan="2">
      <f:facet name="header"><h:outputText styleClass="headerText" value="quotaunit" /></f:facet>
      </rich:column>

      </rich:scrollableDataTable>
      <rich:separator></rich:separator>

      <rich:scrollableDataTable first="" rowKeyVar="rkv" frozenColCount="1" height="400px"
      width="900px" id="quotaList" rows="20" columnClasses="col"
      value="#{quotaDataTableScroller.allQuotas}" var="category" sortMode="single"
      binding="#{quotaDataTableScroller.table}"
      selection="#{quotaDataTableScroller.selection}">

      <rich:column id="quotaid" width="80px" sortable="false">
      <f:facet name="header"><h:outputText styleClass="headerText" value="id" /></f:facet>
      <h:outputText value="#{category.quotaid}" />
      </rich:column>
      <rich:column id="quotaname" width="350px" sortable="false">
      <f:facet name="header"><h:outputText styleClass="headerText" value="name" /></f:facet>
      <h:outputText value="#{category.quotaname}" />
      </rich:column>
      <rich:column id="quotaunit" width="80px" sortable="false">
      <f:facet name="header"><h:outputText styleClass="headerText" value="unit" /></f:facet>
      <h:outputText value="#{category.quotaunit}" />
      </rich:column>
      </rich:scrollableDataTable>
      </h:panelGrid>



      2�
      <rich:panel style="overflow:auto; height:450px;width:300px">
      <rich:contextMenu attached="false" id="menu" submitMode="ajax">
      <rich:menuItem ajaxSingle="true" value="see detail">
      <a4j:actionparam value="{nodeid}" name="currentid" assignTo="#{quotaContextMenu.currentNodeid}"/>
      </rich:menuItem>
      </rich:contextMenu>

      <rich:tree stateAdvisor="#{catalogueTreeStateAdvisor}" style="width:300px;" switchType="ajax">
      <rich:recursiveTreeNodesAdaptor var="node" nodes="#{node.nodes}" roots="#{catalogue.root}" >
      <rich:treeNode>
      <h:commandLink action="#{node.click}" value="#{node.nodename}" >
      <a4j:actionparam value="{node.rownum}" name="rownum" assignTo="#{quotaContextMenu.currentNodeid}"/>
      </h:commandLink>
      <rich:componentControl event="oncontextmenu" for="menu" operation="show">
      <f:param value="#{node.nodeid}" name="nodeid"/>
      </rich:componentControl>
      </rich:treeNode>
      </rich:recursiveTreeNodesAdaptor>
      </rich:tree>
      </rich:panel>

      <a4j:outputPanel ajaxRendered="true">
      <rich:panel bodyClass="inpanelBody" style="overflow:auto; height:150px;width:300px">
      <f:facet name="header"><h:outputText value="see detail"></h:outputText>
      </f:facet>
      <h:outputText value="#{quotaContextMenu.currentContent}"></h:outputText>
      </rich:panel>
      </a4j:outputPanel>