4 Replies Latest reply on Jul 8, 2007 10:05 AM by pmuir

    @DataModel problem

    jump

      I have a simple bean with DataModel and DataModelSelection

      @Stateful
      @Name("toolbar")
      @Scope(ScopeType.SESSION)
      public class ToolbarImpl implements Toolbar {
      
       ...................
      
       @DataModel
       public List<ProcessDefinition> getProcessDefinitions() {
       return processDefinitions;
       }
      
       @DataModelSelection("processDefinitions")
       private ProcessDefinition selectedProcess = null;
      
       public String createProcess() {
      
       System.out.println(selectedProcess + " process started");
       return null;
       }
      
      }
      

      And a simple page
      <rich:dataTable value="#{processDefinitions}" var="process">
       <rich:column>
       <h:commandLink value="#{process.description}" action="#{toolbar.createProcess}" style="font-size:14px">
       <h:graphicImage value="#{process.processIcon}" style="width:42px;height:42px;border:0" align="middle"/>
       </h:commandLink>
       </rich:column>
       </rich:dataTable>
      


      and a simple exception

      Caused by java.lang.IllegalArgumentException with message: "Could not invoke method by reflection: ToolbarImpl.getProcessDefinitions() with parameters: (java.util.ArrayList) on: virtprofstud.ToolbarImpl"