Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Trusted Contributor
jaff
Posts: 115
Registered: ‎11-16-2011
My Device: Smartphone Storm 9900
My Carrier: 3
Accepted Solution

Detect link on string and make clickable to launch?

hi,,, i have a rich text field... and contain rich text field is data from database... on some data it is include link <a href>www.blabla.com</a> and the position of link string is not fixed, it is depend user input...

 

my logic :

1. search link string

2. get address from link string

3. make string clickable and got to other screen with browserfield

4. open connection with link from string

5. finish..

 

my problem..

how to solve logic no.1 and 2... if the link not fixed offset? and how to get url from string to open conector in browser field? thanks... i hope anybody can help me...

Please use plain text.
Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Detect link on string and make clickable to launch?

Try ActiveRichTextField

 

Please use plain text.
Trusted Contributor
jaff
Posts: 115
Registered: ‎11-16-2011
My Device: Smartphone Storm 9900
My Carrier: 3

Re: Detect link on string and make clickable to launch?

yes u right,,, activeRichTextField is way to detect string... but how t create this... for show if this is a link... ?

Please use plain text.
Trusted Contributor
jaff
Posts: 115
Registered: ‎11-16-2011
My Device: Smartphone Storm 9900
My Carrier: 3

Re: Detect link on string and make clickable to launch?

Please help me....any solution?

Please use plain text.
Developer
peter_strange
Posts: 19,601
Registered: ‎07-14-2008
My Device: Not Specified

Re: Detect link on string and make clickable to launch?

As far as I can see, your only best option is to search the input text and remove the tags like <a, leaving things like the links in there, which the active text field will automatically use. 

Please use plain text.
Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Detect link on string and make clickable to launch?

If the content is HTML markup, then you might want to consider using BrowserField instead of ActiveRichTextField.

 

Please use plain text.