on 09-30-2008 10:05 AM
how to populate values in a dropdown with values coming from RFC?...can anyone help me out with the code?
Hi Parama,
Use dropdownbyIndex UI element and bind to the model attribute from RFC and write the following code in init
IPrivateEVSView.IAElement oE = wdContext.nodeA().createAElement();
IPrivateEVSView.IAElement oE1;
oE.setB("Select");
wdContext.nodeA().addElement(oE);
for(int i=0;i<wdContext.nodeC().size();i++){
oE1 = wdContext.nodeA().createAElement();
oE1.setB(wdContext.nodeC().getCElementAt(i).getELEMENT());
wdContext.nodeA().addElement(oE1);
Regards
Raghu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
Writ down the following code onAction
public void onActiongetflightlist(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onActiongetflightlist(ServerEvent)
wdThis.wdGetFlightModelCustController().executeBapi_Flight_Getlist_Input();
ISimpleTypeModifiable myType=wdThis.wdGetAPI().getContext().getModifiableTypeOf("Drop_flightList");
IModifiableSimpleValueSet values=myType.getSVServices().getModifiableSimpleValueSet();
int nodesize=wdContext.nodeFlight_List().size();
for(int i=0;i<nodesize;i++)
{
values.put(""+i,wdContext.nodeFlight_List().getFlight_ListElementAt(i).getAirline());
}
}
here u have to create one context Drop_flightlist and it bind to the dropdownbykey "selectedkey" property
Edited by: Abhilasha Dahare on Sep 30, 2008 11:15 AM
Hi,
Try to bind your model node attribute with dropdown ui value property.
Regards,
Gurprit Bhatia
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
follow this code implemented in wdModifyview
Create one SimpleType in Dictionaries with time data .
Then use Dynamic programming to achieve your need
in wdDomodifyView() method, write following code
wdContext.getContext().reset(false);
IWDTransparentContainer tc= (IWDTransparentContainer)view.getElement("RootUIElementContainer");
tc.destroyAllChildren();
for(int i=0;i<15;i++)
{
wdContext.getNodeInfo.addAttribute("attr"+i,"<SimpleTypePackage>.<SimpleTypeName> ");
}
for(int k=0;k<15;k++)
{
IWDDropDownByKey ddk=(IWDDropDownByKey)view.createElement(IWDDropDownByKey.class,"ddk");
ddk.bindSelectedKey("attr"+k);
tc.addChild(ddk);
}
or follow the link provided with all the discussion that may be help full to you
Regards
Raghu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use DropDownByIndex and bind the Texts property of DropDownByindex to the model node.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
call the rfc in DoInit() of view.
and goto DropDownByIndex properties,
set the following property
texts=<your rfc out put attribute>
deploy the application.
Regards,
ramesh
Edited by: Ramesh Babu V on Sep 30, 2008 2:42 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
refer this link.
http://saptechnical.com/Tutorials/WebDynproJava/EVS/Demo.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 |
---|---|
78 | |
9 | |
9 | |
7 | |
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.