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

inconsistent date behaviour of sling.wizard()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • Scripting
    • None
    • Sling bundled with CRX Quickstart

    Description

      I create a form in a .jst page that creates a new node and add the special "craeted" field like this:

      <form class="hform" method="POST" action="/content/myblog/posts/*">
      <legend>Post form</legend>

      <p><label>Title</label>
      <input name="title" type="text" size="80"></p>

      <p><label>Body</label>
      <textarea name="posttext" cols="40" rows="5"></textarea></p>

      <input type="hidden" name="created"/>
      <input name=":redirect" type="hidden" value="/content/myblog/posts.admin.html"/>

      <input type="submit" value="Post" class="button">
      </form>
      <script>Sling.wizard();</script>

      This will create the node with an attribute "created" of JCR type Date

      Then, I use the same .jst to edit this node and post again. This time, "created" will be a String property.

      Causes other scripts that use this property to fail

      Attachments

        Activity

          People

            Unassigned Unassigned
            mmarth Michael Marth
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: