Optaros Surf Code Camp Lab 1

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    1 Favorite

    Optaros Surf Code Camp Lab 1 - Presentation Transcript

    1. Alfresco Surf Code Camp Lab 1: Hello World Dashlet for Share
    2. Hands-on Lab Objectives • Build a custom dashlet for Alfresco Share • Select dashlet from configure dashboard page • Add it to your dashboard to view it Notes • Alfresco Share is an Alfresco Surf-powered application • Dashlets are web components 12/01/09 2
    3. Directories Alfresco Share web application ($SHARE_HOME) • /opt/alfresco/tomcat/webapps/share site-data • $SHARE_HOME/WEB-INF/classes/alfresco/site-data site-webscripts • $SHARE_HOME/WEB-INF/classes/alfresco/site-webscripts templates • $SHARE_HOME/WEB-INF/classes/alfresco/templates 12/01/09 3
    4. 1 - Preparation Navigate to the site-webscripts directory • $SHARE_HOME/WEB-INF/classes/alfresco/site-webscripts Create a folder called demo Navigate into the demo directory • $SHARE_HOME/WEB-INF/classes/alfresco/site-webscripts/demo Create a Web Script: • helloworld 12/01/09 4
    5. 2 – Hello World Dashlet helloworld.get.desc.xml <webscript> <shortname>Hello World Dashlet</shortname> <description>Hello World Dashlet</description> <family>user-dashlet</family> <url>/demo/helloworld</url> </webscript> helloworld.get.js model.body = \"All your base are belong to us!\"; helloworld.get.html.ftl <div class=\"dashlet\"> <div class=\"title\">Hello World</div> <div class=\"body\">${body}</div> </div> 12/01/09 5
    6. 3 – Test it manually Browse to • http://labs3c:8080/share/service/index Click on ‘Refresh’ to reset the Web Scripts cache Test your dashlet • http://labs3c:8080/share/service/demo/helloworld 12/01/09 6
    7. 4 – View it in Share Browse to • http://labs3c:8080/share Log in • admin/admin Click on ‘Customize Dashboard’ Click ‘Add Dashlets’ You should see your new dashlet • Try adding it to your dashboard page 12/01/09 7
    8. 5 – Web Script Configuration Configuration files for Web Scripts Allows Web Scripts to store configuration files in associated XML Let's give it a shot with our Hello World Dashlet 12/01/09 8
    9. 5 – Web Script Configuration helloworld.get.config.xml <properties> <title>Hello World</title> </properties> helloworld.get.html.ftl <div class=\"dashlet\"> <div class=\"title\">${config.script[\"properties\"][\"title\"]}</div> <div class=\"body\">${body}</div> </div> 12/01/09 9
    10. 6 – Test it manually Browse to http://labs3c:8080/share/service/index ● Click on ‘Refresh’ to reset the Web Scripts cache Test your dashlet http://labs3c:8080/share/service/demo/helloworld ● 12/01/09 10
    11. Wrap-up In this lab, you... • Created a simple Share Dashlet • The Dashlet was a good old fashioned web script • The web script read a parameter from a config file 12/01/09 Optaros and Client confidential. All rights reserved. 11

    + Jeff PottsJeff Potts, 9 months ago

    custom

    2304 views, 1 favs, 1 embeds more stats

    In the first Surf Code Camp lab your goal is to cre more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 2304
      • 2303 on SlideShare
      • 1 from embeds
    • Comments 0
    • Favorites 1
    • Downloads 136
    Most viewed embeds
    • 1 views on http://www.slideshare.net

    more

    All embeds
    • 1 views on http://www.slideshare.net

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories