cancel
Showing results for 
Search instead for 
Did you mean: 

Remove Value Attributes from a Value Node Dynamically

Former Member
0 Kudos

Hi All,

I had created a node in design time and created value attributes of the node dynamically.The requirement is to remove the value attributes that were created dynamically.Can anyone please help me to solve this requirement.

Thanks in Advance.

Regards,

Jude.

Accepted Solutions (1)

Accepted Solutions (1)

susmita_panigrahi
Active Participant
0 Kudos

Answers (2)

Answers (2)

former_member192434
Active Contributor
0 Kudos

Use this code to reset the attributes.

boolean hasAttr = false;
  for (Iterator iter = wdContext.nodeResultSet().getNodeInfo().iterateAttributes(); iter.hasNext();) {
  hasAttr= true;
  break;
}
  if(hasAttr == true)
  {
     wdContext.nodeResultSet().getContext().reset();
  }

Hope it will help

Thanks

Former Member
0 Kudos

Hai Anup,

Thanks a lot for your suggestion.

Its working , but instead of resting single node attribute it resets all the context attribute of a view.

Thanks,

Krish

Former Member
0 Kudos

Hai Anup,

Thanks a lot for your suggestion.

Its working , but instead of resting single node attribute it resets all the context attribute of a view.

I need to reset only one node attribute ,not each every context attributes under a view.

How can i...

Thanks,

Krish

former_member192434
Active Contributor
0 Kudos

That's bez for loop is running and getting every value of the node, remove the for loop and Iterate single value and reset it

Former Member
0 Kudos

Hi All,

I thank everyone for your posts.I got my requirement done.

thanks to all once again.

Regards,

Jude

Former Member
0 Kudos

To delete all the attributes created dynamically

wdcontext.node<urnode>().reset(False).

it will delete all the attrbutes created at runtime.

to delete attrbutes created at designtime use.

wdcontext.node<urnode>().reset(True).

Thanks

Avik

Former Member
0 Kudos

Hai Avik,

Me too have a same task.

I have created a table and assigned a value attribute for each columns at run time.

Now, i need to remove the created attributed and need to create a new one at run time on button action .

how can i achive this.

i tried your code sample

wdcontext.node<urnode>().reset(False).

but i shows an error

wdcontext.nodeTableNode().reset(False).

.reset(false) as undefined method.

I am using NWDS7.0.15, can u suggest me some other code ....

Thanks

Krish.

Former Member
0 Kudos

Hai Avik, Susmita and Anup,

Superb yar,

Thanks a lot people,

My problem solved and your suggestions working very well.

I tried the code

wdcontext.node<urnode>()..getNodeInfo().getcontext().reset(False).

Thanks and regards,

Krish.