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 < thiag...@gmail.com> wrote: > Em Tue, 27 Jan 2009 00:10:36 -0300, Davor Miku <davorm...@gmail.com> > 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: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >