Skip to Content
author's profile photo Former Member
Former Member

To clear the fields

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....

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Feb 01, 2008 at 06:59 AM

    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;

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 01, 2008 at 07:06 AM

    Hi,

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

    Ex:

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

    Regards

    Ayyapparaj

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

      }

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.