Control to add block of read-only text (in Form Builder)

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

Control to add block of read-only text (in Form Builder)

Simon Goodchild
Hi,

I'm building a solution using the Form Builder, and need my end-users
to be able to add blocks of read-only descriptive text to the forms
they create. None of the standard controls seem to give this option -
the 'Text Output' control only allows 1 line of text, and making the
standard 'Multi-Line Text' control read-only isn't very user-friendly.

I've tried creating my own control in XBL (baed on the Multi-Line Text
control), but have had a lot of trouble with it and am not sure if
there is a better way.

Soes anyone have any suggestions or examples of how I might do this?

Thanks for your help,

Simon


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Control to add block of read-only text (in Form Builder)

Erik Bruchez
Administrator
Simon,

Currently, XBL components do not actually have a WYSIWYG appearance in
Form Builder itself, so I think this will require a change to Form
Builder, because you will want a textarea to enter the text, right?

-Erik

On Tue, Jul 21, 2009 at 9:58 AM, Simon Goodchild<[hidden email]> wrote:

> Hi,
>
> I'm building a solution using the Form Builder, and need my end-users
> to be able to add blocks of read-only descriptive text to the forms
> they create. None of the standard controls seem to give this option -
> the 'Text Output' control only allows 1 line of text, and making the
> standard 'Multi-Line Text' control read-only isn't very user-friendly.
>
> I've tried creating my own control in XBL (baed on the Multi-Line Text
> control), but have had a lot of trouble with it and am not sure if
> there is a better way.
>
> Soes anyone have any suggestions or examples of how I might do this?
>
> Thanks for your help,
>
> Simon
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Control to add block of read-only text (in Form Builder)

Simon Goodchild
Yes, I was thinking that a simple textarea was all that would be
needed on the Form Builder side, so I just need a way to transform
that content into a static text block in the generated form. I tried
doing this using an xsl transformation in a new XBL component, but
couldn't find a way to retrieve the content from the textarea for
display. I was hoping it would be fairly easy to do, as the 'Text
Output' control is doing almost the same thing with a text field, but
maybe it's more difficult :-)

Simon

2009/7/21 Erik Bruchez <[hidden email]>:

> Simon,
>
> Currently, XBL components do not actually have a WYSIWYG appearance in
> Form Builder itself, so I think this will require a change to Form
> Builder, because you will want a textarea to enter the text, right?
>
> -Erik
>
> On Tue, Jul 21, 2009 at 9:58 AM, Simon Goodchild<[hidden email]> wrote:
>> Hi,
>>
>> I'm building a solution using the Form Builder, and need my end-users
>> to be able to add blocks of read-only descriptive text to the forms
>> they create. None of the standard controls seem to give this option -
>> the 'Text Output' control only allows 1 line of text, and making the
>> standard 'Multi-Line Text' control read-only isn't very user-friendly.
>>
>> I've tried creating my own control in XBL (baed on the Multi-Line Text
>> control), but have had a lot of trouble with it and am not sure if
>> there is a better way.
>>
>> Soes anyone have any suggestions or examples of how I might do this?
>>
>> Thanks for your help,
>>
>> Simon
>>
>>
>> --
>> You receive this message as a subscriber of the [hidden email] mailing list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>
>>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Control to add block of read-only text (in Form Builder)

Erik Bruchez-3
I don't think it's *very* difficult to do, but again it requires a
change to Form Builder. If you look at grid-cell-editor.xml in the
source, you will see the following match for the text output control:

<xforms:group ref="xforms:output[not(@mediatype)]">

This is where Form Builder decides to place an input field to edit the text.

Something similar would be needed to place a textarea for your control.

-Erik

On Tue, Jul 21, 2009 at 1:00 PM, Simon Goodchild<[hidden email]> wrote:

> Yes, I was thinking that a simple textarea was all that would be
> needed on the Form Builder side, so I just need a way to transform
> that content into a static text block in the generated form. I tried
> doing this using an xsl transformation in a new XBL component, but
> couldn't find a way to retrieve the content from the textarea for
> display. I was hoping it would be fairly easy to do, as the 'Text
> Output' control is doing almost the same thing with a text field, but
> maybe it's more difficult :-)
>
> Simon
>
> 2009/7/21 Erik Bruchez <[hidden email]>:
>> Simon,
>>
>> Currently, XBL components do not actually have a WYSIWYG appearance in
>> Form Builder itself, so I think this will require a change to Form
>> Builder, because you will want a textarea to enter the text, right?
>>
>> -Erik
>>
>> On Tue, Jul 21, 2009 at 9:58 AM, Simon Goodchild<[hidden email]> wrote:
>>> Hi,
>>>
>>> I'm building a solution using the Form Builder, and need my end-users
>>> to be able to add blocks of read-only descriptive text to the forms
>>> they create. None of the standard controls seem to give this option -
>>> the 'Text Output' control only allows 1 line of text, and making the
>>> standard 'Multi-Line Text' control read-only isn't very user-friendly.
>>>
>>> I've tried creating my own control in XBL (baed on the Multi-Line Text
>>> control), but have had a lot of trouble with it and am not sure if
>>> there is a better way.
>>>
>>> Soes anyone have any suggestions or examples of how I might do this?
>>>
>>> Thanks for your help,
>>>
>>> Simon
>>>
>>>
>>> --
>>> You receive this message as a subscriber of the [hidden email] mailing list.
>>> To unsubscribe: mailto:[hidden email]
>>> For general help: mailto:[hidden email]?subject=help
>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>>
>>>
>>
>>
>> --
>> You receive this message as a subscriber of the [hidden email] mailing list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>
>>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Control to add block of read-only text (in Form Builder)

Simon Goodchild
Thanks for the hint Erik. I now how the new group defined within
grid-cell-editor.xml, an my custom XBL component setup, so that I can
add the control in using the Form Builder. The textarea correctly
appears in the formbuilder for editing, but there is nothing displayed
when I actually test the form output. I'm assuming there's another
config file somewhere whih will map my new component to a view whe the
form is run, but haven't found anything yet. Any ideas to help me do
this?

Many thanks,

Simon

2009/7/28 Erik Bruchez <[hidden email]>:

> I don't think it's *very* difficult to do, but again it requires a
> change to Form Builder. If you look at grid-cell-editor.xml in the
> source, you will see the following match for the text output control:
>
> <xforms:group ref="xforms:output[not(@mediatype)]">
>
> This is where Form Builder decides to place an input field to edit the text.
>
> Something similar would be needed to place a textarea for your control.
>
> -Erik
>
> On Tue, Jul 21, 2009 at 1:00 PM, Simon Goodchild<[hidden email]> wrote:
>> Yes, I was thinking that a simple textarea was all that would be
>> needed on the Form Builder side, so I just need a way to transform
>> that content into a static text block in the generated form. I tried
>> doing this using an xsl transformation in a new XBL component, but
>> couldn't find a way to retrieve the content from the textarea for
>> display. I was hoping it would be fairly easy to do, as the 'Text
>> Output' control is doing almost the same thing with a text field, but
>> maybe it's more difficult :-)
>>
>> Simon
>>
>> 2009/7/21 Erik Bruchez <[hidden email]>:
>>> Simon,
>>>
>>> Currently, XBL components do not actually have a WYSIWYG appearance in
>>> Form Builder itself, so I think this will require a change to Form
>>> Builder, because you will want a textarea to enter the text, right?
>>>
>>> -Erik
>>>
>>> On Tue, Jul 21, 2009 at 9:58 AM, Simon Goodchild<[hidden email]> wrote:
>>>> Hi,
>>>>
>>>> I'm building a solution using the Form Builder, and need my end-users
>>>> to be able to add blocks of read-only descriptive text to the forms
>>>> they create. None of the standard controls seem to give this option -
>>>> the 'Text Output' control only allows 1 line of text, and making the
>>>> standard 'Multi-Line Text' control read-only isn't very user-friendly.
>>>>
>>>> I've tried creating my own control in XBL (baed on the Multi-Line Text
>>>> control), but have had a lot of trouble with it and am not sure if
>>>> there is a better way.
>>>>
>>>> Soes anyone have any suggestions or examples of how I might do this?
>>>>
>>>> Thanks for your help,
>>>>
>>>> Simon
>>>>
>>>>
>>>> --
>>>> You receive this message as a subscriber of the [hidden email] mailing list.
>>>> To unsubscribe: mailto:[hidden email]
>>>> For general help: mailto:[hidden email]?subject=help
>>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>>>
>>>>
>>>
>>>
>>> --
>>> You receive this message as a subscriber of the [hidden email] mailing list.
>>> To unsubscribe: mailto:[hidden email]
>>> For general help: mailto:[hidden email]?subject=help
>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>>
>>>
>>
>>
>> --
>> You receive this message as a subscriber of the [hidden email] mailing list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>
>>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: Control to add block of read-only text (in Form Builder)

Erik Bruchez-3
Simon,

Does your component appears in the Form Builder toolbox?

It should also work at runtime then!

-Erik

On Fri, Jul 31, 2009 at 6:40 AM, Simon Goodchild<[hidden email]> wrote:

> Thanks for the hint Erik. I now how the new group defined within
> grid-cell-editor.xml, an my custom XBL component setup, so that I can
> add the control in using the Form Builder. The textarea correctly
> appears in the formbuilder for editing, but there is nothing displayed
> when I actually test the form output. I'm assuming there's another
> config file somewhere whih will map my new component to a view whe the
> form is run, but haven't found anything yet. Any ideas to help me do
> this?
>
> Many thanks,
>
> Simon
>
> 2009/7/28 Erik Bruchez <[hidden email]>:
>> I don't think it's *very* difficult to do, but again it requires a
>> change to Form Builder. If you look at grid-cell-editor.xml in the
>> source, you will see the following match for the text output control:
>>
>> <xforms:group ref="xforms:output[not(@mediatype)]">
>>
>> This is where Form Builder decides to place an input field to edit the text.
>>
>> Something similar would be needed to place a textarea for your control.
>>
>> -Erik
>>
>> On Tue, Jul 21, 2009 at 1:00 PM, Simon Goodchild<[hidden email]> wrote:
>>> Yes, I was thinking that a simple textarea was all that would be
>>> needed on the Form Builder side, so I just need a way to transform
>>> that content into a static text block in the generated form. I tried
>>> doing this using an xsl transformation in a new XBL component, but
>>> couldn't find a way to retrieve the content from the textarea for
>>> display. I was hoping it would be fairly easy to do, as the 'Text
>>> Output' control is doing almost the same thing with a text field, but
>>> maybe it's more difficult :-)
>>>
>>> Simon
>>>
>>> 2009/7/21 Erik Bruchez <[hidden email]>:
>>>> Simon,
>>>>
>>>> Currently, XBL components do not actually have a WYSIWYG appearance in
>>>> Form Builder itself, so I think this will require a change to Form
>>>> Builder, because you will want a textarea to enter the text, right?
>>>>
>>>> -Erik
>>>>
>>>> On Tue, Jul 21, 2009 at 9:58 AM, Simon Goodchild<[hidden email]> wrote:
>>>>> Hi,
>>>>>
>>>>> I'm building a solution using the Form Builder, and need my end-users
>>>>> to be able to add blocks of read-only descriptive text to the forms
>>>>> they create. None of the standard controls seem to give this option -
>>>>> the 'Text Output' control only allows 1 line of text, and making the
>>>>> standard 'Multi-Line Text' control read-only isn't very user-friendly.
>>>>>
>>>>> I've tried creating my own control in XBL (baed on the Multi-Line Text
>>>>> control), but have had a lot of trouble with it and am not sure if
>>>>> there is a better way.
>>>>>
>>>>> Soes anyone have any suggestions or examples of how I might do this?
>>>>>
>>>>> Thanks for your help,
>>>>>
>>>>> Simon
>>>>>
>>>>>
>>>>> --
>>>>> You receive this message as a subscriber of the [hidden email] mailing list.
>>>>> To unsubscribe: mailto:[hidden email]
>>>>> For general help: mailto:[hidden email]?subject=help
>>>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> You receive this message as a subscriber of the [hidden email] mailing list.
>>>> To unsubscribe: mailto:[hidden email]
>>>> For general help: mailto:[hidden email]?subject=help
>>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>>>
>>>>
>>>
>>>
>>> --
>>> You receive this message as a subscriber of the [hidden email] mailing list.
>>> To unsubscribe: mailto:[hidden email]
>>> For general help: mailto:[hidden email]?subject=help
>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>>
>>>
>>
>>
>> --
>> You receive this message as a subscriber of the [hidden email] mailing list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>
>>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: Re: Control to add block of read-only text (in Form Builder)

Simon Goodchild
Hi Erik,

It does appear in the Form Builder interface (in the compenent menu on
the left and within the actual builder), and allows me to view/edit
the text that is displayed. But when I save and preview the form I
just get a blank space where that component should appear. All the
other components in my test form appear around this, so I just get a
blank space in the form.

I can provide the source for the changes I have made if that helps - I
was going to contribute it back to the project once it's working
anyway.

Many thanks,

Simon

2009/8/2 Erik Bruchez <[hidden email]>:

> Simon,
>
> Does your component appears in the Form Builder toolbox?
>
> It should also work at runtime then!
>
> -Erik
>
> On Fri, Jul 31, 2009 at 6:40 AM, Simon Goodchild<[hidden email]> wrote:
>> Thanks for the hint Erik. I now how the new group defined within
>> grid-cell-editor.xml, an my custom XBL component setup, so that I can
>> add the control in using the Form Builder. The textarea correctly
>> appears in the formbuilder for editing, but there is nothing displayed
>> when I actually test the form output. I'm assuming there's another
>> config file somewhere whih will map my new component to a view whe the
>> form is run, but haven't found anything yet. Any ideas to help me do
>> this?
>>
>> Many thanks,
>>
>> Simon
>>
>> 2009/7/28 Erik Bruchez <[hidden email]>:
>>> I don't think it's *very* difficult to do, but again it requires a
>>> change to Form Builder. If you look at grid-cell-editor.xml in the
>>> source, you will see the following match for the text output control:
>>>
>>> <xforms:group ref="xforms:output[not(@mediatype)]">
>>>
>>> This is where Form Builder decides to place an input field to edit the text.
>>>
>>> Something similar would be needed to place a textarea for your control.
>>>
>>> -Erik
>>>
>>> On Tue, Jul 21, 2009 at 1:00 PM, Simon Goodchild<[hidden email]> wrote:
>>>> Yes, I was thinking that a simple textarea was all that would be
>>>> needed on the Form Builder side, so I just need a way to transform
>>>> that content into a static text block in the generated form. I tried
>>>> doing this using an xsl transformation in a new XBL component, but
>>>> couldn't find a way to retrieve the content from the textarea for
>>>> display. I was hoping it would be fairly easy to do, as the 'Text
>>>> Output' control is doing almost the same thing with a text field, but
>>>> maybe it's more difficult :-)
>>>>
>>>> Simon
>>>>
>>>> 2009/7/21 Erik Bruchez <[hidden email]>:
>>>>> Simon,
>>>>>
>>>>> Currently, XBL components do not actually have a WYSIWYG appearance in
>>>>> Form Builder itself, so I think this will require a change to Form
>>>>> Builder, because you will want a textarea to enter the text, right?
>>>>>
>>>>> -Erik
>>>>>
>>>>> On Tue, Jul 21, 2009 at 9:58 AM, Simon Goodchild<[hidden email]> wrote:
>>>>>> Hi,
>>>>>>
>>>>>> I'm building a solution using the Form Builder, and need my end-users
>>>>>> to be able to add blocks of read-only descriptive text to the forms
>>>>>> they create. None of the standard controls seem to give this option -
>>>>>> the 'Text Output' control only allows 1 line of text, and making the
>>>>>> standard 'Multi-Line Text' control read-only isn't very user-friendly.
>>>>>>
>>>>>> I've tried creating my own control in XBL (baed on the Multi-Line Text
>>>>>> control), but have had a lot of trouble with it and am not sure if
>>>>>> there is a better way.
>>>>>>
>>>>>> Soes anyone have any suggestions or examples of how I might do this?
>>>>>>
>>>>>> Thanks for your help,
>>>>>>
>>>>>> Simon
>>>>>>
>>>>>>
>>>>>> --
>>>>>> You receive this message as a subscriber of the [hidden email] mailing list.
>>>>>> To unsubscribe: mailto:[hidden email]
>>>>>> For general help: mailto:[hidden email]?subject=help
>>>>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> You receive this message as a subscriber of the [hidden email] mailing list.
>>>>> To unsubscribe: mailto:[hidden email]
>>>>> For general help: mailto:[hidden email]?subject=help
>>>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> You receive this message as a subscriber of the [hidden email] mailing list.
>>>> To unsubscribe: mailto:[hidden email]
>>>> For general help: mailto:[hidden email]?subject=help
>>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>>>
>>>>
>>>
>>>
>>> --
>>> You receive this message as a subscriber of the [hidden email] mailing list.
>>> To unsubscribe: mailto:[hidden email]
>>> For general help: mailto:[hidden email]?subject=help
>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>>
>>>
>>
>>
>> --
>> You receive this message as a subscriber of the [hidden email] mailing list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>
>>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: Re: Control to add block of read-only text (in Form Builder)

Simon Goodchild
In case anyone has any ideas, below are the configuration entries I'm
currently using:

For the XBL definition of the new component:
    <xbl:binding id="fb-mloutput" element="xforms|mloutput">
               
        <!-- Orbeon Form Builder Component Metadata -->
        <metadata xmlns="http://orbeon.org/oxf/xml/form-builder">
            <display-name lang="en">Multi-line Text Output</display-name>
            <display-name lang="fr">Sortie texte</display-name>
            <icon lang="en">

<small-icon>/apps/fr/style/images/silk/text_align_left.png</small-icon>

<large-icon>/apps/fr/style/images/silk/text_align_left.png</large-icon>
            </icon>
            <datatype>xs:string</datatype>
            <template>
                <xforms:mloutput id="" ref="" xmlns="">
                    <xforms:label ref=""/>
                    <xforms:help ref=""/>
                    <!-- No hint? -->
                    <xforms:alert ref="$fr-resources/detail/labels/alert"/>
                </xforms:mloutput>
            </template>
        </metadata>
    </xbl:binding>

Within grid-cell-editor.xml to map the mloutput component to a
textarea for inplace editing:
<xforms:group ref="xforms:mloutput[not(@mediatype)]">
   <!-- In-place text -->
   <xforms:textarea id="fb-xforms-mloutput-text-input"
ref="$instance-holder" appearance="fr:in-place" incremental="false" />
</xforms:group>


The results from these changes are that the new control appears in the
left menu, and correctly invokes the inplace editing using a textarea.
The problem comes when you preview the form, where nothing is
displayed in the block for that control. I think it must be a problem
with a lack of a binding to view the output outside of the form
builder, but I don't know enough about how things are configured to be
able to trace where to add this.

One thing I've noted is that the standard fb-output control is mapped
to an xforms:output element, whereas I have defined my own mloutput
element. Maybe this is the wrong way to do it, but I can't find a way
to map the textarea and normal output control together.

Any help would be much appeciated.

Simon


2009/8/2 Simon Goodchild <[hidden email]>:

> Hi Erik,
>
> It does appear in the Form Builder interface (in the compenent menu on
> the left and within the actual builder), and allows me to view/edit
> the text that is displayed. But when I save and preview the form I
> just get a blank space where that component should appear. All the
> other components in my test form appear around this, so I just get a
> blank space in the form.
>
> I can provide the source for the changes I have made if that helps - I
> was going to contribute it back to the project once it's working
> anyway.
>
> Many thanks,
>
> Simon
>
> 2009/8/2 Erik Bruchez <[hidden email]>:
>> Simon,
>>
>> Does your component appears in the Form Builder toolbox?
>>
>> It should also work at runtime then!
>>
>> -Erik
>>
>> On Fri, Jul 31, 2009 at 6:40 AM, Simon Goodchild<[hidden email]> wrote:
>>> Thanks for the hint Erik. I now how the new group defined within
>>> grid-cell-editor.xml, an my custom XBL component setup, so that I can
>>> add the control in using the Form Builder. The textarea correctly
>>> appears in the formbuilder for editing, but there is nothing displayed
>>> when I actually test the form output. I'm assuming there's another
>>> config file somewhere whih will map my new component to a view whe the
>>> form is run, but haven't found anything yet. Any ideas to help me do
>>> this?
>>>
>>> Many thanks,
>>>
>>> Simon
>>>
>>> 2009/7/28 Erik Bruchez <[hidden email]>:
>>>> I don't think it's *very* difficult to do, but again it requires a
>>>> change to Form Builder. If you look at grid-cell-editor.xml in the
>>>> source, you will see the following match for the text output control:
>>>>
>>>> <xforms:group ref="xforms:output[not(@mediatype)]">
>>>>
>>>> This is where Form Builder decides to place an input field to edit the text.
>>>>
>>>> Something similar would be needed to place a textarea for your control.
>>>>
>>>> -Erik
>>>>
>>>> On Tue, Jul 21, 2009 at 1:00 PM, Simon Goodchild<[hidden email]> wrote:
>>>>> Yes, I was thinking that a simple textarea was all that would be
>>>>> needed on the Form Builder side, so I just need a way to transform
>>>>> that content into a static text block in the generated form. I tried
>>>>> doing this using an xsl transformation in a new XBL component, but
>>>>> couldn't find a way to retrieve the content from the textarea for
>>>>> display. I was hoping it would be fairly easy to do, as the 'Text
>>>>> Output' control is doing almost the same thing with a text field, but
>>>>> maybe it's more difficult :-)
>>>>>
>>>>> Simon
>>>>>
>>>>> 2009/7/21 Erik Bruchez <[hidden email]>:
>>>>>> Simon,
>>>>>>
>>>>>> Currently, XBL components do not actually have a WYSIWYG appearance in
>>>>>> Form Builder itself, so I think this will require a change to Form
>>>>>> Builder, because you will want a textarea to enter the text, right?
>>>>>>
>>>>>> -Erik
>>>>>>
>>>>>> On Tue, Jul 21, 2009 at 9:58 AM, Simon Goodchild<[hidden email]> wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> I'm building a solution using the Form Builder, and need my end-users
>>>>>>> to be able to add blocks of read-only descriptive text to the forms
>>>>>>> they create. None of the standard controls seem to give this option -
>>>>>>> the 'Text Output' control only allows 1 line of text, and making the
>>>>>>> standard 'Multi-Line Text' control read-only isn't very user-friendly.
>>>>>>>
>>>>>>> I've tried creating my own control in XBL (baed on the Multi-Line Text
>>>>>>> control), but have had a lot of trouble with it and am not sure if
>>>>>>> there is a better way.
>>>>>>>
>>>>>>> Soes anyone have any suggestions or examples of how I might do this?
>>>>>>>
>>>>>>> Thanks for your help,
>>>>>>>
>>>>>>> Simon
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> You receive this message as a subscriber of the [hidden email] mailing list.
>>>>>>> To unsubscribe: mailto:[hidden email]
>>>>>>> For general help: mailto:[hidden email]?subject=help
>>>>>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> You receive this message as a subscriber of the [hidden email] mailing list.
>>>>>> To unsubscribe: mailto:[hidden email]
>>>>>> For general help: mailto:[hidden email]?subject=help
>>>>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> You receive this message as a subscriber of the [hidden email] mailing list.
>>>>> To unsubscribe: mailto:[hidden email]
>>>>> For general help: mailto:[hidden email]?subject=help
>>>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> You receive this message as a subscriber of the [hidden email] mailing list.
>>>> To unsubscribe: mailto:[hidden email]
>>>> For general help: mailto:[hidden email]?subject=help
>>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>>>
>>>>
>>>
>>>
>>> --
>>> You receive this message as a subscriber of the [hidden email] mailing list.
>>> To unsubscribe: mailto:[hidden email]
>>> For general help: mailto:[hidden email]?subject=help
>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>>
>>>
>>
>>
>> --
>> You receive this message as a subscriber of the [hidden email] mailing list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>
>>
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: Re: Re: Control to add block of read-only text (in Form Builder)

Erik Bruchez-3
Hi Simon,

Just noticing this thread did not have any follow-up. Please let us
know if you still need help.

-Erik

On Fri, Aug 7, 2009 at 4:06 AM, Simon Goodchild <[hidden email]> wrote:

> In case anyone has any ideas, below are the configuration entries I'm
> currently using:
>
> For the XBL definition of the new component:
>    <xbl:binding id="fb-mloutput" element="xforms|mloutput">
>
>        <!-- Orbeon Form Builder Component Metadata -->
>        <metadata xmlns="http://orbeon.org/oxf/xml/form-builder">
>            <display-name lang="en">Multi-line Text Output</display-name>
>            <display-name lang="fr">Sortie texte</display-name>
>            <icon lang="en">
>
> <small-icon>/apps/fr/style/images/silk/text_align_left.png</small-icon>
>
> <large-icon>/apps/fr/style/images/silk/text_align_left.png</large-icon>
>            </icon>
>            <datatype>xs:string</datatype>
>            <template>
>                <xforms:mloutput id="" ref="" xmlns="">
>                    <xforms:label ref=""/>
>                    <xforms:help ref=""/>
>                    <!-- No hint? -->
>                    <xforms:alert ref="$fr-resources/detail/labels/alert"/>
>                </xforms:mloutput>
>            </template>
>        </metadata>
>    </xbl:binding>
>
> Within grid-cell-editor.xml to map the mloutput component to a
> textarea for inplace editing:
> <xforms:group ref="xforms:mloutput[not(@mediatype)]">
>   <!-- In-place text -->
>   <xforms:textarea id="fb-xforms-mloutput-text-input"
> ref="$instance-holder" appearance="fr:in-place" incremental="false" />
> </xforms:group>
>
>
> The results from these changes are that the new control appears in the
> left menu, and correctly invokes the inplace editing using a textarea.
> The problem comes when you preview the form, where nothing is
> displayed in the block for that control. I think it must be a problem
> with a lack of a binding to view the output outside of the form
> builder, but I don't know enough about how things are configured to be
> able to trace where to add this.
>
> One thing I've noted is that the standard fb-output control is mapped
> to an xforms:output element, whereas I have defined my own mloutput
> element. Maybe this is the wrong way to do it, but I can't find a way
> to map the textarea and normal output control together.
>
> Any help would be much appeciated.
>
> Simon
>
>
> 2009/8/2 Simon Goodchild <[hidden email]>:
>> Hi Erik,
>>
>> It does appear in the Form Builder interface (in the compenent menu on
>> the left and within the actual builder), and allows me to view/edit
>> the text that is displayed. But when I save and preview the form I
>> just get a blank space where that component should appear. All the
>> other components in my test form appear around this, so I just get a
>> blank space in the form.
>>
>> I can provide the source for the changes I have made if that helps - I
>> was going to contribute it back to the project once it's working
>> anyway.
>>
>> Many thanks,
>>
>> Simon
>>
>> 2009/8/2 Erik Bruchez <[hidden email]>:
>>> Simon,
>>>
>>> Does your component appears in the Form Builder toolbox?
>>>
>>> It should also work at runtime then!
>>>
>>> -Erik
>>>
>>> On Fri, Jul 31, 2009 at 6:40 AM, Simon Goodchild<[hidden email]> wrote:
>>>> Thanks for the hint Erik. I now how the new group defined within
>>>> grid-cell-editor.xml, an my custom XBL component setup, so that I can
>>>> add the control in using the Form Builder. The textarea correctly
>>>> appears in the formbuilder for editing, but there is nothing displayed
>>>> when I actually test the form output. I'm assuming there's another
>>>> config file somewhere whih will map my new component to a view whe the
>>>> form is run, but haven't found anything yet. Any ideas to help me do
>>>> this?
>>>>
>>>> Many thanks,
>>>>
>>>> Simon
>>>>
>>>> 2009/7/28 Erik Bruchez <[hidden email]>:
>>>>> I don't think it's *very* difficult to do, but again it requires a
>>>>> change to Form Builder. If you look at grid-cell-editor.xml in the
>>>>> source, you will see the following match for the text output control:
>>>>>
>>>>> <xforms:group ref="xforms:output[not(@mediatype)]">
>>>>>
>>>>> This is where Form Builder decides to place an input field to edit the text.
>>>>>
>>>>> Something similar would be needed to place a textarea for your control.
>>>>>
>>>>> -Erik
>>>>>
>>>>> On Tue, Jul 21, 2009 at 1:00 PM, Simon Goodchild<[hidden email]> wrote:
>>>>>> Yes, I was thinking that a simple textarea was all that would be
>>>>>> needed on the Form Builder side, so I just need a way to transform
>>>>>> that content into a static text block in the generated form. I tried
>>>>>> doing this using an xsl transformation in a new XBL component, but
>>>>>> couldn't find a way to retrieve the content from the textarea for
>>>>>> display. I was hoping it would be fairly easy to do, as the 'Text
>>>>>> Output' control is doing almost the same thing with a text field, but
>>>>>> maybe it's more difficult :-)
>>>>>>
>>>>>> Simon
>>>>>>
>>>>>> 2009/7/21 Erik Bruchez <[hidden email]>:
>>>>>>> Simon,
>>>>>>>
>>>>>>> Currently, XBL components do not actually have a WYSIWYG appearance in
>>>>>>> Form Builder itself, so I think this will require a change to Form
>>>>>>> Builder, because you will want a textarea to enter the text, right?
>>>>>>>
>>>>>>> -Erik
>>>>>>>
>>>>>>> On Tue, Jul 21, 2009 at 9:58 AM, Simon Goodchild<[hidden email]> wrote:
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> I'm building a solution using the Form Builder, and need my end-users
>>>>>>>> to be able to add blocks of read-only descriptive text to the forms
>>>>>>>> they create. None of the standard controls seem to give this option -
>>>>>>>> the 'Text Output' control only allows 1 line of text, and making the
>>>>>>>> standard 'Multi-Line Text' control read-only isn't very user-friendly.
>>>>>>>>
>>>>>>>> I've tried creating my own control in XBL (baed on the Multi-Line Text
>>>>>>>> control), but have had a lot of trouble with it and am not sure if
>>>>>>>> there is a better way.
>>>>>>>>
>>>>>>>> Soes anyone have any suggestions or examples of how I might do this?
>>>>>>>>
>>>>>>>> Thanks for your help,
>>>>>>>>
>>>>>>>> Simon
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> You receive this message as a subscriber of the [hidden email] mailing list.
>>>>>>>> To unsubscribe: mailto:[hidden email]
>>>>>>>> For general help: mailto:[hidden email]?subject=help
>>>>>>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> You receive this message as a subscriber of the [hidden email] mailing list.
>>>>>>> To unsubscribe: mailto:[hidden email]
>>>>>>> For general help: mailto:[hidden email]?subject=help
>>>>>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> You receive this message as a subscriber of the [hidden email] mailing list.
>>>>>> To unsubscribe: mailto:[hidden email]
>>>>>> For general help: mailto:[hidden email]?subject=help
>>>>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> You receive this message as a subscriber of the [hidden email] mailing list.
>>>>> To unsubscribe: mailto:[hidden email]
>>>>> For general help: mailto:[hidden email]?subject=help
>>>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> You receive this message as a subscriber of the [hidden email] mailing list.
>>>> To unsubscribe: mailto:[hidden email]
>>>> For general help: mailto:[hidden email]?subject=help
>>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>>>
>>>>
>>>
>>>
>>> --
>>> You receive this message as a subscriber of the [hidden email] mailing list.
>>> To unsubscribe: mailto:[hidden email]
>>> For general help: mailto:[hidden email]?subject=help
>>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>>
>>>
>>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws