page flow <action> / <result> question

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

page flow <action> / <result> question

Pascal Heus
Hi,
I'm trying to implement a simple page flow between a catalog list and a
catalog search page.
The page flow shown below has 2 pages:
- a search page with an xform to capture the search parameters
- a show catalog page that shows the list of the items in the catalog
The show-catalog page called directky shows all the items in the catalog
using the show-catalog-model.xpl (this works well)
The search-catalog page is associated with an action  that triggers the
search-xmlfiles.xpl model who returns the filtered catalog items.

I have a problem with the result element. As I understand from the
documentation at
http://www.orbeon.com/ops/doc/reference-page-flow#action-element
the model associated with the show-catalog page should not get executed
and the page should instead get the input of the result's oxf:transform.
However, this doesn't seem to happen. The show-catalog-model.xpl gets
called no matter what. If I remove the model, not input get submitted to
the page.
If there something wrong with my flow or has something changed since the
last documentation update?
(Also, if I name my top level element in the oxf:xslt something other
than <form>, an exception)
many thanks
Pascal

   <page is="search-catalog" path-info="/catalog/search"
view="search-view.xsl">
        <action when="/form/action='search-files'"
action="search-xmlfiles.xpl">
                <result page="show-catalog" transform="oxf:xslt">
                    <form xsl:version="2.0" xmlns="">
                        <xsl:copy-of select="doc('input:action')"/>
                    </form>
                </result>
        </action>
    </page>

    <page id="show-catalog" path-info="/catalog/show-catalog"
model="show-catalog-model.xpl" view="show-catalog-view.xslt"/>




--
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: page flow <action> / <result> question

Alessandro  Vernet
Administrator
Hi Pascal,

When you hit the "search" button on the search-catalog page, the
<action> runs and you go to the show-catalog page. When this happens
the model for the search-catalog page is not executed. However the
model for the target page (show-catalog) will be executed. The <form>
document that you create in the <result> element gets passed to the
target page (show-catalog) and you can access that document by reading
the "instance" input in your show-catalog-model.xpl.

Alex

On 11/1/05, Pascal Heus <[hidden email]> wrote:

> Hi,
> I'm trying to implement a simple page flow between a catalog list and a
> catalog search page.
> The page flow shown below has 2 pages:
> - a search page with an xform to capture the search parameters
> - a show catalog page that shows the list of the items in the catalog
> The show-catalog page called directky shows all the items in the catalog
> using the show-catalog-model.xpl (this works well)
> The search-catalog page is associated with an action  that triggers the
> search-xmlfiles.xpl model who returns the filtered catalog items.
>
> I have a problem with the result element. As I understand from the
> documentation at
> http://www.orbeon.com/ops/doc/reference-page-flow#action-element
> the model associated with the show-catalog page should not get executed
> and the page should instead get the input of the result's oxf:transform.
> However, this doesn't seem to happen. The show-catalog-model.xpl gets
> called no matter what. If I remove the model, not input get submitted to
> the page.
> If there something wrong with my flow or has something changed since the
> last documentation update?
> (Also, if I name my top level element in the oxf:xslt something other
> than <form>, an exception)
> many thanks
> Pascal
>
>    <page is="search-catalog" path-info="/catalog/search"
> view="search-view.xsl">
>         <action when="/form/action='search-files'"
> action="search-xmlfiles.xpl">
>                 <result page="show-catalog" transform="oxf:xslt">
>                     <form xsl:version="2.0" xmlns="">
>                         <xsl:copy-of select="doc('input:action')"/>
>                     </form>
>                 </result>
>         </action>
>     </page>
>
>     <page id="show-catalog" path-info="/catalog/show-catalog"
> model="show-catalog-model.xpl" view="show-catalog-view.xslt"/>
>
>
>
>
>
> --
> 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