cancel
Showing results for 
Search instead for 
Did you mean: 

To clear the fields

Former Member
0 Kudos

i have different groups and input fields inside that in my application i want to clear all the input fields which entered by the user on a single reset button.

how can i do this please help me .

will give pooints to helpful answers....

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Create a custom method and invalidate all context nodes which are bound to the UIelements.

Ex:

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

Regards

Ayyapparaj

Former Member
0 Kudos

public void resetmethod( )

{

//@@begin resetmethod()

try

{

wdContext.currentContextElement().setFirstName(null);

wdContext.currentContextElement().setLastName(null);

wdContext.currentContextElement().setDOB(null);

wdContext.currentContextElement().setGender(null);

wdContext.currentContextElement().setEmailid(null);

wdContext.currentContextElement().setAddress1(null);

wdContext.currentContextElement().setAddress2(null);

wdContext.currentContextElement().setCity(null);

wdContext.currentContextElement().setPhoneNumber(null);

for(int i=0;i<wdContext.nodeSk().size();i++)

{

wdContext.nodeSk().getSkillSetsElementAt(i).setab(null);

wdContext.nodeSk().getSkillSetsElementAt(i).setbc(null);

wdContext.nodeSk().nodeKeyNode().getKeyNodeElementAt(i).setdc(null);

}

for(int i=0;i<wdContext.nodeEdu().size();i++)

{

wdContext.nodeEdu().getEducationElementAt(i).setA(null);

wdContext.nodeEdu().getEducationElementAt(i).setB(null);

wdContext.nodeEdu().getEducationElementAt(i).setC(null);

}

}

catch(Exception e)

{

wdComponentAPI.getMessageManager().reportException("Exception onActionReset "+e, true);

}

//@@end

}

Former Member
0 Kudos

Hi..,

if you have the fields bound to a single node..then just give

wdcontext."nodename".invalidate();

otherwise to set particular fields to null, wdcontext."nodename".current"nodeElement".setAttributevalue = null;