Re: WicketMessage: Expected close tag for '' Possible attempt to embed component(s) '' in the body of this component which discards its body
Ok, all working - the bug was as expected, user error. add(new Label("programProfile", bem.getProgramProfile())); add(new Label("weightingProfile", bem.getWeightingProfile())); should've been item.add(new Label("programProfile", bem.getProgramProfile())); item.add(new Label("weightingProfile", bem.getWeightingProfile())); Shows that staring at too much code at 2 am isn't good for you - much better to go & dig over your veg patch and come back to the problem :-) -- 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#a13233215 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WicketMessage: Expected close tag for '' Possible attempt to embed component(s) '' in the body of this component which discards its body
Thanks for the reply, Igor - I probably didn't explain myself well, the HTML I listed in my post was part of the error message thrown by Wicket and not my source code. In my source HTML I had this (read span for spanx, if I put in span it doesn't show up in the post !!): [dataview navigator] Actions Booking Id Start Time End Time Campaign Status Program Profile Weighting Profile [actions] [bookingid] [bookingStartRun] [bookingEndRun] [campaign] [status] [programProfile] [weightingProfile] and just in case I've also tried this: [dataview navigator] Actions Booking Id Start Time End Time Campaign Status Program Profile Weighting Profile [actions] [bookingid] [bookingStartRun] [bookingEndRun] [campaign] [status] [programProfile] [weightingProfile] They both give the error I stated. It is lifted more or less entirely from the Wicketstuff SortedGrid example so I'm not clear on what I'm doing wrong, unless it is an incompatibility with Wicket 1.3 ? -- 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#a13228299 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WicketMessage: Expected close tag for '' Possible attempt to embed component(s) '' in the body of this component which discards its body
I should add that I'm using Wicket 1.3 whereas the examples were all 1.2 - though in this area it seems that nothing substantial has changed -- 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#a13224667 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
WicketMessage: Expected close tag for '' Possible attempt to embed component(s) '' in the body of this component which discards its body
I'm getting this error WicketMessage: Expected close tag for '' 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: http://wicket.apache.org/";> Perception Panel Bookings Create/Amend/Delete Bookings Selected Booking: [selected booking] Feedback messages go here [dataview navigator] Actions Booking Id Start Time End Time Campaign Status Program Profile Weighting Profile [actions] [bookingid] [bookingStartRun] [bookingEndRun] [campaign] [status] [programProfile] [weightingProfile] -- 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]
Re: Refresh fields from model
Thanks, that worked great Christopher Gardner-2 wrote: > > I had to call modelChanged() to do this very thing. > > On 10/12/07, Rich Livingstone <[EMAIL PROTECTED]> wrote: >> >> I'm just not sure how to do this - for example, I have a drop down choice >> and >> when it changes, I need to populate other fields. I had presumed the way >> to >> do this was to change the values in an attached PropertyModel and any >> text >> or other UI fields which were attached to this model would be >> automatically >> updated. But this doesn't seem to be so. >> >> It seems an obvious thing but I can't find it in any of the forums - if >> it's >> possible it's got to be simple, yes ? >> -- >> View this message in context: >> http://www.nabble.com/Refresh-fields-from-model-tf4614207.html#a13177078 >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> - >> 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] > > > -- View this message in context: http://www.nabble.com/Refresh-fields-from-model-tf4614207.html#a13224136 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Refresh fields from model
I'm just not sure how to do this - for example, I have a drop down choice and when it changes, I need to populate other fields. I had presumed the way to do this was to change the values in an attached PropertyModel and any text or other UI fields which were attached to this model would be automatically updated. But this doesn't seem to be so. It seems an obvious thing but I can't find it in any of the forums - if it's possible it's got to be simple, yes ? -- View this message in context: http://www.nabble.com/Refresh-fields-from-model-tf4614207.html#a13177078 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]