users@jersey.java.net

Re: [Jersey] Using _at_FormParam value to specify/call resource method

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Thu, 15 Jan 2009 11:02:54 +0100

On Jan 15, 2009, at 10:56 AM, António Mota wrote:

> Jee, don't let no RESTafarian guy look at that...
>

Tis true. Ideally one should be using different URIs that embed the
action as a noun associated with the data and then one POSTs forms
(without requiring the action parameter). But sometimes if you are
using a toolkit you have to go the way it defines, i suspect ExtJS is
forcing one to utilize this approach.

Paul.


> :)
> _______________________________________________
>
> Melhores cumprimentos / Beir beannacht / Best regards
>
> António Manuel dos Santos Mota
>
> mobile PT: +351919623568 (deprecated)
> mobile IE: +353(0)877718363
> mail: amsmota_at_gmail.com
> skype: amsmota
> msn: antoniomsmota_at_hotmail.com
> linkedin: www.linkedin.com/in/amsmota
> _______________________________________________
>
>
>
>
> 2009/1/15 <shaper_at_sibmail.com>:
>> Hello,
>>
>> We have pack of front-end javascript code based on ExtJS library
>> and we
>> are going to use Jersey in a project instead of own framework, so to
>> reduce the changes just want to extend easily Jersey. Is it
>> possible to
>> implement through Jersey API the extension with functionality as
>> shown
>> from the code below? Could you clarify in short the approach to
>> implementation the extension?
>>
>>
>> @Path("/query")
>> @Consumes("application/json")
>> @Produces("application/json")
>> public class QueryResource {
>>
>> @POST
>> @FormParam(action="postQuery") // Action parameter value
>> "postQuery"
>> in POST
>> public void postQuery() {
>> …
>> }
>>
>> @POST
>> @FormParam(action="postQueryGroup") // Action parameter value
>> "postQueryGroup" in POST
>> public void postQueryGroup() {
>> …
>> }
>> }
>>
>>
>> Thanks in advance,
>> Dmitry S.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>