Hello,

I just ran into the same problem.

You are probably creating the available and select lists in 2 different
methods, you need to do it in the same method with the SAME object(or at
least with a list that doesn't reload when you pull your select) otherwise
you get that null error(or at least that was my problem) because you are
basically handing your palette objects in your select that do not exist in
your available.

I was using the GenericSelectModel from the JumpStart object select that you
use as both your encoder and model.

Not sure if it's the same problem that I was having but it sounds alot like
it. Posting your java may help.

--James

-----Original Message-----
From: Geoff Callender [mailto:[email protected]] 
Sent: January-27-09 12:56 AM
To: Tapestry users
Subject: Re: Palette component

Does this one that works help you?
http://jumpstart.doublenegative.com.au:8080/jumpstart/examples/component/cor
einputcomponents

On 27/01/2009, at 3:32 PM, Davor Miku wrote:

> Anyone, plaese?
>
> On Mon, Jan 26, 2009 at 10:30 PM, Davor Miku <[email protected]>  
> wrote:
>
>>    public List<OptionModel> getOptions() {
>>        List<OptionModel> list = new ArrayList<OptionModel>();
>>        for (Category c : categories) {
>>            list.add(new CategoryOptionModel(c));
>>        }
>>        return list;
>>    }
>>
>> This method returns list of OptionModel objects. If you meant on  
>> this, this
>> list is not empty. I'm not sure I'm following you.
>>
>> On Mon, Jan 26, 2009 at 11:17 PM, Thiago H. de Paula Figueiredo <
>> [email protected]> wrote:
>>
>>> Em Tue, 27 Jan 2009 00:10:36 -0300, Davor Miku <[email protected]>
>>> escreveu:
>>>
>>> Hi Thiago,
>>>>
>>>
>>> Hi!
>>>
>>> Thanks for reply.
>>>> Can you be more specific, please?
>>>>
>>>
>>> It's 1:12 AM here in Belo Horizonte (Brazil), so please don't mind  
>>> if the
>>> answer is as clear as you need. :)
>>>
>>> One of the parameters of Select is model. You should pass a  
>>> SelectModel to
>>> it. Basically, a SelectModel is a list of OptionModel instances
>>> (SelectModel.getOptionModels()), one for each option to appear in  
>>> your
>>> select tag (and component). Select does not support null  
>>> OptionModel's
>>> returned by SelectModel.getOptionModels(), so the exception you seen
>>> happens.
>>>
>>> Summary: make sure the SelectModel returned by getCategoryModel()  
>>> does not
>>> return nulls in its getOptionModels(). ;)
>>>
>>>
>>> --
>>> Thiago H. de Paula Figueiredo
>>> Independent Java consultant, developer, and instructor
>>> http://www.arsmachina.com.br/thiago
>>>
>>> ---------------------------------------------------------------------
>>> 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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to