Hey there
For my project I need two chained select boxes.
I followed the example shown in the API
(http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Select.html),
but used my own SelectModel for my custom value type.
It all looks nice, but when I submit the form,
Are your selects in a loop ?
2012/3/5 Beat Durrer bdur...@gmail.com
Hey there
For my project I need two chained select boxes.
I followed the example shown in the API
(
http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Select.html
),
but used my own
Hi Giulio,
No, they are not. The form is really straight forward as in the example:
t:form t:id=applicationForm
t:errors/
div class=form-row
div class=twoColumnFirst
t:select t:id=category model=categoryModel
encoder=categoryModel blankOption=ALWAYS
Just a wild guess. If any method is called before validating the form
returns a value that should re-post the form, your field will be null if
it's not persisted.
So for example, is the submit button handling method returning anything or
is it void ?
Try *@Persist*ing your field, if it's not
Thanks for that Link, it got me thinking and solved my issue :)
A missing @Persist on the property combined with an onActivate method
which always resetted the ValueEncoder/SelectModel was the issue.
My data comes out of a Database, I wrote a ValueEncoder which only
holds the values of the