on 07-13-2009 7:28 AM
Hi,
I need to create radio button group by key from the values fetched from the oracle DB,i think you can do this by creating simple data type dynamically for the fetched values. can any one please guide me how to create simple data types dynamically.
is there any other solution to implement this?
Regards,
Lakshmi.
Hi Lakshmi
Another solution would be to implement radio button group by values bind to a context node (key/value pairs). Then you do not need to change the simple type dynamically. Instead you just populate the context node bound to the group with key/value pairs fetched from DB.
Changing a simple type dynamically shall be used only if this is really necessary. I think here you can avoid doing this.
BR, Sergei
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Check this (RadioButtonGroupByIndex): http://help.sap.com/saphelp_nw70/helpdata/en/59/b2af840e67514f8e8973d97d494c9b/content.htm.
"The context must provide a context node X that can contain 0 to n elements (X.cardinality=0..n). The context node must contain a context attribute y that is of a simple type and provides the texts for the radio buttons. For data binding, property texts is bound to attribute y. Each node element represents a radio button. The selected index is specified by the lead selection of the node X."
BR, Sergei
Hi Expert
Edited by: sudhir kumar on Jul 15, 2009 11:25 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Expert
Its basically localy i have done for locally .you have to adjuct accordingly..all code writtin in wdDoModify method..due to Wd Ui created on WdModify method..
I have created one context value node adn ahhttribute for storing data the dynamically.
please look at following code and use accordingly
My Node value=Month.
vallue attribute--MonthName
String monthNames[]={
"January", "February", "March", "April",
};
List monthLst = new ArrayList();
for (int i = 0; i < monthNames.length; ++i)
{
IPrivateCompView.IMonthsElement month =
wdContext.createMonthsElement();
month.setMonthName(monthNames<i>);
monthLst.add(month);
}
wdContext.nodeMonthsOfYear().bind(monthLst);
// Bind node to element list
wdContext.nodeRFC().bind(month);
IWDTransparentContainer container = (IWDTransparentContainer)view.getElement("RootUIElementContainer");
IWDRadioButtonGroupByIndex radiobtn = (IWDRadioButtonGroupByIndex) view.createElement(IWDRadioButtonGroupByIndex.class, "MyradioByIndex");
radiobtn.bindTexts ("Month.MonthName");
ontainer.addChild(radiobtn);
Thanks
Jati
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
this thread solves your problem,
http://help.sap.com/saphelp_nw70/helpdata/en/95/93fe1e71a2e44691b1f041e67f71aa/content.htm
Regards,
Sunaina Reddy T
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.