on 10-04-2007 11:35 AM
Hi,
I have a link that opens an external URL.
Furthremore, I have a context node with the URL for the link.
I have bound the context node to both the reference, and the text attribute of the link.
Now I would like to cut-off the link-text if the URL is longer that 30 characters and add 3 dots ("..."). So the link should look like this
<b><u>http://www.sap.com/blablabla.ht...</u></b>
For this, I have a method GET_SHORTENED_URL.
Do I need a new context element that stores the shortened URL? And where do I call the method to shorten the URL?
PS: I have similar problems frequently, where I want to modify some attributes of some UI elements with some methods (usually, read-only attributes like the "text" of a link). Do I need a context attributes for all these values?
Hi Daniel,
Yes, you need a different attribute to store the text of the URL, and bind that attribute to the text property, and you will be binding the long url to the reference property. When you call the method get_shortened_url, do a set_attribute to set the text property.
Regards
Nithya
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 change the width of the context elements, the content gets truncated
grtz,
Koen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.