I'm sorry but reading that didn't help. I was not able to find the
answer for my problem. Maybe I'm to tired.

If I do this:

<wicket:panel>
        <div wicket:id="sibling"> -- Loop is used here
                <div>
                        <div wicket:id="caption"> -- this comes from the page 
markup
                </div>
                <div>
                        <div wicket:id="content" /> -- this comes from the page 
markup
                </div>
        </div>
</wicket:panel>


Am I able to create pages like this?

<body>
        <div wicket:id="level1"> -- my panel
                <div> -- caption for level1
                        <span wicket:id="text" />
                        <span wicket:id="text2" />
                </div>
                <div> -- content for level1
                        <div wicket:id="level2-1"> -- my panel
                                <div> -- caption for level2-1
                                        <span wicket:id="label" />
                                </div>
                                <div> -- empty content for level2-1
                                </div>
                        </div>
                        <div wicket:id="level2-2"> -- my panel
                                <div> -- caption for level2-2
                                        <span wicket:id="text" />
                                </div>
                                <div> -- content for level2-2
                                        <table>
                                        <tr wicket:id="items">
                                        ...
                                        </tr>
                                        </table>
                                </div>
                        </div>
                </div>
        </div>
</body>

My problem is I don't know how to connect the panel instance with the
right caption and content. Each node caption differs not in the data but
also in the layout. And this is available also for the content.

Thanks,
Stefan

On Wed, 2008-06-04 at 14:35 +0200, Martijn Dashorst wrote:
> Yes. you are wrong.
> 
> Read about Models:
> http://cwiki.apache.org/WICKET/working-with-wicket-models.html
> 
> Martijn
> 
> On Wed, Jun 4, 2008 at 2:29 PM, Stefan Selariu <[EMAIL PROTECTED]> wrote:
> > Thanks for the answers.
> >
> > The only annoying thing is that I have to create a different panel for
> > each node since the captions differ on each level. Or am I wrong?
> >
> > Stefan
> >
> > On Wed, 2008-06-04 at 14:22 +0200, Jan Kriesten wrote:
> >> hi stefan,
> >>
> >> > The think is the markup is required to be like this. The only thing I'd
> >> > like to reduce is the written java code. In short I'd like to create a
> >> > reusable node component that I can configure (with populateCaption() and
> >> > populateChildren() callback methods perhaps) just like the Loop :)
> >>
> >> martijns solution still applies - just make your own panels with the needed
> >> methods?!
> >>
> >> regards, --- jan.
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to