on 05-05-2006 1:39 PM
Hi everybody,
My problem is, that I want to create a number of elements at runtime. The number depends on the records in the database. So when I got 30 records in my database. I want to create 30 elements. So far, so good.
The connection through the WebServices works very well.
Now I got my problems with display the elements. I want to use the tray element.
Now my Code looks like this:
//... much code before! :-)
//here you get the number of affected rows
length = req.getResponse().getResultAsArray().length;
//dynamically create trays, after the number of selected rows
for (int i = 0; i < length; i++)
{
IWDTransparentContainer transparent = (IWDTransparentContainer) view.createElement(IWDTransparentContainer.class, "TC."+i);
IWDTray tray = (IWDTray) view.createElement(IWDTray.class, "tray."+i);
//I don't want any more options at the moment ;-)
tray.setEnabled(true);
tray.setExpanded(false);
transparent.addChild(textView);
transparent.addChild(tray);
}
So but nothing is shown on the screen.
Now there exists the method setVisible(), I think this is the key to solve my problem. But this method expects a WDVisibility parameter and I don't know what I must type in.
I tried it with com.sap.ide.webdynpro.uielemtdefinitions.Visibility, it doesn't work.
Then I created a context attribute with this type!
doesn't work, too.
My you can help me?
Kind Regards,
Andre
Hi,
for (int i = 0; i < length; i++)
{
<b>IWDTransparentContainer container = (IWDTransparentContainer)view.getElement("RootUIElementContainer");</b>
IWDTransparentContainer transparent = (IWDTransparentContainer) view.createElement(IWDTransparentContainer.class, "TC."+i);
IWDTray tray = (IWDTray) view.createElement(IWDTray.class, "tray."+i);
//I don't want any more options at the moment
tray.setEnabled(true);
tray.setExpanded(false);
transparent.addChild(textView);
transparent.addChild(tray);
<b>container.addChild(transparent);</b>
}
Hope it helps,
Regards,
Nagarajan.
Message was edited by: Nagarajan Kumarappan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Now it works. ;-D
Thanks for your help, Maksim & Nagarajan!
Kind regards & thanks a lot!
Andre
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
And how can I add the IWDTransparentContainer to the standard RootUIContainer?
Thanks for help!
Kind regards,
Andre
edit:
Ohh, we postet at the same time
Message was edited by: Andre Becker
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Andre,
Did you add <i>transparent</i> to RootUIElementContainer?
Best regards, Maksim Rashchynski.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.