Hi Patrick,
On Wed, Jul 24, 2013 at 10:36 AM, Patrick Davids <patrick.dav...@nuboit.de>wrote: > Hi Martin, > concerning the IComponentInheritedModel I did not not try anything in my > panel since yet, because I suppose it should work from the scratch, when > a manually wrap the ModelObject on form level into CompundPropertyModel. > > As I can see CompoundPropertyModel is an IComponentInheritedModel, and I > understand, why this works. > > Form f = new Form("anyid", new CompoundPropertyModel(PersonObject)); > f.add(new TextField("personName")); > > > > My question focused more on, what I should implement in > MyOwnTextFieldPanel("personName") to act the same way like an usual > textfield, not what I have to do on the parent component/form. > An ususal TextField "joins" the Form and its inner CompundPropertyModel > (Handling) in a magic way, and I would like to have the same feature for > MyOwnTextField. > It should work the same way. Just make sure your panel "participates" in the component path. For example: Form f = new Form("anyid", new CompoundPropertyModel(personObject)); f.add(new YourPanel("namesObject")); class YourPanel extends Panel { public YourPanel(Sting id) { super(id); add(new TextField("first")); add(new TextField("last")); } } With this code the text field's model would be: personObject.getNamesObject().getFirst() > regards > Patrick > > Am 23.07.2013 15:21, schrieb Martin Grigorov: > > Hi, > > > > > > On Tue, Jul 23, 2013 at 4:17 PM, Patrick Davids < > patrick.dav...@nuboit.de>wrote: > > > >> Hi all, > >> I implemented a "TextField-Panel". > >> Its kind of FormComponentPanel, but not really... do not have a > >> convertInput() situation. > >> Just additional behaviors and some own l18n stuff... > >> > >> Its already working fine, but what I always have to to is, getting the > >> modelobject manually and forward into my form (model object), where it > >> is used. > >> > >> I would like to implement it in a way, behaving like CompundProperty > >> modeled forms. > >> > >> I read about an IComponentInheritance marker interface, but I do not > >> > > > > Do you mean org.apache.wicket.model.IComponentInheritedModel ? > > It has a demo code in its javadoc. > > Show us what you tried. > > > > > >> know, how to use it. > >> > >> Can some one help? > >> > >> kind regards and thanx > >> Patrick > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > >> For additional commands, e-mail: users-h...@wicket.apache.org > >> > >> > > >