XForms - 使用Portlet单独部署无法加载资源

时间:2013-04-18 14:44:06

标签: liferay portlet orbeon xforms

有过滤的xform资源问题 - javascript,css和图片。我们尝试使用OrbeonPortletXFormsFilter和Trampoline servlet写入响应整个表单或者使用request.setAttribute(“oxf.xforms.renderer.document”,xformXml)在liferay portlet中显示xform。结果是相同的 - 表单被渲染但找不到javascript和CSS,并且所有表单都是分散的。表单操作也不起作用。谢谢。

我的配置:

portlet.xml中

    <portlet>
        <portlet-name>xForm-portlet</portlet-name>
        <portlet-class>com.xform.XFormPortlet</portlet-class>
        <init-param>
            <name>oxf.main-processor.name</name>
            <value>{http://www.orbeon.com/oxf/processors}pipeline</value>
        </init-param>
        <init-param>
            <name>oxf.main-processor.input.config</name>
            <value>oxf:/config/prologue-portlet.xpl</value>
        </init-param>
        <init-param>
            <name>oxf.error-processor.name</name>
            <value>{http://www.orbeon.com/oxf/processors}pipeline</value>
        </init-param>
        <init-param>
            <name>oxf.error-processor.input.config</name>
            <value>oxf:/config/error.xpl</value>
        </init-param>
        <supports>
            <mime-type>text/html</mime-type>
            <portlet-mode>view</portlet-mode>
        </supports>
        <portlet-info>
            <title>Xform Portlet</title>
        </portlet-info>
    </portlet>
<filter>
    <filter-name>orbeon-forms-portlet-xforms-filter</filter-name>
    <filter-class>org.orbeon.oxf.portlet.OrbeonPortletXFormsFilter</filter-class>
    <lifecycle>RENDER_PHASE</lifecycle>
    <lifecycle>ACTION_PHASE</lifecycle>
    <lifecycle>RESOURCE_PHASE</lifecycle>
    <init-param>
        <name>oxf.xforms.renderer.context</name>
        <value>/orbeon</value>
    </init-param>
</filter>   
<!-- Map the Orbeon portlet XForms filter -->
<filter-mapping>
<filter-name>orbeon-forms-portlet-xforms-filter</filter-name>
    <portlet-name>xForm-portlet</portlet-name>
</filter-mapping>    

的web.xml

<filter>
    <filter-name>orbeon-xforms-filter</filter-name>
    <filter-class>org.orbeon.oxf.servlet.OrbeonXFormsFilter</filter-class>
    <init-param>
      <param-name>oxf.xforms.renderer.context</param-name>
      <param-value>/orbeon</param-value>
    </init-param>
  </filter>
  <filter-mapping>
    <filter-name>orbeon-xforms-filter</filter-name>
    <url-pattern>/orbeon/*</url-pattern>
  </filter-mapping>

 <servlet>
    <servlet-name>orbeon-trampoline-servlet</servlet-name>
    <servlet-class>org.orbeon.oxf.portlet.OrbeonTrampolineServlet</servlet-class>
    <init-param>
      <param-name>oxf.xforms.renderer.context</param-name>
      <param-value>/orbeon</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>orbeon-trampoline-servlet</servlet-name>
    <url-pattern>/xforms-trampoline</url-pattern>
  </servlet-mapping>

1 个答案:

答案 0 :(得分:0)

此时的答案是此功能无法与Orbeon Forms 4.0一起使用。已输入An issue