You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Carl Smith <cc...@yahoo.com> on 2005/08/01 22:07:47 UTC
Form bean's attribute displays as Html
I have an attribute in my ActionForm (called myForm) called text, this text have a value of
<a href="http://www.yahoo.com">Click here to Yahoo.com</a>, now I want this attribute to be displayed on web page as a hyper link. I used <bean:write name="myForm" property="text"/>, which prints <a href="http://www.yahoo.com">Click here to Yahoo.com</a> on the screen. I understand I should't use <bean:write> tag since it prints all the value to JSPWriter, the thing is which is the correct tag/way to display the value of the frombean's attribute as a html to the user?
Thanks in advance.
---------------------------------
Start your day with Yahoo! - make it your home page
RE: Form bean's attribute displays as Html
Posted by Raj Tilak <ra...@hotmail.com>.
try one of the attribute in the bean:write which is
filter="true"
>From: Carl Smith <cc...@yahoo.com>
>Reply-To: "Struts Users Mailing List" <us...@struts.apache.org>
>To: Struts Users Mailing List <us...@struts.apache.org>
>Subject: Form bean's attribute displays as Html
>Date: Mon, 1 Aug 2005 13:07:47 -0700 (PDT)
>
>
>I have an attribute in my ActionForm (called myForm) called text, this text
>have a value of
>
><a href="http://www.yahoo.com">Click here to Yahoo.com</a>, now I want this
>attribute to be displayed on web page as a hyper link. I used <bean:write
>name="myForm" property="text"/>, which prints <a
>href="http://www.yahoo.com">Click here to Yahoo.com</a> on the screen. I
>understand I should't use <bean:write> tag since it prints all the value to
>JSPWriter, the thing is which is the correct tag/way to display the value
>of the frombean's attribute as a html to the user?
>
>Thanks in advance.
>
>
>---------------------------------
> Start your day with Yahoo! - make it your home page
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: AW: Form bean's attribute displays as Html
Posted by Carl Smith <cc...@yahoo.com>.
Thank you Leon Rosenberg and Raj Tilak, this works perfect by turning filter="false".
Leon Rosenberg <st...@anotheria.net> wrote:
In this (and only this case) you can use bean:write with filter="false"
This will work
> -----Ursprüngliche Nachricht-----
> Von: Carl Smith [mailto:ccsmith20002001@yahoo.com]
> Gesendet: Montag, 1. August 2005 22:08
> An: Struts Users Mailing List
> Betreff: Form bean's attribute displays as Html
>
>
> I have an attribute in my ActionForm (called myForm) called
> text, this text have a value of
>
> Click here to Yahoo.com,
> now I want this attribute to be displayed on web page as a
> hyper link. I used > property="text"/>, which prints > href="http://www.yahoo.com">Click here to Yahoo.com on
> the screen. I understand I should't use tag
> since it prints all the value to JSPWriter, the thing is
> which is the correct tag/way to display the value of the
> frombean's attribute as a html to the user?
>
> Thanks in advance.
>
>
> ---------------------------------
> Start your day with Yahoo! - make it your home page
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
---------------------------------
Start your day with Yahoo! - make it your home page
AW: Form bean's attribute displays as Html
Posted by Leon Rosenberg <st...@anotheria.net>.
In this (and only this case) you can use bean:write with filter="false"
This will work
> -----Ursprüngliche Nachricht-----
> Von: Carl Smith [mailto:ccsmith20002001@yahoo.com]
> Gesendet: Montag, 1. August 2005 22:08
> An: Struts Users Mailing List
> Betreff: Form bean's attribute displays as Html
>
>
> I have an attribute in my ActionForm (called myForm) called
> text, this text have a value of
>
> <a href="http://www.yahoo.com">Click here to Yahoo.com</a>,
> now I want this attribute to be displayed on web page as a
> hyper link. I used <bean:write name="myForm"
> property="text"/>, which prints <a
> href="http://www.yahoo.com">Click here to Yahoo.com</a> on
> the screen. I understand I should't use <bean:write> tag
> since it prints all the value to JSPWriter, the thing is
> which is the correct tag/way to display the value of the
> frombean's attribute as a html to the user?
>
> Thanks in advance.
>
>
> ---------------------------------
> Start your day with Yahoo! - make it your home page
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org