1 2 Previous Next 16 Replies Latest reply on Nov 29, 2010 7:10 AM by spiritfox26

    problem with dynamic id generation inside a4j:form

    spiritfox26

      I'm using rich:listShuttle to load a Configuration Item, when i load one CI this generate a list of dynamic attributes (input text, combobox, checkbox, etc.. the id components are generated via code). When they are generated for the first time, the attribute id's of a certain category (Pc for example) are correctly generated.
      However, when i try to load other CI for a different category (Printer for example) the shared attributes between the Pc and the Printer are created with the same id as before. But, the attributes that are not shared by the two categories, are generated correctly.

       

      The id is generated whit this pattern _TipoAtritubuto_idTipoAtributo_idCategoria.

       

      In example:

       

      PC (idCategoria = 10) have this attributtes name (idTipoAtributo = 1), code (idTipoAtributo = 2)  and operative system (idTipoAtributo = 3)

       

      Printer (idCategoria = 12) have this attributtes name (idTipoAtributo = 1), code (idTipoAtributo = 2)  and  description (idTipoAtributo = 4)

       

      When i load one PC the gerenerated id are:

       

      _TipoAtritubuto_1_10

      _TipoAtritubuto_2_10

      _TipoAtritubuto_3_10

       

      After load one PC i load a Printer and the generated id are:

       

      _TipoAtritubuto_1_10

      _TipoAtritubuto_2_10

      _TipoAtritubuto_4_12

       

      I'm attach te xhtml code in a code.txt

       

      Can someone help me with this? It is very important for me due to the fact that I am using the id attributes to obtain the values of the components to save.

       

      Thanks in advance
      Regards

        1 2 Previous Next