on 05-23-2007 12:54 PM
Hello Experts,
I struck up with a small Issue, can any one help me.
My scenario is ..
In a View I am creating attributes and text boxs dynamically in the do modify method, also same fields in component controller dynamically.
I need to access these fields in component controller.
for which I need to bind view attributes to the component controller attributes dynamically, how to do this.
Help me please,
Thanks in advance,
Sai.k.k
Hai
dynamically creating context node and attributes
// you can write this code in wddoinit
IWDNodeInfo node=wdContext.getNodeInfo().addChild("DynamicNode",null,true,true,false,false,false,true,null,null,null);
node.addAttribute("Name","com.sap.dictionary.string");
bind it to ui eelement
//done in wddomodify() method only
IWDInputField field1=(IWDInputField)view.createElement(IWDInputField.class,"InputField1");
field1.bindValue("DynamicNode.Name");
Regards,
Naga
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Naga raju,
here is my code, still getting error.
<b>
IWDNodeInfo ccparent = wdThis.Employee_ComponentController().wdGetContext().nodeEmployee().getNodeInfo(); // Component Controller's
WDNodeInfo parent = wdContext.getNodeInfo().addMappedChild("Employee",null,true,true,false,null,false,true); //view controller's
IWDAttributeInfo ccchild = ccparent.addAttribute(resourceHandler.getString("FIELD"i"_FIELDNAME"),"com.sap.dictionary."resourceHandler.getString("FIELD"i+"_DATATYPE"));
IWDAttributeInfo child = parent.addMappedAttribute(resourceHandler.getString("FIELD"i"_FIELDNAME"),".Employee_Component.Employee."resourceHandler.getString("FIELD"i+"_FIELDNAME"));
</b>
This is the error I am getting :
com.sap.tc.webdynpro.progmodel.context.ContextException: MappedAttributeInfo(Employee_TabsView.Employee.Name): must not modify the datatype of a mapped attribute
Is this is due to that I am using EVS to the fields in view.
Regards,
Sai.k.k.
Thanks for all your helpful replies.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Konchada,
1. Create attributes dynamically in component controller
2. Create <u>mapped</u> attributes dynamically in view controller. Map them to attributes in component controller.
3. Add text boxes in wdDoModify, bind them to mapped attributes.
Valery Silaev
SaM Solutions
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
public IWDNodeInfo addMappedChild(String name,
Class elementClass,
boolean singleton,
boolean mandatorySelection,
boolean multipleSelection,
String mappedPath,
boolean selectionMapped,
boolean initializeLeadSelection)
//mappedPath - componentname.name of the parent node
//elementClass - null
Regards
Bharathwaj
Message was edited by:
Bharathwaj
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
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.