Trigger Load in 2016.2

classic Classic list List threaded Threaded
6 messages Options
Jez
Reply | Threaded
Open this post in threaded view
|

Trigger Load in 2016.2

Jez
Hi - Doing an upgrade to 2016.2 (from 4.10). Using full portlet in Liferay, I have a number of xforms apps which use triggers to load up Form Runner pages, using the following syntax:
<xf:trigger appearance="xxf:primary">
    <xf:label>New Form</xf:label>
    <xf:hint>Create and manage a new form entry</xf:hint>
    <xf:load ev:event="DOMActivate" resource="/fr/app-name/form-name/new" show="replace"/>
</xf:trigger>
Can't seem to get this to work in 2016.2. Links such as:
<xh:a href="/fr/app-name/form-name/new">New Form</xh:a>
work correctly.

Any help appreciated.

Cheers

Jez
Reply | Threaded
Open this post in threaded view
|

Re: Trigger Load in 2016.2

Erik Bruchez
Administrator
Jez,

Where do you place those triggers? Can you show a full example?

-Erik
Jez
Reply | Threaded
Open this post in threaded view
|

Re: Trigger Load in 2016.2

Jez
Thanks Erik

I'm using a landing page for the full portlet to manage an entry point to the forms, where the triggers are within an xh:table row

<!-- Driver Database Home Page
  Version: 0.1
  Author: J. Place
  Date: 16/25/15
  Changes:-->
<xh:html xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" xmlns:xh="http://www.w3.org/1999/xhtml" xmlns:xi="http://www.w3.org/2001/XInclude"
    xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:saxon="http://saxon.sf.net/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fb="http://orbeon.org/oxf/xml/form-builder"
    xmlns:xxf="http://orbeon.org/oxf/xml/xforms" xmlns:sql="http://orbeon.org/oxf/xml/sql" xmlns:fr="http://orbeon.org/oxf/xml/form-runner" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xf="http://www.w3.org/2002/xforms" xmlns:exf="http://www.exforms.org/exf/1-0">
    
    <!-- XHTML Head -->
    <xh:head>
        <xh:title>Driver Database Home Page</xh:title>
        <xh:link rel="stylesheet" type="text/css" href="/apps/parkers/formrunner.css"/>
        
        <xf:model id="parkers-model">
        </xf:model>
        
    </xh:head>
    
    <xh:body>
        <xh:table>
            <xh:tr>
                <xh:td>
                    <xf:trigger appearance="xxf:primary">
                        <xf:label>New Driver</xf:label>
                        <xf:hint>Create and manage a new driver entry</xf:hint>
                        <xf:load ev:event="DOMActivate" resource="/fr/parkers/drivers/new"
                            show="replace"/>
                    </xf:trigger>
                </xh:td>
                
                <xh:td>
                    <xf:trigger>
                        <xf:label>Drivers</xf:label>
                        <xf:hint>Manage Driver Data</xf:hint>
                        <xf:load ev:event="DOMActivate" resource="/fr/parkers/drivers/summary"
                            show="replace"/>
                    </xf:trigger>
                </xh:td>
            </xh:tr>
        </xh:table>
    </xh:body>
</xh:html>
Jez
Reply | Threaded
Open this post in threaded view
|

Re: Trigger Load in 2016.2

Jez
In reply to this post by Erik Bruchez
Hi Erik

Found the problem. Full Portlet appears to still require the
<requires-namespaced-parameters>false</requires-namespaced-parameters>
parameter in liferay-portlet.xml

Would you concur?

Cheers

Jez
Jez
Reply | Threaded
Open this post in threaded view
|

Re: Trigger Load in 2016.2

Jez
In reply to this post by Erik Bruchez
ps

Also, maybe typo in portlet.xml filter mapping?

<filter-mapping>
    <filter-name>orbeon-add-orbeon-auth-headers</filter-name>
    <portlet-name>orbeon-forms-portlet</portlet-name>
</filter-mapping>

should be

<filter-mapping>
    <filter-name>orbeon-add-orbeon-auth-headers-portlet-filter</filter-name>
    <portlet-name>orbeon-forms-portlet</portlet-name>
</filter-mapping>
Reply | Threaded
Open this post in threaded view
|

Re: Trigger Load in 2016.2

Erik Bruchez
Administrator
Jez,

Good catches!

Yes, if the proxy portlet needs `requires-namespaced-parameters = false`, then so does the full portlet. And the reference to the filter was incorrect. I committed these changes:

    https://github.com/orbeon/orbeon-forms/commit/f8147a962a073f130a0a6fa3b23240d6fa0441c1

-Erik