[ 
http://www.stripesframework.org/jira/browse/STS-645?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ben Gunter resolved STS-645.
----------------------------

    Resolution: Not a Bug

It's a bit of a stretch to go from "this specific case will fire the event" to 
"the $event parameter is useless." What you have hit on here is a little-known 
feature that was added to Stripes long before clean URLs that allowed the event 
name to be specified as an extension to the path instead of as a parameter. 
When you map a URL like ("/test/{action}") what you are essentially doing is 
binding it to /test and then specifying how to parse the extra path info into 
request parameters. In this case, you aren't specifying the event in any other 
way (parameter, $event, _eventName) so it finally tries the old path extension 
trick. Your path is /test/fire and so it uses "fire" as the event. This is not 
a bug.

> UrlBinding : the parameter name $event is useless
> -------------------------------------------------
>
>                 Key: STS-645
>                 URL: http://www.stripesframework.org/jira/browse/STS-645
>             Project: Stripes
>          Issue Type: Bug
>          Components: ActionBean Dispatching
>    Affects Versions: Release 1.5
>            Reporter: Amaury Mylonas
>            Priority: Minor
>         Attachments: TestActionBean.java
>
>
> An event can be invoked without using the "$event" special parameter. If 
> another parameter value matches an event's name this one is fired.
> @UrlBinding("/test/{action}")
> public class TestActionBean {
>       
>       private String action;
>       
>       @DefaultHandler
>       public Resolution defaultHandler() {
>               System.out.println("default handler");
>               return null;
>       }
>       @HandlesEvent("fire")
>       public Resolution fireEventHandler() {
>               System.out.println("'fire' event handler");
>               return null;
>       }
>       public void setAction(String action) {
>               this.action = action;
>       }
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://www.stripesframework.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to