是否可以使用Alfresco表单服务为自定义WebScript或Dashlet创建输入字段



alfresco共享中的表单引擎似乎是创建和编辑新内容对象的非常有力的方法。是否可以使用此声明性配置也适用于与存储库对象不直接对应的表单?

我要解决的问题是一些自定义属性的搜索掩码。搜索字段之一是针对列表约束的方面,如果alfresco可以自动创建相应的选择元素和验证,那将是很棒的,就像编辑对象属性时一样。

为例,请考虑以下内容模型:

<constraints>
    <constraint name="jh:listconstraint" type="LIST">
        <parameter name="allowedValues">
            <list>
                <value>100</value>
                <value>200</value>
                <value>300</value>
            </list>
        </parameter>
    </constraint>
    <constraint name="jh:regexConstraint" type="REGEX">
        <parameter name="expression">
            <value>[a-z]{4}</value>
        </parameter>
        <parameter name="requiresMatch">
            <value>true</value>
        </parameter>
    </constraint>
</constraint>
<aspects>
    <aspect name="jh:test">
        <properties>
            <property name="jh:property1">
                <title>Property 1</title>
                <type>d:int</type>
                <constraints>
                    <constraint ref="jh:listconstraint"/>
                </constraints>
            </property>
            <property name="jh:property2">
                <title>Property 2</title>
                <type>d:text</type>
                <constraints>
                    <constraint ref="jh:regexConstraint"/>
                </constraints>
            </property>
        </properties>
    </aspect>
</aspects>

具有此方面的文档的属性表包含对属性的不错的下拉列表选择,并具有列表约束和对正则限制的自动验证。我想在自定义仪表室内渲染相同的输入字段,但要处理后端逻辑。

目标版本将是alfresco 4.1.1。

我怀疑有一种合理的方法可以基于类型或方面的定义来建立搜索(表格),而不会严重伤害库存中的crud-semantics和丑陋的 FormsService hacks。P>

如果您想利用Alfresco表格,我将尝试在Wiki上记录的基于动作的表格http://wiki.alfresco.com/wiki/custom_actions。您可能仍然需要担心处理价值约束,您可能必须重复自己,但它仍然应该给您一个体面的开始。

最新更新