cancel
Showing results for 
Search instead for 
Did you mean: 

Creating Dynamic Iframes in CE

Former Member
0 Kudos

Hi Experts,

I am trying to create dynamic iframe in NWDS 7.1.1 but i am not able to see any thing as output.

Here is what i have done

1. Create iframe uing iframe API in wdModify.

2. Passed the desired URL

IWDView view = (IWDView) wdControllerAPI;
view = (IWDView) wdControllerAPI;
		view.createElement(IWDIFrame.class,"Iframe");
		 IWDIFrame frame = (IWDIFrame)view.getElement("Iframe");

//		 IWDAttributeInfo AttInfo = (IWDAttributeInfo)j.next();
		 IWDAttributeInfo AttInfo = wdContext.nodeTest().getNodeInfo().getAttribute("Va_HTMLSource");
		 frame.bindSource(AttInfo);
		 frame.setVisible(WDVisibility.VISIBLE);
		 frame.setEnabled(true);
		 frame.setBorder(true);
wdContext.nodeTest().currentTestElement().setVa_HTMLSource("http://www.google.com");

Please suggest what i need to do to see iframe as output.

Regards

Pranav

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

void wdDoModifyView(IWDView view, boolean firstTime)
{
  if (firstTime)
  {
    IWDIFrame frame = view.createElement(IWDIFrame.class, "Iframe");
    IWDUIElementContainer container = (IWDUIElementContainer) view.getRoot(); /* or wherever you want to add the IFrame */
    container.addChild(frame);
    IWDAttributeInfo att = wdContext.nodeTest().getNodeInfo().getAttribute(ITestElement.VA_HTMLSOURCE");
   frame.bindSource(att);
   frame.setBorder(true);
   wdContext.nodeTest().currentTestElement().setVa_HTMLSource("http://www.google.com");

Armin

Former Member
0 Kudos

Thanks Armin, i forgot to add frame in container.

Regards

Pranav

Answers (0)