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

[jira] Created: (SLING-280) ujax post serlvet should be able to insert new nodes at specified location

ujax post serlvet should be able to insert new nodes at specified location
--------------------------------------------------------------------------

                 Key: SLING-280
                 URL: https://issues.apache.org/jira/browse/SLING-280
             Project: Sling
          Issue Type: Improvement
            Reporter: Tobias Bocanegra


the current version only supports: ujax:order = 0, which orders a newly created node above it's siblings.
suggest to implement the following variants:

ujax:order= ("below" | "above" ) [name]

example: 
/a
/b
/c

ujax:order="above b"  -> /a, /newnode, /b, /c
ujax:order="above a"  -> /newnode, /a, /b, /c
ujax:order="above"  -> /newnode, /a, /b, /c

ujax:order="below b" -> /a,/b,/newnode,/c
ujax:order="below c" -> /a,/b,/c,/newnode
ujax:order="below" -> /a,/b,/c,/newnode

Please note that JCR does not support the 'below' ordering and it's 'above' handling is different. but i think in  scripting environment, where you loop over a list. the "below" makes sense, since you don't need to know the next list item when drawing the 'insert' form.

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


[jira] Commented: (SLING-280) ujax post serlvet should be able to insert new nodes at specified location

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

Felix Meschberger commented on SLING-280:
-----------------------------------------

Just a slight remark on the syntax: You say above (or before) without a parameter would place at the beginning. While this sounds logical, it is not. Converting this into clear text means something like "above nothing", which in turn sounds more like bottom than top.

I would rather say, that before and after (rather than below and above) require an argument. To place the new node in front of anything, we should use "front" and to place the new node at the end we should use "tail" (or similar).

> ujax post serlvet should be able to insert new nodes at specified location
> --------------------------------------------------------------------------
>
>                 Key: SLING-280
>                 URL: https://issues.apache.org/jira/browse/SLING-280
>             Project: Sling
>          Issue Type: Improvement
>            Reporter: Tobias Bocanegra
>
> the current version only supports: ujax:order = 0, which orders a newly created node above it's siblings.
> suggest to implement the following variants:
> ujax:order= ("below" | "above" ) [name]
> example: 
> /a
> /b
> /c
> ujax:order="above b"  -> /a, /newnode, /b, /c
> ujax:order="above a"  -> /newnode, /a, /b, /c
> ujax:order="above"  -> /newnode, /a, /b, /c
> ujax:order="below b" -> /a,/b,/newnode,/c
> ujax:order="below c" -> /a,/b,/c,/newnode
> ujax:order="below" -> /a,/b,/c,/newnode
> Please note that JCR does not support the 'below' ordering and it's 'above' handling is different. but i think in  scripting environment, where you loop over a list. the "below" makes sense, since you don't need to know the next list item when drawing the 'insert' form.

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


[jira] Commented: (SLING-280) ujax post serlvet should be able to insert new nodes at specified location

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

Tobias Bocanegra commented on SLING-280:
----------------------------------------

i will provide a patch if no one objects against the syntax

> ujax post serlvet should be able to insert new nodes at specified location
> --------------------------------------------------------------------------
>
>                 Key: SLING-280
>                 URL: https://issues.apache.org/jira/browse/SLING-280
>             Project: Sling
>          Issue Type: Improvement
>            Reporter: Tobias Bocanegra
>
> the current version only supports: ujax:order = 0, which orders a newly created node above it's siblings.
> suggest to implement the following variants:
> ujax:order= ("below" | "above" ) [name]
> example: 
> /a
> /b
> /c
> ujax:order="above b"  -> /a, /newnode, /b, /c
> ujax:order="above a"  -> /newnode, /a, /b, /c
> ujax:order="above"  -> /newnode, /a, /b, /c
> ujax:order="below b" -> /a,/b,/newnode,/c
> ujax:order="below c" -> /a,/b,/c,/newnode
> ujax:order="below" -> /a,/b,/c,/newnode
> Please note that JCR does not support the 'below' ordering and it's 'above' handling is different. but i think in  scripting environment, where you loop over a list. the "below" makes sense, since you don't need to know the next list item when drawing the 'insert' form.

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


[jira] Updated: (SLING-280) ujax post serlvet should be able to insert new nodes at specified location

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

Tobias Bocanegra updated SLING-280:
-----------------------------------

    Attachment: ujax_order_fix.r632454.patch

implements node ordering as described by bertrand.
note that this patch also includes the changes of my patch of SLING-295.


> ujax post serlvet should be able to insert new nodes at specified location
> --------------------------------------------------------------------------
>
>                 Key: SLING-280
>                 URL: https://issues.apache.org/jira/browse/SLING-280
>             Project: Sling
>          Issue Type: Improvement
>            Reporter: Tobias Bocanegra
>         Attachments: ujax_order_fix.r632454.patch
>
>
> the current version only supports: ujax:order = 0, which orders a newly created node above it's siblings.
> suggest to implement the following variants:
> ujax:order= ("below" | "above" ) [name]
> example: 
> /a
> /b
> /c
> ujax:order="above b"  -> /a, /newnode, /b, /c
> ujax:order="above a"  -> /newnode, /a, /b, /c
> ujax:order="above"  -> /newnode, /a, /b, /c
> ujax:order="below b" -> /a,/b,/newnode,/c
> ujax:order="below c" -> /a,/b,/c,/newnode
> ujax:order="below" -> /a,/b,/c,/newnode
> Please note that JCR does not support the 'below' ordering and it's 'above' handling is different. but i think in  scripting environment, where you loop over a list. the "below" makes sense, since you don't need to know the next list item when drawing the 'insert' form.

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


[jira] Commented: (SLING-280) ujax post serlvet should be able to insert new nodes at specified location

Posted by "Bertrand Delacretaz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12572805#action_12572805 ] 

Bertrand Delacretaz commented on SLING-280:
-------------------------------------------

I like the idea but to me "before/after" would seem more natural. DOM for example uses insertBefore.

> ujax post serlvet should be able to insert new nodes at specified location
> --------------------------------------------------------------------------
>
>                 Key: SLING-280
>                 URL: https://issues.apache.org/jira/browse/SLING-280
>             Project: Sling
>          Issue Type: Improvement
>            Reporter: Tobias Bocanegra
>
> the current version only supports: ujax:order = 0, which orders a newly created node above it's siblings.
> suggest to implement the following variants:
> ujax:order= ("below" | "above" ) [name]
> example: 
> /a
> /b
> /c
> ujax:order="above b"  -> /a, /newnode, /b, /c
> ujax:order="above a"  -> /newnode, /a, /b, /c
> ujax:order="above"  -> /newnode, /a, /b, /c
> ujax:order="below b" -> /a,/b,/newnode,/c
> ujax:order="below c" -> /a,/b,/c,/newnode
> ujax:order="below" -> /a,/b,/c,/newnode
> Please note that JCR does not support the 'below' ordering and it's 'above' handling is different. but i think in  scripting environment, where you loop over a list. the "below" makes sense, since you don't need to know the next list item when drawing the 'insert' form.

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


[jira] Commented: (SLING-280) ujax post serlvet should be able to insert new nodes at specified location

Posted by "Bertrand Delacretaz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12574410#action_12574410 ] 

Bertrand Delacretaz commented on SLING-280:
-------------------------------------------

Modified patch applied in rev 633023.

I had to manually fix the patch as SLING-295 was committed already, please cross-check that I didn't overlook something.

> ujax post serlvet should be able to insert new nodes at specified location
> --------------------------------------------------------------------------
>
>                 Key: SLING-280
>                 URL: https://issues.apache.org/jira/browse/SLING-280
>             Project: Sling
>          Issue Type: Improvement
>            Reporter: Tobias Bocanegra
>            Assignee: Bertrand Delacretaz
>         Attachments: ujax_order_fix.r632454.patch
>
>
> the current version only supports: ujax:order = 0, which orders a newly created node above it's siblings.
> suggest to implement the following variants:
> ujax:order= ("below" | "above" ) [name]
> example: 
> /a
> /b
> /c
> ujax:order="above b"  -> /a, /newnode, /b, /c
> ujax:order="above a"  -> /newnode, /a, /b, /c
> ujax:order="above"  -> /newnode, /a, /b, /c
> ujax:order="below b" -> /a,/b,/newnode,/c
> ujax:order="below c" -> /a,/b,/c,/newnode
> ujax:order="below" -> /a,/b,/c,/newnode
> Please note that JCR does not support the 'below' ordering and it's 'above' handling is different. but i think in  scripting environment, where you loop over a list. the "below" makes sense, since you don't need to know the next list item when drawing the 'insert' form.

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


[jira] Assigned: (SLING-280) ujax post serlvet should be able to insert new nodes at specified location

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

Bertrand Delacretaz reassigned SLING-280:
-----------------------------------------

    Assignee: Bertrand Delacretaz

> ujax post serlvet should be able to insert new nodes at specified location
> --------------------------------------------------------------------------
>
>                 Key: SLING-280
>                 URL: https://issues.apache.org/jira/browse/SLING-280
>             Project: Sling
>          Issue Type: Improvement
>            Reporter: Tobias Bocanegra
>            Assignee: Bertrand Delacretaz
>         Attachments: ujax_order_fix.r632454.patch
>
>
> the current version only supports: ujax:order = 0, which orders a newly created node above it's siblings.
> suggest to implement the following variants:
> ujax:order= ("below" | "above" ) [name]
> example: 
> /a
> /b
> /c
> ujax:order="above b"  -> /a, /newnode, /b, /c
> ujax:order="above a"  -> /newnode, /a, /b, /c
> ujax:order="above"  -> /newnode, /a, /b, /c
> ujax:order="below b" -> /a,/b,/newnode,/c
> ujax:order="below c" -> /a,/b,/c,/newnode
> ujax:order="below" -> /a,/b,/c,/newnode
> Please note that JCR does not support the 'below' ordering and it's 'above' handling is different. but i think in  scripting environment, where you loop over a list. the "below" makes sense, since you don't need to know the next list item when drawing the 'insert' form.

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


[jira] Closed: (SLING-280) ujax post serlvet should be able to insert new nodes at specified location

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

Tobias Bocanegra closed SLING-280.
----------------------------------

    Resolution: Fixed

thanks. works.

(i could have provided a new patch based on the changes of SLING-295)

> ujax post serlvet should be able to insert new nodes at specified location
> --------------------------------------------------------------------------
>
>                 Key: SLING-280
>                 URL: https://issues.apache.org/jira/browse/SLING-280
>             Project: Sling
>          Issue Type: Improvement
>            Reporter: Tobias Bocanegra
>            Assignee: Bertrand Delacretaz
>         Attachments: ujax_order_fix.r632454.patch
>
>
> the current version only supports: ujax:order = 0, which orders a newly created node above it's siblings.
> suggest to implement the following variants:
> ujax:order= ("below" | "above" ) [name]
> example: 
> /a
> /b
> /c
> ujax:order="above b"  -> /a, /newnode, /b, /c
> ujax:order="above a"  -> /newnode, /a, /b, /c
> ujax:order="above"  -> /newnode, /a, /b, /c
> ujax:order="below b" -> /a,/b,/newnode,/c
> ujax:order="below c" -> /a,/b,/c,/newnode
> ujax:order="below" -> /a,/b,/c,/newnode
> Please note that JCR does not support the 'below' ordering and it's 'above' handling is different. but i think in  scripting environment, where you loop over a list. the "below" makes sense, since you don't need to know the next list item when drawing the 'insert' form.

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


[jira] Commented: (SLING-280) ujax post serlvet should be able to insert new nodes at specified location

Posted by "Bertrand Delacretaz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12572841#action_12572841 ] 

Bertrand Delacretaz commented on SLING-280:
-------------------------------------------

IMHO the clearest syntax for ujax:order would be:

first = before all child nodes, same as the current "0"
before a = before child node a
after a = after child node a
last = after all nodes
N = at a specific position, N being an integer

Although we might not need to implement N now, apart from 0 which can stay as a synonym for "first"

> ujax post serlvet should be able to insert new nodes at specified location
> --------------------------------------------------------------------------
>
>                 Key: SLING-280
>                 URL: https://issues.apache.org/jira/browse/SLING-280
>             Project: Sling
>          Issue Type: Improvement
>            Reporter: Tobias Bocanegra
>
> the current version only supports: ujax:order = 0, which orders a newly created node above it's siblings.
> suggest to implement the following variants:
> ujax:order= ("below" | "above" ) [name]
> example: 
> /a
> /b
> /c
> ujax:order="above b"  -> /a, /newnode, /b, /c
> ujax:order="above a"  -> /newnode, /a, /b, /c
> ujax:order="above"  -> /newnode, /a, /b, /c
> ujax:order="below b" -> /a,/b,/newnode,/c
> ujax:order="below c" -> /a,/b,/c,/newnode
> ujax:order="below" -> /a,/b,/c,/newnode
> Please note that JCR does not support the 'below' ordering and it's 'above' handling is different. but i think in  scripting environment, where you loop over a list. the "below" makes sense, since you don't need to know the next list item when drawing the 'insert' form.

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


[jira] Commented: (SLING-280) ujax post serlvet should be able to insert new nodes at specified location

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

Felix Meschberger commented on SLING-280:
-----------------------------------------

Sounds good.

> ujax post serlvet should be able to insert new nodes at specified location
> --------------------------------------------------------------------------
>
>                 Key: SLING-280
>                 URL: https://issues.apache.org/jira/browse/SLING-280
>             Project: Sling
>          Issue Type: Improvement
>            Reporter: Tobias Bocanegra
>
> the current version only supports: ujax:order = 0, which orders a newly created node above it's siblings.
> suggest to implement the following variants:
> ujax:order= ("below" | "above" ) [name]
> example: 
> /a
> /b
> /c
> ujax:order="above b"  -> /a, /newnode, /b, /c
> ujax:order="above a"  -> /newnode, /a, /b, /c
> ujax:order="above"  -> /newnode, /a, /b, /c
> ujax:order="below b" -> /a,/b,/newnode,/c
> ujax:order="below c" -> /a,/b,/c,/newnode
> ujax:order="below" -> /a,/b,/c,/newnode
> Please note that JCR does not support the 'below' ordering and it's 'above' handling is different. but i think in  scripting environment, where you loop over a list. the "below" makes sense, since you don't need to know the next list item when drawing the 'insert' form.

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


[jira] Commented: (SLING-280) ujax post serlvet should be able to insert new nodes at specified location

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

Tobias Bocanegra commented on SLING-280:
----------------------------------------

great. i will provide a patch

> ujax post serlvet should be able to insert new nodes at specified location
> --------------------------------------------------------------------------
>
>                 Key: SLING-280
>                 URL: https://issues.apache.org/jira/browse/SLING-280
>             Project: Sling
>          Issue Type: Improvement
>            Reporter: Tobias Bocanegra
>
> the current version only supports: ujax:order = 0, which orders a newly created node above it's siblings.
> suggest to implement the following variants:
> ujax:order= ("below" | "above" ) [name]
> example: 
> /a
> /b
> /c
> ujax:order="above b"  -> /a, /newnode, /b, /c
> ujax:order="above a"  -> /newnode, /a, /b, /c
> ujax:order="above"  -> /newnode, /a, /b, /c
> ujax:order="below b" -> /a,/b,/newnode,/c
> ujax:order="below c" -> /a,/b,/c,/newnode
> ujax:order="below" -> /a,/b,/c,/newnode
> Please note that JCR does not support the 'below' ordering and it's 'above' handling is different. but i think in  scripting environment, where you loop over a list. the "below" makes sense, since you don't need to know the next list item when drawing the 'insert' form.

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