I use the following code for select-component:
Java class:
@Component(parameters = {"blankOption=AUTO", "model=someModel", "value=someId", "zone=someZone"}) private Select demoSelect;
Template:
<select t:id="demoSelect" />
It will display something like this:
<select id="demoSelect" name="demoSelect"> <option value=""></option> <option value="1">first</option> <option value="2">second</option> <option value="3">third</option> </select>
The behavior I'm looking for is that a certain parameter is defined (this should be defined in the page class). How can I configure this in Tapestry? Basically I need to tell Tapestry to display "selected" for the corresponding option, for example:
<select id="demoSelect" name="demoSelect"> <option value=""></option> <option value="1">first</option> <option value="2" selected="selected">second</option> <option value="3">third</option> </select>
Is it enough to change the model (I donβt think so), or do I need to expand the Select component itself. I found this article that looked pretty promising, but unfortunately all the links to the source codes are dead.
source share