cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Link to url

Former Member
0 Kudos

Hi,

I am working with dynamic Link to Url.Im done with the creation of the Link to Url. Now i need to set the url to this link, so that when i click on the link a new browser page should open.

Please help how to do it.

Regards,

Padmalatha.K

Points will be rewarded.

Accepted Solutions (1)

Accepted Solutions (1)

former_member201361
Active Contributor
0 Kudos

Hi,

create a context attribute as link.in the DoModify method use this code

if(firsttime){

wdContext.currentContextElement().setLink("http://www.google.com");

IWDTransparentContainer tc =(IWDTransparentContainer)view.createElement(IWDTransparentContainer.class,"TransparentContainer");

IWDLinkToURL url = (IWDLinkToURL)view.createElement(IWDLinkToURL.class,"linkURl");

url.setEnabled(true);

url.setText("google");

url.setReference("http://www.google.com");

tc.addChild(url);

IWDTransparentContainer root = (IWDTransparentContainer)view.getElement("RootElement");

root.addChild(tc);

}

Hope your problem get resolved.

thanks and regards

fazal

Answers (1)

Answers (1)

former_member751941
Active Contributor
0 Kudos

Hi padmalatha,

Check this .

Regards,'

Mithu