Ach. my bad, I just checked how "name" is resolved in "UIBean" instead of analysing it into deep and I messed up things with "value" attribute, my explanation below
niedz., 23 lut 2020 o 23:06 John Bush <jtb...@mchsi.com> napisał(a): > <s:iterator value="displayColumnList" var="a"> > <s:textfield name="%{formcolumnName}" /> This works because of %{} and "a" was pushed onto the top of ValueStack, so all its properties are accessible > <s:textfield name="formcolumnName" /> This won't work because "name" is evaluated but only if it contains %{} - this allows build dynamic names like: name="user_%{expr}_id" or name="%{user_id}" > <s:textfield name="%{a.formcolumnName}" /> As "a" was pushed into to the ValueStack, we must strictly say which scope we are interested in, so we must use "#" to use "a" scope: name="%{#a.formcolumnName}" We can use "a" directly: name="%{a}" but then it will be evaluated as "a.toString()" because "name" expects String Sorry for my misleading answer before :( Please let me know if I should extend the Tag Syntax guide https://struts.staged.apache.org/tag-developers/tag-syntax.html Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org