why? because propertymodel is a convinience class only. once we start
adding things like this into it it will get bloated. it is pretty easy
to roll your own implementing imodel directly.

-igor

On Tue, Sep 30, 2008 at 10:53 AM, dlipski <[EMAIL PROTECTED]> wrote:
>
> If there is no option to force (why? I can imagine setMapKeyClass method in
> PropertyModel...) PropertyModel to do this and I have to use different
> Model, I would like to ask does Wicket(or one of Wicket subprojects such as
> WicketExtensions) provide such ready to use model ?
>
> Daniel Lipski
>
> igor.vaynberg wrote:
>>
>> dont use a property model, roll your own
>>
>> -igor
>>
>> On Tue, Sep 30, 2008 at 8:31 AM, dlipski <[EMAIL PROTECTED]>
>> wrote:
>>>
>>> Hi
>>>
>>> Im trying to 'force' PropertyModel to put into map key different then
>>> String
>>> but after few trials I have no idea how to do this.
>>>
>>> Example:
>>> I have field myMap in my page initialized as follows:
>>>
>>> Map<Long, Boolean> myMap = new HashMap<Long, Boolean>();
>>>
>>> then I create property model for my page(this == page containing myMap
>>> field):
>>> PropertyModel p = new PropertyModel (this, "myMap[123]");
>>>
>>> now when I execute:
>>> p.setObject(true);
>>> model puts into map expected boolean but key is of type String not Long.
>>> How I can force this property model to put with key of choosen class (in
>>> this example Long)?
>>>
>>> Regards
>>> Daniel Lipski
>>> --
>>> View this message in context:
>>> http://www.nabble.com/PropertyModel-type-of-key-map-tp19744489p19744489.html
>>> 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/PropertyModel-type-of-key-map-tp19744489p19747226.html
> 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]

Reply via email to