i think i could solve what i wanted to do.

generating dynamically the t:selects with their appropriate selectModels.

TML

<div t:type="loop" source="group.baseFeatureList" value="baseFeature"
encoder="encoder">
<div>
${baseFeature.key}
<t:select  value="featureValue" model="baseFeature.selectModel" />
</div>
</div>

JAVA

    @Property
    private final ValueEncoder<BaseFeature> encoder = new
ValueEncoder<BaseFeature>()
    {

                @Override
                public String toClient(BaseFeature value) {
                        return value.getKey();
                }

                @Override
                public BaseFeature toValue(String clientValue) {
                        System.out.println(clientValue);
                        return featureService.findBaseFeatureByKey(clientValue);
                }
    };

if someone needs this approach, just ask, and you get my code. 

thx to all for helping!



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Dynamic-OptionModel-Implementation-How-To-tp5719875p5719911.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