You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Bertrand Delacretaz <bd...@apache.org> on 2013/07/02 11:39:28 UTC

Re: [DISCUSS] SLING-2936 - passing selector as POST parameter

Hi,

On Thu, Jun 27, 2013 at 5:46 PM, Justin Edelson
<ju...@justinedelson.com> wrote:
>...I think there is a significant need to be able to "select"
> amongst multiple POST servlets for a particular resource. Thus, I propose
> that we allow for the selector to be passed via a request parameter....

Why is that better than using a selector?

-Bertrand (not contesting, trying to understand ;-)

Re: [DISCUSS] SLING-2936 - passing selector as POST parameter

Posted by Justin Edelson <ju...@justinedelson.com>.
Hi,


On Tue, Jul 2, 2013 at 5:39 AM, Bertrand Delacretaz
<bd...@apache.org>wrote:

> Hi,
>
> On Thu, Jun 27, 2013 at 5:46 PM, Justin Edelson
> <ju...@justinedelson.com> wrote:
> >...I think there is a significant need to be able to "select"
> > amongst multiple POST servlets for a particular resource. Thus, I propose
> > that we allow for the selector to be passed via a request parameter....
>
> Why is that better than using a selector?
>

Chiefly because the resource is the same yet there are two different paths.
So rather than using the path to purely describe a noun, you are also
embedding a verb into it.

For example, consider a polling resource. You want to be able to vote and
clear results. The poll is the noun and "vote" and "clear" are the verbs.

With a path-based selector, you have:
POST /content/site/poll.vote.html
item=one

POST /content/site/poll.clear.html

With a parameter-based selector:
POST /content/site/poll.html
:selector=vote&item=one

POST /conetnt/site/poll.clear.html
:selector=clear

Regards,
Justin


>
> -Bertrand (not contesting, trying to understand ;-)
>