Tapestry SelectModel

"Christopher Dodunski" <[email protected]>
Newsgroups gmane.comp.java.tapestry.user
Message-ID <[email protected]>
Hi team,

Just a quick question: When using Tapestry's SelectModel to create a drop
down list of String options, is it possible to enforce this at the 'model'
tier through the use of an annotation?

With Java enumerations this is possible:

    @Enumerated(EnumType.STRING)
    private String country;

The Tapestry 'Hotel' demo app introduces an alternative to plain
enumerations: (Abstract)SelectModel.  But I notice that it is only 'wired
up' at the 'view' tier:

    <select t:type="select" t:id="roomPreference" t:value="booking.beds"
t:model="bedType">
    </select>

Without the SelectModel being 'wired' to the model tier (an entity), it
would mean BeanEditForm would allow the user to type directly into a
String field.  Ideally, I'd like this also to be a drop down selection.

Thanks for any suggestions,

Chris.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.