Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-154

Allow access to Node and Property Methods on ScriptableNode and ScriptableProperty

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • None
    • 3
    • Scripting
    • None

    Description

      I would like to propose access to all jcr Node methods from ScriptableNode and access to the jcr Property.

      I recently wanted to access the Property.getLength() method from a .esp script and didn't find a good way starting
      out from my very convenient ScriptableNode.

      This discussion already talks about a similar issue:
      http://www.mail-archive.com/sling-dev@incubator.apache.org/msg01481.html

      So ideally somthing like an automatic getter mapping that I know from earlier rhino projects would mean
      that I could access the same information through for example prop.length or prop.getLength().

      I think it would be great if all jcr Property and Node methods would be exposed, otherwise we are hiding jcr features from
      the script user. I think maybe the solution also requires a ScriptableProperty.

      WDYT?

      Attachments

        1. SLING-154_2.patch
          14 kB
          Felix Meschberger
        2. SLING-154.partial.patch
          12 kB
          Bertrand Delacretaz

        Issue Links

          Activity

            People

              fmeschbe Felix Meschberger
              uncled David Nuescheler
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: