1 Reply Latest reply on Jan 5, 2009 6:16 AM by Andrei Markavtsov

    rich:columns --- Could you help me?

    Josef Sin Newbie

      I need to manage M:N table where M and N are variables. I thought that rich:columns could help me, but I wasn't able to set up example from demos because of

      java.lang.IllegalStateException: Component ID j_id_jsp_433896525_1:columns:j_id_jsp_433896525_5 has already been found in the view.

      I'd like to create dataTable with following parameters:

      | rowTitle | column1 | column2 | ... |
      | rowTitle2 | column1 | column2 | ... |
      | rowTitle3 | column1 | column2 | ... |

      My solution was ArrayList of Rows where was title and next ArrayList which I wanted to print out using rich:columns. I don't need any header or footer, just data...

      jsp page:

      <rich:dataTable id="dataTable" value="#{mnAnswersBean.mnAnswer}" var="row">
       <rich:column id="title">
       <h:outputText value="#{row.title}" />
       <rich:columns id="columns" value="#{row.choices}" var="col">
       <h:outputText value="#{col}" />

      private List<MNAnswer> answers;

      MNAnswer class:
      private String title;
      private List<String> choices;

      Could anyone help me?