cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Derek Hohls" <DHo...@csir.co.za>
Subject RE: HTML Styling in displayed form widgets?
Date Fri, 13 Feb 2009 10:41:16 GMT
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 <F8E386B54CE3E6408F3A32ABB9A7908A012325B5@hai02.hippointern.lan>,
"Jasha Joachimsthal" <j.joachimsthal@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


Mime
View raw message