on 04-26-2005 1:47 PM
Hi,
Can I attach OVS to a model attribute in the view controller? I tried to do it but at runtime I got the error 'must not modify the datatype of a mapped attribute'. Any suggestions...Thanks.
Kapil,
Create non-model calculated attribute, wich getter/setter merely delegates call to original one. If you do not using structure binding, then you may create it in desired model node, otherwise create a subnode (non-model, cardinality=1..1, selection=1..1, initializeLeadSelection=true, singleton=false[actually, it depends]). Then you can apply OVS extension to this attribute.
VS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Valery,
I tried OVS with a non Model attribute and it worked fine.
Can you please explain what do you mean by delegation in your statement 'Create non-model calculated attribute, wich getter/setter merely <b>delegates</b> call to original one'.
I have to attach OVS to a table column. This table is attached through controller to the model for its data.
Say you have model node MyNode and model attribute MyAttr. Next you are creating read-write calculated attribute MyCalculus under the same node. WD generates 2 method for this attribute: getter to read value and setter to write value.
So under deleagtion I mean the following:
inside getMyNodeMyCalculus write:
return element.getMyAttr();
inside setMyNodeMyCalculus write:
element.setMyAttr(value);
So in fact you are just proxing original attribute. But your calculated attribute has no metadata / type-data mapping (to model or other controller). Therefore you may use OVS for this calculated attribute.
VS
Hi Valery,
Thanks so much for your explanation. As per your suggestion, I was able to attach the OVS help to the table fields by using a calculated attribute. However, as soon as I click on the icon to initiate the OVS help it gives me a NullPointerException as below. I am trying to resolve it, but if you could throw any pointers on how to resolve it, it would be great.
java.lang.NullPointerException
at com.sap.tc.webdynpro.progmodel.valuehelp.NodeCMIModelClassWrapper.<init>(NodeCMIModelClassWrapper.java:46)
at com.sap.tc.webdynpro.progmodel.valuehelp.NodeSingletonCMIModelClassWrapper.<init>(NodeSingletonCMIModelClassWrapper.java:35)
I was able to resolve the NullPointerException error.
Another issue : the model attribute is delegated to the calculated attribute but how can I display multiple model attribute values as a single calculated attribute in my table view. The value node is also 1:1.
Thanks Valery!
PS : I was able to resolve this by refering to the parent element.
Message was edited by: kapil sharma
Hi Guys,
i have also the same NullPointerException in a Webdynrpo App using a RFC Model.
Actually, i'm not a expert in this technology
@Kalpi
So, what you mean by reffering to parent element?
Can you give me an example?
Actually i fight with this problem until three days, and i've no solution.
I hope someone can help me! I became totally desperate.
Thanks
Best Regards,
Chris
Message was edited by: Christian Kleinschroth
Message was edited by: Christian Kleinschroth
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.