It sound as if you know which page should be the next page a bit too late.
Are you in the default RRLoop (.../wo/...)? Or maybe in an Ajax call?
The default Request-Response-Loop is designed so that such decision are made in
invokeAction(). And it's in that phase / method that you are given the chance
to decide what component is going to be the next page.
Once that decision is made, appendToResponse() is sent to that component (page)
and at that point, it's a bit too late to « return » another page. At that
point all you can do is render another component as a child of you (woswitch /
wocomponentcontent), or « render a redirect link » to the next page.
I think you will be best served with a WOSwitchComponent, and given what we
gave you (the feed), you will render the appropriate component as a child.
jfv
Le 2012-08-23 à 13:34, jazz a écrit :
> Hi Chuck,
>
> Page2 gets a feed with information and has an appendToResponse method. But
> how do I implement WORedirect in an appendToResponse method (which does not
> return any methods, void)? Or do I need to add another method? If so which on?
>
> public WOComponent signOut()
> {
> session().terminate();
> WORedirect redirect = new WORedirect(context());
>
> redirect.setUrl(context().directActionURLForActionNamed("default",null));
> return redirect;
> }
>
> This would work, but it needs an action method (press button signOut). How
> can this work without user interaction?
>
> Regards, Bart
>
> On 23 Aug 2012, at 19:13, Chuck Hill wrote:
>
>> Hi Bart,
>>
>> I think we will need some more details on what you have and what you want to
>> achieve. Is a WORedirect what you are looking for?
>>
>>
>> Chuck
>>
>> On 2012-08-23, at 8:04 AM, wrote:
>>
>>> Hi,
>>>
>>> I have a question. How do you go automatically to the next page without
>>> action methods such as button clicks?
>>> The first page is reached using a WOActionResults DA method. This connects
>>> to the next page using pageWithName("page2"). Page2 has an appendToResponse
>>> method so this can not have a return page?
>>>
>>> Thanks for your help!
>>>
>>> Regards, Bart
>>>
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list ([email protected])
>>> Help/Unsubscribe/Update your Subscription:
>>> https://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
>>>
>>> This email sent to [email protected]
>>
>> --
>> Chuck Hill Senior Consultant / VP Development
>>
>> Practical WebObjects - for developers who want to increase their overall
>> knowledge of WebObjects or who are trying to solve specific problems.
>> http://www.global-village.net/gvc/practical_webobjects
>>
>>
>>
>>
>>
>>
>>
>>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list ([email protected])
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/jean_francois_veillette%40yahoo.ca
>
> This email sent to [email protected]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]