On Mon, Feb 23, 2009 at 1:37 PM, Vidar Ramdal <vi...@idium.no> wrote:
> How about including resourceType as well when selecting a non-GET
> script? This would make the process more in line with GET script
> selection.

Not sure what you mean... The resource type is respected for all
cases. The samples Felix gave in his answer are all using a resource
type: he requested the resource /content/a which has the node type
nt:file, which leads to /libs/nt/file/POST.jsp or
/apps/nt/file/POST.jsp for the simple POST case.

Similarly, if you'd set a resource type "sample/type" on the resource,
the POST script would be at /libs/sample/type/POST.jsp or
/apps/sample/type/POST.jsp. This has always worked in Sling that way.

> I've had some cases where I want to post some content of a certain
> resourceType, to any location, while doing something special to the
> data being posted.
>
> The resourceType should be extracted from the fields being posted (if
> available), or from the already existing node (if it exists).

I don't think it is a good idea to let the resource type be defined in
the request. Inside Sling however, using include or forward, you can
override the resource type.

Using the resource type from the existing node is what is already
working in Sling, just as for all the other methods.

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetsc...@day.com

Reply via email to