cancel
Showing results for 
Search instead for 
Did you mean: 

how to empty a node under Java Web Dynpro?

Former Member
0 Kudos

Hello,

I want to empty a node in the controller, I tried several attempts to do so, but no attempt is good.

I would like to know if someone already met this problem? If yes, please give me the solution.

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

If your node is a value node then invalidate() will work.

If your node is a model node then for clearing the node, you have the create object of particular model class and bind it to the context node Or remove elements from the model node.

Regards,

Amol

Stefan-EA
Contributor
0 Kudos

>

> Hello,

> I want to empty a node in the controller, I tried several attempts to do so, but no attempt is good.

> I would like to know if someone already met this problem? If yes, please give me the solution.

Take a look at this [thread|;.

Former Member
0 Kudos

hi...

U can try

wdContext.node<node name>.reset()

node will lose its data...

jaya

Former Member
0 Kudos

I have testes the method reset() but does not exist on Web Dynpro Java;

Momo

Former Member
0 Kudos

Hi,

The invalidate() method for node should work to clear the nodes element collection.

else we can set "" to each context attribute in a node.

If your node cardinality is 1..1

wdcontext.current<nodeelement>().setname("");

if your node cardinality is 0..n

for (int i=0;i<wdcontext.node<nodename>().size();i++)

{

wdContext.node<nodename>().get<node>ElementAt(i).setname("");

}

Regards,

Bala Baskaran.S

Former Member
0 Kudos

Hi,

I already tested it but this attempt does not work.

for (int i=0;i<wdcontext.node<nodename>().size();i++)

{

wdContext.node<nodename>().get<node>ElementAt(i).setname("");

}

Edited by: Groupement Integrateur Syclade Deux on Mar 18, 2011 2:19 PM

Former Member
0 Kudos

Hi,

To empty the nodes element collection, you can use the code

wdContext.node<nodename>().invalidate();

Regards,

Bala Baskaran.S

Former Member
0 Kudos

Hi,

I thank you for the reply but I already tested it but this attempt

does not work, Please give me if you have another solution!