Hi Hugi,

You can always you the trusty delegation pattern:

SomeComponentThatContainsAWOSwitchComponent nextPage = pageWithName( 
SomeComponentThatContainsAWOSwitchComponent.class );
nextPage.setSomeComponentThatContainsAWOSwitchComponentDelegate(this);
nextPage.componentInstanceDisplayedByWOSwitchComponentSomehowExposed.searchString
 = "Some String";
nextPage.componentInstanceDisplayedByWOSwitchComponentSomehowExposed.invokeSomeMethodThatPotentiallyModifiesTheResponse();
return nextPage;

Design your interface/delegate, and then implement on what/where/how care to 
know/listen/control:

public interface SomeComponentThatContainsAWOSwitchComponentDelegate{
public String 
someComponentThatContainsAWOSwitchComponentDelegate_searchString();
public WOActionResults 
someComponentThatContainsAWOSwitchComponentDelegate_responseForDidCancel();
public WOActionResults 
someComponentThatContainsAWOSwitchComponentDelegate_responseForDidSearch();
}

-G

> On Mar 27, 2019, at 8:34 AM, Hugi Thordarson <h...@karlmenn.is> wrote:
> 
> Hi all.
> I think I might be out of luck here, but does anyone have Some Amazing Way™ 
> to programmatically work with a component instance generated by a 
> WOSwichComponent?
> 
> Ideally, what I'd be able to do is something like:
> 
> SomeComponentThatContainsAWOSwitchComponent nextPage = pageWithName( 
> SomeComponentThatContainsAWOSwitchComponent.class );
> nextPage.componentInstanceDisplayedByWOSwitchComponentSomehowExposed.searchString
>  = "Some String";
> nextPage.componentInstanceDisplayedByWOSwitchComponentSomehowExposed.invokeSomeMethodThatPotentiallyModifiesTheResponse();
> return nextPage;
> 
> I'm currently using ERXThreadStorage to throw values around and facilitate 
> communication between components, but of course that feels very, very wrong, 
> so any suggestions would be nice.
> 
> Cheers,
> - hugi
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/g%40knuckleheads.net
> 
> This email sent to g...@knuckleheads.net

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to