Re: Model property name different than wicket:id, is possible?

2009-10-21 Thread Iain Reddick
Hi, You use it like this: (assuming myModel is the compound property model) Label idLabel = new Label(idLabel, myModel.bind(id)); This would give component id idLabel, using property id. CompoundPropertyModel.bind() basically returns a PropertyModel. iainr Manuel Corrales wrote: Ok, I

Re: Model property name different than wicket:id, is possible?

2009-10-21 Thread James Carman
Do you have to use CompoundPropertyModel? Why not use explicit models instead? This is one reason why I don't like to use CompoundPropertyModels. On Tue, Oct 20, 2009 at 2:57 PM, Manuel Corrales manuelcorra...@gmail.com wrote: Hello. I have a (i hope) reusable panel. This panel has a

Re: Model property name different than wicket:id, is possible?

2009-10-21 Thread Manuel Corrales
Hey, thanks!! I solved the issue using Iain advice. Thanks for your help! Best regards. On Wed, Oct 21, 2009 at 9:15 AM, James Carman jcar...@carmanconsulting.comwrote: Do you have to use CompoundPropertyModel? Why not use explicit models instead? This is one reason why I don't like to use

Model property name different than wicket:id, is possible?

2009-10-20 Thread Manuel Corrales
Hello. I have a (i hope) reusable panel. This panel has a textField, a hiddenField and a link that open up a modalWindow. Then you can select an item from a list in the modal window and the field and hidden field completes according to the selected value. I want the hidden field to be binded with

Re: Model property name different than wicket:id, is possible?

2009-10-20 Thread Manuel Corrales
Ok, I have found a few things but still can't figure this out. Apparently the BoundCompoundPropertyModel is what i need, but it is deprecated. And I have read the javadoc but still can't figure out how to achieve having wicket:id on HTML different than the property name in the model. The javadoc

Re: Model property name different than wicket:id, is possible?

2009-10-20 Thread Pedro Santos
the problem I have is that the field name of the model object is different on every form, and the wicket:id is the same you has: public class ObjectThatGoesToModel{ private Object propetyThatGoesToSomeForm; private Object propetyThatGoesToOtherFormInSomeSituations; } ?? I think you can