05-03-2012 08:29 AM
05-03-2012 06:13 PM
05-04-2012 04:42 AM
function escapeQName(qname)
{
var separator = qname.indexOf(':'),
namespace = qname.substring(0, separator),
localname = qname.substring(separator + 1);
return escapeString(namespace) + '\\:' + escapeString(localname);
}
function escapeString(value)
{
var result = "";
for (var i=0,c; i<value.length; i++)
{
c = value.charAt(i);
if (i == 0)
{
if (!((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '_'))
{
result += '\\';
}
}
else
{
if (!((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '_' || c == '$' || c == '#' || (c >= '0' && c <= '9')))
{
result += '\\';
}
}
result += c;
}
return result;
}
05-07-2012 08:59 PM
We patched two functions in search.lib.js of the community 4.0dCE version in use.
In file alfresco/templates/webscripts/org/alfresco/slingshot/search/search.lib.js of the repository side.
1. added backslash in colon-separator ( I don't understand why SOLR accepts a query like >>cm:title:"some text")
2. added digits to the accepted set of chars in the identifier (not at the beginning)
But also to say, that the forn service returns a non expected field name for properties that do not belong to the requested type directly. That is for properties that are defined on an aspect.
We created a custom form control that adds the required prop_ prefix to the html field name, so that it gets actually considered in the search query.
05-08-2012 04:17 AM
<config evaluator="model-type" condition="cm:content">
<forms>
<form id="ecm4uTool">
<field-visibility>
<show id="ecm4uTool:personName" />
</field-visibility>
<appearance>
<field id="ecm4uTool:personName">
<control template="/ecm4u/searchTextfield.ftl" />
</field>
</appearance>
</form>
</forms>
</config>
<div class="form-field">
<label for="${fieldHtmlId}">${field.label?html}:<#if field.mandatory><span class="mandatory-indicator">${msg("form.required.fields.marker")}</span></#if></label>
<input id="${fieldHtmlId}" name="prop_${field.name}" tabindex="0"
<#if field.value?is_number>value="${field.value?c}"<#else>value="${field.value?html}"</#if> />
<@formLib.renderFieldHelp field=field />
</div>
05-13-2012 10:18 PM
05-14-2014 10:37 AM
<input id="${fieldHtmlId}" type="hidden" name="${field.name}" value="${fieldValue?string}" />
<input id="${fieldHtmlId}" type="hidden" name="prop_${field.name}" value="${fieldValue?string}" />
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.