WODynamicElement are only java code, no .wo, but they have access to 
subcomponents
public WODynamicElement(String 
<http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html> aName,
                        NSDictionary 
<http://api.webobjects.me/wo542/com/webobjects/foundation/NSDictionary.html> 
associations,
                        WOElement 
<http://api.webobjects.me/wo542/com/webobjects/appserver/WOElement.html> 
template)

btw, I wrongly typed in my previous email, the outer should be WODynamicElement

> On 28/gen/2015, at 15:00, Daniele Corti <[email protected]> wrote:
> 
> Hi Amedeo,
> thanks for the answer, but, sorry, I'm not sure to understand it. AFAIK, 
> WODynamicElement is a simple HTML Element, not a component, so I cannot 
> assign a .wo file to it (or am I wrong?).
> 
> Anyway, I'm trying to change my example by moving the submit button on the 
> SubComponent and using context().page().takeValueForKey(Object value, String 
> key) in the SubComponent Action to set the value in the Parent Component, 
> last I call performParentAction(String action) to do the login in the parent.
> 
> Not sure if this is the best way, but seems to work.
> 
> Thank you,
> __
> Daniele
> 
> 
> 2015-01-28 14:02 GMT+01:00 Amedeo Mantica <[email protected] 
> <mailto:[email protected]>>:
> The only way is to use a WODynamicElement as subcomponent instead of a 
> WOComponent
> 
> Sent from my iPhone
> 
> > On 28/gen/2015, at 12:46, Daniele Corti <[email protected] 
> > <mailto:[email protected]>> wrote:
> >
> > Hi list,
> > I don't know if what I want to do is the best approach:
> >
> > I would like to create a Main Component Page that call a reusable 
> > SubComponent
> >
> > Example:
> >
> > MyPage.wo:
> >      <h1>My Page</h1>
> >
> >      <wo:form multipleSubmit="$true">
> >          <wo:submitButton action="$myAction">Do It!</wo:subimtButton>
> >          <wo:MyList></wo:MyList>
> >     </wo:form>
> >
> > in the Subcomponent there is a List of Checkbox
> >
> > MyList.wo:
> >     <ul>
> >          <wo:loop list="$myList" item="$myItem">
> >          <li><wo:checkBox selection="$mySelection" 
> > value="$true"></wo:checkBox></li>
> >          </wo:loop>
> >     </ul>
> >
> > I would like to obtain the checked objects of the subcomponent, but I don't 
> > know how can I get the subcomponent from the Parent MyPage.
> >
> > I know I can put the button in the subcomponent and call 
> > performParentAction, but I would like to put all the logic inside the 
> > MyPage component, and simply display values in the MyList component.
> >
> > Is this possible (first of all)? And, if so, how can I reach subcomponents 
> > from parent?
> >
> > Thank you in advance!
> >
> > --
> > Daniele Corti
> > --
> > I DON'T DoubleClick
> > _______________________________________________
> > Do not post admin requests to the list. They will be ignored.
> > Webobjects-dev mailing list      ([email protected] 
> > <mailto:[email protected]>)
> > Help/Unsubscribe/Update your Subscription:
> > https://lists.apple.com/mailman/options/webobjects-dev/amedeomantica%40me.com
> >  
> > <https://lists.apple.com/mailman/options/webobjects-dev/amedeomantica%40me.com>
> >
> > This email sent to [email protected] <mailto:[email protected]>
> 
> 
> 
> -- 
> Daniele Corti
> --
> I DON'T DoubleClick

 _______________________________________________
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