on 07-18-2008 1:02 AM
Dear Experts,
the problem what I am having is
that an input which is entered on the WebDynpro side within
a TextEdit Field like
aaaa
bbbb
ccccc
internally as "Ltxt"= "aaaa\r\nbbbb\r\nccccc\r\n"
will be translated on the SAP
Side as -> aaaa##bbbb##ccccc##.
This is what I am seing inside the field on the Sap side
What is wrong here ?
Regards
erdem
Hi Erdem,
Try like this:
StringBuffer buffer = new StringBuffer(wdContext.currentContextElement().get<TextEditAttrib>());
for (int i = 0,index=buffer.indexOf("\n"); i < buffer.length(); i++) {
if(i==index){
buffer.replace(i-1, i+1,"\r\n");
index = buffer.indexOf("\n");
if (index == -1)
break;
}
}
wdContext.currentContextElement().set<attribName>(buffer.toString());
Now attribName value is "aaaa\r\nbbbb\r\nccccc\r\n"
regards,
Siva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
is that a common sap problem or not.
Why this bahaivour ? What is the reason for ?
Regards
sas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If you want to remove this, use the following code align this with your context attribute instead of hard coded strings
Example :
String str = "aaaa\r\nbbbb\r\nccccc\r\n";
str = str.replace("\r\n", ""); // will replace all "\r\n" with ""
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.