cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Url Link

Former Member
0 Kudos

Hi,

I want to generate a dynamic url link during the runtime (pick up fr database), which is to load an image from external source. How to do it programmatically?

Any help would be much appreciated. Thanks.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Lets consider http://i82.photobucket.com/ is fixed in the url and you will be getting the "j249/xxxx.jpg" from your DB.

In that case you can read the values from DB and populate the context by appending the value .

Regards, Anilkumar

Former Member
0 Kudos

May be my last question was a bit vague. I want to generate a dynamic url link on the page, eg, which point to http://i82.photobucket.com/albums/j249/xxxx.jpg. The user can then click on the link to see the image.

Former Member
0 Kudos

Julius,

1. Use table with IWDLinkToAction cell editor.

2. Populate node used as table data source with dynamic part of url, i.e. create elements with string attribute DynamicUrlSuffix set to j249/xxxx.jpg.

3. In action handler for LinkToAction use wdComponentAPI.getWindowManager().createExternalWindow(...) to open external window with complete URL. Complete URL can be composed in this action handler as

staticUrlPart + wdContext.current<TableNode>Element().getDynamicUrlSuffix()

Valery Silaev

SaM Solutions

http://www.sam-solutions.net

Former Member
0 Kudos

Hi Valery,

Is there any other way, apart from using table? This is because the space in my page is a bit limited, a table is apparently over-consumed my space. I just want to display one url link.

julius

Former Member
0 Kudos

Julius,

Yes, you may create IWDLinkToUrl UI controls dynamically in wdDoModifyView.

Valery Silaev

SaM Solutions

http://www.sam-solutions.net

lajitha_menon
Contributor
0 Kudos

Hi Julius,

Cant you use the LinkToURL element? For eg: like this,

Create a LinkToURL element in your view. Give it a text like 'Click here to see photo'. The reference property of this element is bound to a context value attribute of type string. Bind the visibile property of this element to a context value attribute of type WDVisibility. This value is set to NONE in wdDoInit().

When you know the value of the URL(for example , after a button click), form the URL value dynamically, set this value to the context attribute to which you have set the reference. At this point, set the visibility to true.

Regards,

Lm

Former Member
0 Kudos