Hi,

If the parent is always the same, this is exactly the PageContainer pattern... 
The child component includes the parent. You may even use a WOSwitchComponent 
to have a variable container.

Samuel


> Le 2015-11-02 à 07:46, Hugi Thordarson <[email protected]> a écrit :
> 
> Hi all.
> 
> I’m looking for a way to programmatically wrap one component instance into 
> another one. Essentially: I want a switch component, but without putting an 
> actual switch component into the child template itself.
> 
> Pseudocodingally speaking, I want to be able to do something like this:
> 
> public WOActionResults action() {
>       WrapMe child = pageWithName( WrapMe.class );
>       Wrapper parent = pageWithName( Wrapper.class );
> 
>       // somehow wrap ‘parent' around ‘child'…
>       // ‘parent’ probably has a WOComponentContent in it where child should 
> be inserted.
> 
>       return child;
> }
> 
> I realize one approach is to go the other way around, i.e. by putting a 
> switch component in “parent” and then communicating with my child component 
> through bindings on that and returning “parent”. But I need to have the 
> action method return the instance of the child component.
> 
> Any ideas?
> 
> Cheers,
> - hugi
> _______________________________________________
> 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/samuel%40samkar.com
> 
> 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]

Reply via email to