On Thursday 11 December 2008 23:15:35 Musachy Barroso wrote: > Now I see what you mean. What 'push' does is to put a value on top of > the stack. The name attribute is a string, not an expression, and > doesn't use the stack for anything. That is why it wouldn't work. > There is a simple workaround tho, > > you can set a variable for it like: > > <s:set var="prefix" value="%{''person'}" /> > ..... > <s:textfield name="%{#prefix + '.x.y.z'}" /> > .... > or even > <s:textfield name="%{#prefix}.x.y.z'}" /> > > I dont remember if the second option works.
I know the name-attribute is just a String and I think it would be possible without much effort (se how Struts-1.1 does it) to avoid the messy stuff you're suggesting above. -- Andreas Joseph Krogh <andr...@officenet.no> Senior Software Developer / CEO ------------------------+---------------------------------------------+ OfficeNet AS | The most difficult thing in the world is to | Karenslyst Allé 11 | know how to do a thing and to watch | PO. Box 529 Skøyen | somebody else doing it wrong, without | 0214 Oslo | comment. | NORWAY | | Tlf: +47 24 15 38 90 | | Fax: +47 24 15 38 91 | | Mobile: +47 909 56 963 | | ------------------------+---------------------------------------------+ --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org For additional commands, e-mail: dev-h...@struts.apache.org