cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic generation of UI elements:link to url

Former Member
0 Kudos

Dear Experts,

I need to generate link to URL UI element dynamically as per the no of entries provide by bapi.

Please Help....

Regards:

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Dear Kishore,

Write the following code in the wdDoModifyView(...) method..and replace YourModelNode with actuals


if (firstTime) {
// Get the reference to the UI rool elemnet
                      IWDTransparentContainer rootElement = (IWDTransparentContainer) view.getRootElement();
// Set the layout manager to MatrixLayout
	rootElement.createLayout(IWDMatrixLayout.class);
// Get the metadata of the node
	IWDNodeInfo nodeInfo = wdContext.getYourModelNode().getNodeInfo();
	for (Iterator iter = nodeInfo.iterateAttributes(); iter.hasNext();) {
		IWDAttributeInfo attributeInfo = (IWDAttributeInfo) iter.next();
		IWDLinkToURL LinkToURL=(IWDLinkToURL) view.createElement(IWDLinkToURLclass,attributeInfo.getName() +"LinkToURL");
		LinkToURL.setText(attributeInfo.getName());
                                          LinkToURL.setReference(attributeInfo.getReference());
		LinkToURL.createLayoutData(IWDMatrixHeadData.class);
		// Add the LinkToURL to the UI
		rootElement.addChild(LinkToURL);
			}
}

Hope it helps!

Warm Regards

Upendra Agrawal

Answers (0)