[UPDATED WORKAROUND] SEVERE unicode/ UTF-8 ADFm bidnig/invokation problem
I have BIG problem with very simple search page use-case (with one text input field, search button and af:table for results). It looks like the unicode input value is somehow ruined during PPR and model update cycle (the unicode value is internally collated to ascii while transferred to EJB method)!!!
Here is the scenario (please note that all was created by pure drag-and-drop from Data Controls palette):
I have one inputText field on page, value of which is bound to simple attribute binding (say #{bindings.key.inputValue}) which is bound to vKey variable.
In PageDef I have methodIterator with
<methodIterator Binds="XYZ.result" Refresh="always" ...(the XYZ is method in some EJB) and I have adequate methodAction XYZ defined with named param:
<NamedData NDName="key" NDValue="${bindings.vKey}" NDType="java.lang.String"/>The table is bound to tree binding bound to the above methodIterator. The button is PPR trigger for table (only thing nod done by drag-and-drop).
JSPX page is xml encoding="UTF-8" with:
<jsp:directive.page contentType="text/html;charset=UTF-8"
pageEncoding="UTF-8"/>There are no locale settings in faces-config.xml (the default config).
In inputText I entered some unicode input text like "ЧШЩЪ".
When button is clicked, the methodAction XYZ is invoked.
The debugger brake-point is set inside EJB method.
Now, during the PPR after button click, the EJB method brake-point is hited twice (I assume because the Refresh="always" for methodIterator). In firs hit, the value of key parameter is OK (correct unicode value visible in Inspect...). BUT, the second time (during the same PPR) the method is invoked WITH totally ruined value of "????"! Of course, the search didn't find anything...
Thus, not only that problem of unicode is related to localization of pages/resources but something strange is happening with value binding also.
Can someone help?
Message was edited by:
PaKo
Message was edited by:
PaKo
Another way around:
Instead using processScope or pageFlowScope (which is not releasing memory automatically so it may make you a problems further on), I discovered an alternative workaround:
instead binding to #{bindings.someAttribBinding.inputValue} (which suffers from UTF-8 bug as concluded), you can bind your text inputs directly to #{bindings.someIterator.currentRow.dataProvider. someAttribute } which binds directly to your underlying data source property.
In my case, I use EJBs so the underlying datasource is Entity bean and this way I bind directly to setter method thus overriding any ADFm interference.
This shows to be more reliable and also MORE EFFICIENT! In case of indirect (via buggy attribute) binding, the getter method in entity is called twice while in case of direct binding (through .currentRow.dataProvider.someAttribute) the getter is called only once per page lifecycle (the setter is called once in both cases).
I would, thus, suggest to ADF team to consider introduction of some sort of better support for direct binding to the underlying data sources instead through Iterators and Attribute bindings. On example, introduce Entity Binding (like Tree binding, but with direct support for access to entity attributes including parent/children collections). This also apply for list bindings where it is NECESSARY to enable object binding from list to entity attribute (as EJB entities don't know for foreign keys but for related entities so the attribute mapping supported with current list bindings is totally useless).
Regards,
Pavle
Similar Messages
-
How to save a file in unicode (UTF-8)
Hello,
I'm trying to save a xml file in unicode (UTF-8) in a 4.6C system. I tried the OPEN DATASET 'file' IN TEXT MODE FOR OUTPUT ENCODING UTF-8 but this is not available in 4.6C. Does anybody have an idea how to do this?
Thanks in advance
Kind regards
RoelHi Roel,
There is a workaround for this issue.
Use code below:
encoding = 'utf-8'.
data: codepage type cpcodepage.
call function 'SCP_CODEPAGE_BY_EXTERNAL_NAME'
exporting
external_name = encoding
importing
sap_codepage = codepage
exceptions
not_found = 1
others = 2.
if sy-subrc <> 0.
endif.
call function 'SCP_TRANSLATE_CHARS'
exporting
inbuff = sourcedata_xml
inbufflg = length
incode = codepage
outcode = codepage
substc_space = 'X'
substc = '00035'
importing
outbuff = custom_data
exceptions
invalid_codepage = 1
internal_error = 2
cannot_convert = 3
fields_bad_type = 4
others = 5.
Now write this custom_data onto application server by using open dataset and transfer.
Also have a look at this weblog, there is a code sample in it.
/people/thomas.jung3/blog/2004/08/31/bsp-150-a-developer146s-journal-part-x--igs-charting
Hope it'll help.
Cheers
Ankur -
On many web pages, where a quotation mark character should appear, instead the page displays the text ". I believe this happens with other punctuation characters as well such as apostrophes although the text displayed in these other cases is different, of course. I'm guessing this is a problem with character encoding. I'm currently set to Unicode (UTF-8) encoding. Have tried several others without success.
Here's a link where the problem occurs. Note the second line of the main body of text.
http://www.sierratradingpost.com/lp2/snowshoes.html
BTW, I never use IE, but I checked this site in IE and it shows the same problem, so maybe it is the page encoding after all rather than what I thought.
In any case, my thanks for your help and would appreciate any solution you can suggest. -
I really do not know what details you want. When I press on the icon to open Firefox, it opens and Google appears. I go to my bookmarks to my purchasing file. There I click on my bookmarked "Quality Paperbacks" site. I get a big colorful page with a statement that I need to update Firefox. I have followed the directions to update on several different occasions. It appears to download but the next time I try, I get the same thing.
Can you attach a screenshot or link to the instructions you are following?
You are on the 3.6 release and Firefox 7.0.1 is out. You can download and install the latest release from http://www.mozilla.org/en-US/firefox/new/ if you would like to update now. The 3.6 version will be maintained for a while longer, but you should update when you can. -
iTunes on my Windows Vista has failed to update over several weeks. Audio will not play out. Attempting uninstal/reinstall according to iTunes support page. Will not uninstall 'Apple Mobile Device Support' - goes to 99% then progress bar unwinds completely. Tried rebooting. Any clues??
Hey petanque1,
Thanks for the question. I understand that you are experiencing issues installing iTunes for Windows. The following article outlines the error message you are receiving and a potential resolution:
iTunes 11.1.4 for Windows: Unable to install or open
http://support.apple.com/kb/TS5376
Some Windows customers may experience installation issues while trying to install or open iTunes 11.1.4.
Symptoms may include:
"The program can't start because MSVCR80.dll is missing from your computer"
"iTunes was not installed correctly. Please reinstall iTunes. Error 7 (Windows Error 126)”
"Runtime Error: R6034 - An application has made an attempt to load the C runtime library incorrectly"
"Entry point not found: videoTracks@QTMovie@@QBE?AV?$Vector@V?$RefPtr@VQTTrack@@@***@@$0A@VCrashOnOverf low@@***@@XZ could not be located in the dynamic link library C:\Program Files(x86)\Common Files\Apple\Apple Application Support\WebKit.dll”
Resolution
Follow these steps to resolve the issue:
Check for .dll files
1. Go to C:\Program Files (x86)\iTunes and C:\Program Files\iTunes and look for .dll files.
2. If you find QTMovie.DLL, or any other .dll files, move them to the desktop.
3. Reboot your computer.
Note: Depending on your operating system, you may only have one of the listed paths.
Uninstall and reinstall iTunes
1. Uninstall iTunes and all of its related components.
2. Reboot your computer. If you can't uninstall a piece of Apple software, try using theMicrosoft Program Install and Uninstall Utility.
3. Re-download and reinstall iTunes 11.1.4.
Thanks,
Matt M. -
More Cf + MySQL 5 + Unicode/UTF-8 Problems
Here is the problem:
I am using a MySQL database that store data in Unicode/UTF-8
(the website/database are in Lao).
Settings:
CF 7.0.2
MySQL 5.0.26
MySQL Defaults: latin1_swedish_ci collation, latin1 encoding
Database Defaults: utf8_general_ci collation, utf8 encoding
These are same on my local computer and on the host
(HostNexus)
The only difference is that my CF uses
mysql-connector-java-3.1.10 driver while the host uses MySQL 3.x
driver (org.gjt.mm.mysql.Driver class).
On my local computer everything works just fine, even without
any extra CF DSN settings (i.e. connection string and/or JDBC URL
do not need the useUnicode=true&characterEncoding=UTF-8 strings
added to show Lao text properly).
On the host, even with the
useUnicode=true&characterEncoding=UTF-8 added (I have even
tried adding
&connectionCollation=utf8_unicode_ci&characterSetResults=utf8
to the line as well), I only get ??????? instead of Lao text from
the db.
The cfm pages have <cfprocessingdirective> and
<cfcontent> tags set to utf-8 and also have html <meta>
set to utf-8. ALl static Lao text in cfm pages shows just fine.
Is this the problem with the MySQL driver used by the host?
Has anyone encountered this before? Is there some other setting I
have to emply with the org.gjt.mm.mysql.Driver class on the host?
Please help!Thanks for your reply/comments, Paul!
I also think it must be the db driver used on the host... I
just don't understand why the DSN connection string
(useUnicode=true&characterEncoding=UTF-8 [btw, doesn't really
matter utf8 or UTF-8 - works with both; I think the proper way
actually is UTF-8, since that is the encosing's name used in
Java...]) wouldn't work with it??? I have the hosting tech support
totally puzzled over this.
Don't know if you can help any more, but I have added answers
to your questions in the quoted text below.
quote:
Sabaidee wrote:
> Here is the problem:
> I am using a MySQL database that store data in
Unicode/UTF-8 (the
> website/database are in Lao).
well that's certainly different.
I mean, they are in Lao language, not that they are hosted in
Laos.
> Database Defaults: utf8_general_ci collation, utf8
encoding
how was the data entered? how was it uploaded to the host?
could the data have
been corrupted loading or uploading to the host?
The data was entered locally, then dumped into a .sql file using
utf8 charset and then the dump imported into the db on the host,
once again with utf8 charset. I know the data in the database is
correct: when I browse the db tables with phpMyAdmin, all Lao text
in the db is displayed in proper Lao...
> The only difference is that my CF uses
mysql-connector-java-3.1.10 driver
> while the host uses MySQL 3.x driver
(org.gjt.mm.mysql.Driver class).
and does that driver support mysql 5 and/or unicode?
I am sure it does support MySQL5, as I have other MySQL5
databases hosted there and they work fine. I am not sure if it
supports Unicode, though.... I am actually more and more sure it
does not... The strange this is, I am not able to find the java
class that driver is stored in to try and test using it on my local
server... I have asked the host to email me the .jar file they are
using, but have not heard back from them yet...
> On my local computer everything works just fine, even
without any extra CF DSN
> settings (i.e. connection string and/or JDBC URL do not
need the
> useUnicode=true&characterEncoding=UTF-8 strings
added to show Lao text
> properly).
and what happens if you do use those? what locale for the
local server?
If I use just that line, nothing changes (apart from the 2 mysql
variables which then default to uft8 instead of latin1) -
everything works just fine locally.
The only difference I have noticed between MySQL setup on my
local comp and on the host is that on my comp the
character_set_results var is not set (shows [empty string]), but on
the host it is set to latin1. When I set it to latin1 on my local
comp using &characterSetResults=ISO8859_1 in the JDBC URL
string, I get exactly same problem as on the host: all ???????
instead of Lao text from db. If it is not set, or set to utf8,
everything works just fine.
For some reason, we are unable to make it work on the host:
whatever you add to the JDBC URL string or enter in the Connection
String box in CF Admin is simply ignored...
Do you know if this is a particular problem of the driver
used on the host?
> The cfm pages have <cfprocessingdirective> and
<cfcontent> tags set to utf-8
> and also have html <meta> set to utf-8. ALl static
Lao text in cfm pages
> shows just fine.
db driver then.
I think so too... -
Read/Write file in Unicode (UTF-16)
Hi, I have some issue to write a file in Unicode (UTF-16)
I have to read a file with LabView, change some parameters and write the new data into the same file. The file uses Unicode UTF-16.
I downloaded some library here: https://decibel.ni.com/content/docs/DOC-10153
I can read the file, convert the data to UNI/ASCII/UNI, and then write the file. But when I open the new file with an editor like Notepad++ there are some unexpected characters at the end of the line.
Even reading the file and writing exactly the same data doesn'not work.
I attached an example.
Thanks for you kind support.
Solved!
Go to Solution.
Attachments:
TEST.zip 7 KBRight-click on your Read and Write Text File functions. There is an option to "Convert End Of Line". Turn that off on both functions.
As a side not, you don't need the Close File functions. The Read and Write Text File functions will close the file if the file reference output is not wired.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines -
the layout of the page is different that it appears on the screen. I printed the confirmation of my VISA payment on line and it is not concise. The information is correct, but the layout isn't.
Should I use another encoding? One of the Western ones? Maybe unicode (UTF-16)?There is a known bug involving printing in beta 12 that has been fixed in the Firefox 4 release candidate which is due out soon.
-
I am trying to upgrade to Lion. I need to go through Mac App store to buy it. I need to get the Mac App store icon in my dock. I have run Update Software several times, trying to get the Mac App store onto my iMac, but with no luck. It doesn't show up in the dock, it doesn't show up in Finder under Applications, and it doesn't show up when I search in Searchlight for App Store, Store, Mac App Store, etc. What am I doing wrong?
I am running snow leopard
James....
You arne't necessarily doing anything wrong.
Install the Mac OS X 10.6.8 Update Combo
That should reinstall the App Store for you.
Restart your Mac after the combo is finished installing.
You should see the App Store icon in the Dock and be able to access from your Apple menu also.
Make sure your Mac meet's Lion's requirements -
JDBC-ODBC Bridge does not support Unicode UTF-16
Hi
I'm using Jdeveloper 10.0.3 IDE in order to develop an application for data transformation between MS Access 2003 (source) and Oracle 10g (destination). Clients use Windows XP.
JDBC-ODBC Bridge still does not support Unicode UTF-16 which is the Charest used by MS Access 2000/2003.
Note that when I changed locale in regional setting, destination Connection to Ora10g failed to open a connection, it works only with English locale, so I can't change my locale information.
How can I read Unicode from source DB?
Any help would be appreciated. I look forward to see your response.
Thanks,i also heared that JDBC-ODBC Bridge still does not support Unicode UTF-16,
but i guess this is not in my case.That's the key in fact. JDBC-ODBC Bridge does not support UTF-16, which is the charset used by MS Access 2000/2003.
or do i need to use a third party driver for jdbc odbc bridge?Free library at http://jackcess.sourceforge.net/
Commerical JDBC driver at http://www.hxtt.com/access.html
Yonghong Zhao
System Analyst
www.hxtt.com -
Latest update removed several Quick Fix items
I noticed that the latest update removed several quick fix items.
I use the quick fix often for family type shots.
I only shoot in RAW.
Also they removed several adjustments that would appear in the menu and now you have to take an additional step to open it in the adjustment menu side bar.
The one I am most interested in is : Levels, it seems to be that is a basic adjustment and seeing the graph is important.
QUESTIONS :
(1)
Are there ways to add changes to the quick fix adjustments
(2)
Is there a way to add/keep certain adjustments in the side bar permenantly
Thanks,
GregHi Greg,
Glad to help.
The naming wouldn't be so important if we were working in the same room. As it is, words are all we have to go on here in the Discussion forums; use of the correct names saves a lot of time.
I'd forgotten about the "Quick Fixes" Effect Preset Group. My bad -- -- sorry.
You have no idea how lucky you are
Au contraire, mon ami -- I have publicly thanked Sony for making full-frame digital cameras within reach at a time when I became passionate about photography, and I state whenever I can how fabulous are the tools that are now available to your run-of-the-mill image-maker. It's an extraordinary time -- enjoy. -
MR21 performance slow on price update for several materials for a company c
Hi,
Can you please tell me if anyone has faced the problem of price updates through MR21 being very slow when performing the update for several materials at one go? Is there a resolution to this?
Thanks in advanceCheck "Note 312013 - Bad performance when material price is changed"is applicable for your sap version ???
-
SVN Merge - Another Unicode/UTF-8 problem
When merging conflicts in Unicode/UTF-8 files (Java, XML, JSPX) the resulting file looses UTF-8 characters.
This is yet another serious Unicode/UTF-8 bug in JDev. What is going on with Unicode/UTF-8 support? Currently, developing any fully "Globalized" application with JDev is "mission impossible"...Hi Steve!
Thank you for info. In noticed that Trinidad 1.2.2, released 3 months ago, is not included in TP 2 also. So I understand that something commited on 20th of September also did not make to TP 2.
Anyhow, god to know that we can expect better unicode support in TP 3 or so. -
I have iWorks for a Mac Mini, I want to install that software on my MackBook Air, but it keeps telling me to update the software, I have updated it several times. Still no go, any ideas how to get past this problem? Thanks!
Movies are not bought via Netflix, then are rented or borrowed.
For iTunes account issues, contact iTunes Customer Support. -
Iphone 5 stopped charging and playing music through usb in my 2012 Chevy sonic after iOS 8.1 update. Several friends have same problem. Hard reset didn't help. Help???
Fixed it. It is on Chevrolet's end. Press config to access the configuration settings. Turn menu/tune knob to highlight vehicle settings. Press menu/tune to select the vehicle settings menu. Choose return to factory settings.
Maybe you are looking for
-
HRMD_A07 stauts is 53 data is not posted
Hi I need to update the info types 0000 and 0001 for this Iam using idoc type HRMD_A07,Message type HRMD_A and inbound process code is HRMD. Idoc status is showing 53 and data is not posting into SAP.Can you please help me out of this... Thanks and r
-
DTW Incoming payment Credit Card
Hi everybody, I try load by DTW the incoming payments, but can I not load successful the Credit card payment, I don't understand how match the Header Template with Detail Template. I upload Template file that I use. Please look up the "Header" file
-
Large Number of Lync Conference Session Failures Every 3 Minutes
I'm wondering if anyone has ever seen this issue before. It's new to me. A client of mine is experiencing extremely high conferencing session failures in Lync. Once looking into the conferences in question, it looks as though one specific users con
-
Hp Pavilion DV 6000 Windows 7 32 bit -driver for webcam
Hello I purchased a used HP Pavilion DV6000 with Windows 7 32 bit . It did have the webcam working and I had to do a recovery. There is no Image Device in the Device Manager.. Does not detect Webcam. How do I get my webcam working again. Thank you P
-
Doubts about configurate services with JBI
Hi people, I have been looking for a way to develop a wizard for configuration of services in different ESBs from my web application. I took a look at some presentations (like http://80.69.93.183/sun-evenementen/pdf/jbi_openesb.pdf and http://mediaca