> 
> >compent names nested inside a wicket:component still need to be
> >unique, because wicket:components are "anonymous". Except you do
> >get("myBox").add(new Label("helloworld"...). correct?
> >
> >
> well, no, i was thinking you just say add(new Label("helloworld", ...))
> 

but how does add() know which "helloworld" you are adding? The order
at which I add components to the container can be random. I do not see
any means how add() can figure out which "helloworld" component I'm
adding.

> then add would be smart enough to figure out that there is an
> intervening wicket:component
> that needs to be added first.
> 
> if we're going to force people to name wicket:component nodes and then
> use that name in
> the java code, we might as well abandon the idea altogether since the
> point of wicket:component
> is to enable seamless presentation-only components so that designers can
> just insert borders
> as they see fit without requiring any code changes.  i think that goal
> is worthy if we can figure
> out how to accomplish it elegantly.
>

The problem occurs only with equally named components ("helloworld").
If that is the only restriction, I think we can live with that.
Btw, the component is javadoced experimental to inform every user
about possible major changes to this component.
 
> 
> >container.add() checks against the Markup that the component name
> >exists. Else throw an error.
> >
> >
> yes.  this can be very tricky though... the simple case works as you
> suggest.  but in more
> complex containers like pages, you can have out-of-order container
> construction where
> a deeply nested structure is composed from the bottom up using java
> local variables to
> hold the intermediate container hierarchy results.  in this case,
> checking cannot be done
> until the nested structure is finally added to the container because the
> nesting is being
> defined by java local variables until add() is called.  make sense?
> 
not sure I understand what you means.Isn't the deep structure created
by add(add(add(add())) etc. Thus add() only needs to check its
immediate children. That should be true for borders, bodies as well as
panels.

> 
> >container.add() will also add <wicket:component>s which are immediate
> >children (not nested children) of the component just added (nested
> >components).
> >
> >
> yes, but the component being added may itself be a container with
> children already added to it
> thanks again to java out-of-order construction (relative to the markup).
> 
yes but the container's add will handle it's children. I think there
is no need for the component to handle it (component and container in
the context of your sentence).

Juergen


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to