You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@sling.apache.org by Mansour Al Akeel <ma...@gmail.com> on 2011/02/26 09:05:49 UTC

46 line blog example

I am trying to follow the example 46-line-blog, and having issues with
step 2.
I can post through the form, and check the contents through json. But
the after posting, I don't get a formatted page.

I added the <head> and <script> parts but no results display. Here's the
contents of the apps/blog/blog.esp:


<html>
  <head>
    <script src="/system/sling.js"></script>
    </head>
  <body>
    <h1>Sling microblog</h1>
    <div>
      <form method="POST">
        Title:<br/>
        <input type="text" name="title" style="width:100%"/>
        
        <br/>Text:<br/>
        <textarea style="width:100%" name="text"></textarea>
        
        <br/>
        <input type="submit" value="save"/>
        <input type="hidden" name=":redirect" value="*.html"/>
      </form>
    </div>
    <!-- code of step 2 comes here -->
  <script>Sling.wizard();</script>
  </body>
</html>

I installed PathBasedResourceProvider bundle as per the README file.

After I post, I get this:


Resource dumped by HtmlRendererServlet

Resource path: /content/blog/foo_1

Resource metadata: {sling.resolutionPathInfo=.html,
sling.resolutionPath=/content/blog/foo_1}

Resource type: sling:Folder

Resource super type: -

Resource properties

title: foo
jcr:createdBy: admin
jcr:created:
java.util.GregorianCalendar[time=1298706113938,areFieldsSet=true,areAll FieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="Canada/ Eastern",offset=-18000000,dstSavings=3600000,useDaylight=true,transitio ns=231,lastRule=java.util.SimpleTimeZone[id=Canada/Eastern,offset=-1800 0000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,startM onth=2,startDay=8,startDayOfWeek=1,startTime=7200000,startTimeMode=0,en dMode=3,endMonth=10,endDay=1,endDayOfWeek=1,endTime=7200000,endTimeMode =0]],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2011,MONTH=1, WEEK_OF_YEAR=9,WEEK_OF_MONTH=4,DAY_OF_MONTH=26,DAY_OF_YEAR=57,DAY_OF_WE EK=7,DAY_OF_WEEK_IN_MONTH=4,AM_PM=0,HOUR=2,HOUR_OF_DAY=2,MINUTE=41,SECO ND=53,MILLISECOND=938,ZONE_OFFSET=-18000000,DST_OFFSET=0]
jcr:primaryType: sling:Folder
text: foo text


Am I missing something.
Thank you.