My form has a custom element like below, created using custom ajax:
<select jwcid="testtest <at> Any">
<option value="x">California -- CA</option>
<option value="y">Colorado -- CO</option>
<option value="z">Connecticut -- CN</option>
</select>
After the form is submitted, how do I get the value of this custom html element?
cycle.getPage().getComponents().get("testtest") ?
If I understand you correctly, you have a form element generated not by Tapestry, but by something else.
First of all,
jwcidhas no place in your HTML code, it’s only used in Tapestry component templates. Second, theselectelement must have anameattribute or else your browser won’t submit it at all:To get the submitted value on the server side, use
cycle.getParameter("name-of-element")in your page/component class.