on 09-14-2010 10:54 AM
i need dynamically create link,
like HTML Tag <a href='URL' >text</a>
public void wdDoInit()
{
ArrayList al = .... (URL String List)
for(int i =0;i<al.size(); i++)
{
..... HOW TO CODING??
}
}
Dynamically Insert UI to View or Dynamically Insert UI to View LinkToURL
hi
Use the following code to in wddomodify method
if(firstTime)
{
IWDTransparentContainer tc = (IWDTransparentContainer)view.getElement("RootUIElementContainer");
IWDLinkToURL ld = (IWDLinkToURL)view.createElement(IWDLinkToURL.class,"ltu" );
ld.setTarget("http://www.google.com");
ld.setText("test...");
ld.setEnabled(true);
tc.addChild(ld);
}
thnaks
Sarbjeet
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Sarbjeet
this is my code,
how coding LinkToURL UI put in Group UI and how use group.createLayout() method for GridLayout ?
if(firstTime)
{
IWDTransparentContainer tc = (IWDTransparentContainer)view.getElement("RootUIElementContainer");
tc = (IWDTransparentContainer)view.getElement("RootUIElementContainer");
IWDCaption groupTitle = (IWDCaption)view.createElement(IWDCaption.class,"GroupTitle");
groupTitle.setText("TempGroup");
IWDGroup group = (IWDGroup)view.createElement(IWDGroup.class,"DynamicallyGroup");
group.setHeader(groupTitle);
group.setWidth("100%");
group.setEnabled(true);
tc.addChild(group);
for (int i=0 ; i<10; i++)
{
tc = (IWDTransparentContainer)view.getElement("RootUIElementContainer");
IWDLinkToURL ld = (IWDLinkToURL)view.createElement(IWDLinkToURL.class,"ltu"+i );
ld.setTarget("http://www.google.com");
ld.setReference("http://www.google.com");
ld.setText("test..."+i+"\t");
ld.setEnabled(true);
tc.addChild(ld);
}
}
Hi,
Use the below code.
IWDGridLayout layout = (IWDGridLayout) group.createLayout(IWDGridLayout.class);
group.set...
You can set its various properties through its setter methods.
You can always search SDN and you will definetly get the solution for these commonly asked questions without waiting for the response here : )
Hope it helps.
Regards,
Manoj
Hi,
see also the video which covers dynamic UI generation as well:
Best Regards,
Ervin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you gotta create the uI elements in the method wdDoModify()
for each entry you need to create a new UI element of type LinkToUrl
or are you looking for the exact code?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.