on 02-01-2008 6:54 AM
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....
Hi,
Create a custom method and invalidate all context nodes which are bound to the UIelements.
Ex:
wdContext.node<Yournode>().invalidate();
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
}
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;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.