on 11-08-2006 6:14 AM
Hi
I am trying to bring the search help values for field religion on my screen. I am using EVS. I have a context attribute ca_konfe on the component controller which will be populated with values from the model. Now I have mapped this value attribute to a value attribute on a view named ctx_konfe. This context is binded to a drop down by key control. Now in am able to get the numerical value of religion on the view during debug. Now in the init(), I used this code:
IWDAttributeInfo attributeInforeligion =
wdContext.getNodeInfo().getAttribute(IPrivatePersonalDetail_EmpPrComponentView.IContextElement.ctx_konfe);
ISimpleTypeModifiable religion = attributeInforeligion.getModifiableSimpleType();
IModifiableSimpleValueSet valueSetreligion= religion.getSVServices().getModifiableSimpleValueSet();
int religionn= wdContext.nodeT_Religion().size();
for(int i=0;i<religionn;i++)
{
valueSetreligion.put(wdContext.nodeT_Religion().getElementAt(i).getAttributeAsText("Konfe"),wdContext.nodeT_Religion().getElementAt(i).getAttributeAsText("Ktext"));
}
Here T_Religion is a Table with the Key, Value pairs.
When I run the code , I gethis error:
com.sap.tc.webdynpro.progmodel.context.ContextException: MappedAttributeInfo(Details.ctx_konfe): must not modify the datatype of a mapped attribute
Regards,
Murali.
Muralidaran,
Synopsis: you have create node in component controller, then created mapped node in view controller and try to modify attribute of mapped node in view controller.
Solution: move your code from view controller to component controller where original node is declared (do not forget to modify names i.e. IPrivatePersonalDetail_EmpPrComponentView.*)
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,
If the key of your religion table is numerical, then probably
getAttributeAsText("Konfe")
won't work.
Create an Integer as key object instead.
Good luck, Roelof
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
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.