2 Replies Latest reply on Oct 16, 2009 6:15 AM by Sascha Janz

    selection on extendeddatatable not working

    Sascha Janz Master

      i use an extendeddatatable like on demo page, but selection is not working.

      page is

      <?xml version="1.0" encoding="ISO-8859-15"?>
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html 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:rich="http://richfaces.org/rich"
       xmlns:a4j="http://richfaces.org/a4j"
       xmlns:s="http://jboss.com/products/seam/taglib">
      <head>
      <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
      
       </head>
       <body>
       <a4j:form id="mywfform" >
       <rich:extendedDataTable selectionMode="single" style="margin-left:10px;margin-right:10px;border:1px" value="#{Testtable.entries}" var="wf" id="wftbl" selection="#{Testtable.selection}"
       rows="18" cellpadding="0" cellspacing="0" width="1140px" >
       <rich:column id="rc4" style="text-align:left;" label="Art" >
       <f:facet name="header" >
       <h:outputText value="Wert" />
       </f:facet>
       <center> <h:outputText value="#{wf}" /></center>
       </rich:column>
      
      
       </rich:extendedDataTable>
      
      
       </a4j:form>
      
      
      </body>
      </html>
      
      
      



      bean

      package de.lorenz.soaworkflow.test;
      
      import java.util.ArrayList;
      
      import org.jboss.seam.annotations.Create;
      import org.jboss.seam.annotations.Name;
      
      @Name("Testtable")
      public class TestTable {
      
      
       ArrayList<String> entries=new ArrayList<String>();
      
       boolean isinit= false;
      
       public ArrayList<String> getEntries() {
       if ( isinit == false) init();
       return entries;
       }
      
       public void setEntries(ArrayList<String> entries) {
       this.entries = entries;
       }
      
      
       void init(){
       entries.add("Eintrag 1 ");
       entries.add("Eintrag 2 ");
       entries.add("Eintrag 3 ");
       entries.add("Eintrag 4 ");
       isinit = true;
       }
      
       String selection;
      
       public String getSelection() {
      
       return selection;
       }
      
       public void setSelection(String selection) {
       this.selection = selection;
       }
      
      }