hmm...
I just ran into something similar with fragments. The markup looks like this:

<wicket:fragment wicket:id="menuItemNoSubMenu">
                <a wicket:id="menuItemLink">
                                <span wicket:id="menuItemLabel">[label 
here]</span>
                </a>
                <em class="checkedindicator" wicket:id="menuCheck" ></em>
</wicket:fragment>

If I create a WebComponent for "menuCheck", I get the "expected close
tag for...". If I create a WebMarkupContainer for "menuCheck", it
works. Since a Label is a WebComponent, I bet this is the problem Kent
is seeing also. I think it is a bug. I'll try find some time to create
a test case.

best,
jim

On 5/28/07, Matthieu Casanova <[EMAIL PROTECTED]> wrote:
> 2007/5/27, Kent Tong <[EMAIL PROTECTED]>:
> > Matthieu Casanova <chocolat.mou <at> gmail.com> writes:
> >
> > > <html>
> > > <body>
> > > <span wicket:id="list">
> > >     <label wicket:id="key">key</label>
> > >     <span wicket:id="list2">
> > >         <label wicket:id="value">Value</label>
> > >     </span>
> > > </span>
> > > </body>
> > > </html>
> >
> > If you use a fragment inside list2, there is no one to absorb the <label>:
> >
> >          <label wicket:id="value">Value</label>
> >
> > As it is sticking there, Wicket can't find the closing tag for list2.
> > A solution is to not to use a fragment. Just make list2 invisible
> > (or just use it as is. If the model given to it is null, list2 will
> > do nothing).
> >
> >
>
> I think I understand but it is strange to me : if I replace the list2 by a
> fragment, I expect the content of list2 is completely replaced so isn't it a
> bug ?
> The only method I found was to have 2 fragments : one if the list contains
> something and the other if the list is empty and my template is like that :
> <span wicket:id="list2>
> <wicket:panel wicket:id="panelinside"></wicket:panel>
> </span>
>
> <wicket:fragment wicket:id="frag1">
> Nothing inside
> </wicket:fragment>
>
>
> <wicket:fragment wicket:id="frag2">
> <label wicket:id="value">Value</label>
> </wicket:fragment>
>
> It works but it is not really handy.
>
> The idea is to replace the content of a table by a line containing "no
> records" if there is no data instead of having an empty line.
> Is there a simple way to do that or nothing easier than my 2 fragments ?
>
>
> Matthieu
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to