on 11-14-2006 8:08 AM
Hi
I've searched for a long time now and have not been able to come up with an answer.
Have SAP made the terrible design mistake or did they forget to include some sort of dynamic attribute removal? (rhetorical question - do not answer )
As it seems there are a ton of ways to add nodes and attributes to any given context node using node.getNodeInfo().add...(); however one would expect a ...getNodeInfo().removeAttribute(attributeName) and a ...getNodeInfo().removeChild(childID)
I mean the IWDTable contains a destroyAllGroupedColumns() which effective cleans it up.
And now for the question:
Is there any other way around this than to make a custom controller an re-instantiate it, manually mapping the rest of the context, when mapping removal is needed?
Best regards
Thomas.
Hi Thomas
You can only remove all attributes or child nodes was added dynamically before.
wdContext.getContext().reset();
or
wdContext.getContext().reset(boolean clear);
Below is info from WebDynpro Javadoc regarding the method:
<i>public void reset(boolean clear)Conditionally resets the context to its initial state. By setting the clear parameter to false, data in node collections created at design time will be preserved. All dynamically added nodes and attributes are destroyed from the metadata.
Calling reset(true) is functionally equivalent to calling reset().
The same warning given for method reset() about mapped or bound nodes and attributes also applies to reset(boolean clear).
Parameters:
clear - Whether the data shall be cleared before cleaning the metadata</i>
BR
Sergei
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.