Академический Документы
Профессиональный Документы
Культура Документы
Apache Sling
Sele cto r
Ex te ns ion
script resolution
Su fx
1 2 3 4 5
Best match:
Metho d
HTTP Request
Content Resolution
/wiki/Sling
Node has properties
sling:resourceType
wiki/page
Resource Type
Script Locations
eit he r:
/apps/wiki/page/
or: /libs/wiki/page/
Script Names
Extens ion
edit.esp html.esp
Worst match:
6
Script
edit.html.esp
Selecto r+Exten sion
GET.esp
Sele cto r
Met ho d
Include Options
sling.include("path", "forceResourceType= wiki/body, (Powerf ul) replaceSuffix= xhtml, addSelectors= foo.bar");
script"); <% log.info("Executing my rameter("simple")) { if (request.getRequestPa ttp://localhost/"); response.sendRedirect("h } %> <html> d> ode.title %></title></hea <head><title><%=currentN <body> ) %></h1> <h1><%=resource.getPath( String()); %> <% out.println(reader.to e.getPath() + "content", <% sling.include(resourc ; %> "replaceSelectors= edit") </body> </html>
Create or update /mynode, set title and body. Set lastModied and lastModiedBy automatically
<form action="/mynode/" method="POST"> <input type="text" name="dummy"> <input type="hidden" name=":order" value="first"> </form>
<input type="text" name="date1" value="2008-06-13T18:55:00"> <input type="text" name="date2"> <input type="hidden" name="date2@TypeHint" value="Date"> <input type="hidden" value="nt:file" name="./uploaded/jcr:primaryType">
Guess property type from date pattern, set property type explicitly and set node type explicitly
<form action="/old/node" method="POST"> <input type="hidden" name=":operation" value="copy"> <input type="hidden" name=":dest" value="/new/place"> <input type="hidden" name=":replace" value="true"> </form>
Create new node below /mynode and make it the rst child (also valid: last, before x, after x, 3, 7, 9. <form action="/node" method="POST"> <input name=":operation" type="hidden" value="delete"> </form> Delete /node
<form action="/node" method="POST"> <input type="hidden" name=":operation" value="delete"> <input type="hidden" name=":applyTo" value="/node/one"> <input type="hidden" name=":applyTo" value="/node/two"> </form>
Create new node below /mynode, use name or name hint. Set created and createdBy automatically
<input type="text" name="customer"> <input type="hidden" value="John Doe" name="customer@DefaultValue" > <input type="hidden" name="title@Delete">
Take default value for customer property, remove the title property
<form action="/old/node" method="POST"> <input type="hidden" name=":operation" value="move"> <input type="hidden" name=":dest" value="/new/place"> </form>