on 06-18-2007 9:48 AM
Hello,
I exposed a BAPI for creating business partners as a web service. Now I would like to set the title (Mr., Ms.) using a dropdown box. Thus I created a value attribute with a corresponding enum type and bound this to the dropdown box. Is it possible to map the dropdown box to a controller model attribute that maps to the web serivce? In the moment I have to hand code this relation using:
wdContext.currentXXXElement.setXXX(
wdContext.currentContextElement()getXXX()
);
Thanks,
Felix
Hi Felix,
I gues it's not possible why bcz your context attribute type is enum type . But your model attribute type is some thing else.
So it may not be possible.
If attributes are same type, it may be possible.
Did you try with mapping?
Rgds
SS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Felix,
Try this you can create a value attribute(which will be mandatory in this case).
Create a simple type of builtin type String and set it as the type of value attribute use the following code to populate its enumeration.
You can use the following code:
IModifiableValueSet valset = wdContext.getNode("NodeName").getNodeInfo().getAttribute("").getSVServices().getModifiableValueSet();
valset.put("key","value");
This most be the most practical case becaue the code would be generic and just need to change the node and the attribute name.
Regards
Amit
[
Message was edited by:
Amit Kesari
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
No need of using different context attribute.you can directly map the model attribute to view context through component controller.
Firstly use DropDownByIndex.
map the controller attribute to the view context.
Now map the context attribute that will contain values to the texts property of dropdownbyindex.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Felix,
This would not be nessecary.Look if you've a model attribute of type list getting exposed from the webservice you can directly bind it to the UI element(DD) and make sure that the objects in the list are of type string.
It will work.
regards
Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.