3 Replies Latest reply on Nov 2, 2008 12:19 PM by Nick Belaevski

    Rerender OrderingList problem

    marcus sim Newbie

      Hi,

      I have problem with orderinglist component when trying to rerender the component by clicking a button. When I put the orderinglist component in a page and click the rerender button, the action does not get executed and throw error Property 'commandName' not found on type java.lang.String.


      The page code is as below:

      <a4j:commandButton id="addcmd" value="#{messageSource.moduledef_add_installationinstruction}" action="#{createQasPage.addToList}" reRender="orderingList"/>
      
       <a4j:outputPanel id="orderingList">
       <rich:orderingList id="orderList" value="#{createQas.qasList}" var="installinslist" listHeight="300" listWidth="350">
       <rich:column width="180">
       <f:facet name="header">
       <h:outputText value="#{messageSource.installationinstruction_commandname}"/>
       </f:facet>
       <h:outputText id="commandname" value="#{installinslist}">
       </h:outputText>
       </rich:column>
      
       </rich:orderingList>
       </a4j:outputPanel>
      


      The class code is
       public List<QASVersionModuleDefInstallInstructionDTO> getQasVersionModuleDefInstallInstructionDtoList() {
       qasMVDI.setCommandName("comsat");
       qasMVDI.setCommandLine("liner");
       this.qasVersionModuleDefInstallInstructionDtoList.add(qasMVDI);
       qasMVDI = new QASVersionModuleDefInstallInstructionDTO();
       qasMVDI.setCommandName("comsat2");
       qasMVDI.setCommandLine("liner2");
       this.qasVersionModuleDefInstallInstructionDtoList.add(qasMVDI);
       qasMVDI = new QASVersionModuleDefInstallInstructionDTO();
       qasMVDI.setCommandName("comsat3");
       qasMVDI.setCommandLine("liner3");
       this.qasVersionModuleDefInstallInstructionDtoList.add(qasMVDI);
       return this.qasVersionModuleDefInstallInstructionDtoList;
       }
      
       public String addToList() {
       System.out.println("addToList123123123");
      
       return null;
       }
      


      I tried using converter and end up getting error:
      java.lang.String cannot be cast to com.quintiq.tiger.api.dto.QASDTO

      Please give some tips. Thanks.