Alfresco Forms 서비스가 제대로 작동하지 않습니다.Alfresco FormService Fundamental WRONG
기본 모양처럼 보입니다. 기능이 양식 구성 (control-param name="nameHere"
)을 웹 스크립트로 전달하지 않습니다.
단계별로 재현합니다.
Freemarker 템플릿을 만들고/share 프로젝트의 설명서에 따라 등록하십시오. 구성 요소가 렌더링되고 성공적으로 표시됩니다. 모든 것이 잘 작동합니다.
위키 양식 페이지의 문서에 따라 양식을 만듭니다.
<TOMCAT_INST/shared/classes/alfresco/web- extension/myclok-form-config.xml>
디렉토리에 등록하고 같은 방식으로 부하를 전달합니다<bean id="sampleShareConfig" class="org.springframework.extensions.config.ConfigBootstrap" init-method="register"> <property name="configService" ref="web.config" /> <property name="configs"> <list> <value>classpath:alfresco/web-extension/myclok-form-config.xml</value> </list> </property> </bean> <!-- ... share/WEB-INF/classes/org/springframework/extensions/surf/bootstrap/forms-bootstrap-context.xml -->
양식 이달 공식 문서에서
<config>
<forms>
<form id="myclok">
<view-form template="/org/alfresco/components/myclok/myclok.get.html.ftl" />
<edit-form template="/org/alfresco/components/myclok/myclok.get.html.ftl" />
<create-form template="/org/alfresco/components/myclok/myclok.get.html.ftl" />
<field-visibility>
<show id="currentPath" />
</field-visibility>
<appearance>
<field id="currentPath">
<control name="currentPath" template="/org/alfresco/components/myclok/myclok.get.html.ftl">
<control-param name="currentPath">sampleData1</control-param>
</control>
</field>
<control name="currentPath" template="/org/alfresco/components/myclok/myclok.get.html.ftl">
<control-param name="currentPath">sampleData2</control-param>
</control>
</appearance>
</form>
</forms>
</config>
가 기록됩니다
양식을하는 경우 요소가 평가자가없는 config 요소 내에 있고 양식이 언제나 찾을 수 있습니다. 응용 프로그램의 모든 양식에 특정 필드를 표시하려는 경우에 유용합니다.
그래서 myclok-form-config.xml 파일에서 지정했지만이 방법으로도 아무런 결과가 나오지 않습니다. PARAM 그러한 참조 성분은 다음의 URL < http://localhost:8080/share/page/site/wcmqs/myclok
의해로드 따라서 때>는 프레스코 제외 실패 말하면
Exception: freemarker.core.InvalidReferenceException - Expression field is undefined on line 6, column 6 in org/alfresco/components/myclok/myclok.get.html.ftl.
freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:125)
freemarker.core.TemplateObject.invalidTypeException(TemplateObject.java:135)
freemarker.core.Dot._getAsTemplateModel(Dot.java:78)
가 정의되어 currentPath
의 파라미터 값을 수신하는 것은 불가능 FormConfigs
. FormsService/ConfigService의 최소 기능이 작동하지 않습니다.
<#if field.control.params.currentPath??>
<#assign path=field.control.params.currentPath>
<#else>
<#assign path="someOtherDataValue">
</#if>
해결 방법을 알고 계시거나 작동 샘플을 보여줄 수 있습니까?
추 신 : 위의 모든 구성 형태는 FormService
이며 웹 스크립트 구성 요소가 첨부되어 있습니다.
java -jar alfresco-mmt.jar install myclokStubFormComponent.amp ../tomcat/webapps/share.war
AMP file : 빠른 설치를위한 .AMP 파일은 다음과 같은 명령을 호출해야합니다. Config file.
파일 'myclok.get.html.ftl'에서 오류가 발생 했으므로 해당 파일의 내용을 게시 할 수 있습니까? –