In yourpage.tml:
<t:form>
<input t:id="selectName" model="nameSelection" />
</t:form>
In yourpage.java:
@Property
@Persist
private String selectedName;
@Component(parameters = {"value=selectedName"})
private Select selectName;
@Property
@Persist
private SelectModel nameSelection;
.... in your code .....
List<String> names = new ArrayList<String>();
// populate
for (Iterator<String> iter = .....; iter.hasNext();){
names.add(iter.next());
}
nameSelection = TapestryInternalUtils.toSelectModel(names);
No comments:
Post a Comment