on 07-30-2008 6:02 PM
OK I thought I had this figured out but...
I am getting a null pointer error on this code:
ISimpleValueSet valueset = wdContext.getNodeInfo().getAttribute(IContextElement.element).getSimpleType().getSVServices().getValues();
I tried breaking it down into this:
IWDAttributeInfo attributeinfo = wdContext.getNodeInfo().getAttribute(IContextElement.element);
ISimpleType simpleType = attributeinfo.getSimpleType();
ISimpleValueSet valueset = simpleType.getSVServices().getValues();
And found that the error occurs here: ISimpleType simpleType = attributeinfo.getSimpleType();
Any suggestions as to why this may be happening?
I have resolved this issue, for anyone who may be interested the problem was that I had bound the fields to the Original View (where the values were set) which were tied to the Component controller but did not have the fields on the Secondary View (where the values are displayed) tied to the Component controller.
Once I created the fields in the Secondary View Context and tied them to the fields in the Component Controller context all was well!!)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
plz refer following code.
ISimpleValueSet valueset =
wdContext
.getNodeInfo()
.getAttribute(IPrivate<CompName>View.IContextElement.ELEMENT) // or enter attribute name instead
.getSimpleType()
.getSVServices()
.getValues();
nikhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
please use the following code:
ISimpleValueSet valueset =
wdContext
.getNodeInfo()
.getAttribute(IPrivate<CompName>View.IContextElement.ELEMENT) // or enter attribute name instead
.getSimpleType()
.getSVServices()
.getValues();
and please check if u bind the simple type to
context attribute --> element or not.
What is the name of your context attribute? Does the following compile?
wdContext.getNodeInfo().getAttribute(IContextElement.element);
If yes, what is the type of attribute "element"?
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Actual problem probably in this statement
IWDAttributeInfo attributeinfo = wdContext.getNodeInfo().getAttribute(IContextElement.element);
particularly in IContextElement.element. (I hope you are giving upper case like
IContextElement.<YOUR ELEMENT NAME IN UPPER CASE> ) Check whether it is returning proper value. Print this value
wdComponentAPI.getMessageManager().reportSuccess("AttributeInfo "+ attributeinfo);
Regards,
Siva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.