On 9/15/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> this is exactly the interface i described earlier in this thread, and yeah
> it will work for this usecase as well even though i explained another one.
>
> you just have to be careful to provide the page as the parent when the
> border component itself is added - but you can do that by checking the id.
>

The I implemented it the return value of getAlternateParent() must
never be null. You must either return the border or the page, if the
border == null. This was necessary as HtmlHeaderContainer and
HtmlBoldyContainer are added prior to the border as well.

> so the interface would actually need to have getAlernateParent(Component c);
> so you can be selective - which also means we need to set the id before the
> parent. this is where the danger comes in - getAlternateParent is dealing
> with an uninitialized component object. so maybe getAlternatePrent(Class
> clazz, String id, IModel model) would be better because those 3 things we
> know upfront and they are safe to touch.

I haven't understood yet why we need to be selective. Why doesn't

MarkupContainer getAlternateParent()
{
    return (this.border == null ? this : this.border);
}

work? It seems to work fine in the current code base.

Juergen

>
> -Igor
>
>
>
> On 9/14/06, Juergen Donnerstag <[EMAIL PROTECTED]> wrote:
>
>
>
> On 9/14/06, Juergen Donnerstag <[EMAIL PROTECTED]> wrote:
>
> > While starting to removing the bordered page code pieces it came to me
> > that an Interface such as
> >
> > interface IAlternateParentProvider
> > {
> >    MarkupContainer getAlternateParent()
> > }
> >
> > could do the trick in 2.0 if in Container.<init> we do
> >
> > if (parent instanceof IAlternateParentProvider)
> > {
> >    this.parent = ((IAlternateParentProvider) parent).getParent();
> > }
> > else
> > {
> >    this.parent = parent;
> > }
> >
> > The outcome is that your bordered page needs to implement the
> > interface, you provide the border component, and that's it. Any
> > component create in Page will be added to border instead. It is
> > non-intrusive and to me it is much more intuitive as well compared to
> > border.setTransparent().
> >
> > Juergen
> >
> > On 9/14/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> > > On 9/14/06, Juergen Donnerstag < [EMAIL PROTECTED]> wrote:
> > > > Some more food for thought or what we should support and what not.
> > > >
> > > > Transparent containers allow you to add a component to the transparent
> > > > container and the markup is expected to be in the transparent
> > > > containers parent. Thats why it is called transparent. I'm fine with
> > > > this use case and I think we should support it.
> > > >
> > > > In contrast with a bordered page you add the component to a container
> > > > (e.g. Page) and the markup can be found in any transparent container
> > > > which is also a child of Page. In order to find the markup for the
> > > > component you hence must scan the Pages markup file the components
> > > > markup as well as the markup associated with all transparent
> > > > containers also add to Page. This use case (e.g. bordered pages), IMHO
> > > > we shouldn't support.
> > > >
> > > > I currently believe there is too much magic involved in the latter use
> > > > case and as already mentioned you'll find quite some clunky code in
> > > > the code base already to just support that use case. I'd much try to
> > > > stay as close as possible to the 1:1 mapping of component hierarchy
> > > > and markup hierarchy.
> > >
> > > +1
> > >
> > > Eelco
> > >
> > >
> -------------------------------------------------------------------------
> > > Using Tomcat but need to do more? Need to support web services,
> security?
> > > Get stuff done quickly with pre-integrated technology to make your job
> easier
> > > Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo
> > >
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> > > _______________________________________________
> > > Wicket-develop mailing list
> > > Wicket-develop@lists.sourceforge.net
> > >
> https://lists.sourceforge.net/lists/listinfo/wicket-develop
> > >
> >
> >
> -------------------------------------------------------------------------
> > Using Tomcat but need to do more? Need to support web services, security?
> > Get stuff done quickly with pre-integrated technology to make your job
> easier
> > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> >
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> > _______________________________________________
> > Wicket-develop mailing list
> > Wicket-develop@lists.sourceforge.net
> >
> https://lists.sourceforge.net/lists/listinfo/wicket-develop
> >
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>
> _______________________________________________
> Wicket-develop mailing list
> Wicket-develop@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-develop
>
>
>

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-develop mailing list
Wicket-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to