cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Uielement textview

Former Member
0 Kudos

Hai,

I tried to develope the scenario like when i entered the data in <b>textfield</b> and press the <b>button</b> the data is to be shown in <b>textview</b> .

The problem is the data coming into the textview is formatted. I need the same format(like paragraph) in the text view also.

How to do it.

Please help me asap.

regards,

Accepted Solutions (1)

Accepted Solutions (1)

former_member182372
Active Contributor
0 Kudos

Hi,

If you are using WD for java check Valery`s nice blog /people/valery.silaev/blog/2005/11/23/display-formatted-text-using-webdynpro-for-java

Best regards, Maksim Rashchynksi.

Former Member
0 Kudos

Hai Maksim,

I need the text in the form of paragraph .The blog is very nice , but i think thats not solving my problem.

like you see the text whch you are seeing here now .

i need to be displayed as it is in the text view.

regards,

Former Member
0 Kudos

Naga,

Actually, it is possible to use my code, your "formattedStr" should be created like:


/* Your original value */
final String multiline_text =
 "Lorem ipsumn" +
 "Dolor sit ammenn" +
 "And all the rest";

/* Formatted value */		
final String formattedStr =
  "<html><body><p>" +
  multiline_text.replaceAll("\r?\n", "</p><p>") +
  "</p></body></html>";

In NW04s text view will support multiline text automatically.

Valery Silaev

EPAM Systems

http://www.NetWeaverTeam.com

Former Member
0 Kudos

Hai Valery,

I need to display the data in textview. as i tried your code above .Its displaying the html text.

I think its fine for iframe.

can you suugest me the process for textview.

regards,

naga

Former Member
0 Kudos

Naga,

Currently the only option is to split text up to "lines" and then create several TextView controlls dynamically for every line.

VS

Former Member
0 Kudos

hai valery ,

how can i split the text in textview

regards,

former_member182372
Active Contributor
0 Kudos

The splitting logic is dscribed in another very nice Valery`s blog /people/valery.silaev/blog/2005/07/05/the-quik-brouwn-fox-jamps-ovrr-the-laizy-dog :-). There every word is representing like textView ui element.

Former Member
0 Kudos

hi Naga

i am trying to do the same what you tried. Can you tell me if you are sucessfull if so how you did it .

thanks ,

Chandra.

Former Member
0 Kudos

Hai Chandra,

I used iframe to show the formatted text.

regards,

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

did you try using the FormattedTextView ui element instead of TextView? See also http://help.sap.com/saphelp_nw04s/helpdata/en/3b/219141c1d0ae5fe10000000a1550b0/frameset.htm

Regards, Heidi

Former Member
0 Kudos

Hai Heidi,

I seen the Link Its very fine. But Iam unable to find the ui element Formattedtextview in layout.

and ia m using sapnwds ver 2.0.11

regards,

Former Member
0 Kudos

Hi,

sorry, I forgot to mention that FormattedTextView is available in Web Dynpro ABAP, it's in the View Designer in the Standard Simple Library. I'm not sure if it is released in Web Dynpro Java yet.

Regards, Heidi