Quantcast

ops3 - xforms. submission result

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

ops3 - xforms. submission result

ampatspell
Hello,
I'm trying to get familiar with OPS3 XForms NG.
One of my first questions i couldn't find the answer anywhere in examples
is:

I have xforms instance, i have submission for it. the submission calls xpl
what returns result (using xml-serializer).
the result is instance with filled previously empty <result/> element with
<status/> and possibly with <error/> elements.
how access those result values?  i want to show the result and/or set the
<xforms:toggle case="success"/> (if submission is successfull)..

in ops2.8 i had something simlar to this:
if /result/status = 'success' then show some chunk of xhtml etc.. otherwise
show other

best,
Arnis




--
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
|  
Report Content as Inappropriate

Re: ops3 - xforms. submission result

Erik Bruchez
Administrator
ampatspell. wrote:
 > Hello,
 > I'm trying to get familiar with OPS3 XForms NG.
 > One of my first questions i couldn't find the answer anywhere in
 > examples is:
 >
 > I have xforms instance, i have submission for it. the submission calls
 > xpl what returns result (using xml-serializer).
 > the result is instance with filled previously empty <result/> element
 > with <status/> and possibly with <error/> elements.
 > how access those result values?  i want to show the result and/or set
 > the <xforms:toggle case="success"/> (if submission is successfull)..

Check for example the XForms Translate example. It has the following
submission:

<xforms:submission ref="instance('instance')" id="default-submission"
     method="post" action="/direct/xforms-translate/post"
replace="instance"/>

The replace="instance" attribute means that the result of the
submission will be used to entirely replace the instance which is
submitted.

In the latest builds, you can now also use the attribute
instance="my-instance-id" to specify that the returned XML data must
be stored in a particular instance (this feature was absent from the
initial XForms 1.0 spec but is now specified in the latest XForms 1.0
errata document). This is now implemented in OPS (post-3.0 beta).

This mechanism allows you to use one instance containing an XML
request, and another instance receiving the XML response from an XML
service.

 > in ops2.8 i had something simlar to this:
 > if /result/status = 'success' then show some chunk of xhtml etc..
 > otherwise show other

You can use XForms controls to display data from the resulting
instance, like the XForms Translate example. Check also the XForms
Controls example for an example of how you can

-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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ops3 - xforms. submission result

ampatspell
Thank you for the reply!
The instance attribute for submission was what i had looked for. it seems, i
was too sleepy that i didn't saw it in XForms spec.. sorry.

best,
Arnis

----- Original Message -----
From: "Erik Bruchez" <[hidden email]>
To: <[hidden email]>
Sent: Monday, August 01, 2005 8:29 PM
Subject: Re: [ops-users] ops3 - xforms. submission result


> ampatspell. wrote:
> > Hello,
> > I'm trying to get familiar with OPS3 XForms NG.
> > One of my first questions i couldn't find the answer anywhere in
> > examples is:
> >
> > I have xforms instance, i have submission for it. the submission calls
> > xpl what returns result (using xml-serializer).
> > the result is instance with filled previously empty <result/> element
> > with <status/> and possibly with <error/> elements.
> > how access those result values?  i want to show the result and/or set
> > the <xforms:toggle case="success"/> (if submission is successfull)..
>
> Check for example the XForms Translate example. It has the following
> submission:
>
> <xforms:submission ref="instance('instance')" id="default-submission"
>     method="post" action="/direct/xforms-translate/post"
> replace="instance"/>
>
> The replace="instance" attribute means that the result of the
> submission will be used to entirely replace the instance which is
> submitted.
>
> In the latest builds, you can now also use the attribute
> instance="my-instance-id" to specify that the returned XML data must
> be stored in a particular instance (this feature was absent from the
> initial XForms 1.0 spec but is now specified in the latest XForms 1.0
> errata document). This is now implemented in OPS (post-3.0 beta).
>
> This mechanism allows you to use one instance containing an XML
> request, and another instance receiving the XML response from an XML
> service.
>
> > in ops2.8 i had something simlar to this:
> > if /result/status = 'success' then show some chunk of xhtml etc..
> > otherwise show other
>
> You can use XForms controls to display data from the resulting
> instance, like the XForms Translate example. Check also the XForms
> Controls example for an example of how you can
>
> -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
>




--
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
|  
Report Content as Inappropriate

Re: ops3 - xforms. submission result

Erik Bruchez
Administrator
FYI this attribute was added to the errata recently:

   http://www.w3.org/2003/10/REC-xforms-10-20031014-errata.html#E69a

-Erik

ampatspell. wrote:

> Thank you for the reply!
> The instance attribute for submission was what i had looked for. it
> seems, i was too sleepy that i didn't saw it in XForms spec.. sorry.
>
> best,
> Arnis
>
> ----- Original Message ----- From: "Erik Bruchez" <[hidden email]>
> To: <[hidden email]>
> Sent: Monday, August 01, 2005 8:29 PM
> Subject: Re: [ops-users] ops3 - xforms. submission result
>
>
>> ampatspell. wrote:
>> > Hello,
>> > I'm trying to get familiar with OPS3 XForms NG.
>> > One of my first questions i couldn't find the answer anywhere in
>> > examples is:
>> >
>> > I have xforms instance, i have submission for it. the submission calls
>> > xpl what returns result (using xml-serializer).
>> > the result is instance with filled previously empty <result/> element
>> > with <status/> and possibly with <error/> elements.
>> > how access those result values?  i want to show the result and/or set
>> > the <xforms:toggle case="success"/> (if submission is successfull)..
>>
>> Check for example the XForms Translate example. It has the following
>> submission:
>>
>> <xforms:submission ref="instance('instance')" id="default-submission"
>>     method="post" action="/direct/xforms-translate/post"
>> replace="instance"/>
>>
>> The replace="instance" attribute means that the result of the
>> submission will be used to entirely replace the instance which is
>> submitted.
>>
>> In the latest builds, you can now also use the attribute
>> instance="my-instance-id" to specify that the returned XML data must
>> be stored in a particular instance (this feature was absent from the
>> initial XForms 1.0 spec but is now specified in the latest XForms 1.0
>> errata document). This is now implemented in OPS (post-3.0 beta).
>>
>> This mechanism allows you to use one instance containing an XML
>> request, and another instance receiving the XML response from an XML
>> service.
>>
>> > in ops2.8 i had something simlar to this:
>> > if /result/status = 'success' then show some chunk of xhtml etc..
>> > otherwise show other
>>
>> You can use XForms controls to display data from the resulting
>> instance, like the XForms Translate example. Check also the XForms
>> Controls example for an example of how you can
>>
>> -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
>>
>
>
>
> ------------------------------------------------------------------------
>
>
> --
> 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



--
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
|  
Report Content as Inappropriate

Re: ops3 - xforms. submission result

ampatspell
thanx!

and another question:
i have instance, submission defined.
the submission returns instance with status information. i want to
call/execute:

<xforms:toggle case="success"/> if /form/result/status = 'success'
or
<xforms:toggle case="fail"/> if /form/result/status = 'fail'

can it's be done in XForms or do i need to define success result page
outside current view?

best,
Arnis

----- Original Message -----
From: "Erik Bruchez" <[hidden email]>
To: <[hidden email]>
Sent: Tuesday, August 02, 2005 12:25 AM
Subject: Re: [ops-users] ops3 - xforms. submission result


> FYI this attribute was added to the errata recently:
>
>   http://www.w3.org/2003/10/REC-xforms-10-20031014-errata.html#E69a
>
> -Erik
>
> ampatspell. wrote:
>> Thank you for the reply!
>> The instance attribute for submission was what i had looked for. it
>> seems, i was too sleepy that i didn't saw it in XForms spec.. sorry.
>>
>> best,
>> Arnis
>>
>> ----- Original Message ----- From: "Erik Bruchez" <[hidden email]>
>> To: <[hidden email]>
>> Sent: Monday, August 01, 2005 8:29 PM
>> Subject: Re: [ops-users] ops3 - xforms. submission result
>>
>>
>>> ampatspell. wrote:
>>> > Hello,
>>> > I'm trying to get familiar with OPS3 XForms NG.
>>> > One of my first questions i couldn't find the answer anywhere in
>>> > examples is:
>>> >
>>> > I have xforms instance, i have submission for it. the submission calls
>>> > xpl what returns result (using xml-serializer).
>>> > the result is instance with filled previously empty <result/> element
>>> > with <status/> and possibly with <error/> elements.
>>> > how access those result values?  i want to show the result and/or set
>>> > the <xforms:toggle case="success"/> (if submission is successfull)..
>>>
>>> Check for example the XForms Translate example. It has the following
>>> submission:
>>>
>>> <xforms:submission ref="instance('instance')" id="default-submission"
>>>     method="post" action="/direct/xforms-translate/post"
>>> replace="instance"/>
>>>
>>> The replace="instance" attribute means that the result of the
>>> submission will be used to entirely replace the instance which is
>>> submitted.
>>>
>>> In the latest builds, you can now also use the attribute
>>> instance="my-instance-id" to specify that the returned XML data must
>>> be stored in a particular instance (this feature was absent from the
>>> initial XForms 1.0 spec but is now specified in the latest XForms 1.0
>>> errata document). This is now implemented in OPS (post-3.0 beta).
>>>
>>> This mechanism allows you to use one instance containing an XML
>>> request, and another instance receiving the XML response from an XML
>>> service.
>>>
>>> > in ops2.8 i had something simlar to this:
>>> > if /result/status = 'success' then show some chunk of xhtml etc..
>>> > otherwise show other
>>>
>>> You can use XForms controls to display data from the resulting
>>> instance, like the XForms Translate example. Check also the XForms
>>> Controls example for an example of how you can
>>>
>>> -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
>>>
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>>
>> --
>> 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
>
>
>

--------------------------------------------------------------------------------


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




--
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
|  
Report Content as Inappropriate

Re: ops3 - xforms. submission result

Erik Bruchez
Administrator
ampatspell. wrote:
 > thanx!
 >
 > and another question:
 > i have instance, submission defined.
 > the submission returns instance with status information. i want to
 > call/execute:
 >
 > <xforms:toggle case="success"/> if /form/result/status = 'success'
 > or
 > <xforms:toggle case="fail"/> if /form/result/status = 'fail'
 >
 > can it's be done in XForms or do i need to define success result page
 > outside current view?

You can do it but it's a little tricky unfortunately. Something that
has to be improved in the next version of the spec...

The idea is to use a dummy control bound to an xforms:bind element as
follows:

<xforms:bind id="toggle1"
   constraint="result/status = 'success'"
   relevant="false()"/>

The control will toggle between being valid and invalid, and therefore
send xforms-valid and xforms-invalid events. You can toggle the
correct case within event handlers for those events. Note that we have
made some fixes to xforms-valid and xforms-invalid post 3.0 BETA.

A better approach would be a conditional event handler you can call
upon xforms-submit-done. Such a proposal is being discussed for XML
events I think.

-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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ops3 - xforms. submission result

ampatspell
Hello,
yes, this should do the trick. Thank you very much!
strange that i didn't find it by myself.. argh..

best,
Arnis

----- Original Message -----
From: "Erik Bruchez" <[hidden email]>
To: <[hidden email]>
Sent: Tuesday, August 02, 2005 9:36 PM
Subject: Re: [ops-users] ops3 - xforms. submission result


> ampatspell. wrote:
> > thanx!
> >
> > and another question:
> > i have instance, submission defined.
> > the submission returns instance with status information. i want to
> > call/execute:
> >
> > <xforms:toggle case="success"/> if /form/result/status = 'success'
> > or
> > <xforms:toggle case="fail"/> if /form/result/status = 'fail'
> >
> > can it's be done in XForms or do i need to define success result page
> > outside current view?
>
> You can do it but it's a little tricky unfortunately. Something that
> has to be improved in the next version of the spec...
>
> The idea is to use a dummy control bound to an xforms:bind element as
> follows:
>
> <xforms:bind id="toggle1"
>   constraint="result/status = 'success'"
>   relevant="false()"/>
>
> The control will toggle between being valid and invalid, and therefore
> send xforms-valid and xforms-invalid events. You can toggle the
> correct case within event handlers for those events. Note that we have
> made some fixes to xforms-valid and xforms-invalid post 3.0 BETA.
>
> A better approach would be a conditional event handler you can call
> upon xforms-submit-done. Such a proposal is being discussed for XML
> events I think.
>
> -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
>




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