struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Don Brown (JIRA)" <>
Subject [jira] Updated: (WW-1133) Deprecate the ww:push tag
Date Sat, 10 Jun 2006 03:17:20 GMT
     [ ]

Don Brown updated WW-1133:

    Fix Version: Future
                     (was: 2.0.0)

> Deprecate the ww:push tag
> -------------------------
>          Key: WW-1133
>          URL:
>      Project: Struts Action 2
>         Type: Improvement

>   Components: Views
>     Versions: WW 2.2
>     Reporter: Gabriel Zimmerman
>      Fix For: Future

> I think it would be an improvement for webwork to deprecate the push tag, and perhaps
modify how the iterator tag places each iterated object on the stack by setting as discussed
in XW-329, making the ww:iterator tag work more like the JSTL iterator tag in that respect.

> The reasons "setting" is better in my opinion than "pushing" for views are the following:
> 1) When you see a set object, it gives you the context of where it is coming from. <ww:property
value=""/> is more descriptive than simply <ww:property value="name"/>

> 2) With pushing, there is a large possibility of clashing of property names. If I inadvertently
push a "parent" object on the stack and later push a "child" object on the stack, then <ww:property
value="name"/> would give you the child's name, there would be no way of accessing the
> 3) Setting is probably somewhat better for performance than pushing is. When XWork searches
on the stack for a pushed Object, it looks at all the properties of each object until it finds
the latest on the stack. That amount of introspection is bad for performance, worse, at least
than if it had to look up "child" in a Map, where a Map was the latest object on the stack
(as it would be if setting was done as discussed in XW-329.
> 4) It would be easier to implement "track back" features without pushing. If you have
a <ww:property value="name"/>, it would be harder to find where that name came from
than if you have <ww:property value=""/>, where "child" was set sometime earlier.

> 5) It simplifies the API by removing a technology that adds nothing (pushing adds nothing
to setting when doing so within a given JSP)
> 6) It makes the API closer to JSTL, which makes it simpler to explain to a user who knows
> Thus, overall, I propose that the pushing should be done for actions onto the stack,
but only setting should be done within a given JSP.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message