1. I am having some trouble with xforms attributes and the link submit type..
<td valign="top"> <xforms:submit xxforms:appearance="link"> <xforms:caption>Annotate</xforms:caption> <xxforms:set ref="photos/@selection" value="1"/> <xxforms:set ref="action" value="annotate"/> </xforms:submit> </td>
I find that the xforms input is giving me "Cannot map multiple values to an attribute". I want the xxforms:set to overwrite the @selection rather than try and append to it.
Actually I seem to encounter the same problem trying to update any form with an attribute a second time. At least with a POST submission method.
1) To test this, I modified the XForms Submit example, and I could not reproduce the error you are mentioning.
I added a "value" attribute to "taste" element in xforms.xml, changed the <xxforms:hidden> to <xxforms:hidden ref="taste/@value"/>, and changed the <xxforms:set> to <xxforms:set ref="taste/@value" value="strawberry"/>.
Are you sure you don't have multiple <xxforms:hidden>, or other XForms control, with the same ref expression? That would account for the error message you are getting.
2. Nested <xform:group> elements would be quite useful in larger, more complex xforms.
2) Definitely. I added an entry to Bugzilla, so we don't loose track of this:
http://www.orbeon.com/webtools/bugzilla/show_bug.cgi?id=1441
3. Is there a way to avoid the URL getting really long during redirects? I am afraid of hitting the GET limit if my instance contains too much data.
Even when I change submission method to POST it doesn't help because action redirects seem to add the whole photos-list xforms instance into the URL string. eg.
<page path-info="/photos/"> <action> <result page="photos-list"/> </action> </page>
Is this necessary? If so how about encoding it as a hidden form field. eg. The developer needs to add <xxforms:hidden-state/> variable to the photos-list page?
3) If you use namespaces in your XForms instance, the URL becomes very long, much longer than it really needs to. Future versions of OXF will solve this particular issue. Is this your case?
If you are not using namespaces, it means that you have quite a few XForms element on the page, which of course should not be a problem. Just like you mentioned, as long as you stay on the same page, you get around the GET limit by doing a POST.
When going from page A to page B, a forward will happen. But maybe you don't need to pass all the content of the instance to page B? In this case you can use XUpdate in the controller.xml to build the XForms instance for B.
Otherwise you will have to resort to some other manual mechanism, like having A store the instance in the session, and B reading it from the session. In future versions of OXF, we are planning to support forwarding in addition to redirecting, which will solve this issue.
You suggest that the user encodes the content of the instance using a <xxforms:hidden-state/> element? What do you mean exactly?
Alex
_______________________________________________ oxf-users mailing list [EMAIL PROTECTED] http://mail.orbeon.com/mailman/listinfo/oxf-users
