Hello! I have objects (Messages) and each message may have some "attributes" associated with. Each attribute is part of one attribute family.
Example: Attribute-Family Age has the attributes young, adult, old. Attribute-Family Relation has the attributes single, couple, family. Both the Attribute Families are dynamic as well as their attributes itself. So they should be generated or manipulated at runtime. (in 99,9% of the cases, i will only add attributes for attribute families and will only add completely new attribute-families (so i wont change or delete attributes or their families) Each message may be associated with ONE attribute for each or some attribute-families. Example: Message m1 gets adult and single as attribute values. Message m2 gets young Message m3 gets couple For this, I need a dynamic approach with the OptionModel. There should be a list being populated with t:selects for each attribute familiy with their corresponding attributes. loop through all attribute-families: t:select1 should show young, adult, old t:select2 should show single, couple, family and so on.. My current (non dynamic) implementation comes with enums, but what i really need is a list implementation for the OptionModel. So my first look was this; http://tapestry.apache.org/using-select-with-a-list.html this should direct me to the right solution. the point is, i need to program this module efficiently. Therefore, i have three questions: *Q1* Contributing value encoders to app module wont help, due to the reason that the value encoders are not really dynamic in my case (e.g. if iam creating a new attribute-family, i would need to add a value encoder also for each attribute family at runtime / but i guess this is not possible, is it?) *Q2* What i understood so far is that the added value encoders to app module will populate the option model somehow static so that the model itself will be only generated once /Well, in short, this design allows you to avoid storing (via @Persist, @SessionAttribute or @SessionState) the entire (potentially large) list of objects in the session or rebuilding the whole list of objects again (though only one is needed) when the form is submitted. / but if it is only generated once, how then will the list get updated if i am enhancing the list? *Q3* If I have thousands of users creating messages, and for each message the optionModel would be generated again (for all attribute families which are expected to increase), this would result in many "unnecessary" database queries. I will probably cope with 20-500 families and each family will have a growing list of attributes. Adding attributes or attributes-familiies is not time-critical. So another approach would be to hold somewhere a static list of value encoders which are updating themselves in a specific interval. Is this possible? i guess that i have misunderstood some things, right? alex -- View this message in context: http://tapestry.1045711.n5.nabble.com/Dynamic-OptionModel-Implementation-How-To-tp5719875.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