[
http://issues.apache.org/jira/browse/VELTOOLS-69?page=comments#action_12450118
]
Nathan Bubna commented on VELTOOLS-69:
--------------------------------------
Hmm. Breaking #if($query.foo) compatibility isn't ok, if we can't find a
reasonable way to keep that and the sub, then i'll ditch the sub. But i much
prefer $query.foo.bar over $query.get('foo.bar'), so i'm not going to give that
up quickly. The type conversion suffixes are more than just nice since the
main point of the ValueParser is to parse values. If you don't care about type
conversion, then you may as well just put the source map into the context.
Anyway, i'm going to see if i can make both work somehow. If i can't, then
expect me to resurrect the sub in a later version where complete backwards
compatibility isn't necessary.
> ValueParserSub generic getter never worked
> ------------------------------------------
>
> Key: VELTOOLS-69
> URL: http://issues.apache.org/jira/browse/VELTOOLS-69
> Project: VelocityTools
> Issue Type: Bug
> Components: VelocityView
> Affects Versions: 1.3
> Reporter: Claude Brisson
> Attachments: valueparser.patch
>
>
> (I attach this issue to the VelocityView component but we may need a Generic
> component in Jira)
> When $query is the ValueParser object for the query string http://...?foo=5,
> then $query.foo.int is an invalid reference.
> Why? Because there is a collision of variable names in
> ValueParserSub.get(Object key).
> I profit of this opportunity to state that I really don't like the
> ValueParserSub class, because it breaks the "#if($query.foo)" syntax. Hence,
> it is not backward compatible. Or at least, it could return null for an
> unexistant key.
> Is it really usefull to keep it now that Velocity handles conversions much
> better? Since obviously nobody used the $query.foo.int feature, it is still
> time to remove it... Also, since the need to convert between types can emerge
> elsewhere, it would be much cleaner to have a standalone converter object.
> Yes, we loose the syntax $query.foo.int, but is it that nice a syntax?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]