3 Replies Latest reply on Feb 29, 2008 5:23 AM by Ilya Shaikovsky

    Problems with rich:scrollableDataTable

    Anton Newbie

      The component do not work with selection binding. No calls to getter or setter of bean at all.

      providing a large part of then the component, maybe it may be important.

      public class FilterMBean extends ExtendedDataModel {
       private List<Filter> filters = new ArrayList<Filter>();
       private Selection selection = new SimpleSelection();
      ....
       public List<Filter> getFilters() {
       return filters;
       }
      
       public void setFilters(List<Filter> filters) {
       this.filters = filters;
       }
      
       public Selection getSelection() {
       log.info("getSelection");
       return selection;
       }
      
       public void setSelection(Selection selection) {
       log.info("setSelection");
       this.selection = selection;
       }
      }
      
      
      <rich:panel id="filters" rendered="#{descriptionView.mode.ordinal==5}">
       <f:facet name="header"><h:outputText value="#{localization['filters.for.ontology.folder.concept']}"/></f:facet>
       <h:form>
       <rich:panel id="filter">
       <f:facet name="header"><h:outputText value="#{localization['general.filter']}"/></f:facet>
       <h:selectBooleanCheckbox value="#{filterCrud.currentFilter.active}"/>
       <h:outputText value="#{localization['filter.activate']}"/>
       <h:inputText value="#{filterCrud.currentFilter.name}"/><br>
       <h:selectOneMenu value="#{filterCrud.currentFilter.objectType}">
       <f:selectItems value="#{filterCrud.filterObjectTypes}"/>
       </h:selectOneMenu><br>
       <h:selectBooleanCheckbox value="#{filterCrud.nameFilterElement.inverse}"/>
       <h:outputText value="#{localization['general.negation']}"/>
       <h:selectOneMenu value="#{filterCrud.nameFilterElement.type}">
       <f:selectItems value="#{filterCrud.nameFilterElementTypes}"/>
       </h:selectOneMenu>
       <h:inputText value="#{filterCrud.nameFilterElement.sample}"/><br>
       <h:selectOneMenu value="#{filterCrud.currentFilter.groupOperator}">
       <f:selectItems value="#{filterCrud.filterOperators}"/>
       </h:selectOneMenu><br>
      
       <h:selectBooleanCheckbox value="#{filterCrud.levelFilterElement.inverse}"/>
       <h:outputText value="#{localization['general.negation']}"/>
       <h:selectOneMenu value="#{filterCrud.levelFilterElement.type}">
       <f:selectItems value="#{filterCrud.levelFilterTypes}"/>
       </h:selectOneMenu>
       <h:inputText value="#{filterCrud.levelFilterElement.sample}"/>
       </rich:panel>
      
       <rich:panel id="filterList">
       <f:facet name="header"><h:outputText value="#{localization['filter.list']}"/></f:facet>
       <rich:scrollableDataTable id="filterListTable" value="#{filterCrud.filters}" var="filter"
       selection="#{filterCrud.selection}" ajaxSingle="true">
       <rich:column>
       <f:facet name="header"><h:outputText value="#{localization['filter.name']}"/></f:facet>
       <h:outputText value="#{filter.name}"/>
       </rich:column>
       <rich:column>
       <f:facet name="header"><h:outputText value="#{localization['general.activity']}"/></f:facet>
       <h:outputText value="#{localization['general.active']}" rendered="#{filter.active}"/>
       <h:outputText value="#{localization['general.passive']}" rendered="#{!filter.active}"/>
       </rich:column>
       <rich:column>
       <f:facet name="header"><h:outputText value="#{localization['filter.usage']}"/></f:facet>
       <h:outputText value="#{filter.objectType}"/>
       </rich:column>
       </rich:scrollableDataTable>
       </rich:panel>
       <a4j:commandButton value="#{localization['general.clear']}" action="#{filterCrud.clear}" reRender="filters"/>
       <a4j:commandButton value="#{localization['filter.delete']}" action="#{filterCrud.delete}" reRender="filters"/>
       <a4j:commandButton value="#{localization['general.save']}" action="#{filterCrud.save}" reRender="navigation, filters"/>
      
      
       <%--<a4j:commandButton value="#{localization['general.cancel']}" action="#{filterCrud.cancel}" reRender="filters"/>
       <a4j:commandButton value="#{localization['filter.add']}" action="#{filterCrud.add}" reRender="filters"/>
      
       <%--TODO buttons--%>
       </h:form>
      
      </rich:panel>