You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Derek Hohls <DH...@csir.co.za> on 2009/02/13 09:02:46 UTC

HTML Styling in displayed form widgets?

Using Cocoon 2.1.8
 
Can anyone give me an idea how to retain HTML tags in a
form widget :
 
e.g.. in form template, widget is:
 
<ft:widget id="message">
 
and in flowscript, its assigned a value:
 
model.message = "<b>Hey!</b>";
 
but the output is presented exactly as this:
 
<b>Hey!</b>

(and not in bold).

(Note The above is a trivial example; real app needs many more
tags than this... so CSS stylng will not help)

Thanks
Derek


-- 
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE: HTML Styling in displayed form widgets?

Posted by Derek Hohls <DH...@csir.co.za>.
Jasha

Thanks; I had not noticed that type before.  So now I have in
the form definition:

<fd:messages id="message" state="output"/>

However, the part of the doc that says "Messages are added 
using the addMessage  method on this widget" is unclear.

In flowscript, when I try (as below) to update this widget:

model.message.addMessage ( "<b>Hey!</b>" );

I get the error:

org.mozilla.javascript.EcmaError: addMessage is not a function.

and using:

model.message = "<b>Hey!</b>";

does not produce anything at all!

Any ideas?

Thanks
Derek


>>> On 2009/02/13 at 10:53, in message <F8...@hai02.hippointern.lan>, "Jasha Joachimsthal" <j....@onehippo.com> wrote:


> -----Original Message-----
> From: Derek Hohls [mailto:DHohls@csir.co.za] 
> Sent: vrijdag 13 februari 2009 9:03
> To: users@cocoon.apache.org 
> Subject: HTML Styling in displayed form widgets?
> 
> Using Cocoon 2.1.8
>  
> Can anyone give me an idea how to retain HTML tags in a form widget :
>  
> e.g.. in form template, widget is:
>  
> <ft:widget id="message">
>  
> and in flowscript, its assigned a value:
>  
> model.message = "<b>Hey!</b>";
>  
> but the output is presented exactly as this:
>  
> <b>Hey!</b>
> 
> (and not in bold).
> 
> (Note The above is a trivial example; real app needs many 
> more tags than this... so CSS stylng will not help)
> 

The message content is a string and not XML although it looks like XML.
It's returned as &lt;b&gt;Hey!&lt;/b&gt; instead of <b>Hey!</b>. On [1]
I found: "Messages are added using the addMessage method on this widget.
The argument can be a string, but also any object implementing the
XMLizable interface, for example
org.apache.cocoon.forms.util.I18nMessage."

[1] http://cocoon.apache.org/2.1/userdocs/widgets/widget_messages.html 


Jasha Joachimsthal 

j.joachimsthal@onehippo.com - jasha@apache.org 

www.onehippo.com 
Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466 
San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA
94952-5100 +1 (707) 773-4646


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
For additional commands, e-mail: users-help@cocoon.apache.org 



-- 
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE: HTML Styling in displayed form widgets?

Posted by Jasha Joachimsthal <j....@onehippo.com>.
 

> -----Original Message-----
> From: Derek Hohls [mailto:DHohls@csir.co.za] 
> Sent: vrijdag 13 februari 2009 9:03
> To: users@cocoon.apache.org
> Subject: HTML Styling in displayed form widgets?
> 
> Using Cocoon 2.1.8
>  
> Can anyone give me an idea how to retain HTML tags in a form widget :
>  
> e.g.. in form template, widget is:
>  
> <ft:widget id="message">
>  
> and in flowscript, its assigned a value:
>  
> model.message = "<b>Hey!</b>";
>  
> but the output is presented exactly as this:
>  
> <b>Hey!</b>
> 
> (and not in bold).
> 
> (Note The above is a trivial example; real app needs many 
> more tags than this... so CSS stylng will not help)
> 

The message content is a string and not XML although it looks like XML.
It's returned as &lt;b&gt;Hey!&lt;/b&gt; instead of <b>Hey!</b>. On [1]
I found: "Messages are added using the addMessage method on this widget.
The argument can be a string, but also any object implementing the
XMLizable interface, for example
org.apache.cocoon.forms.util.I18nMessage."

[1] http://cocoon.apache.org/2.1/userdocs/widgets/widget_messages.html


Jasha Joachimsthal 
 
j.joachimsthal@onehippo.com - jasha@apache.org
 
www.onehippo.com
Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466 
San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA
94952-5100 +1 (707) 773-4646


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org