3 Replies Latest reply on Sep 17, 2008 9:02 AM by Ronald van Kuijk

    gravel and j4j tags in datatable

    Gergely Nagy Newbie


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

      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?