Migration to 3.0

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

Migration to 3.0

Taras Bahnyuk

I'm in the process of migration to 3.0,
And I'm experiencing certain difficulties with understanding new submit mechanism.

For instance, In Xform I have something like:

  <xForms:submit>
         <xForms:label>Submit</xForms:label>
             <xForms:setvalue ref="/form/document/pcs:PCS/background/attachment/@id">
                <xsl:value-of select="
/form/attachmentList/attachment/@id"/>
             </xforms:setvalue>  
             <xforms:setvalue ref="/form/action">save</xforms:setvalue>
  </xforms:submit>

And in pageflow:

  <action when="/form/action = 'save'   action="../PCSentry_DEV/detail/save-document-action.xpl">
       <result page="summary_DEV">
                .....

        </result>
  </action>

After :

I add the following line to my model:
<xforms:submission id="main-submission" method="post" ref="instance('main-instance')" action="xforms-upload" encoding="multipart/form-data"/>

And change the xform into:

<xforms:trigger>
    <xforms:label>Submit
</xforms:label>
    <xforms:action ev:event="DOMActivate"
>
    <xforms:recalculate model="main-model"
/>
    <xforms:send submission="main-submission"
/>
    </xforms:action>
</xforms:trigger>

And I'm getting nothing in return. I press "Submit" button and nothing happens, of course.
My problem is, that I don't exactly understand what I am doing, simply copying code from different examples has lead me nowhere so far.

Kind regards,

-Taras


--
The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt.



--
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: Migration to 3.0

Taras Bahnyuk
Ok, after few random changes and reloads I have achieved obvious progress.
Now my form gives me a
XForms error: null, line 1, column 621: nullnull
error upon submission :-)
 


From: Taras Bahnyuk [mailto:[hidden email]]
Sent: vrijdag 17 februari 2006 15:06
To: [hidden email]
Subject: [ops-users] Migration to 3.0

I'm in the process of migration to 3.0,
And I'm experiencing certain difficulties with understanding new submit mechanism.

For instance, In Xform I have something like:

  <xForms:submit>
         <xForms:label>Submit</xForms:label>
             <xForms:setvalue ref="/form/document/pcs:PCS/background/attachment/@id">
                <xsl:value-of select="
/form/attachmentList/attachment/@id"/>
             </xforms:setvalue>  
             <xforms:setvalue ref="/form/action">save</xforms:setvalue>
  </xforms:submit>

And in pageflow:

  <action when="/form/action = 'save'   action="../PCSentry_DEV/detail/save-document-action.xpl">
       <result page="summary_DEV">
                .....

        </result>
  </action>

After :

I add the following line to my model:
<xforms:submission id="main-submission" method="post" ref="instance('main-instance')" action="xforms-upload" encoding="multipart/form-data"/>

And change the xform into:

<xforms:trigger>
    <xforms:label>Submit
</xforms:label>
    <xforms:action ev:event="DOMActivate"
>
    <xforms:recalculate model="main-model"
/>
    <xforms:send submission="main-submission"
/>
    </xforms:action>
</xforms:trigger>

And I'm getting nothing in return. I press "Submit" button and nothing happens, of course.
My problem is, that I don't exactly understand what I am doing, simply copying code from different examples has lead me nowhere so far.

Kind regards,

-Taras


--
The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt.


--
The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt.



--
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: Migration to 3.0

Erik Bruchez
Administrator
In reply to this post by Taras Bahnyuk
Taras Bahnyuk wrote:
 > I'm in the process of migration to 3.0,
 > And I'm experiencing certain difficulties with understanding new submit
 > mechanism.
 >
 > For instance, In Xform I have something like:
 >
 >   <xForms:submit>
 >          <xForms:label>Submit</xForms:label>
 >              <xForms:setvalue
 > ref="/form/document/pcs:PCS/background/attachment/@id">
 >                 <xsl:value-of
select="/form/attachmentList/attachment/@id"/>
 >              </xforms:setvalue>
 >              <xforms:setvalue ref="/form/action">save</xforms:setvalue>
 >   </xforms:submit>
 >
 > And in pageflow:
 >
 >   <action when="/form/action = 'save'
 > action="../PCSentry_DEV/detail/save-document-action.xpl">
 >        <result page="summary_DEV">
 >                 .....
 >
 >         </result>
 >   </action>
 >
 > After :
 >
 > I add the following line to my model:
 > <xforms:submission id="main-submission" method="post"
 > ref="instance('main-instance')" action="xforms-upload"
 > encoding="multipart/form-data"/>

 > And change the xform into:
 >
 > <xforms:trigger>
 >     <xforms:label>Submit</xforms:label>
 >     <xforms:action ev:event="DOMActivate">
 >     <xforms:recalculate model="main-model"/>
 >     <xforms:send submission="main-submission"/>
 >     </xforms:action>
 > </xforms:trigger>
 >
 > And I'm getting nothing in return. I press "Submit" button and nothing
 > happens, of course.
 > My problem is, that I don't exactly understand what I am doing, simply
 > copying code from different examples has lead me nowhere so far.


Here, it is important to understand what the "action" attribute means
on <xforms:submission>:

o That attribute is a URL (which may be relative).

o It is resolved according to xml:base attributes in the XForms page,
   if you have any, or (which is the usual case) to the *request*
   URL. E.g., if you access your page with:

   http://localhost:8888/ops/myapp/mypage

   you get as resolved action with the above:

   http://localhost:8888/ops/myapp/xforms-upload

o The resulting URL is used to perform a request. If the URL points to
   paths handled by OPS, your page flow must correctly handle the
   associated path. In this case, the path would be:

   /myapp/xforms-upload

So you must answer first the question: will that path do anything with
your current page flow?

Now you are of course 100% right in one aspect: the errors you are
getting are less than helpful. We are currently thinking about how we
can improve the developer's experience by providing an XForms console,
that would log events, allow you to visualize XForms intances and
MIPs, steps of submission, etc.

For now, there is a little bit of guess work required. Note that for
debugging, you can enable some XForms tracing in log4j.xml by
uncommenting the following:

     <category name="org.orbeon.oxf.xforms.processor.XFormsServer">
         <priority value="debug"/>
     </category>

In the case of submissions, you can also look in the logs at whether
there is a request made on OPS as a result of the submission. You can
also, under the <xforms:submission> element, place event handlers for
xforms-submit-error and xforms-submit-done, and use <xforms:message>
to display a different message in both cases, so that at leat you know
whether from the XForms engine's point of view the submission
succeeded or failed.

I hope this helps,

-Erik




--
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