action versus view in page-flow.xml

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

action versus view in page-flow.xml

Doug Young

Hi,

I do not understand the difference between action and view in the page flow. I could not find a description of them in the documentation, could someone point me to a description ?

 

 

My confusion was caused by the following example

 

In a page of our application we have

    <xforms:submission id="save-submission" ref="instance('main-instance')"

                       method="post" replace="instance" instance="main-instance" action="/pmp/services/pmp/save">

 

In the page flow we have

   <page id="save-pmp" path-info="/pmp/services/pmp/save">

        <action action="/talent-management/pmp/services/save-pmp.xpl"/>

    </page>

 

the file save-pmp.xpl has the following parameters

    <p:param name="instance" type="input"/>

    <p:param name="data" type="output"/>

save-pmp.xpl in the data parameter outputs an altered version of the contents of the input parameter

 

the question I have is why does the output from save-pmp.xpl not get sent back to the submitting page ?

Is this correct or a bug ?

 

I changed the page flow to have

    <page id="save-pmp" path-info="/pmp/services/pmp/save" view="/talent-management/pmp/services/save-pmp.xpl"/>

and the output of the save-pmp.xpl does get sent back to the page

 

so am I right in concluding that the output of an action never gets sent back ? Is that the only difference ?

 

 

 

regards

   Doug

 

 

   

 

 

Doug Young

Software Engineer

 

Teleflex IT

1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP

+44 (0) 1506 407107

 



--
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: action versus view in page-flow.xml

Alessandro  Vernet
Administrator
Doug,

On 7/28/06, Doug Young <[hidden email]> wrote:
> I do not understand the difference between action and view in the page flow.
> I could not find a description of them in the documentation, could someone
> point me to a description ?

The 'action' element was introduced when only XForms Classic was
available to respond to user's actions and execute something different
depending on what was the action taken by the user. Think about a page
where you have a number of buttons: "view details", "delete", ... With
XForms Classic there is no Ajax and every interaction submits the form
back to the server. In that scenario actions where used to run those
different operations depending on what the user's "action" was.

With XForms NG, we call "services" with <xforms:submission>. So there
is less of a need for the <action> element in the PFC. If you are
using XForms NG, I wouldn't worry about the <action> element.

The purpose of the view is to create a result which is sent back to
the browser. For a web page this is XHTML+XForms, for a service it is
XML, for a PDF it is XSL:FO. So when implementing a service called by
<xforms:submission>, this is where you should put your code.

Alex

>
>
>
>
>
> My confusion was caused by the following example
>
>
>
> In a page of our application we have
>
>     <xforms:submission id="save-submission" ref="instance('main-instance')"
>
>                        method="post" replace="instance"
> instance="main-instance" action="/pmp/services/pmp/save">
>
>
>
> In the page flow we have
>
>    <page id="save-pmp" path-info="/pmp/services/pmp/save">
>
>         <action
> action="/talent-management/pmp/services/save-pmp.xpl"/>
>
>     </page>
>
>
>
> the file save-pmp.xpl has the following parameters
>
>     <p:param name="instance" type="input"/>
>
>     <p:param name="data" type="output"/>
>
> save-pmp.xpl in the data parameter outputs an altered version of the
> contents of the input parameter
>
>
>
> the question I have is why does the output from save-pmp.xpl not get sent
> back to the submitting page ?
>
> Is this correct or a bug ?
>
>
>
> I changed the page flow to have
>
>     <page id="save-pmp" path-info="/pmp/services/pmp/save"
> view="/talent-management/pmp/services/save-pmp.xpl"/>
>
> and the output of the save-pmp.xpl does get sent back to the page
>
>
>
> so am I right in concluding that the output of an action never gets sent
> back ? Is that the only difference ?
>
>
>
>
>
>
>
> regards
>
>    Doug
>
>
>
>
>
>
>
>
>
>
>
> Doug Young
>
> Software Engineer
>
>
>
> Teleflex IT
>
> 1 Michaelson Square
>  Livingston
>  West Lothian
>  Scotland
>  EH54 7DP
>
>
> +44 (0) 1506 407107
>
>
>
> --
> 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
>
>
>

--
Blog (XML, Web apps, Open Source):
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
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

RE: action versus view in page-flow.xml

Doug Young
Alex,
  Thanks for the reply that makes it clear to me.

regards
  Doug

Doug Young
Software Engineer
 
Teleflex IT
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP
+44 (0) 1506 407107

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Alessandro
Vernet
Sent: 29 July 2006 01:07
To: [hidden email]
Subject: Re: [ops-users] action versus view in page-flow.xml

Doug,

On 7/28/06, Doug Young <[hidden email]> wrote:
> I do not understand the difference between action and view in the page
flow.
> I could not find a description of them in the documentation, could someone
> point me to a description ?

The 'action' element was introduced when only XForms Classic was
available to respond to user's actions and execute something different
depending on what was the action taken by the user. Think about a page
where you have a number of buttons: "view details", "delete", ... With
XForms Classic there is no Ajax and every interaction submits the form
back to the server. In that scenario actions where used to run those
different operations depending on what the user's "action" was.

With XForms NG, we call "services" with <xforms:submission>. So there
is less of a need for the <action> element in the PFC. If you are
using XForms NG, I wouldn't worry about the <action> element.

The purpose of the view is to create a result which is sent back to
the browser. For a web page this is XHTML+XForms, for a service it is
XML, for a PDF it is XSL:FO. So when implementing a service called by
<xforms:submission>, this is where you should put your code.

Alex

>
>
>
>
>
> My confusion was caused by the following example
>
>
>
> In a page of our application we have
>
>     <xforms:submission id="save-submission"
ref="instance('main-instance')"

>
>                        method="post" replace="instance"
> instance="main-instance" action="/pmp/services/pmp/save">
>
>
>
> In the page flow we have
>
>    <page id="save-pmp" path-info="/pmp/services/pmp/save">
>
>         <action
> action="/talent-management/pmp/services/save-pmp.xpl"/>
>
>     </page>
>
>
>
> the file save-pmp.xpl has the following parameters
>
>     <p:param name="instance" type="input"/>
>
>     <p:param name="data" type="output"/>
>
> save-pmp.xpl in the data parameter outputs an altered version of the
> contents of the input parameter
>
>
>
> the question I have is why does the output from save-pmp.xpl not get sent
> back to the submitting page ?
>
> Is this correct or a bug ?
>
>
>
> I changed the page flow to have
>
>     <page id="save-pmp" path-info="/pmp/services/pmp/save"
> view="/talent-management/pmp/services/save-pmp.xpl"/>
>
> and the output of the save-pmp.xpl does get sent back to the page
>
>
>
> so am I right in concluding that the output of an action never gets sent
> back ? Is that the only difference ?
>
>
>
>
>
>
>
> regards
>
>    Doug
>
>
>
>
>
>
>
>
>
>
>
> Doug Young
>
> Software Engineer
>
>
>
> Teleflex IT
>
> 1 Michaelson Square
>  Livingston
>  West Lothian
>  Scotland
>  EH54 7DP
>
>
> +44 (0) 1506 407107
>
>
>
> --
> 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
>
>
>

--
Blog (XML, Web apps, Open Source):
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