Hi,
I have a pageflow that defines three edit pages: <page id="edit-1" path-info="..." view="..." default-submission="..."> <setvalue parameter="field-on-page1" ref="/form/edit-1/field-on-page1"/> <setvalue parameter="field-on-page2" ref="/form/edit-2/field-on-page2"/> <setvalue parameter="field-on-page3" ref="/form/edit-3//field-on-page3"/> <action ... next/> </page> <page id="edit-2" path-info="..." view="..." default-submission="..."> <action ... goto edit-1/> <action ... next/> </page> <page id="edit-3" path-info="..." view="..." default-submission="..."> <action ... goto edit-1/> <action ... goto edit-2/> <action ... next/> </page> This allows prefilling using url parameters when starting the form. However, when I don't fill in the field on edit-page 1, go to edit-page 2 and then go back to edit-page 1, I get an exception from NetUtils#decodeQueryString: Malformed URL: %24instance=X2ztn[...]Aqjf0A%3D&field-on-page1=&field-on-page2=&field-on-page3= The reason for this exception seems to be that Orbeon adds unescaped url parameters to the url with empty values. This exception doesn't happen when going from edit-page 3 to edit-page 2, so it seems that the bug is triggered by a xforms:send to a page with setvalue's. Weirdly enough, this works (except that it obviously doesn't prefill the fields for later edit-pages): <page id="edit-1" path-info="..." view="..." default-submission="..."> <setvalue parameter="field-on-page1" ref="/form/edit-1/field-on-page1"/> <action ... next/> </page> I don't understand why it would matter if I do a setvalue for a field from the second or third edit-page. Is this a bug or am I using Orbeon incorrectly? Regards, Wouter Zelle -- 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 |
Administrator
|
Wouter,
It is hard to see exactly what is going on without being able to run the code. Could you create a minimal "app" that we can use to reproduce this? I.e. a few files that you put in your own directory under apps and that we can just put in our environment to reproduce this. Alex |
Hi Alessandro,
I've attached a small app with two edit-steps and a view-page. There are two street fields, called "street" for edit-page 1 and "street2" for edit-page 2, that can be prefilled. There are also two housenr fields that cannot be prefilled. Test1: - Goto /orbeon/address/?street=a&street2=b - Click on Next until you get to the summary page - Click on Previous until you get back to the first page > This works perfectly Test2: - Goto /orbeon/address/?street2=b - Click on Next until you get to the summary page - Click on Previous until you get back to the first page > This crashes when going back to the first page Test3: - Goto /orbeon/address/?street=a - Click on Next until you get to the summary page - Click on Previous until you get back to the first page > Strangely enough, this works perfectly Wouter On Fri, Jun 12, 2009 at 01:55, Alessandro Vernet <[hidden email]> wrote:
-- 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 address.zip (4K) Download Attachment |
Administrator
|
Wouter,
Thank you for the test case! I'll investigate this as soon as I get an chance and get back to you here (if someone doesn't respond to you before that). Alex |
Alex,
I managed to get prefilling to work by doing it in the view. On the xforms-model-construct-done event, I do xforms:setvalue's to do prefilling. However, I'm still interested in knowing why it won't work correctly in the pageflow. Regards, Wouter Zelle On Fri, Jun 19, 2009 at 02:22, Alessandro Vernet <[hidden email]> wrote:
-- 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 |
Free forum by Nabble | Edit this page |