on 08-05-2005 9:43 AM
Hi!
I've got a problem with calling the method
<b>wdContext.getNodeInfo().getAttribute(...)</b>
on a Model Attribute as it always returns null.
I'm using the automatically created <i>IController.INodeElement.ATTRIBUTE</i> constant for specifying the attribute.
When I try to get the attribute of the Root-Context, it works.
Has anybody got an idea why?
Regards,
Thomas
Thomas,
Could you post original code with relevant context outline?
What type of model are you using? Adaptive RFC?
VS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thomas,
will you test whether this code works for you or not:
IWDAttributeInfo attInfo = wdContext.getNodeInfo().getChild("MyModelNode").getAttribute("myModelAttribute");
OR this one
IWDAttributeInfo attInfo1 = wdContext.node<Your Model Node>().getNodeInfo().getAttribute("myAttribute");
Shubhadip
Message was edited by: Shubhadip Ghosh
Hi, Valery!
I've used Adaptive RFC to import the Bapi BAPI_HELPVALUES_GET and mapped it to following context structure in the controller of IPrivateApplicantCompView:
Application
|_Title (Model Attribute)
I bound this element to an input field and then wanted to implement EVS for it as follows:
IWDAttributeInfo attributeInfo =
wdContext.getNodeInfo().getAttribute(
IPrivateApplicantCompView.IApplicationElement.TITLE
);
ISimpleTypeModifiable attributeType =
attributeInfo.getModifiableSimpleType();
a.s.o.
And the first method return null!
Thanks!
Thomas
Hi, Valery!
I changed the code, which obviously worked perfect as I now get the message:
-
<i>com.sap.tc.webdynpro.progmodel.context.ContextException:
AttributeInfo(ApplicantCompView.Application.Title):
must not modify the datatype of a mapped attribute
at
com.sap.tc.webdynpro.progmodel.context.
AttributeInfo.getModifiableSimpleType
at com.snapconsult.portal.applicant.
ApplicantCompView.setValueHelpForInputElement</i>
-
Following the example for ESV, I do have to change the attribute in order to implement value help. How could ESV then be implemented for mapped attributes otherwise?
Thanks!
Regards,
Thomas
Hi Thomas,
if you're doing the EVS tutorial, you're supposed to use "getAttribute" on a value attribute you created in the context. Don't use the one that you mapped to the bapi output. Create a new one.
When you assign the values though (inside the "for" statement), use the one from the bapi output. This way you're not directly changing the mapped attribute.
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
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.