Skip to Content
May 11, 2004 at 01:21 PM

NullPointerException in Merged Value Node


Hi there,

I have a component with it's component controller and a CustomController, lets call it CustCont. Within the context of the CustCont, there are two Value Nodes, lets call them GenericNode and SpecificNode, with different attributes (most of type string), lets call them genAtt1, genAtt2, specAtt1, specAtt2.

Now I have a view, lets call it V, with a context with a Value Node VN with context mapping in that kind, that all attributes of the SpecificNode and all attributes of the GenericNode are mapped (first map attributes to GenericNode, then to SpecificNode).

When I produce test values within the views implementation, wdDoInit, in the following form:

IPrivateV.IVNElement vn = wdContext.nodeVN().createVNElement;





the first or(!) the third set...() method leads to a NullPointerException, complete StackTrace below. It depends whether the VN is mapped to SpecificNode or to GenericNode (if to SpecificNode, then vn.setGenAtt1("test") throws the exception).

Somehow I understand that it may be problematic to map the attributes of VN to the attributes of different value nodes of the custom controller context (both have the same settings, so in my opinion, this could work).

What is really estonishing for me is that such a construction works if I do not set directly the attribute value of the node that is not mapped but map the attribute to the value of an InputField. Then I can type in some data and all the mapping work!

Any help?

Thanks in advance







at com.test.wdp.InternalChangeFilesystemRolesView$RoleElement.setRemark(

at com.test.V.wdDoInit(