struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Musachy Barroso <musa...@gmail.com>
Subject Re: iterator tag: how to interpret the property value which are html
Date Tue, 06 Oct 2009 17:12:48 GMT
html gets escaped  by the 'property' tag. hint: read my other hint.

On Tue, Oct 6, 2009 at 10:05 AM, samsun <greg.zhang@barcap.com> wrote:
>
> value on value stack are, i think, changed when retreiving
> from valuestack thru <s:property>,the problem i have is
> value with html tag around it is not interpreted properly
> by browser, like bold java, i think struts2 tag's internal
> freemarker template do some transformation and its output
> feed to the browser, what is why html like  is litterally
> printout as it is in browser. as the content i try to spit out
> onto browser is getting from another application's database
> which already mixed in html tags with it content, so i just
> try to retriev them and like browser handle the tag rendering,
> but struts2 seems do some pre-processing.
>
>
>
>
>
> Kawczynski, David wrote:
>>
>> If you put "java" onto the value stack, and it
>> remains unchanged when you retrieve it from the
>> value stack, that's expected.  If you want java
>> in bold tags, put it in bold tags.
>>
>> Regarding the normal JSP behavior you cited:
>> that's a mystery.  Scripting variables don't
>> magically just decide to surround themselves
>> with bold tags.  ;)
>>
>>
>>> -----Original Message-----
>>> From: samsun [mailto:greg.zhang@barcap.com]
>>> Sent: Tuesday, October 06, 2009 12:26 PM
>>> To: user@struts.apache.org
>>> Subject: Re: iterator tag: how to interpret the property
>>> value which are html
>>>
>>>
>>> i got
>>> < b > java  < / b>
>>>
>>> back
>>>
>>>
>>> samsun wrote:
>>> >
>>> > I would like put my question simply like this:
>>> >
>>> > in jsp,
>>> >
>>> > <%! String test="java"; %>
>>> > <%=test%>
>>> > i got bold Java
>>> >
>>> > try to have same thing from struts2
>>> >
>>> > <s:set name="test" value="%{'java'}">
>>> > <s:property value="#test" />  i got
>>> > java back,which is not what i want
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > samsun wrote:
>>> >>
>>> >>
>>> >>
>>> >> samsun wrote:
>>> >>>
>>> >>> I have to iterate thru a list of strings, some of the
>>> string element
>>> >>> include html tag
>>> >>> like &lt;b>Copmany Names:&lt;/b>   it print out litterlly
>>> like this
>>> >>>  Copmany Names:, not the bolded word Company Names:
>>> >>>
>>> >>> here is what the iterate tag look like
>>> >>> <s:iterator value="CompanyNames" status="stat">
>>> >>>  <tr>
>>> >>>  <td><s:property /> <br>
>>> >>>  </td>
>>> >>>  </tr>
>>> >>> </s:iterator>
>>> >>>
>>> >>> btw, the CompanyNames is getting from other application's
>>> database, all
>>> >>> the html tags are mixed in beyond
>>> >>> my control, so have to display what is there.
>>> >>>
>>> >>>
>>> >>> Thanks
>>> >>> Sam
>>> >>>
>>> >>>
>>> >>>
>>> >>
>>> >>
>>> >
>>> >
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/iterator-tag%3A-how-to-interpret-the-pro
>> perty-value-which-are-html-tp25769502p25772037.html
>>> Sent from the Struts - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>> Notice:  This e-mail message, together with any attachments, contains
>> information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
>> New Jersey, USA 08889), and/or its affiliates (which may be known
>> outside the United States as Merck Frosst, Merck Sharp & Dohme or
>> MSD and in Japan, as Banyu - direct contact information for affiliates is
>> available at http://www.merck.com/contact/contacts.html) that may be
>> confidential, proprietary copyrighted and/or legally privileged. It is
>> intended solely for the use of the individual or entity named on this
>> message. If you are not the intended recipient, and have received this
>> message in error, please notify us immediately by reply e-mail and
>> then delete it from your system.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/iterator-tag%3A-how-to-interpret-the-property-value-which-are-html-tp25769502p25772816.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message