Hi folks,

i think the rest thing is a complementary feature, so having a
dedicated annotation is good : avoids cluttering the existing ones for
those who don't need the rest thing...

Cheers

Remi

2010/10/8, Evan Leonard <[email protected]>:
>
> Done. Please hack away and change the patch as you see fit!
>
> The one question I had about this is that I thought I saw some discussion
> about having @UrlBinding be applicable to event handlers too?  Please
> correct my memory if its inaccurate.  The point is though, that if there is
> another idea for having a binding annotation on handler methods already, its
> be worth considering combining them. Something like:
>
> @Retention(RetentionPolicy.RUNTIME)
> @Target({ElementType.TYPE, ElementType.METHOD})
> @Documented
> public @interface UrlBinding {
>     /** The web-app relative URL that the ActionBean will respond to. */
>     String value();
>
>     /** The HTTP Verb that should be responded to. The default value
> indicates that
>           any verb will be responded to. Acceptable values are "POST",
> "GET", "PUT", "OPTIONS", "DELETE" */
>     String method() default "__ANY__";
> }
>
>
>
>
> On Oct 8, 2010, at 7:14 AM, Ben Gunter wrote:
>
>> Evan, I've looked at your patch a bit, and it looks OK to me. I'd probably
>> change a couple of little things, but in general it's fine. This is a
>> feature that has come up before. Would you mind creating an issue in Jira
>> and attaching your patch there? That will prevent this from getting lost.
>>
>> -Ben
>>
>> On Mon, Oct 4, 2010 at 11:09 PM, Evan Leonard <[email protected]>
>> wrote:
>>
>> Of course I forgot to attach the patch...
>>
>> :-)
>>
>> Evan
>>
>>
>> On Oct 4, 2010, at 8:58 PM, Evan Leonard wrote:
>>
>> >
>> > Hi All,
>> >
>> > Attached is a patch to the 1.5.x branch that adds support for a new
>> > annotation; @RestBinding.
>> >
>> > Here's a sample of its usage:
>> >
>> > @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. Would someone have a look and see
>> > if this is up to snuff for a commit?
>> >
>> > Thanks in advance,
>> > Evan
>> >
>> >
>> >
>> >
>> >
>> >
>>
>> ------------------------------------------------------------------------------
>> 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/beautyoftheweb
>> _______________________________________________
>> Stripes-development mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/stripes-development
>>
>>
>> ------------------------------------------------------------------------------
>> 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/beautyoftheweb_______________________________________________
>> Stripes-development mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/stripes-development
>
>

-- 
Envoyé avec mon mobile

------------------------------------------------------------------------------
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/beautyoftheweb
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to