[ 
http://www.stripesframework.org/jira/browse/STS-774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12870#comment-12870
 ] 

Remi VANKEISBELCK commented on STS-774:
---------------------------------------

We were discussing this on IRC : can't this be done without hasking Stripes, 
just by using a custom ActionResolver in the app ?

There's a method for retrieving the event handler to be invoked :

net.sourceforge.stripes.controller.ActionResolver#getHandler

As usual, it ain't dynamic : you don't have access to the HttpServletRequest. 
But as usual, you can grab it from :

net.sourceforge.stripes.controller.ExecutionContext#currentContext

I'd like to close that ticket if it's ok for everyone, as it can be done 
without patching Stripes. Moreover the feature doesn't seem to be very popular, 
it's been hanging in the JIRA for too long without activity.

> Resolve event handler by HTTP verb (RestBinding)
> ------------------------------------------------
>
>                 Key: STS-774
>                 URL: http://www.stripesframework.org/jira/browse/STS-774
>             Project: Stripes
>          Issue Type: New Feature
>            Reporter: Evan Leonard
>         Attachments: RestBinding_annotation.patch
>
>
> Attached is a patch that enables one to bind a rest verb to a specific 
> handler in your ActionBean. An example:
> @UrlBinding("/RestAction")
> public class RestActionBean implements ActionBean {
>   @RestBinding("PUT")
>    public Resolution myPutHandler() {
>        log.info("Got a Put");
>        return null;
>    }
> }
> Now if you send a PUT request to "/yourapp/RestAction", it will be routed to 
> the "myPutHandler" method. 
> The patch needs a little review & clean-up before committing. Ben's had at 
> least a quick look at it at this point.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to