Re: Character conversions?
| Newsgroups | gmane.comp.cms.jahia.template |
|---|---|
| Message-ID | <OF9B3461EE.E642AA63-ONC12570FA.00503DD4-C12570FA.00503DD9@generic.se> |
Yes it works.
It was the rawValue property I was looking for.
Thank you very much.
<content:textField name="genericWordTitle" id="myTitleField" display="false" />
<c:out value="${myTitleField.rawValue}"/>
or if using struts:
<bean:write name="myTitleField" property="rawValue" filter="false"/>
gives the result I was looking for. Now I can use the value property for display purposes and the rawValue property for search, sort and logic purposes. This confirms my theori that the correct value is stored in the database.
( I browsed the java sources and found the JahiaTools.text2html method but I did not find a solution...)
Regards
/lars hagrot
[email protected] wrote: -----
To: <[email protected]>
From: [email protected]
Date: 01/18/2006 01:52PM
Subject: Re: Character conversions?
Hello Lars,
Jahia context:textField tag performs the conversion (using JahiaTools.text2html(...) method) when the display attribute of the tag is set to 'true' (default value).
The problem is, that Jahia performs such conversions also somewhere else (e.g. I have seen such a conversion in load() method of the JahiaSmallTextField).
Could you try the following (based on the example of Lorenzo):
<content:textField name="genericWordTitle" id="myTitleField" display="false" />
<c:out value="${myTitleField.rawValue}"/>
Let me know, please, if it works
Kind regards.
Sergiy
Lorenzo Patocchi <[email protected]>
18.01.2006 11:21
Please respond to
<[email protected]>
To
[email protected]
cc
Subject
Re: Character conversions?
Can you try out this ?
<content:textField name="genericWordTitle" id="titlefield" valueId="title" display="false" />
<bean:define id="title" name="title" />
<bean:define id="titlefield" name="titlefield" property="value"/>
<%=title%>
<%=titlefield%>
just to bypass any writing tag and check if content:textField is using some HTML conversion when display=true
[email protected] wrote:
Thank You very much for trying to help.
I am using or trying jahia , struts and jstl taglibs.
<content:textField name="genericWordTitle" id="titlefield" valueId="title" />
<bean:write name="titlefield" property="value" filter="false"/>
<bean:write name="title" filter="false"/>
<c:out value="${title}"/>
<c:out value="${titlefield.value}" />
if the field has the value Åland the result will be
Åland // Jahia tag
Åland // struts getting value property
Åland // struts using the string
&Aring;land // jstl using the string and filtering the &
&Aring;land // jstl using the string and filtering the &
So with filtering (jstl) even the output will look bad.
Ok. I have to make a filter and replace the encoded characters, sort, do all other logic then convert the strings back again before I show them.
Regards
/Lars
--
Lorenzo Patocchi
Dipl. Ing. STS/ETS/HTL
[email protected] - www.cryms.com
Tel: +41 91 60 55266
Cel: +41 79 375 0891
Fax: +41 91 223 9797
Cryms sagl
Via Cantonale 34a
6928 Manno - Lugano
Switzerland