That's a clear example, thanks, and nicely highlights the point I had in mind. Here's a small but important section of the javadoc for Component:
* The primary responsibility of a component is * to use its model (an object that implements IModel), which can be set via * [EMAIL PROTECTED] Component#setModel(IModel model)} and retrieved via * [EMAIL PROTECTED] Component#getModel()}, to render a response in an appropriate markup * language, such as HTML. In addition, form components know how to update their * models based on request information. I suppose this could be interpreted (in the context of a MarkupContainer, WebMarkupContainer ... down to the various Repeaters impls) to also mean supplying "model" information for its children "to render a response ..." (rather than the container component directly using its model to render anything itself - although it will tell its children to render themselves, and they may get their model data from it - using the mechanism provided by the CompoundPropertyModel or the like). Other MarkupContainers (eg TextField) use their models as the above javadoc suggests - without the need for any such special interpretation. I'll go over what I was thinking in this respect when I see you later. Regards- Cemal http://jWeekend.co.uk http://jWeekend.co.uk Al Maw wrote: > > jweekend wrote: >> When instantiating a RepeatingView, is there a case where >> RepeatingView(String id, IModel model) would be used instead of >> RepeatingView(String id) ? >> It seems that RepeatingView's (and RefreshingView's) "model" is unused. > > Use case: > > RepeatingView view = new RepeatingView( > "foo", new CompoundPropertyModel(someBean) > ); > > view.add(new PropertyEditorPanel("name")); > if (isAllowed(somebean, "ACTION.EDIT.SomeBean.description")) { > view.add(new PropertyEditorPanel("description")); > } > > > Regards, > > Al > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/RepeatingView-constructors-tf4830379.html#a13857191 Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
