03-06-2012 12:13 AM
<family>dashlet</family>
<transaction>required</transaction>
<authentication>user</authentication>
model.sessionticket = session.ticket
${sessionticket}
However, this always returns a value of org.mozilla.javascript.Undefined@{some_memory_address}.session.getTicket()
. Note that the session variable is in fact instantiated as an org.springframework.extensions.webscripts.AbstractRuntime$RuntimeSession@{some_memory_location}.03-07-2012 06:49 PM
function main()
{
model.sessionTicket = session.getTicket();
}
main();
The view would look like:<#escape x as jsonUtils.encodeJSONString(x)>
{
"ticket": "${sessionTicket}"
}
</#escape>
Then, you could call the repo tier web script from your share tier web script, like this:function main()
{
var json = remote.call("/example/get-ticket");
if (json.status == 200)
{
obj = eval('(' + json + ')');
model.result = obj;
}
}
main();
And the view could then snag the ticket like this:<span>TICKET</span>: <span>${result.ticket}</span>
Hope that helps,06-13-2014 03:23 AM
remote.call("/example/get-ticket")
06-13-2014 06:28 AM
/opt/alfresco-4.2.e/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/repository
get-ticket.get.desc.xml get-ticket.get.js get-ticket.get.json.ftl
http://localhost/alfresco/s/example/get-ticket
var json = remote.call("/example/get-ticket");
03-08-2012 07:45 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.