xforms-submission-path property in property.xml

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

xforms-submission-path property in property.xml

Alan Skorkin
xforms-submission-path property in property.xml

Hello,
I'm trying to change the submission URL of Orbeon from "/xforms-server-submit" to "/forms/xforms-server-submit". I found the xforms-submission-path property in Orbeon's property.xml file,

and changed its value to "/forms/xforms-server-submit". This change was not reflected in the action attribute of the form node in the html page. Clicking submit produced an error with the message:

Condition failed for every branch of choose: [(/request/request-path = '/forms/xforms-server-submit'), (/request/request-path = '/forms/templates'), (/request/request-path = '/forms/templates/page1'), (/request/request-path = '/forms/templates/page2'), (/request/request-path = '/forms/templates/print'), (/request/request-path = '/forms/templates/submitPage'), (/request/request-path = '/forms/templates/saveDraft'), (/request/request-path = '/forms/templates/viewFile')]

What does this property do, and is it possible to change the submission URL?
Cheers,
Mike



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: xforms-submission-path property in property.xml

Adrian Baker-2
Currently this property is ignored: the submission URL is hardcoded in the generated HTML.

XHTMLBodyHandler needs to be changed from

        helper.startElement(prefix, XMLConstants.XHTML_NAMESPACE_URI, "form", new String[]{
                "id", "xforms-form", "class", "xforms-form",
                "action", "/xforms-server-submit", "method", "POST", "onsubmit", "return false",
                hasUpload ? "enctype" : null, hasUpload ? "multipart/form-data" : null});

to

        final String xformsServerUrl = OXFProperties.instance().getPropertySet(
                new QName("page-flow",XMLConstants.OXF_PROCESSORS_NAMESPACE)).getString(
                        PageFlowControllerProcessor.XFORMS_SUBMISSION_PATH_PROPERTY_NAME, "/xforms-server-submit");
       
        helper.startElement(prefix, XMLConstants.XHTML_NAMESPACE_URI, "form", new String[]{
                "id", "xforms-form", "class", "xforms-form",
                "action", xformsServerUrl, "method", "POST", "onsubmit", "return false",
                hasUpload ? "enctype" : null, hasUpload ? "multipart/form-data" : null});




Alan Skorkin wrote:
xforms-submission-path property in property.xml

Hello,
I'm trying to change the submission URL of Orbeon from "/xforms-server-submit" to "/forms/xforms-server-submit". I found the xforms-submission-path property in Orbeon's property.xml file,

and changed its value to "/forms/xforms-server-submit". This change was not reflected in the action attribute of the form node in the html page. Clicking submit produced an error with the message:

Condition failed for every branch of choose: [(/request/request-path = '/forms/xforms-server-submit'), (/request/request-path = '/forms/templates'), (/request/request-path = '/forms/templates/page1'), (/request/request-path = '/forms/templates/page2'), (/request/request-path = '/forms/templates/print'), (/request/request-path = '/forms/templates/submitPage'), (/request/request-path = '/forms/templates/saveDraft'), (/request/request-path = '/forms/templates/viewFile')]

What does this property do, and is it possible to change the submission URL?
Cheers,
Mike


-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] ObjectWeb mailing lists service home page: http://www.objectweb.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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: xforms-submission-path property in property.xml

Erik Bruchez
Administrator
Adrian,

This patch makes sense. I have included the patch and checked it
in. This should appear in the nightlies soon.

Thanks!

-Erik

Adrian Baker wrote:
 > Currently this property is ignored: the submission URL is hardcoded in
 > the generated HTML.
 >
 > XHTMLBodyHandler needs to be changed from
 >
 >         helper.startElement(prefix, XMLConstants.XHTML_NAMESPACE_URI,
 > "form", new String[]{
 >                 "id", "xforms-form", "class", "xforms-form",
 >                 "action", "/xforms-server-submit", "method", "POST",
 > "onsubmit", "return false",
 >                 hasUpload ? "enctype" : null, hasUpload ?
 > "multipart/form-data" : null});
 >
 > to
 >
 >         final String xformsServerUrl =
 > OXFProperties.instance().getPropertySet(
 >                 new
 > QName("page-flow",XMLConstants.OXF_PROCESSORS_NAMESPACE)).getString(
 >
 > PageFlowControllerProcessor.XFORMS_SUBMISSION_PATH_PROPERTY_NAME,
 > "/xforms-server-submit");
 >
 >         helper.startElement(prefix, XMLConstants.XHTML_NAMESPACE_URI,
 > "form", new String[]{
 >                 "id", "xforms-form", "class", "xforms-form",
 >                 "action", xformsServerUrl, "method", "POST", "onsubmit",
 > "return false",
 >                 hasUpload ? "enctype" : null, hasUpload ?
 > "multipart/form-data" : null});
 >
 >
 >
 >
 > Alan Skorkin wrote:
 >>
 >> Hello,
 >> I'm trying to change the submission URL of Orbeon from
 >> "/xforms-server-submit" to "/forms/xforms-server-submit". I found the
 >> xforms-submission-path property in Orbeon's property.xml file,
 >>
 >> and changed its value to "/forms/xforms-server-submit". This change
 >> was not reflected in the action attribute of the form node in the html
 >> page. Clicking submit produced an error with the message:
 >>
 >> Condition failed for every branch of choose:* [(/request/request-path
 >> = '/forms/xforms-server-submit'*), (/request/request-path =
 >> '/forms/templates'), (/request/request-path =
 >> '/forms/templates/page1'), (/request/request-path =
 >> '/forms/templates/page2'), (/request/request-path =
 >> '/forms/templates/print'), (/request/request-path =
 >> '/forms/templates/submitPage'), (/request/request-path =
 >> '/forms/templates/saveDraft'), (/request/request-path =
 >> '/forms/templates/viewFile')]
 >>
 >> What does this property do, and is it possible to change the
 >> submission URL?
 >> Cheers,
 >> Mike

--
Orbeon - XForms Everywhere: http://www.orbeon.com/blog/



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws