You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Paul Joseph <pj...@gmail.com> on 2008/05/14 19:00:26 UTC
CForms Aggregator Widget--preserving line breaks in text areas
Hi There,
I use the Text Area widget extensively in my forms and am able to enter text with line breaks, save it to the database, retrieve it etc. with no problems.
However, when I use a Text Area type widget in an aggregator, I find that the Aggregator does not seem to be able to retrieve and display any information in any of the widgets that make up the aggregator, IF I enter even a single line break in the Text Area widget that is part of the Aggregator widget.
It is able to save it with line breaks to the database--it is only on retrieval that it the Aggregator seems to have difficulty due to the line breaks.
Any ideas?
thx
Paul Joseph
This communication, including attachments, is for the exclusive use of the addressee and may contain proprietary, confidential, or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination, or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender by return mail and delete this communication and destroy all copies.
Re: CForms Aggregator Widget--preserving line breaks in text areas
Posted by Paul Joseph <pj...@gmail.com>.
Sure thing...note that I amusing a somewhat strange field separator
@!#-_-#!@.
It is a aggregator made up of four fields.
Field 1 is a string with validation to ensure only numbers can be entered.
Field 2 is styled as a text area. It appears I can enter line breaks and
that these get saved to the database. However, they do not appear to be
retrievable and displayable...the entire aggregate showing up blank.
thx!
Paul
Here is the snippet from the form definition file:
<fd:aggregatefield id="taskaggregate" required="false">
<fd:label/>
<fd:datatype base="string"/>
<fd:split pattern="(.*)@!#-_-#!@(.*)">
<fd:map group="1" field="part1"/>
<fd:map group="2" field="part2"/>
</fd:split>
<fd:combine expression = 'Concat(NVL(part1, ""), "@!#-_-#!@", NVL(part2,
""))'/>
<fd:widgets>
<fd:field id="part1" required="false">
<fd:datatype base="string"/>
<fd:help>Help info 3</fd:help>
<fd:validation>
<fd:regexp pattern="[-+]?([0-9]*\.)?[0-9]+([eE][-+]?[0-9]+)?">
<fd:failmessage>Only decimals (numbers) are allowed here.</fd:failmessage>
</fd:regexp>
</fd:validation>
<fd:on-value-changed/>
</fd:field>
<fd:field id="part2" required="false">
<fd:datatype base="string"/>
<fd:validation/>
</fd:field>
</fd:widgets>
</fd:aggregatefield>
Here is the snippet from the form styling file:
<tr>
<td width="3"/><td width="174" bgColor="#f7f3d6" height="10"><font
style="font-size: 9pt" face="Arial">Customer Number</font></td>
<td valign="top"><ft:aggregate-widget id="taskaggregate"><ft:widget
id="part1"><fi:styling size="20"/></ft:widget></ft:aggregate-widget></td>
</tr>
<tr>
<td width="4" height="4"/>
<td colspan="2" width="746" height="4"/>
</tr>
<tr>
<td width="3"/><td width="174" bgColor="#f7f3d6" height="10"><font
style="font-size: 9pt" face="Arial">Custom Desc.</font></td>
<td valign="top"><ft:aggregate-widget id="taskaggregate"><ft:widget
id="part2"><fi:styling type="textarea" rows="10"
size="20"/></ft:widget></ft:aggregate-widget></td>
</tr>
----- Original Message -----
From: "Joerg Heinicke" <jo...@gmx.de>
To: <us...@cocoon.apache.org>
Sent: Thursday, May 15, 2008 12:06 AM
Subject: Re: CForms Aggregator Widget--preserving line breaks in text areas
> On 14.05.2008 13:00, Paul Joseph wrote:
>
>> However, when I use a Text Area type widget in an aggregator, I find
>> that the Aggregator does not seem to be able to retrieve and display
>> any information in any of the widgets that make up the aggregator, IF
>> I enter even a single line break in the Text Area widget that is part
>> of the Aggregator widget.
>>
>> It is able to save it with line breaks to the database--it is only on
>> retrieval that it the Aggregator seems to have difficulty due to the
>> line breaks.
>
> With aggregator you mean the aggregate field widget [1]? Can you show some
> code?
>
> Joerg
>
> [1] http://cocoon.apache.org/2.2/blocks/forms/1.0/486_1_1.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: CForms Aggregator Widget--preserving line breaks in text areas
Posted by Joerg Heinicke <jo...@gmx.de>.
On 14.05.2008 13:00, Paul Joseph wrote:
> However, when I use a Text Area type widget in an aggregator, I find
> that the Aggregator does not seem to be able to retrieve and display
> any information in any of the widgets that make up the aggregator, IF
> I enter even a single line break in the Text Area widget that is part
> of the Aggregator widget.
>
> It is able to save it with line breaks to the database--it is only on
> retrieval that it the Aggregator seems to have difficulty due to the
> line breaks.
With aggregator you mean the aggregate field widget [1]? Can you show
some code?
Joerg
[1] http://cocoon.apache.org/2.2/blocks/forms/1.0/486_1_1.html
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org