I am using the playframework 2.0 with scala and I am facing many problem with the @select template. So what I have is a @select field as part of a Form (the Form shouldn't be interesting here):
@select(
Form("<variable of select 1>"),
options = options(<call of function which returns a list>),
'_default -> "--- stupid select templates ---",
'_error -> Form.globalError
)
now i have another select. Important about this one is - I want to fill it from a function, which gets the actual value of the first @select as parameter.
@select(
Form("<other name of variable>"),
options = options(<function(<variable of select 1>)>),
'_default -> "--- stupid select templates ---",
'_error -> Form.globalError
)
So what i actually need is some kind of "onchange" envent for the @select fields. Another problem is, that the playframework can't read the "'_default" value of the @select (when I set a default value and try to use it in a Form, it gets counted as None)
NOTE: both @selects are on the same html site and both belong to the same form
Does someone know a workaround here? or possible examples?