2012-09-10 3 views
-3

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.

+1

파일 'myclok.get.html.ftl'에서 오류가 발생 했으므로 해당 파일의 내용을 게시 할 수 있습니까? –

답변

4

양식 서식 파일과 입력란 서식 파일의 차이점을 잘못 이해했다고 생각합니다. /org/alfresco/components/myclok/myclok.get.html.ftl 동일한 파일을 지정하여 필드 레이아웃을 제어하고 필드를 렌더링합니다.

필드 서식 파일을 사용하여 양식을 렌더링 할 때 field 개체가 채워지지 않았다는 오류가 표시됩니다. 프레임 워크가 아직 개별 필드를 렌더링하기 시작하지 않았으므로 이는 매우 정확합니다. 양식을 렌더링 중입니다.

좀 더 복잡한 양식을 구현하기 전에 Forms Development Kit (FDK)와 함께 제공되는 예제와 같은 기본 예제를 시도해보고 특히이라고 주장하기 전에 프레임 워크가 문서화 된대로 작동하지 않습니다.