2 Replies Latest reply on May 12, 2009 9:21 PM by willie slepecki

    pass parameter on view id of pageflow

    willie slepecki Newbie

      in my pageflow i need to specify a view id of /app/frame.xhtml?url=patriot_act.  is that possible with pageflows?  if it isn't, how can i accomplish the same thing?  if i do pass the url as a parameter how do i extract the url parameter on the frame page?


      thanks guys and gals


        • 1. Re: pass parameter on view id of pageflow
          Jaime Martin Apprentice

          To work with parameters, you may use your view page.xml.
          In your case, you should define a frame.page.xml.
          In it you have to add your params this way, as long as you store your url in a urlHome class


          <param name="url" value="#{urlHome.url}"/>
          



          If you store your url data in a different object, you just have to specify it in the page.xml. For instance, if url is a attribute from FrameHome.


          <param name="url" value="#{frameHome.url}"/>
          



          On the other hand, to extract the paramater in the page, use the proper EL expression to refer to the object and attribute that stores that data.
          For instance, in your Frame.xhtml, if you are storing data in FrameHome in the url attribute you coyld try this:


          this is the passed yrl parameter: #{frameHome.url}
          



          hope this helps you!

          • 2. Re: pass parameter on view id of pageflow
            willie slepecki Newbie

            ok, so if i create a series of bla.page.xml files, one like this



            <?xml version="1.0" encoding="UTF-8"?>
            <page xmlns="http://jboss.com/products/seam/pages" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                 xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.1.xsd"
                 view-id="/eca/frame.xhtml">
            
                 <param name="url" value="http://www.cnn.com" />
            
            </page>




            one named foo.page.xml



            <?xml version="1.0" encoding="UTF-8"?>
            <page xmlns="http://jboss.com/products/seam/pages" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                 xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.1.xsd"
                 view-id="/eca/frame.xhtml">
            
                 <param name="url" value="http://www.google.com" />
            
            </page>




            and one named bar.page.xml



            <?xml version="1.0" encoding="UTF-8"?>
            <page xmlns="http://jboss.com/products/seam/pages" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                 xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.1.xsd"
                 view-id="/eca/frame.xhtml">
            
                 <param name="url" value="http://www.msn.com" />
            
            </page>



            im my pageflow file, i can i reference those page.xml files like this?



            <page name="bar_page" view-id="bar">
                      <transition to="schumer1"></transition>
                 </page>