You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Adriano dos Santos Fernandes <ad...@gmail.com> on 2009/03/05 14:12:13 UTC

DropDownChoice with disabled items

Is there an easy way to do it? Output would be:

<select>
    <option>Enabled item</option>
    <option disabled="disabled">Disabled item</option>
    ...
</select>


Adriano


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: DropDownChoice with disabled items

Posted by Adriano dos Santos Fernandes <ad...@gmail.com>.
jWeekend escreveu:
> Adriano,
>
> I'm glad it was useful - these classes make DDCs pretty versatile.
>
> Wicket 1.3 is designed to be ale to run on Java versions before 1.5 (when
> generics were introduced to the language). Take a look at 
> http://wicket.apache.org/docs/1.4/ SelectOption in Wicket 1.4   if you are
> using Java 5 or better.
I'm using Wicket 1.4. :-)

Let me explain. The problems are:
- Select is not generified. It receives an unparameterized Model.
- SelectOption is parameterized, but we should rely on getDefaultModel 
(that returns a IModel<?>), so it getDefaultModel().getObject() always 
returns an Object.


Adriano


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: DropDownChoice with disabled items

Posted by jWeekend <jw...@cabouge.com>.
Adriano,

I'm glad it was useful - these classes make DDCs pretty versatile.

Wicket 1.3 is designed to be ale to run on Java versions before 1.5 (when
generics were introduced to the language). Take a look at 
http://wicket.apache.org/docs/1.4/ SelectOption in Wicket 1.4   if you are
using Java 5 or better.

Regards - Cemal
http://jWeekend.com jWeekend 


Adriano dos Santos Fernandes-3 wrote:
> 
> Thanks, Cemal.
> 
> However, I must say that I don't like how generics are handled (or not 
> handled at all) in these components.
> 
> 
> Adriano
> 
> 
> jWeekend escreveu:
>> Adriano,
>>
>> Take a look at a mini-presentation I gave at one of our London Wicket
>> Events
>> sometime in last couple of years on "Select and SelectOption" at
>> http://jweekend.com/dev/ArticlesPage/  .
>>
>> Regards - Cemal
>> http://jWeekend.com jWeekend  
>>
>>
>> Adriano dos Santos Fernandes-3 wrote:
>>   
>>> Is there an easy way to do it? Output would be:
>>>
>>> <select>
>>>     <option>Enabled item</option>
>>>     <option disabled="disabled">Disabled item</option>
>>>     ...
>>> </select>
>>>
>>>
>>> Adriano
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>>
>>>     
>>
>>   
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/DropDownChoice-with-disabled-items-tp22351308p22371622.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: DropDownChoice with disabled items

Posted by Adriano dos Santos Fernandes <ad...@gmail.com>.
Thanks, Cemal.

However, I must say that I don't like how generics are handled (or not 
handled at all) in these components.


Adriano


jWeekend escreveu:
> Adriano,
>
> Take a look at a mini-presentation I gave at one of our London Wicket Events
> sometime in last couple of years on "Select and SelectOption" at
> http://jweekend.com/dev/ArticlesPage/  .
>
> Regards - Cemal
> http://jWeekend.com jWeekend  
>
>
> Adriano dos Santos Fernandes-3 wrote:
>   
>> Is there an easy way to do it? Output would be:
>>
>> <select>
>>     <option>Enabled item</option>
>>     <option disabled="disabled">Disabled item</option>
>>     ...
>> </select>
>>
>>
>> Adriano
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>
>>     
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: DropDownChoice with disabled items

Posted by jWeekend <jw...@cabouge.com>.
Adriano,

Take a look at a mini-presentation I gave at one of our London Wicket Events
sometime in last couple of years on "Select and SelectOption" at
http://jweekend.com/dev/ArticlesPage/  .

Regards - Cemal
http://jWeekend.com jWeekend  


Adriano dos Santos Fernandes-3 wrote:
> 
> Is there an easy way to do it? Output would be:
> 
> <select>
>     <option>Enabled item</option>
>     <option disabled="disabled">Disabled item</option>
>     ...
> </select>
> 
> 
> Adriano
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/DropDownChoice-with-disabled-items-tp22351308p22352276.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: DropDownChoice with disabled items

Posted by Martin Makundi <ma...@koodaripalvelut.com>.
Would you have time to implement this?

https://issues.apache.org/jira/browse/WICKET-1785

http://mail-archives.apache.org/mod_mbox/wicket-commits/200808.mbox/%3C784112037.1218385184286.JavaMail.jira@brutus%3E

I was planning to do it but it hasn't been an issue for me lately.

**
Martin

2009/3/5 Adriano dos Santos Fernandes <ad...@gmail.com>:
> Is there an easy way to do it? Output would be:
>
> <select>
>   <option>Enabled item</option>
>   <option disabled="disabled">Disabled item</option>
>   ...
> </select>
>
>
> Adriano
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org