Hi all,
I want users of an advanced search page to be able to add textfields to
a form dynamically. There should be a plus sign button which when each
time it's pressed there should be added 2 dropdowns and a textfield.
I have created an advancedSearchFields class with getters and setters.
public class AdvancedSearchFields {
private String boolDropdownIdValue;
private String searchTextFieldIdValue;
private String dropdownIdValue;
}
When I try to do the following from within the AdvancedSearch.tml I get
an error.
<tr t:type="loop" t:source="extraFields" t:value="advSearchFieldItem">
<td><t:select
t:id="*advSearchFieldItem.boolDropdownIdValue*"
value="*advSearchFieldItem.boolDropdownIdValue*" blankLabel="and"
model="literal:OR=or,NOT=not" /></td>
<td><input t:type="textfield"
t:value="*advSearchFieldItem.searchTextFieldIdValue*"
t:id="*advSearchFieldItem.searchTextFieldIdValue*" type="text"
name="*advSearchFieldItem.searchTextFieldIdValue*" class="searchfield"
/></td>
<td>in <t:select t:id="*advSearchFieldItem.dropdownIdValue*"
value="*advSearchFieldItem.dropdownIdValue*" blankLabel="All Fields"
model="literal:cat_ref_code=Catalogue: Reference code,
cat_title=Catalogue: Title"/></td>
</tr>
_Error:_
Failure parsing template context:AdvancedSearch.tml: Component id
'advSearchFieldItem.boolDropdownIdValue' is not valid; component ids
must be valid Java identifiers: start with a letter, and consist of
letters, numbers and underscores.
It seems that there seems to not accept the *advSearchFieldItem.* *that
I have entered as ids and values.
Any ideas on how to solve this? Or another way of doing the same thing?
Dimitrios
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org