Problem Redirecting URL

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

Problem Redirecting URL

Phani S
Hi all,
       In my application I have different pages. Each page is having a button triggering to next page. When I click the button "Next" the url in the browser not changing to the actual page. When I click next on the second page the first page url not appearing in browser. When I click next on the third page it is appearing first page url. The problem continues on each page.

Please help me solve this problem.

I declared my trigger in each page like this

            <xforms:group>
                <xforms:trigger>
                    <xforms:label>Next</xforms:label>
                </xforms:trigger>
                <xforms:action ev:event="DOMActivate">
                    <xforms:setvalue ref="instance('form-instance')//action">submit</xforms:setvalue>
                    <xforms:send submission="main-submission"/>
                </xforms:action>
            </xforms:group>

binding

       <xforms:submission id="main-submission" ref="instance('form-instance')//action" method="post" action="/myProject/second-page"/>

in page-flow.xml

    <page id="first-page" path-info="/myProject/first-page" model="main-model.xpl" view="firstPage.xhtml">
    <action when="/form/action = 'submit'">
        <result page="second-page"  />
    </action>
    </page>

    <page id="second-page" path-info="/myProject/second-page" view="secondPage.xhtml">
    <action when="/form/action = 'submit'">
        <result page="third-page" />
    </action>
    </page>
...............

help me to solve my problem.

--
Phani. S
M.Tech(Software Engineering)
Motilal Nehru National Institute of Technology
(+91) 9010093398


--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: Problem Redirecting URL

Steve Bayliss
Message
Hi Phani
 
 
I think that will answer your question.
 
Regards
Steve
-----Original Message-----
From: Phani Sajja [mailto:[hidden email]]
Sent: 03 August 2009 06:41
To: [hidden email]
Subject: [ops-users] Problem Redirecting URL

Hi all,
       In my application I have different pages. Each page is having a button triggering to next page. When I click the button "Next" the url in the browser not changing to the actual page. When I click next on the second page the first page url not appearing in browser. When I click next on the third page it is appearing first page url. The problem continues on each page.

Please help me solve this problem.

I declared my trigger in each page like this

            <xforms:group>
                <xforms:trigger>
                    <xforms:label>Next</xforms:label>
                </xforms:trigger>
                <xforms:action ev:event="DOMActivate">
                    <xforms:setvalue ref="instance('form-instance')//action">submit</xforms:setvalue>
                    <xforms:send submission="main-submission"/>
                </xforms:action>
            </xforms:group>

binding

       <xforms:submission id="main-submission" ref="instance('form-instance')//action" method="post" action="/myProject/second-page"/>

in page-flow.xml

    <page id="first-page" path-info="/myProject/first-page" model="main-model.xpl" view="firstPage.xhtml">
    <action when="/form/action = 'submit'">
        <result page="second-page"  />
    </action>
    </page>

    <page id="second-page" path-info="/myProject/second-page" view="secondPage.xhtml">
    <action when="/form/action = 'submit'">
        <result page="third-page" />
    </action>
    </page>
...............

help me to solve my problem.

--
Phani. S
M.Tech(Software Engineering)
Motilal Nehru National Institute of Technology
(+91) 9010093398


--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: RE: Problem Redirecting URL

Phani S
Hi Steve,
           I am not sending a large xml as submission. Instance-passing is defined as redirect at properties.xml. I try to redefine at result level as instance-passing="redirect". Still I could not be able to solve the problem. The main problem is that what I expected in url is not coming immediately. But when I try to navigate to next page the current page url is appearing in url bar.

Please help me

thanks.
Phani

On Wed, Aug 5, 2009 at 1:03 AM, Steve Bayliss <[hidden email]> wrote:
Hi Phani
 
 
I think that will answer your question.
 
Regards
Steve
-----Original Message-----
From: Phani Sajja [mailto:[hidden email]]
Sent: 03 August 2009 06:41
To: [hidden email]
Subject: [ops-users] Problem Redirecting URL

Hi all,
       In my application I have different pages. Each page is having a button triggering to next page. When I click the button "Next" the url in the browser not changing to the actual page. When I click next on the second page the first page url not appearing in browser. When I click next on the third page it is appearing first page url. The problem continues on each page.

Please help me solve this problem.

I declared my trigger in each page like this

            <xforms:group>
                <xforms:trigger>
                    <xforms:label>Next</xforms:label>
                </xforms:trigger>
                <xforms:action ev:event="DOMActivate">
                    <xforms:setvalue ref="instance('form-instance')//action">submit</xforms:setvalue>
                    <xforms:send submission="main-submission"/>
                </xforms:action>
            </xforms:group>

binding

       <xforms:submission id="main-submission" ref="instance('form-instance')//action" method="post" action="/myProject/second-page"/>

in page-flow.xml

    <page id="first-page" path-info="/myProject/first-page" model="main-model.xpl" view="firstPage.xhtml">
    <action when="/form/action = 'submit'">
        <result page="second-page"  />
    </action>
    </page>

    <page id="second-page" path-info="/myProject/second-page" view="secondPage.xhtml">
    <action when="/form/action = 'submit'">
        <result page="third-page" />
    </action>
    </page>
...............

help me to solve my problem.

--
Phani. S
M.Tech(Software Engineering)
Motilal Nehru National Institute of Technology
(+91) 9010093398


--
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
OW2 mailing lists service home page: http://www.ow2.org/wws




--
Phani. S
M.Tech(Software Engineering)
Motilal Nehru National Institute of Technology
(+91) 9010093398


--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: Re: RE: Problem Redirecting URL

Steve Bayliss
Message
Hi Phani
 
There seems to be a few issues with your example:
 
1) in your view, the <xforms:action> element should appear within the <xforms:trigger> element, so the xforms:setvalue and xforms:send occur when the button is clicked
 
2) in your <xforms:submission> in your view, you have the ref attribute specifying the instance element //action - but in your page flow you are testing /form/action - you should instead just test /action (or you should submit the whole instance, in which case you can test /form/action)
 
3) in your <xforms:submission> you have the action attribute specifying the path for second-page - you should submit back to the same page you are on - ie /myProject/first-page, then your <action> on that first page in the page-flow will pick up the submission and redirect to the second page
 
Attached is an example I have got working here - with instance-passing as redirect specified on the result elements in page-flow.xml - create a "test" subdirectory under apps and put the files in there.  The URLs change when the buttons are clicked.
 
Steve
 
-----Original Message-----
From: Phani Sajja [mailto:[hidden email]]
Sent: 05 August 2009 09:50
To: [hidden email]
Subject: [ops-users] Re: RE: Problem Redirecting URL

Hi Steve,
           I am not sending a large xml as submission. Instance-passing is defined as redirect at properties.xml. I try to redefine at result level as instance-passing="redirect". Still I could not be able to solve the problem. The main problem is that what I expected in url is not coming immediately. But when I try to navigate to next page the current page url is appearing in url bar.

Please help me

thanks.
Phani

On Wed, Aug 5, 2009 at 1:03 AM, Steve Bayliss <[hidden email]> wrote:
Hi Phani
 
 
I think that will answer your question.
 
Regards
Steve
-----Original Message-----
From: Phani Sajja [mailto:[hidden email]]
Sent: 03 August 2009 06:41
To: [hidden email]
Subject: [ops-users] Problem Redirecting URL

Hi all,
       In my application I have different pages. Each page is having a button triggering to next page. When I click the button "Next" the url in the browser not changing to the actual page. When I click next on the second page the first page url not appearing in browser. When I click next on the third page it is appearing first page url. The problem continues on each page.

Please help me solve this problem.

I declared my trigger in each page like this

            <xforms:group>
                <xforms:trigger>
                    <xforms:label>Next</xforms:label>
                </xforms:trigger>
                <xforms:action ev:event="DOMActivate">
                    <xforms:setvalue ref="instance('form-instance')//action">submit</xforms:setvalue>
                    <xforms:send submission="main-submission"/>
                </xforms:action>
            </xforms:group>

binding

       <xforms:submission id="main-submission" ref="instance('form-instance')//action" method="post" action="/myProject/second-page"/>

in page-flow.xml

    <page id="first-page" path-info="/myProject/first-page" model="main-model.xpl" view="firstPage.xhtml">
    <action when="/form/action = 'submit'">
        <result page="second-page"  />
    </action>
    </page>

    <page id="second-page" path-info="/myProject/second-page" view="secondPage.xhtml">
    <action when="/form/action = 'submit'">
        <result page="third-page" />
    </action>
    </page>
...............

help me to solve my problem.

--
Phani. S
M.Tech(Software Engineering)
Motilal Nehru National Institute of Technology
(+91) 9010093398


--
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
OW2 mailing lists service home page: http://www.ow2.org/wws




--
Phani. S
M.Tech(Software Engineering)
Motilal Nehru National Institute of Technology
(+91) 9010093398


--
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
OW2 mailing lists service home page: http://www.ow2.org/wws

page-flow.xml (526 bytes) Download Attachment
next.xhtml (1K) Download Attachment
main.xhtml (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: RE: Re: RE: Problem Redirecting URL

Phani S
Hi Steve,
            Thanks for your reply. I tried your example and working fine for next and back buttons. I introduced a new page and tried it. It is giving the same problem which I got earlier. I am attaching the application including the new page and updated page-flow.xml. Please have a look at the attachment.

thanks
Phani.

On Thu, Aug 6, 2009 at 2:09 PM, Steve Bayliss <[hidden email]> wrote:
Hi Phani
 
There seems to be a few issues with your example:
 
1) in your view, the <xforms:action> element should appear within the <xforms:trigger> element, so the xforms:setvalue and xforms:send occur when the button is clicked
 
2) in your <xforms:submission> in your view, you have the ref attribute specifying the instance element //action - but in your page flow you are testing /form/action - you should instead just test /action (or you should submit the whole instance, in which case you can test /form/action)
 
3) in your <xforms:submission> you have the action attribute specifying the path for second-page - you should submit back to the same page you are on - ie /myProject/first-page, then your <action> on that first page in the page-flow will pick up the submission and redirect to the second page
 
Attached is an example I have got working here - with instance-passing as redirect specified on the result elements in page-flow.xml - create a "test" subdirectory under apps and put the files in there.  The URLs change when the buttons are clicked.
 
Steve
 
-----Original Message-----
From: Phani Sajja [mailto:[hidden email]]
Sent: 05 August 2009 09:50
To: [hidden email]
Subject: [ops-users] Re: RE: Problem Redirecting URL

Hi Steve,
           I am not sending a large xml as submission. Instance-passing is defined as redirect at properties.xml. I try to redefine at result level as instance-passing="redirect". Still I could not be able to solve the problem. The main problem is that what I expected in url is not coming immediately. But when I try to navigate to next page the current page url is appearing in url bar.

Please help me

thanks.
Phani

On Wed, Aug 5, 2009 at 1:03 AM, Steve Bayliss <[hidden email]> wrote:
Hi Phani
 
 
I think that will answer your question.
 
Regards
Steve
-----Original Message-----
From: Phani Sajja [mailto:[hidden email]]
Sent: 03 August 2009 06:41
To: [hidden email]
Subject: [ops-users] Problem Redirecting URL

Hi all,
       In my application I have different pages. Each page is having a button triggering to next page. When I click the button "Next" the url in the browser not changing to the actual page. When I click next on the second page the first page url not appearing in browser. When I click next on the third page it is appearing first page url. The problem continues on each page.

Please help me solve this problem.

I declared my trigger in each page like this

            <xforms:group>
                <xforms:trigger>
                    <xforms:label>Next</xforms:label>
                </xforms:trigger>
                <xforms:action ev:event="DOMActivate">
                    <xforms:setvalue ref="instance('form-instance')//action">submit</xforms:setvalue>
                    <xforms:send submission="main-submission"/>
                </xforms:action>
            </xforms:group>

binding

       <xforms:submission id="main-submission" ref="instance('form-instance')//action" method="post" action="/myProject/second-page"/>

in page-flow.xml

    <page id="first-page" path-info="/myProject/first-page" model="main-model.xpl" view="firstPage.xhtml">
    <action when="/form/action = 'submit'">
        <result page="second-page"  />
    </action>
    </page>

    <page id="second-page" path-info="/myProject/second-page" view="secondPage.xhtml">
    <action when="/form/action = 'submit'">
        <result page="third-page" />
    </action>
    </page>
...............

help me to solve my problem.

--
Phani. S
M.Tech(Software Engineering)
Motilal Nehru National Institute of Technology
(+91) 9010093398


--
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
OW2 mailing lists service home page: http://www.ow2.org/wws




--
Phani. S
M.Tech(Software Engineering)
Motilal Nehru National Institute of Technology
(+91) 9010093398


--
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
OW2 mailing lists service home page: http://www.ow2.org/wws




--
Phani. S
M.Tech(Software Engineering)
Motilal Nehru National Institute of Technology
(+91) 9010093398


--
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
OW2 mailing lists service home page: http://www.ow2.org/wws

test.rar (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: Re: RE: Re: RE: Problem Redirecting URL

Steve Bayliss
Message
Again you are posting your submission to the wrong URL.
 
In your revised "next" page, your submission is posting to /test/third - it should post back to the current page, ie /test/next
 
In general
- the submission on the page should be submitted to the same page - ie the path of the current page
- the action/result elements for that page in page-flow.xml specify the location you want to navigate to
 
Also, in your revised page flow, it looks like the result element for the "next" page is pointing at the wrong place.
 
 
 -----Original Message-----
From: Phani Sajja [mailto:[hidden email]]
Sent: 06 August 2009 10:41
To: [hidden email]
Subject: [ops-users] Re: RE: Re: RE: Problem Redirecting URL

Hi Steve,
            Thanks for your reply. I tried your example and working fine for next and back buttons. I introduced a new page and tried it. It is giving the same problem which I got earlier. I am attaching the application including the new page and updated page-flow.xml. Please have a look at the attachment.

thanks
Phani.

On Thu, Aug 6, 2009 at 2:09 PM, Steve Bayliss <[hidden email]> wrote:
Hi Phani
 
There seems to be a few issues with your example:
 
1) in your view, the <xforms:action> element should appear within the <xforms:trigger> element, so the xforms:setvalue and xforms:send occur when the button is clicked
 
2) in your <xforms:submission> in your view, you have the ref attribute specifying the instance element //action - but in your page flow you are testing /form/action - you should instead just test /action (or you should submit the whole instance, in which case you can test /form/action)
 
3) in your <xforms:submission> you have the action attribute specifying the path for second-page - you should submit back to the same page you are on - ie /myProject/first-page, then your <action> on that first page in the page-flow will pick up the submission and redirect to the second page
 
Attached is an example I have got working here - with instance-passing as redirect specified on the result elements in page-flow.xml - create a "test" subdirectory under apps and put the files in there.  The URLs change when the buttons are clicked.
 
Steve
 
-----Original Message-----
From: Phani Sajja [mailto:[hidden email]]
Sent: 05 August 2009 09:50
To: [hidden email]
Subject: [ops-users] Re: RE: Problem Redirecting URL

Hi Steve,
           I am not sending a large xml as submission. Instance-passing is defined as redirect at properties.xml. I try to redefine at result level as instance-passing="redirect". Still I could not be able to solve the problem. The main problem is that what I expected in url is not coming immediately. But when I try to navigate to next page the current page url is appearing in url bar.

Please help me

thanks.
Phani

On Wed, Aug 5, 2009 at 1:03 AM, Steve Bayliss <[hidden email]> wrote:
Hi Phani
 
 
I think that will answer your question.
 
Regards
Steve
-----Original Message-----
From: Phani Sajja [mailto:[hidden email]]
Sent: 03 August 2009 06:41
To: [hidden email]
Subject: [ops-users] Problem Redirecting URL

Hi all,
       In my application I have different pages. Each page is having a button triggering to next page. When I click the button "Next" the url in the browser not changing to the actual page. When I click next on the second page the first page url not appearing in browser. When I click next on the third page it is appearing first page url. The problem continues on each page.

Please help me solve this problem.

I declared my trigger in each page like this

            <xforms:group>
                <xforms:trigger>
                    <xforms:label>Next</xforms:label>
                </xforms:trigger>
                <xforms:action ev:event="DOMActivate">
                    <xforms:setvalue ref="instance('form-instance')//action">submit</xforms:setvalue>
                    <xforms:send submission="main-submission"/>
                </xforms:action>
            </xforms:group>

binding

       <xforms:submission id="main-submission" ref="instance('form-instance')//action" method="post" action="/myProject/second-page"/>

in page-flow.xml

    <page id="first-page" path-info="/myProject/first-page" model="main-model.xpl" view="firstPage.xhtml">
    <action when="/form/action = 'submit'">
        <result page="second-page"  />
    </action>
    </page>

    <page id="second-page" path-info="/myProject/second-page" view="secondPage.xhtml">
    <action when="/form/action = 'submit'">
        <result page="third-page" />
    </action>
    </page>
...............

help me to solve my problem.

--
Phani. S
M.Tech(Software Engineering)
Motilal Nehru National Institute of Technology
(+91) 9010093398


--
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
OW2 mailing lists service home page: http://www.ow2.org/wws




--
Phani. S
M.Tech(Software Engineering)
Motilal Nehru National Institute of Technology
(+91) 9010093398


--
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
OW2 mailing lists service home page: http://www.ow2.org/wws




--
Phani. S
M.Tech(Software Engineering)
Motilal Nehru National Institute of Technology
(+91) 9010093398


--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: RE: Re: RE: Re: RE: Problem Redirecting URL

Phani S
thanks Steve,
                   Now I solved my problem and able to run my applicaiton fine.

Phani

On Thu, Aug 6, 2009 at 3:35 PM, Steve Bayliss <[hidden email]> wrote:
Again you are posting your submission to the wrong URL.
 
In your revised "next" page, your submission is posting to /test/third - it should post back to the current page, ie /test/next
 
In general
- the submission on the page should be submitted to the same page - ie the path of the current page
- the action/result elements for that page in page-flow.xml specify the location you want to navigate to
 
Also, in your revised page flow, it looks like the result element for the "next" page is pointing at the wrong place.
 
 
 -----Original Message-----
From: Phani Sajja [mailto:[hidden email]]
Sent: 06 August 2009 10:41
To: [hidden email]
Subject: [ops-users] Re: RE: Re: RE: Problem Redirecting URL

Hi Steve,
            Thanks for your reply. I tried your example and working fine for next and back buttons. I introduced a new page and tried it. It is giving the same problem which I got earlier. I am attaching the application including the new page and updated page-flow.xml. Please have a look at the attachment.

thanks
Phani.

On Thu, Aug 6, 2009 at 2:09 PM, Steve Bayliss <[hidden email]> wrote:
Hi Phani
 
There seems to be a few issues with your example:
 
1) in your view, the <xforms:action> element should appear within the <xforms:trigger> element, so the xforms:setvalue and xforms:send occur when the button is clicked
 
2) in your <xforms:submission> in your view, you have the ref attribute specifying the instance element //action - but in your page flow you are testing /form/action - you should instead just test /action (or you should submit the whole instance, in which case you can test /form/action)
 
3) in your <xforms:submission> you have the action attribute specifying the path for second-page - you should submit back to the same page you are on - ie /myProject/first-page, then your <action> on that first page in the page-flow will pick up the submission and redirect to the second page
 
Attached is an example I have got working here - with instance-passing as redirect specified on the result elements in page-flow.xml - create a "test" subdirectory under apps and put the files in there.  The URLs change when the buttons are clicked.
 
Steve
 
-----Original Message-----
From: Phani Sajja [mailto:[hidden email]]
Sent: 05 August 2009 09:50
To: [hidden email]
Subject: [ops-users] Re: RE: Problem Redirecting URL

Hi Steve,
           I am not sending a large xml as submission. Instance-passing is defined as redirect at properties.xml. I try to redefine at result level as instance-passing="redirect". Still I could not be able to solve the problem. The main problem is that what I expected in url is not coming immediately. But when I try to navigate to next page the current page url is appearing in url bar.

Please help me

thanks.
Phani

On Wed, Aug 5, 2009 at 1:03 AM, Steve Bayliss <[hidden email]> wrote:
Hi Phani
 
 
I think that will answer your question.
 
Regards
Steve
-----Original Message-----
From: Phani Sajja [mailto:[hidden email]]
Sent: 03 August 2009 06:41
To: [hidden email]
Subject: [ops-users] Problem Redirecting URL

Hi all,
       In my application I have different pages. Each page is having a button triggering to next page. When I click the button "Next" the url in the browser not changing to the actual page. When I click next on the second page the first page url not appearing in browser. When I click next on the third page it is appearing first page url. The problem continues on each page.

Please help me solve this problem.

I declared my trigger in each page like this

            <xforms:group>
                <xforms:trigger>
                    <xforms:label>Next</xforms:label>
                </xforms:trigger>
                <xforms:action ev:event="DOMActivate">
                    <xforms:setvalue ref="instance('form-instance')//action">submit</xforms:setvalue>
                    <xforms:send submission="main-submission"/>
                </xforms:action>
            </xforms:group>

binding

       <xforms:submission id="main-submission" ref="instance('form-instance')//action" method="post" action="/myProject/second-page"/>

in page-flow.xml

    <page id="first-page" path-info="/myProject/first-page" model="main-model.xpl" view="firstPage.xhtml">
    <action when="/form/action = 'submit'">
        <result page="second-page"  />
    </action>
    </page>

    <page id="second-page" path-info="/myProject/second-page" view="secondPage.xhtml">
    <action when="/form/action = 'submit'">
        <result page="third-page" />
    </action>
    </page>
...............

help me to solve my problem.

--
Phani. S
M.Tech(Software Engineering)
Motilal Nehru National Institute of Technology
(+91) 9010093398


--
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
OW2 mailing lists service home page: http://www.ow2.org/wws




--
Phani. S
M.Tech(Software Engineering)
Motilal Nehru National Institute of Technology
(+91) 9010093398


--
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
OW2 mailing lists service home page: http://www.ow2.org/wws




--
Phani. S
M.Tech(Software Engineering)
Motilal Nehru National Institute of Technology
(+91) 9010093398


--
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
OW2 mailing lists service home page: http://www.ow2.org/wws




--
Phani. S
M.Tech(Software Engineering)
Motilal Nehru National Institute of Technology
(+91) 9010093398


--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: Re: RE: Re: RE: Re: RE: Problem Redirecting URL

Steve Bayliss
Message
Great!
 
An alternative you might consider:
 
If you have quite a lot of navigation between pages, you could handle all of these with a single "navigation" URL, and have all the action/results under there.  Then all of your navigation submissions should submit to this navigation page URL.
 
An example of this is attached.
 
Here you can see that all pages have several navigation buttons (you can include whichever ones you want), and each button sets the value in the instance to specify the destination page.  The submisson element on each page is to the /test/navigate path (ie, not the current page URL) - in page-flow.xml this "page" has no model or view, but it tests the value in the submission and uses action/result elements to navigate to the correct page.
 
So basically, there is a single "handler" for all navigation between pages.
 
I've also included a default action at the end - this is a good idea, as it means you can tell when the value of /action is not recognised (there is an example button for that).
 
 
 
 -----Original Message-----
From: Phani Sajja [mailto:[hidden email]]
Sent: 06 August 2009 11:39
To: [hidden email]
Subject: [ops-users] Re: RE: Re: RE: Re: RE: Problem Redirecting URL

thanks Steve,
                   Now I solved my problem and able to run my applicaiton fine.

Phani

On Thu, Aug 6, 2009 at 3:35 PM, Steve Bayliss <[hidden email]> wrote:
Again you are posting your submission to the wrong URL.
 
In your revised "next" page, your submission is posting to /test/third - it should post back to the current page, ie /test/next
 
In general
- the submission on the page should be submitted to the same page - ie the path of the current page
- the action/result elements for that page in page-flow.xml specify the location you want to navigate to
 
Also, in your revised page flow, it looks like the result element for the "next" page is pointing at the wrong place.
 
 
 -----Original Message-----
From: Phani Sajja [mailto:[hidden email]]
Sent: 06 August 2009 10:41
To: [hidden email]
Subject: [ops-users] Re: RE: Re: RE: Problem Redirecting URL

Hi Steve,
            Thanks for your reply. I tried your example and working fine for next and back buttons. I introduced a new page and tried it. It is giving the same problem which I got earlier. I am attaching the application including the new page and updated page-flow.xml. Please have a look at the attachment.

thanks
Phani.

On Thu, Aug 6, 2009 at 2:09 PM, Steve Bayliss <[hidden email]> wrote:
Hi Phani
 
There seems to be a few issues with your example:
 
1) in your view, the <xforms:action> element should appear within the <xforms:trigger> element, so the xforms:setvalue and xforms:send occur when the button is clicked
 
2) in your <xforms:submission> in your view, you have the ref attribute specifying the instance element //action - but in your page flow you are testing /form/action - you should instead just test /action (or you should submit the whole instance, in which case you can test /form/action)
 
3) in your <xforms:submission> you have the action attribute specifying the path for second-page - you should submit back to the same page you are on - ie /myProject/first-page, then your <action> on that first page in the page-flow will pick up the submission and redirect to the second page
 
Attached is an example I have got working here - with instance-passing as redirect specified on the result elements in page-flow.xml - create a "test" subdirectory under apps and put the files in there.  The URLs change when the buttons are clicked.
 
Steve
 
-----Original Message-----
From: Phani Sajja [mailto:[hidden email]]
Sent: 05 August 2009 09:50
To: [hidden email]
Subject: [ops-users] Re: RE: Problem Redirecting URL

Hi Steve,
           I am not sending a large xml as submission. Instance-passing is defined as redirect at properties.xml. I try to redefine at result level as instance-passing="redirect". Still I could not be able to solve the problem. The main problem is that what I expected in url is not coming immediately. But when I try to navigate to next page the current page url is appearing in url bar.

Please help me

thanks.
Phani

On Wed, Aug 5, 2009 at 1:03 AM, Steve Bayliss <[hidden email]> wrote:
Hi Phani
 
 
I think that will answer your question.
 
Regards
Steve
-----Original Message-----
From: Phani Sajja [mailto:[hidden email]]
Sent: 03 August 2009 06:41
To: [hidden email]
Subject: [ops-users] Problem Redirecting URL

Hi all,
       In my application I have different pages. Each page is having a button triggering to next page. When I click the button "Next" the url in the browser not changing to the actual page. When I click next on the second page the first page url not appearing in browser. When I click next on the third page it is appearing first page url. The problem continues on each page.

Please help me solve this problem.

I declared my trigger in each page like this

            <xforms:group>
                <xforms:trigger>
                    <xforms:label>Next</xforms:label>
                </xforms:trigger>
                <xforms:action ev:event="DOMActivate">
                    <xforms:setvalue ref="instance('form-instance')//action">submit</xforms:setvalue>
                    <xforms:send submission="main-submission"/>
                </xforms:action>
            </xforms:group>

binding

       <xforms:submission id="main-submission" ref="instance('form-instance')//action" method="post" action="/myProject/second-page"/>

in page-flow.xml

    <page id="first-page" path-info="/myProject/first-page" model="main-model.xpl" view="firstPage.xhtml">
    <action when="/form/action = 'submit'">
        <result page="second-page"  />
    </action>
    </page>

    <page id="second-page" path-info="/myProject/second-page" view="secondPage.xhtml">
    <action when="/form/action = 'submit'">
        <result page="third-page" />
    </action>
    </page>
...............

help me to solve my problem.

--
Phani. S
M.Tech(Software Engineering)
Motilal Nehru National Institute of Technology
(+91) 9010093398


--
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
OW2 mailing lists service home page: http://www.ow2.org/wws




--
Phani. S
M.Tech(Software Engineering)
Motilal Nehru National Institute of Technology
(+91) 9010093398


--
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
OW2 mailing lists service home page: http://www.ow2.org/wws




--
Phani. S
M.Tech(Software Engineering)
Motilal Nehru National Institute of Technology
(+91) 9010093398


--
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
OW2 mailing lists service home page: http://www.ow2.org/wws




--
Phani. S
M.Tech(Software Engineering)
Motilal Nehru National Institute of Technology
(+91) 9010093398


--
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
OW2 mailing lists service home page: http://www.ow2.org/wws

test-single-action-handler.rar (3K) Download Attachment