On Fri, Aug 29, 2008 at 10:22 AM, Tobias Bocanegra
<[EMAIL PROTECTED]> wrote:
>>  a) specify only one intermediate jcr:primaryType (instead of
>>  /some/very/jcr:primaryType=my:type,
>>  /some/very/long/jcr:primaryType=my:type, etc.) for all the
>>  intermediate nodes that have to be created
> are you able to specify the default nodetypes for new nodes in the
> nodetype of "/some" ? if yes, this should work automatically since the
> repository selects the correct nodetype.

No, unfortunately not. /some is nt:unstructured.

>>  b) the path is built right from the user input, so I need a nameHint
>>  path (eg. user enters "VerĂ¼/Lon g/Path", => pathHint = "/some/VerĂ¼/Lon
>>  g/Path" sent to server, => generated node path is
>>  "/some/ver_/lon_g/path"); I could do this on the client-side, but I
>>  don't want to reimplement the nameHint -> valid name conversion, it's
>>  good to have a central place for it
> but how would you differentiate from the case where a '/' is present
> in the hint but should not create deep paths?

By using a different request parameter name for that hint, eg.
:pathHint instead of :nameHint.

>>  A different solution would be to make several HTTP requests, one for
>>  each node in the path, but this would also be more code complexity on
>>  the client side and not transactional.
>>
>>  WDYT? Overkill or nice-to-have feature?
>
> i would create the path clientsided...

Well, my current solution is to built it server-side in my own
servlet, because similar functionality is already present there.
Client-sided seems to be quicker and maybe simpler, but IMHO this hint
-> path conversion belongs to the server, because it is a JCR-specific
thing (set of allowed chars). Bertrand's proposal is ok, but it
requires you to do 2 requests to the server...

Regards,
Alex

-- 
Alexander Klimetschek
[EMAIL PROTECTED]

Reply via email to