on 06-26-2006 9:53 AM
Hi all,
I have created a recursive Web Dynpro Tree as described in the document 'Constructing a Recursive and Loadable Web Dynpro Tree'.
However I have the following problem:
In the view-designer I created a action (in the action tab). I named the action 'LoadToolChildren'. (I could not use 'LoadChildren' because this action already exists for another Web Dynpro Tree).
The method I have implemented look as follows:
//@@begin javadoc:onActionLoadToolChildren(ServerEvent)
/** Declared validating event handler. */
//@@end
public void onActionLoadToolChildren(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, com.asml.tpd.distribution.components.wdp.IPrivateBomTableView.IToolTableElement element )
{
//@@begin onActionLoadToolChildren(ServerEvent)
String nc12 = element.getNC12();
TypedBom typedBom = wdThis.wdGetTPD_DistributionController().getBom(nc12);
addToolChildren(typedBom.getBom(), element);
IPrivateBomTableView.IToolTableNode node = wdThis.wdGetContext().nodeToolTable();
node.setTreeSelection(node.getElementAt(0));
//@@end
}
However, no matter what I try, I always get a nullpointer because the parameter element seems to be null.
I have no idea how this is possible, I checked every property but everything seems to be fine.
Can somebody please help me on this, I have been stuck on this for three days now!
Regards,
Harm de Laat
Did you define an event parameter mapping for the IWDTreeNodeType.onLoadChildren event?
Something like
wdDoModifyView(...)
{
if (firstTime)
{
IWDTreeNodeType nodeType = (IWDTreeNodeType) view.getElement("<ID-of-node-type>");
nodeType.mappingOfOnLoadChildren().addSourceMapping
(
"path", /* name of event parameter */
"element" /* name of action parameter */
);
}
}
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
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.