[jboss-user] [JBoss jBPM] - Probleme with update field
turpin_vincent
do-not-reply at jboss.com
Thu Mar 26 09:10:12 EDT 2009
hi,
I'm using JBPM in seam 2.1.1
I' trying to update value in a datatable from an input text, but i've got a probleme. In fact i've got an entity called "sinstre" witch is scoped like that:
@In(scope = ScopeType.BUSINESS_PROCESS, required = false)
| @Out(scope = ScopeType.BUSINESS_PROCESS, required = false)
| private Sinistre sinistre;
In my XHTML page, ive got a Form:
| <h:form id="InfosVoiture">
|
| <h:outputText value="Il n'y a pas de sinistre a renseigner pour le moment" rendered="#{empty taskInstancePriorityList}"/>
|
| <rich:panel>
| <f:facet name="header">Lsite des sinistre comportant une partie materiel </f:facet>
| <h:dataTable value="#{taskInstancePriorityList}"
| var="task" rendered="#{not empty taskInstancePriorityList}"
| bgcolor="#F1F1F1" border="10">
|
| <h:column>
| <f:facet name="header">
| <h:outputText value="Creation"/>
| </f:facet>
| <h:outputText value="#{task.taskMgmtInstance.processInstance.start}">
| <s:convertDateTime type="date"/>
| </h:outputText>
| </h:column>
|
| <h:column>
| <f:facet name="header">
| <h:outputText value="Employe"/>
| </f:facet>
| <h:outputText value="#{task.actorId}"/> <br />
| </h:column> $
| <h:column>
| <f:facet name="header">
| <h:outputText value="task"/>
| </f:facet>
| <h:outputText value="#{task.name}"/> <br />
| </h:column>
| <h:column>
| <f:facet name="header">
| <h:outputText value="Id du sinistre" />
| </f:facet>
| <h:outputText value="#{task.variables['sinistre'].idSinistre}" /> <br />
| </h:column>
| <h:column>
| <f:facet name="header">
| <h:outputText value="Nom du client"/>
| </f:facet>
| <h:outputText value="#{task.variables['sinistre'].nomClient}" /> <br />
| </h:column>
| <h:column>
| <f:facet name="header">
| <h:outputText value="Prenom du client"/>
| </f:facet>
| <h:outputText value="#{task.variables['sinistre'].prenomClient}"/> <br />
| </h:column>
| <h:column>
| <f:facet name="header">
| <h:outputText value="Corporel"/>
| </f:facet>
| <h:outputText value="#{task.variables['sinistre'].sinistreCorporel}"/> <br />
| </h:column>
| <h:column>
| <f:facet name="header">
| <h:outputText value="Materiel"/>
| </f:facet>
| <h:outputText value="#{task.variables['sinistre'].sinistreMateriel}"/> <br />
| </h:column>
|
| <h:column>
| <f:facet name="header">
| <h:outputText value="Voiture task"/>
| </f:facet>
| <h:outputText value="#{task.variables['sinistre'].typeVoiture}"/> <br />
| </h:column>
|
| <h:column>
| <f:facet name="header">
| <h:outputText value="Voiture"/>
| </f:facet>
| <h:outputText value="#{Saisie_1.sinistre.typeVoiture}"/> <br />
| </h:column>
|
| <h:column>
| <f:facet name="header">
| <h:outputText value="type de Voiture"/>
| </f:facet>
| <h:inputText id="typeVoiture" value="#{Saisie_1.sinistre.typeVoiture}"/>
| </h:column>
|
| <h:column>
| <f:facet name="header">
| <h:outputText value="type de Voiture task"/>
| </f:facet>
| <h:inputText id="typeVoitureTask" value="#{task.variables['sinistre'].typeVoiture}"/>
| </h:column>
|
| <h:column>
| <s:button action="#{Saisie_1.test}" taskInstance="#{task}" value="autoriser modif" />
| </h:column>
|
| <h:column>
| <s:button action="updated" taskInstance="#{task}" value="update" />
| </h:column>
|
| <h:column>
| <s:button value="ajouter" taskInstance="#{task}" action="#{Saisie_1.Ajout_Mat(Saisie_1.sinistre.typeVoiture)}">
| </s:button>
| </h:column>
| <h:column>
| <s:button value="afficher" taskInstance="#{task}" action="#{Saisie_1.AfficherVariables}">
| </s:button>
| </h:column>
|
| </h:dataTable>
| <div>
| <h:commandButton value="Mise a jour des champs" action="update" rendered="#{not empty taskInstanceList}"/>
| </div>
I tried many way to update a value in my entity from an input text in the datatable. the only way i find (with done what i want) is starting a task with a button, then use a <h:commandButton value="Mise a jour des champs" action="update" rendered="#{not empty taskInstanceList}"/> and then use an other button to end the task (and merge the value in an other database but that's not the actual probleme).But it's a very ugly way.
So can someone tell me how can i do that in a better way and if i sould use a s:button or something like that.
BTW, i know that in my XHTML file there is many useless field but i use it in order test some ways and see many thing.
thx by advance
In addition i would like to know how i can start a task automatically when it's created, i try with:
<task-node name="Saisie_materiel">
| <task name="RemplirMat">
| <event type="task-create">
| <action>Saisir_1.test</action>
| </event>
| <assignment actor-id="#{actor.id}"/>
| </task>
| <transition to="join" name="toJoin2"></transition>
| </task-node>
but it dont seem to work
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4221287#4221287
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4221287
More information about the jboss-user
mailing list