PDF templates and my own XBL controls

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

PDF templates and my own XBL controls

bwallis42
This post was updated on .
We have an XBL control that adds a spell check button to a text field.
Underneath it is just a textfield.

If I reference this field from a PDF template in the usual way it doesn't
populate the field.

The XBL control is as follows

<xbl:xbl xmlns:xh="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/2002/xforms"
    xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ev="http://www.w3.org/2001/xml-events"
    xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xxi="http://orbeon.org/oxf/xml/xinclude"
    xmlns:xxf="http://orbeon.org/oxf/xml/xforms" xmlns:exforms="http://www.exforms.org/exf/1-0"
    xmlns:fr="http://orbeon.org/oxf/xml/form-runner" xmlns:saxon="http://saxon.sf.net/"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:oxf="http://www.orbeon.com/oxf/processors"    
    xmlns:im="http://www.infomedix.com.au/cpf/forms" xmlns:xbl="http://www.w3.org/ns/xbl"
    xmlns:xxbl="http://orbeon.org/oxf/xml/xbl">
    
    <!--
        SPELLCHECKABLE TEXT AREA

        This control is essentially a wrapper around a text area with the spell checker component included.
     -->
    <xbl:binding id="im-spellcheckable-textarea" element="im|spellcheckable-textarea"
        xxbl:mode="lhha binding value">
        <metadata xmlns="http://orbeon.org/oxf/xml/form-builder">
            <display-name lang="en">Plain Text with Spellcheck</display-name>
            <icon lang="en">
                <small-icon>/forms/orbeon/builder/images/textarea.png</small-icon>
                <large-icon>/forms/orbeon/builder/images/textarea.png</large-icon>
            </icon>
            <datatype>xf:string</datatype>
            <templates>
                <view>
                    <im:spellcheckable-textarea id="" ref="" xmlns="">
                        <xf:label ref="" />
                        <xf:hint ref="" />
                        <xf:help ref="" />
                        <xf:alert ref="$fr-resources/detail/labels/alert" />
                    </im:spellcheckable-textarea>
                </view>
            </templates>
        </metadata>
            
        <xbl:template>
            <xf:group id="im-component-group">
                    <xf:textarea ref="xxf:binding('im-spellcheckable-textarea')" appearance="spell-checker">
                    </xf:textarea>
            </xf:group>
        </xbl:template>
    </xbl:binding>
</xbl:xbl>


--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orbeon+unsubscribe@googlegroups.com.
To post to this group, send email to orbeon@googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: PDF templates and my own XBL controls

Alessandro  Vernet
Administrator
Hi Brian,

When you have a custom PDF, you need to tell Orbeon Forms where the value
should be extracted from. You do this through 2 properties: a
`oxf.fr.pdf.format.FORMAT_NAME` property (the value of this property is an
XPath expression telling Orbeon Forms where the value is in the markup
generated by your component), and a `oxf.fr.pdf.map.*.*.COMPONENT_NAME.*`
property (which map a given format to your component). See the
`properties-internal.xml` (linked below) for some examples for the built-in
components.

https://github.com/orbeon/orbeon-forms/blob/master/src/main/resources/config/properties-internal.xml

You'll let us know if this works for you.

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: PDF templates and my own XBL controls

Alessandro  Vernet
Administrator
Hi Brian, have you tried setting up the `oxf.fr.pdf.format.FORMAT_NAME` and
`oxf.fr.pdf.map.*.*.COMPONENT_NAME.*` properties for your component? If so,
are the values now showing in the PDF?

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: PDF templates and my own XBL controls

bwallis42
Yes, thanks Alex, I have tried the map property using an existing format,
textarea, and it is working as expected.

The customer will be happy :-)

brian...


--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: PDF templates and my own XBL controls

Alessandro  Vernet
Administrator
Excellent Brian; this is really getting into the "guts" of how things work,
so I'm glad you got this to work for your customer!

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet