Levi,

Because they are equivalent ;-)

No.  Seriously.  Because {$event} can get easily confused with EL 
${event} in Url bindings whereas {_eventName} is pretty explicit and 
obvious.

I know I personally will probably not make the same mistake twice but 
other developers working on the code might.
This came up a while back when a typo in Freddy's book resulted in code 
that didn't work.

In the end, both are fine, one just "appears" more explicit.

--Nikolaos



Levi Hoogenberg wrote:
>
> Why are you using {_eventName} instead of {$event}?
>
>> Op 20 nov 2010 19:29 schreef "Nikolaos Giannopoulos" 
>> <nikol...@brightminds.org <mailto:nikol...@brightminds.org>>:
>>
>> gshegosh,
>>
>> Much Appreciated. The following was 99% there:
>>
>> return (new RedirectResolution(ArticleActionBean.class,
>> "view").addParameter("authorId",
>> this.article.getAuthorId()).addParameter("id",
>> this.article.getId()).addParameter("titleUrlified",
>> this.article.getTitleUrlified());
>>
>> As it resulted in:
>> /web/article/245b57557f0d3c57/2/magic-or-science?view=
>>
>> This appears to be a bug as it should have injected the event in the
>> clean Url. No?
>>
>> Whereas the following worked perfectly:
>>
>> return (new
>> RedirectResolution(ArticleActionBean.class).addParameter("authorId",
>> this.article.getAuthorId()).addParameter("id",
>> this.article.getId()).addParameter("titleUrlified",
>> this.article.getTitleUrlified()).addParameter("_eventName", "view"));
>>
>> Correctly resulting in:
>> /web/article/245b57557f0d3c57/2/magic-or-science/view
>>
>> --Nikolaos

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to