Hi,
I have two forms. The main form has many instances that are loaded from a servlet via posted attributes. That form has some button named 'edit' in a Grid. When we click in one of them a submission is made to the second form (editForm) with the instance data to be edited. After editing we click in ok button that does a submission to the main form but when that is done I loose all the instances first loaded in the frst page. How can I keep them? In the Session? Or can I pass many instances from form to form? Passing them all would be the best for me. This is some of the code of the main page: <xforms:submission ref="instance('form-to-send')" id="edit-submission" method="post" resource="/fr/dep/form2/new" replace="all"/> <xforms:instance id="form-to-send"> <form/> </xforms:instance> <xforms:instance id="fr-form-instance" src="input:instance" > <form/> </xforms:instance> <xforms:instance id="list_paper"> <root/> </xforms:instance> <xforms:instance id="form-dados-externos"> <root/> </xforms:instance> <xforms:action ev:event="xforms-model-construct-done"> <xforms:insert nodeset="instance('list_paper')" origin="xxforms:get-request-attribute('list_paper')"/> <xforms:insert nodeset="instance('form-dados-externos')" origin="xxforms:get-request-attribute('form-dados-externos')"/> </xforms:action> And this is some of the code of the editForm: <xforms:submission id="previous-submission" resource="/fr/dep/form1/new" method="post" ref="instance('form-dados-externos')"/> <xforms:instance id="list_paper" src="input:instance"> <root/> </xforms:instance> <xforms:instance id="form-dados-externos" src="input:instance"> <root/> </xforms:instance> <xforms:instance id="fr-form-instance" src="input:instance"> Using the inspector I can see that in the second form the instances o the main form are not loaded. What can I do? Henrique Barros |
Administrator
|
It's usually frowned upon to use the session because doing it right
(e.g. support a workflow with multiple browser tabs/windows) is pretty hard. And unfortunately there is no simple mechanism to pass multiple instances from form to form (some kind of multipart POST could be implemented to submit and read multiple instances but that's not there at this point).One instance is ok though: just post it to the other form. What you could try to do is aggregate all your instances under a single root element, then post them. -Erik On Fri, Oct 26, 2012 at 3:43 AM, Henrique Barros <[hidden email]> wrote: > Hi, > > I have two forms. The main form has many instances that are loaded from a > servlet via posted attributes. > That form has some button named 'edit' in a Grid. When we click in one of > them a submission is made to the second form (editForm) with the instance > data to be edited. > > After editing we click in ok button that does a submission to the main form > but when that is done I loose all the instances first loaded in the frst > page. How can I keep them? In the Session? Or can I pass many instances from > form to form? Passing them all would be the best for me. This is some of the > code of the main page: > > /<xforms:submission ref="instance('form-to-send')" id="edit-submission" > method="post" resource="/fr/dep/form2/new" replace="all"/> > > <xforms:instance id="form-to-send"> > <form/> > </xforms:instance> > <xforms:instance id="fr-form-instance" src="input:instance" > > <form/> > </xforms:instance> > <xforms:instance id="list_paper"> > <root/> > </xforms:instance> > > <xforms:instance id="form-dados-externos"> > <root/> > </xforms:instance> > > > <xforms:action ev:event="xforms-model-construct-done"> > <xforms:insert > nodeset="instance('list_paper')" > origin="xxforms:get-request-attribute('list_paper')"/> > <xforms:insert > nodeset="instance('form-dados-externos')" > > origin="xxforms:get-request-attribute('form-dados-externos')"/> > </xforms:action>/ > > > And this is some of the code of the editForm: > > /<xforms:submission id="previous-submission" resource="/fr/dep/form1/new" > method="post" ref="instance('form-dados-externos')"/> > > <xforms:instance id="list_paper" src="input:instance"> > <root/> > </xforms:instance> > > <xforms:instance id="form-dados-externos" src="input:instance"> > <root/> > </xforms:instance> > > <xforms:instance id="fr-form-instance" src="input:instance">/ > > Using the inspector I can see that in the second form the instances o the > main form are not loaded. > What can I do? > > Henrique Barros > > > > > -- > View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Form-to-Form-lose-instances-tp4655921.html > Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com. > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
In reply to this post by Henrique Barros
Hi Henrique. -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Hi,
Thank you all for your solutions. Yes I figured out that it's not possible to send multiple, I tested agregating all in one and it worked. But now I'm using Sessions like this: "nameSession_documentUuid" And I pass the uuid in the main instance from form to form in order to get the other instances via session. This way all sessions are unique, I guess, and I can use more than one form at the same time. Henrique Barros |
Free forum by Nabble | Edit this page |