× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Stu,

After a bit of investigation I found that trailing blanks get trimmed in
the runtime, at least for LTR fields.

Mike


Mike Hockings, P.Eng.
System i Application Development Tools - CODE/Designer & WebFacing !
IBM Canada Ltd. Laboratory
hockings@xxxxxxxxxx
voice 1-905-413-3199 T/L 313-3199 ITN 23133199



sbramley@xxxxxxxxx
Sent by: wdsci-l-bounces@xxxxxxxxxxxx
01/28/2008 07:49 AM
Please respond to
Websphere Development Studio Client for iSeries <wdsci-l@xxxxxxxxxxxx>


To
WDSCI-L@xxxxxxxxxxxx
cc

Subject
[WDSCI-L] Webfacing - getFieldValueWithTransform problems






I am using the advanced edition of Webfacing, version 7.0.0, build
20070202_0031

When I use the getFieldValueWithTransform method I am getting the same
value returned, no matter what I specify as the transform type.

For example, if the field "FIELD" is a 3 byte character field, containing
the value "AA " (note the trailing blank), the following code: (integer
values as taken from the interface IHTMLStringTransforms)

-<%=FMT.getFieldValue("FIELD")%>-
-<%=FMT.getFieldValueWithTransform("FIELD",0)%>-
-<%=FMT.getFieldValueWithTransform("FIELD",1)%>-
-<%=FMT.getFieldValueWithTransform("FIELD",2)%>-
-<%=FMT.getFieldValueWithTransform("FIELD",3)%>-
-<%=FMT.getFieldValueWithTransform("FIELD",4)%>-
-<%=FMT.getFieldValueWithTransform("FIELD",5)%>-
-<%=FMT.getFieldValueWithTransform("FIELD",6)%>-

Will produce the following output :-

-AA-
-AA-
-AA-
-AA-
-AA-
-AA-
-AA-
-AA-

This is a problem because the trailing blank has been lost. If I specify
the value as 1 (or QUOTED_STRING_TRANSFORM) I had expected that the value
would be returned in quotes - but it is returned as a trimmed string, with

no quotes no matter what option I specify.

What is the correct way to retrieve the value of the field, including any
trailing blanks?

Regards,
Stu

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.