As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
<script type="text/javascript">//<![CDATA[ new Alfresco.widget.DashletResizer("${args.htmlid}", "${instance.object.id}"); function getjson(e){ var name = e.id; var scriptURL = "/RedTree/emaillist?company=" + name + "&format=json"; alert(scriptURL); var connector = remote.connect("alfresco"); alert ("connector ok"); var json = connector.call(scriptURL); if (json.status == 200) { var obj = eval('(' + json + ')'); alert('done'); }else { alert('failed'); } } //]]></script> <div class="dashlet"> <div class="title">${msg("header")}</div> <p style="color:green;font-size:10px;font-weight:bold;">Click a company to view the memberlist with contact details.</p> <div class="body scrollableList" <#if args.height??>style="height: ${args.height}px;"</#if>> <div class="detail-list-item first-item last-item"> <#list result.companylist as company> <a id="${company.companyname}" href = "#" onclick="getjson(this);">${company.companyname}</a> </#list> </div> </div> </div>
javax.servlet.ServletException: Could not resolve view with name 'user/admin/alfresco/services/RedTree/emaillist' in servlet with name 'Spring Surf Dispatcher Servlet'
<script type="text/javascript" src="<%=request.getContextPath()%>/scripts/ajax/yahoo/connection/connection-min.js"> </script> <script type="text/javascript" src="<%=request.getContextPath()%>/scripts/ajax/common.js"> </script> <script type="text/javascript">//<![CDATA[ new Alfresco.widget.DashletResizer("${args.htmlid}", "${instance.object.id}"); //]]></script> <script type="text/javascript"> function getjson(e){ alert('start'); var name = e.id; var scriptURL = "alfresco/services/RedTree/emaillist?company=" + name + "&format=json"; alert(scriptURL); YAHOO.util.Connect.asyncRequest("GET", scriptURL, { success: handleInfo, failure: handleErrorYahoo }, null); } function handleInfo(response) { alert('succes' + response.responseText);} function handleErrorYahoo(response) { alert('failed…' + response.responseText);} </script> <div class="dashlet"> <div class="title">${msg("header")}</div> <p style="color:green;font-size:10px;font-weight:bold;">Click a company to view the memberlist with contact details.</p> <div class="body scrollableList" <#if args.height??>style="height: ${args.height}px;"</#if>> <div class="detail-list-item first-item last-item"> <#list result.companylist as company> <a id="${company.companyname}" href = "#" onclick="getjson(this);">${company.companyname}</a> </#list> </div> </div> </div>
function main() { var companyname = args.company; var query = "TYPE:\"{http://www.alfresco.org/model/content/1.0}person\" AND @cm\\:organization:\"" + companyname + "\""; var userList = search.luceneSearch(query); var length = userList.length; eval("model.userList = userList"); eval("model.company = companyname"); } main();
<#escape x as jsonUtils.encodeJSONString(x)> { "${company}": [ <#list userList as child> { "firstname": "${child.properties.firstName}", "lastname": "${child.properties.lastName}", "email": "${child.properties.email}" } <#if !(child == userList?last)>,</#if> </#list> ] } </#escape>
var scriptURL = "alfresco/services/RedTree/emaillist?company=" + name + "&format=json";
var scriptURL = Alfresco.constants.PROXY_URI + "RedTree/emaillist?company=" + name + "&format=json";