AnsweredAssumed Answered

SearchBased dynamic List constraint in Share

Question asked by cate on Oct 19, 2011
Hi , all
I have successfully implemented SearchBased dynamic List constraint in Alfresco explorer , using this source http://blogs.alfresco.com/wp/jbarmash/2008/08/08/dynamic-data-driven-drop-downs-for-list-properties/.

But when I try to access same from Alfresco share it is showing me an error.

ERROR [scripts.forms.FormUIGet] Failed to generate field model for "test:custom_property"
org.json.JSONException: JSONObject["allowedValues"] not found.
at org.json.JSONObject.get(JSONObject.java:516)
        at org.json.JSONObject.getJSONArray(JSONObject.java:592)
        at org.alfresco.web.scripts.forms.FormUIGet.processFieldConstraintControl(FormUIGet.java:1926)
        at org.alfresco.web.scripts.forms.FormUIGet.generateConstraintModel(FormUIGet.java:1798)
        at org.alfresco.web.scripts.forms.FormUIGet.processFieldConstraints(FormUIGet.java:1683)
        at org.alfresco.web.scripts.forms.FormUIGet.generateFieldModel(FormUIGet.java:1300)
        at org.alfresco.web.scripts.forms.FormUIGet.generateSetModel(FormUIGet.java:1199)
        at org.alfresco.web.scripts.forms.FormUIGet.generateSetModelUsingVisibleFields(FormUIGet.java:1125)
        at org.alfresco.web.scripts.forms.FormUIGet.processVisibleFields(FormUIGet.java:1061)
        at org.alfresco.web.scripts.forms.FormUIGet.processFields(FormUIGet.java:1039)
        at org.alfresco.web.scripts.forms.FormUIGet.generateFormUIModel(FormUIGet.java:651)
        at org.alfresco.web.scripts.forms.FormUIGet.generateFormModel(FormUIGet.java:594)
        at org.alfresco.web.scripts.forms.FormUIGet.generateModel(FormUIGet.java:261)
        at org.alfresco.web.scripts.forms.FormUIGet.executeImpl(FormUIGet.java:216)
        at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:64)
        at org.springframework.extensions.webscripts.PresentationContainer.executeScript(PresentationContainer.java:69)
        at org.springframework.extensions.webscripts.LocalWebScriptRuntimeContainer.executeScript(LocalWebScriptRuntimeContainer.java:231)
        at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:333)
        at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:189)
        at org.springframework.extensions.webscripts.servlet.mvc.WebScriptView.renderMergedOutputModel(WebScriptView.java:99)
        at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
        at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1060)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:798)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
        at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
        at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
        at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
        at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
        at org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:195)
        at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:159)
        at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141)
        at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90)
        at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:417)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
        at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
        at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
        at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
        at java.lang.Thread.run(Thread.java:619)


any help is appreciated well in advance

Outcomes