3 Replies Latest reply on Sep 17, 2008 9:02 AM by kukeltje

    gravel and j4j tags in datatable

    gnagy

      Hi,

      I tried borrowing code from the jbpm console for listing tasks and making transitions. I iterate over #{taskInstanceList} in a datatable (tried both h:datatable and rich:datatable), but the gravel and j4j tags don't pick up the iteration variable.


      <h:dataTable var="taskInstance" value="#{taskInstanceList}">
      <h:column>
      <f:facet name="header" >
      <h:outputText value="Deal info"/>
      </f:facet>
      <h:outputText value="#{taskInstance.variables['dealTask']}"/>
      </h:column>
      <h:column>
      <f:facet name="header" >
      <h:outputText value="State"/>
      </f:facet>
      <h:outputText value="#{taskInstance.task.parent.name}"/>
      </h:column>
      <h:column>
      <f:facet name="header" >
      <h:outputText value="Actions"/>
      </f:facet>
      <ga:responseActions>
      <gd:sort source="#{taskInstance.availableTransitions}" target="#{transitions}" entryVar="e" argument="#{e.name}"/>
      </ga:responseActions>
      < ul>
      <gd:repeat value="#{transitions}" var="transition">
      < li>
      <h:commandLink>
      <j4j:loadTask id="#{taskInstance.id}" target="#{j4jtask}"/>
      <j4j:completeTask task="#{j4jtask}" transition="#{transition.name}"/>
      #{transition.name}
      <n:nav outcome="success" redirect="true" storeMessages="true"/>
      <n:nav outcome="error" redirect="true" storeMessages="true"/>
      </h:commandLink>
      < /li>
      </gd:repeat>
      < /ul>
      </h:column>
      </h:dataTable>


      is rendered as:

      Deal info State Actions
      info1 Accepting Deal
      info2 Accepting Deal
      info3 Accepting Deal


      i.e. the Actions column is empty.

      Any ideas why gravel and j4j don't pick up #{transitions}? Note, it semi-works with ui:repeat, but then i have no chance to sort the set of transitions.

      Also, is it ok to post further gravel questions in the jbpm forum? Or do they belong elsewhere?

      Thanks,
      Greg
      b2international.com

        • 1. Re: gravel and j4j tags in datatable
          kukeltje

          Greg,

          j4j and gravel are soon to be anounced as 'deprecated'. Using default richfaces and maybe some seam extensions will become the default. So I suggest against learning j4j and gravel.

          • 2. Re: gravel and j4j tags in datatable
            jessicacao

            which components of richfaces can instead of gd:sort,i try to jbpm-console with richfaces now ,but i have trouble about it
            help me ,thanks a lot!

            • 3. Re: gravel and j4j tags in datatable
              kukeltje

              gd sort in combination with richfaces could be used (if they work together), but how to use them is up to you. Gravel itself is not deprecated or something, it is just that the jBPM folks are not going to use it anymore.

              Most likely not the answer you were looking for, but for the moment the best I can give you