cancel
Showing results for 
Search instead for 
Did you mean: 

I want to remove a dynamic node

sebastin_alvarez
Participant
0 Kudos

Hi, i did a dynamic node, with attributes, and it works fine, but if i return to the main page of my application, when i go to the page that have the dynamic node there's an error.

The error is:

com.sap.tc.webdynpro.progmodel.context.ContextException: DataNodeInfo(CuadroComparativo.nodeCuadro): unknown child node PRECIO0

I created the node of this way:

IWDNodeInfo nodeCuadro = wdContext.getNodeInfo().addChild("nodeCuadro", null, true, true, true, false, false, true, null, null, null);

And attributes

nodeCuadro.addAttribute("GJAHR", "mx.com.cablemas.concursos.model.types.Gjahr");

I tried to use

wdContext.getContext().reset();

wdContext.wdGetAPI().reset();

But i have the same error, please, i do not know what more can i do... if somebody has some suggestion, I would be thanked for it.

Thanks, Sebastiá

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

The following code deletes all the dynamically created nodes and its attributes,


wdContext.getContext().reset();

If that didn't work, then try,


if(table != null)
{
table.removeAllColumns();
table.destroyAllColumns();
table.destroyHeader(); 
} 

wdContext.getContext().reset();

In wdDoModifyView, write this,


view.resetView();

Hope this helps!

Regards

Kishan

Edited by: kishan chandranna on Dec 30, 2008 6:16 AM

former_member192434
Active Contributor
0 Kudos

Hi

try to implement reset() method on IWDContext

like IWDContext.reset();

Thanks

PradeepBondla
Active Contributor
0 Kudos

Hi,

To remove the dynamically created node use

wdContext.getContext().reset(true);

reset() drops only dynamically created attributes/nodes, but does not affect attributes/nodes created at design-time in IDE.

useful threads...

[Thread: How to delete dynamically created attribute |;

Check the velary's comments / solution in below thread, saying

wdContext.reset(false);

[Thread: dynamic removing of Value Nodes |;

[Thread: How to remove node attributes dynamically? |;

PradeeP

sebastin_alvarez
Participant
0 Kudos

Thank you very much, but i already tried it, and do not work for me, i think i am doing something wrong.

On the action of the button that back to the main page i wrote:

wdContext.getContext().reset(true);

wdContext.wdGetAPI().reset(true);

But the problem persist : (

I do not know what to do...

PradeepBondla
Active Contributor
0 Kudos

Hi,

Did you tried as velary suggested in following link?

https://www.sdn.sap.com/irj/scn/thread?messageID=699364

i.e.

The only way is to completely reset context:
wdContext.reset(false);

This will remove all dynamically created nodes / attributes. You have to recreate structure afterwards (obviously, without node you were actually "removing")

PradeeP