cancel
Showing results for 
Search instead for 
Did you mean: 

reset or delete input

Former Member
0 Kudos

Hi!

Do you know I possibility how I can reset all the

input fields which are filled out.Kind of reset input values.

regards

sas

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Use

wdContext.node<Your Node>().invalidate()

else

create a custom function that takes a node name as param and iterate through the atttibutes and set them to null;



*Sample code not tested*

private void clearAll(IWDNode node)
  {
	  Iterator itr = node.getNodeInfo().iterateAttributes();
	  while(itr.hasNext())
	  {
		  IWDAttributeInfo attributeInfo = (IWDAttributeInfo)itr.next();
		  if(!node.isEmpty())
		  {
			  for(int x=0; x < node.size(); x++)
			  {
				  node.setLeadSelection(x);
				  node.getCurrentElement().setAttributeValue(attributeInfo.getName(), null);
			  }
		  }
		  
	  }
  }

regards

Ayyapparaj

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Put a button .

OnAction put the code

wdContext.node<ur>.current<ur>Element.set<ur>Attirbute(""); for String

for Other data type

wdContext.node<ur>.current<ur>Element.set<ur>Attirbute(null);

Regards

Akshaya

Former Member
0 Kudos

if context attributes are under some value node,

just invalidate the node

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

otherwise, set every individual attrubute to blank or zero.

wdContext.currentContextElement().set<>attribName("");