Hi Thiago, 

Thanx for the detailed answers! And sorry for being not clear. Sure, value,
option and selectModel are different, i just mixed them into "one thing" in
my questions. 

For getting the list-items to select, i need a selectModel. This selectModel
consists of optionModels, the optionModel just gives me the labels and
values. Hence, for linking the items to the DB entries (my server) the
valueEncoder translates the selected item to that item it actually
represents. (correct me if this is not true)

So, now i can correct my Q2, mixed up value and optionModel (which then ends
up not being a real question anymore, but still a misunderstanding):

I thought that it is possible to add the optionModel to the appModule
somehow that it is "static". 

If i am using non-static option models, each user will always 

request the list(s), e.g:

List<Color> colors = colorService.findAll(); //(taken from the example)

and the selectModelFactory will always have to create the selectModel from
scratch:

// create a SelectModel from my list of colors (taken from the example)
colorSelectModel = selectModelFactory.create(colors, "name");

the point is, that my - options for the optionModel are dynamic, but only
"slowly" increasing/changing and for that reason i thought that there may be
a more efficient way to "populate" the optionModel in a way "globally" and
that this global available option model has to be updated time by time for
staying accurate. 

sorry for the confusion & thanx again. 
alex







--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Dynamic-OptionModel-Implementation-How-To-tp5719875p5719885.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to