You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Carsten Ziegeler (JIRA)" <ji...@apache.org> on 2008/02/29 16:36:51 UTC

[jira] Created: (SLING-295) Specify nodetype for node creation

Specify nodetype for node creation
----------------------------------

                 Key: SLING-295
                 URL: https://issues.apache.org/jira/browse/SLING-295
             Project: Sling
          Issue Type: Improvement
          Components: ujax
            Reporter: Carsten Ziegeler


It would be nice to specify the node type for new nodes when they are created through the post servlet.

Perhaps by specifying a node type parameter (like ujax:nodetype)?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SLING-295) Specify nodetype for node creation

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12573809#action_12573809 ] 

Carsten Ziegeler commented on SLING-295:
----------------------------------------

Rethinking and locking at the code, I guess it's easier to use the special prefix "ujax:" as some other code already handels all parameters starting with this prefix as special parameters. if we introduce "jcr:" prefix, we have to update all these locations as well.

> Specify nodetype for node creation
> ----------------------------------
>
>                 Key: SLING-295
>                 URL: https://issues.apache.org/jira/browse/SLING-295
>             Project: Sling
>          Issue Type: Improvement
>          Components: ujax
>            Reporter: Carsten Ziegeler
>         Attachments: patch.txt
>
>
> It would be nice to specify the node type for new nodes when they are created through the post servlet.
> Perhaps by specifying a node type parameter (like ujax:nodetype)?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SLING-295) Specify nodetype for node creation

Posted by "Tobias Bocanegra (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12573869#action_12573869 ] 

Tobias Bocanegra commented on SLING-295:
----------------------------------------

i can provide a fix, if you wish.

> Specify nodetype for node creation
> ----------------------------------
>
>                 Key: SLING-295
>                 URL: https://issues.apache.org/jira/browse/SLING-295
>             Project: Sling
>          Issue Type: Improvement
>            Reporter: Carsten Ziegeler
>            Assignee: Carsten Ziegeler
>         Attachments: patch.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> It would be nice to specify the node type for new nodes when they are created through the post servlet.
> Perhaps by specifying a node type parameter (like ujax:nodetype)?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SLING-295) Specify nodetype for node creation

Posted by "Tobias Bocanegra (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12573870#action_12573870 ] 

Tobias Bocanegra commented on SLING-295:
----------------------------------------

btw: the creation of the 'intermediate' nodes should only rely on 'default node creation'. as defined by the repository.

> Specify nodetype for node creation
> ----------------------------------
>
>                 Key: SLING-295
>                 URL: https://issues.apache.org/jira/browse/SLING-295
>             Project: Sling
>          Issue Type: Improvement
>            Reporter: Carsten Ziegeler
>            Assignee: Carsten Ziegeler
>         Attachments: patch.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> It would be nice to specify the node type for new nodes when they are created through the post servlet.
> Perhaps by specifying a node type parameter (like ujax:nodetype)?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (SLING-295) Specify nodetype for node creation

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler closed SLING-295.
----------------------------------


> Specify nodetype for node creation
> ----------------------------------
>
>                 Key: SLING-295
>                 URL: https://issues.apache.org/jira/browse/SLING-295
>             Project: Sling
>          Issue Type: Improvement
>            Reporter: Carsten Ziegeler
>            Assignee: Carsten Ziegeler
>         Attachments: patch.txt, ujax_create_fix.r632454.patch
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> It would be nice to specify the node type for new nodes when they are created through the post servlet.
> Perhaps by specifying a node type parameter (like ujax:nodetype)?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SLING-295) Specify nodetype for node creation

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12573827#action_12573827 ] 

Felix Meschberger commented on SLING-295:
-----------------------------------------

> locking at the code, I guess it's easier to use the special prefix "ujax:"

Ah, you are right. ok. Then ujax: is probably better.

> Specify nodetype for node creation
> ----------------------------------
>
>                 Key: SLING-295
>                 URL: https://issues.apache.org/jira/browse/SLING-295
>             Project: Sling
>          Issue Type: Improvement
>            Reporter: Carsten Ziegeler
>            Assignee: Carsten Ziegeler
>         Attachments: patch.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> It would be nice to specify the node type for new nodes when they are created through the post servlet.
> Perhaps by specifying a node type parameter (like ujax:nodetype)?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SLING-295) Specify nodetype for node creation

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12573804#action_12573804 ] 

Carsten Ziegeler commented on SLING-295:
----------------------------------------

jcr:primaryType sounds good
and then either
jcr:mixinTypes : comma separeted list
or
jcr:mixinType which can occur more than once?

> Specify nodetype for node creation
> ----------------------------------
>
>                 Key: SLING-295
>                 URL: https://issues.apache.org/jira/browse/SLING-295
>             Project: Sling
>          Issue Type: Improvement
>          Components: ujax
>            Reporter: Carsten Ziegeler
>         Attachments: patch.txt
>
>
> It would be nice to specify the node type for new nodes when they are created through the post servlet.
> Perhaps by specifying a node type parameter (like ujax:nodetype)?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SLING-295) Specify nodetype for node creation

Posted by "Tobias Bocanegra (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tobias Bocanegra updated SLING-295:
-----------------------------------

    Attachment: ujax_create_fix.r632454.patch

includes fix for this issue and SLING-299.

changes:
- divided content processing in 2 steps:
  1) collect all properties
  2) write back content
- altered deepGetOrCreateNode() to use jcr:primaryType and jcr:mixinType props
- simplified RequestProperty to be less intelligent. always has an 'abs path'
- targeted node is always created
- added test cases for (deep) node creation with node types
- (re)enabled move test cases

> Specify nodetype for node creation
> ----------------------------------
>
>                 Key: SLING-295
>                 URL: https://issues.apache.org/jira/browse/SLING-295
>             Project: Sling
>          Issue Type: Improvement
>            Reporter: Carsten Ziegeler
>            Assignee: Carsten Ziegeler
>         Attachments: patch.txt, ujax_create_fix.r632454.patch
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> It would be nice to specify the node type for new nodes when they are created through the post servlet.
> Perhaps by specifying a node type parameter (like ujax:nodetype)?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SLING-295) Specify nodetype for node creation

Posted by "Tobias Bocanegra (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12573868#action_12573868 ] 

Tobias Bocanegra commented on SLING-295:
----------------------------------------

> > locking at the code, I guess it's easier to use the special prefix "ujax:"
> Ah, you are right. ok. Then ujax: is probably better.
i don't think so.

the jcr:primaryType should be used, since it's already defined by JCR. i don't think that introducing a new mechanism is intuitive. 

example:

POST /foo/bar/*
jcr:primaryType="my:nodetype"


> Specify nodetype for node creation
> ----------------------------------
>
>                 Key: SLING-295
>                 URL: https://issues.apache.org/jira/browse/SLING-295
>             Project: Sling
>          Issue Type: Improvement
>            Reporter: Carsten Ziegeler
>            Assignee: Carsten Ziegeler
>         Attachments: patch.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> It would be nice to specify the node type for new nodes when they are created through the post servlet.
> Perhaps by specifying a node type parameter (like ujax:nodetype)?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SLING-295) Specify nodetype for node creation

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12573898#action_12573898 ] 

Carsten Ziegeler commented on SLING-295:
----------------------------------------

As I said, I'm not against using "jcr:primaryType" - but for now, I don't have the overview where we have to check for "jcr:*" throughout the ujax code base
Same applies to jcr:mixinTypes  - i'm using ujax:mixinTypes for now.

> Specify nodetype for node creation
> ----------------------------------
>
>                 Key: SLING-295
>                 URL: https://issues.apache.org/jira/browse/SLING-295
>             Project: Sling
>          Issue Type: Improvement
>            Reporter: Carsten Ziegeler
>            Assignee: Carsten Ziegeler
>         Attachments: patch.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> It would be nice to specify the node type for new nodes when they are created through the post servlet.
> Perhaps by specifying a node type parameter (like ujax:nodetype)?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SLING-295) Specify nodetype for node creation

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12573791#action_12573791 ] 

Felix Meschberger commented on SLING-295:
-----------------------------------------

How about jcr:primaryType ? Btw. the same holds for mixin node types .. which should be manageable through ujax, IMHO (At least I had a use case for an integration test ;-) )

> Specify nodetype for node creation
> ----------------------------------
>
>                 Key: SLING-295
>                 URL: https://issues.apache.org/jira/browse/SLING-295
>             Project: Sling
>          Issue Type: Improvement
>          Components: ujax
>            Reporter: Carsten Ziegeler
>         Attachments: patch.txt
>
>
> It would be nice to specify the node type for new nodes when they are created through the post servlet.
> Perhaps by specifying a node type parameter (like ujax:nodetype)?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SLING-295) Specify nodetype for node creation

Posted by "David Nuescheler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12573880#action_12573880 ] 

David Nuescheler commented on SLING-295:
----------------------------------------

I would go with the jcr:primaryType aswell instead of a magic ujax:primaryType.
 
So far we used ujax: for things that don't have representation in content. I think everything that has trivial representation in content should map the name of the property directly to the form input name just make it simple to understand.
I think it is intuitive for the user to use jcr:primaryType and other jcr: properties.
In my mind jcr:mixinTypes for example should be treated like a normal multivalue property, please don't introduce a special comma separated case for that.

> Specify nodetype for node creation
> ----------------------------------
>
>                 Key: SLING-295
>                 URL: https://issues.apache.org/jira/browse/SLING-295
>             Project: Sling
>          Issue Type: Improvement
>            Reporter: Carsten Ziegeler
>            Assignee: Carsten Ziegeler
>         Attachments: patch.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> It would be nice to specify the node type for new nodes when they are created through the post servlet.
> Perhaps by specifying a node type parameter (like ujax:nodetype)?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SLING-295) Specify nodetype for node creation

Posted by "Tobias Bocanegra (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12574603#action_12574603 ] 

Tobias Bocanegra commented on SLING-295:
----------------------------------------

thanks. works. but i cannot close the bug since i'm not the reporter.

> Specify nodetype for node creation
> ----------------------------------
>
>                 Key: SLING-295
>                 URL: https://issues.apache.org/jira/browse/SLING-295
>             Project: Sling
>          Issue Type: Improvement
>            Reporter: Carsten Ziegeler
>            Assignee: Carsten Ziegeler
>         Attachments: patch.txt, ujax_create_fix.r632454.patch
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> It would be nice to specify the node type for new nodes when they are created through the post servlet.
> Perhaps by specifying a node type parameter (like ujax:nodetype)?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SLING-295) Specify nodetype for node creation

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler updated SLING-295:
-----------------------------------

    Attachment: patch.txt

Hacked patch to demonstrate the wanted behaviour.

> Specify nodetype for node creation
> ----------------------------------
>
>                 Key: SLING-295
>                 URL: https://issues.apache.org/jira/browse/SLING-295
>             Project: Sling
>          Issue Type: Improvement
>          Components: ujax
>            Reporter: Carsten Ziegeler
>         Attachments: patch.txt
>
>
> It would be nice to specify the node type for new nodes when they are created through the post servlet.
> Perhaps by specifying a node type parameter (like ujax:nodetype)?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (SLING-295) Specify nodetype for node creation

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler resolved SLING-295.
------------------------------------

    Resolution: Fixed

Hi Tobi, thanks for the patch.
It's applied now - can you please cross check and close this bug?

Thanks

> Specify nodetype for node creation
> ----------------------------------
>
>                 Key: SLING-295
>                 URL: https://issues.apache.org/jira/browse/SLING-295
>             Project: Sling
>          Issue Type: Improvement
>            Reporter: Carsten Ziegeler
>            Assignee: Carsten Ziegeler
>         Attachments: patch.txt, ujax_create_fix.r632454.patch
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> It would be nice to specify the node type for new nodes when they are created through the post servlet.
> Perhaps by specifying a node type parameter (like ujax:nodetype)?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SLING-295) Specify nodetype for node creation

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler updated SLING-295:
-----------------------------------

           Component/s:     (was: ujax)
              Assignee: Carsten Ziegeler
    Remaining Estimate: 0h
     Original Estimate: 0h

> Specify nodetype for node creation
> ----------------------------------
>
>                 Key: SLING-295
>                 URL: https://issues.apache.org/jira/browse/SLING-295
>             Project: Sling
>          Issue Type: Improvement
>            Reporter: Carsten Ziegeler
>            Assignee: Carsten Ziegeler
>         Attachments: patch.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> It would be nice to specify the node type for new nodes when they are created through the post servlet.
> Perhaps by specifying a node type parameter (like ujax:nodetype)?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SLING-295) Specify nodetype for node creation

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12573874#action_12573874 ] 

Carsten Ziegeler commented on SLING-295:
----------------------------------------

I have a solution running and am currently testing.
The intermediate nodes rely on default node creation.
The code of the post servlet is already very complex. While testing I stumbed across some problems with
all the different parameters used for different things, so atm i think we should not introduce a new prefix
to be handled by the servlet.
So I'll go with "ujax:" for now, but we can change it to "jcr:" prefix then easily.

> Specify nodetype for node creation
> ----------------------------------
>
>                 Key: SLING-295
>                 URL: https://issues.apache.org/jira/browse/SLING-295
>             Project: Sling
>          Issue Type: Improvement
>            Reporter: Carsten Ziegeler
>            Assignee: Carsten Ziegeler
>         Attachments: patch.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> It would be nice to specify the node type for new nodes when they are created through the post servlet.
> Perhaps by specifying a node type parameter (like ujax:nodetype)?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.