Hello Tommy, rewrite <select t:type="select" t:model="option" t:id="option" t:value="option"> to <select t:type="select" t:id="option">
If you explicitly name a model (t:model="option"), it has to be an implementation of org.apache.tapestry.SelectModel. Your Enum "Option" apparently is not an implementation of that. That causes the exception I think. For Enums it is not necessary to explicitly name a model, because Tapestry auto generates one. So simply leave it out. The t:value is not necessary either, because t:id="option" corresponds to a field with the exact same name in the page class. For an example look at the Enum example at the middle of the page: http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry/corelib/components/Select.html Regards, nillehammer ----- original Nachricht -------- Betreff: Tapestry 5.0.11 - Selecting elements causes Exception in ValueEncoderSource Gesendet: Fr, 13. Jun 2008 Von: Tommyboy66<[EMAIL PROTECTED]> > > Hello, > > i have to upgrade a Tapestry-Project from Vers. 5.0.6 to 5.0.11 and now > there are several problems with some components. For example, i want to > select items from a dropdown field. The code in the older Tapestry-Version > works fine, but now i get an exception in ValueEncoderSource which i can't > realize. The complete Output you can find here: > http://ubuntuusers.de/paste/278645/ http://ubuntuusers.de/paste/278645/ . > > The tml and the java-files is imho very simple: > > *.tml: > <select t:type="select" t:model="option" t:id="option" t:value="option"> > </select> > *.java: > @Persist > private Options option; > > @Validate("required") > public Options getOption() { > return option; > } > > public void setOption(Options type) > { > option = type; } > > Options.java: > > public enum Options { > opt1, opt2, opt3 > } > > Can somebody understand the problem and can solve it? > > Thanks for your reply, > Tom > > > > > -- > View this message in context: > http://www.nabble.com/Tapestry-5.0.11---Selecting-elements-causes-Exception- > in-ValueEncoderSource-tp17821914p17821914.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --- original Nachricht Ende ---- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]