Hi, I'm trying to create a component which would generate a form. While doing that I'm creating the form fields and form buttons using the t:loop by picking the values from a hashmap as shown below: <t:Loop t:source="actionmap.keySet()" t:value="actionKey"> <input t:type="submit" t:id="actionKey" id="actionKey" t:value="${actionmapValue}" t:class="formbtn"> </input> </t:Loop>
Java Code: private HashMap<String, String> actionmap = new HashMap<String, String>(); @Property private Object actionKey; public HashMap<String, String> getActionmap() { return actionmap; } public void setActionmap(HashMap<String, String> actionmap) { this.actionmap = actionmap; } public String getActionMapValue() { return this.getActionmap().get(this.actionKey); } While doing this all the values are getting populated to the template properly except the t:id field. For some reason it doesn't pick the value from the property but rather sets the value as "actionKey". Please find below the generated html: <input value="Search Items" class="formbtn" id="actionKey" name="actionKey" type="submit"> <input value="Delete Items" class="formbtn" id="actionKey_0" name="actionKey_0" type="submit"> Can anyone please suggest me why this is happening? Is this the default behavior and does tapestry doesn't set the value to the t:id field from a "Property"? Thanks. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Set-t-id-value-from-a-component-property-tp5491862p5491862.html Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org