Skip to Content

How to Use & (Ampersand) in Text

I have a TextView object in a Web Dynpro Java program that contains text which includes the ampersand (&) character. However, the ampersand is converted to '&' when my text is displayed.

How do I get just the ampersand (&) to display in my text?

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Jun 26, 2012 at 04:39 PM

    where you get the text?

    have you tried to debug your code?

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 27, 2012 at 12:23 PM

    hi Scott,

    I think it will be easier to replace your '&' with 'and' 😊 ! else you will have to link the text with a context attribute and populate the context attribute with the requisite string in wdDoInit() method and as Sergei rightly pointed above, this problem does not happen at run time.

    Text & Text - at design time

    Text & Text - looks perfectly as it is supposed to be at run time.

    Thanks and Regards,

    -Amol Gupta

    and.jpg (3.4 kB)
    and1.jpg (2.5 kB)
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.