--- On Thu, 12/11/08, Andreas Joseph Krogh wrote:
> On Thursday 11 December 2008 22:36:37 Musachy Barroso wrote:
> > I am sort if confused here, what are the advantages of this?
> <s:form name="myForm">
>   <s:push value="person.address">
>     <s:textfield name="street"/>
>   </s:push>
> [...]

The issue is the generation of the form element name, the input element value 
stuff would already work.

If push kept a stack of the names of pushed elements it could be used to 
generate the "name" attribute--but wouldn't you'd have to correlate with the 
depth at which getStreet() was found?

Let's say person.address didn't have a "street" property: currently the value 
stack would be searched until a getStreet() is found or the stack runs out. So 
you'd have to either change the semantics of value stack lookups (bad, and 
would break modelDriven, and probably a bunch of other things) or provide a way 
to match pushed objects' names with where objects are found on the stack.

That paragraph made sense in my head, and I'm pretty sure I know what I mean, 
but it's not coming out particularly well.

Dave


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org
For additional commands, e-mail: dev-h...@struts.apache.org

Reply via email to