Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

RAM API RAMAsset.setDescription - how can we set multi-line Long Description in an asset via API?

We are trying to read a text file, and set the contents of that file as the Long Description in a RAM Asset via API calls. But, when we do this, all of the line endings are lost so that the Description contains one long line consisting of all lines concatenated together. We've done some testing, trying to pass strings containing "\n" or "\r\n", but are unable to get this working.

Is there some special syntax to use to insert line endings into the Long Description?


Here is what we have been trying..........

                String LongDesc = "Line1\nLine2\nLine3\n";
                System.out.println(LongDesc);
                asset.setDescription(LongDesc);

But, here is what the Description looks like in the asset after running this.........




0 votes


Accepted answer

Permanent link
Hi,

long description in RAM is rich text. I think one could use html elements in description.

As to your case, try this one in your code:
asset.setDescription("<p>lin1</p><p>lin3</p><p>lin4</p>");

Thanks.
Troy Klomp selected this answer as the correct answer

0 votes

Comments

comment hided the html element in my comment,  it should be:

asset.setDescription("lin1<br>line2<br>"); 

Thank you Lu! This does what we need at this point. It's good to know that we could put more html out there as well.


Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,020
× 234
× 2

Question asked: May 19 '14, 2:40 p.m.

Question was seen: 5,625 times

Last updated: May 20 '14, 1:02 p.m.

Confirmation Cancel Confirm