you are missing wicket:ids in the second set of tds...

 <tr wicket:id="sorting">
       <td>[actions]</td>

should actually be <td wicket:id="actions">[actions]</td> :)

-igor

On 10/15/07, Rich Livingstone <[EMAIL PROTECTED]> wrote:
>
>
> I'm getting this error WicketMessage: Expected close tag for '<tr
> wicket:id="sorting">' Possible attempt to embed component(s) '' in the
> body
> of this component which discards its body
>
> when I'm actually running something which is near as dammit borrowed from
> the wicketstuff sorted page example. The full text of the generated HTML
> is
> included in the error (see below) and my code is fairly simple and as far
> as
> I can see, identical to the example (well, clearly it isn't but I can't
> see
> the problem anyway). Anyone with sharper eyes than me or am i doing
> something invalid full stop ?
>
> I've read the other posts on this error and they are all embedding invalid
> tags inside others - but my code is straight from an example so how come
> it
> barfs ?
>
> My sorting table view:
>
> // the iterator definitely returns a booking here (the code is part of a
> bookings system)
>         BookingsDataProvider bp = new BookingsDataProvider(bookings);
>
>         final DataView dataView = new DataView("sorting", bp)
>                {
>             protected void populateItem(final Item item)
>             {
>                 Booking booking = (Booking)item.getModelObject();
>
>                 BookingEntryModel bem = new BookingEntryModel();
>
>                 // in correct formats now
>                 try {
> // initialises fields in correct formats etc
>                         bem.updateDisplayFromBooking(booking);
>                 }
>                 catch (Exception e)  {
>                 }
>
>                 item.add(new ActionPanel("actions", item.getModel()));
>
>                             item.add(new Label("bookingid",
> bem.getCurrentBooking()));
>
>                 item.add(new
> Label("bookingStartRun",DateUtil.format(bem.getBookingStartRun(),
> DatePattern.s_datetimedisplay)));
>                 item.add(new
> Label("bookingEndRun",DateUtil.format(bem.getBookingEndRun(),
> DatePattern.s_datetimedisplay)));
>
>
>             item.add(new Label("campaign", bem.getCampaign()));
>             item.add(new Label("status", bem.getStatus()));
>             add(new Label("programProfile", bem.getProgramProfile()));
>             add(new Label("weightingProfile", bem.getWeightingProfile()));
>
>
>                 item.add(new AttributeModifier("class", true, new
> AbstractReadOnlyModel()
>                 {
>                     public Object getObject()
>                     {
>                         return (item.getIndex() % 2 == 1) ? "even" :
> "odd";
>                     }
>                 }));
>             }
>         };
>
> The HTML according to the error message:
>
> <html xmlns:wicket="http://wicket.apache.org/";>
> <head>
>     <title>Perception Panel Bookings</title>
> <!--    <link rel="stylesheet" type="text/css" href="style.css"/>-->
> </head>
> <body>
>
>
>     <h2>Create/Amend/Delete Bookings</h2>
>
>
> Selected Booking: [selected booking]
> <br/>
> Feedback messages go here
> <wicket:child><wicket:extend>
>
> <br/><br/>
>
> [dataview navigator]
> <table cellspacing="0" class="dataview">
>     <tr>
>         <th>Actions</th>
>         <th>Booking Id</th>
>         <th wicket:id="bookingStartRun">Start Time</th>
>         <th>End Time</th>
>         <th>Campaign</th>
>         <th>Status</th>
>         <th>Program Profile</th>
>         <th>Weighting Profile</th>
>     </tr>
>     <tr wicket:id="sorting">
>         <td>[actions]</td>
>         <td>[bookingid] </td>
>         <td>[bookingStartRun]</td>
>         <td>[bookingEndRun]</td>
>         <td>[campaign]</td>
>         <td>[status]</td>
>         <td>[programProfile]</td>
>         <td>[weightingProfile]</td>
> </tr>
>           <tr>
>           <td colspan="2">
>               <input value="Add Booking" type="submit"
> wicket:id="newButton"/>
>           </td>
>           </tr>
> </table>
>
> </wicket:extend></wicket:child>
>
> </body>
> </html>
> --
> View this message in context:
> http://www.nabble.com/WicketMessage%3A-Expected-close-tag-for-%27%3Ctr-wicket%3Aid%3D%22sorting%22%3E%27-Possible-attempt-to-embed-component%28s%29-%27%3Cspan-wicket%3Aid%3D%22actions%22%3E%27-in-the-body-of-this-component-which-discards-its-body-tf4631132.html#a13224261
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to