[jboss-user] [JBoss jBPM] - Re: Signal a task on a html form submit
cahimoped
do-not-reply at jboss.com
Wed May 30 04:06:41 EDT 2007
I just solved my problem. I was trying to get my taskInstance to be signaled with code when I thought about another solution :
I don't put a dataform inside my form but the form inside my dataform. This way the default transition button can still work and I just have to put some javascript on it like that :
<jbpm:dataform>
| <f:facet name="header">
| Envoyer un fichier local
| </f:facet>
| <jbpm:datacell>
| <f:facet name="header">
| Selectionnez le fichier a envoyer :
| </f:facet>
| <form name="uploadFile" enctype="multipart/form-data" method="POST" action="uploadSuivi">
| <input class="file" type="file" name="suiviXLS"/>
| <input class="text" type="hidden" name="nomProjet" value="#{var['nomProjet']}"/>
| </form>
| </jbpm:datacell>
|
| <jbpm:datacell>
| <f:facet name="header">
| <h:outputText value="Actions"/>
| </f:facet>
| <tf:transitionButton transition="OK" value="Envoyer" onclick="document.forms['uploadFile'].submit();"/>
| </jbpm:datacell>
| </jbpm:dataform>
It works well, my task is validated, the next task is created, my servlet is called and my file saved... I'm happy but I'm feeling very stupid to think about that so late. I knew this should be easy :)
Btw I think a little more documentation must be written on EL (some examples would be great) and since jBPM JSF tags are still here in the new admin console and usable from jBPM and JSF users, I think they deserve a little Javadoc like the official JSF one : http://java.sun.com/javaee/javaserverfaces/1.2_MR1/docs/tlddocs/index.html.
That's absolutly not a urgent task... but it would help...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4049612#4049612
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4049612
More information about the jboss-user
mailing list