Skip to Content
avatar image
Former Member

Checking All mandatory Input fields .

Hi All,

I have a general checkMandatory function which is working fine wiht current InputFields on view.

Now, When I add another row of input fields on that form I want them also to be checked through checkMandatory function.

How can I perform this as I want them to be checked only at the click of button.

Can I iterate through all UI elements in OnAction and then do something?

Please guide!

please reply soon1

Sumit

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Mar 21, 2007 at 03:57 PM

    Hi,

    Add this code in your Action method.

    this.checkMandatory("Please enter Order ","Search_Term");

    wdThis.wdGetAPI().getComponent().getMessageManager().raisePendingException();

    // test for another input field

    this.checkMandatory("Please enter Status ","Search_Status");

    wdThis.wdGetAPI().getComponent().getMessageManager().raisePendingException();

    And this context field(Search_Status) is avail in currentContext only.

    Then it should work.

    Other post if any issues.

    thanks,

    Lohi.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 21, 2007 at 05:41 AM

    Hi Sumit,

    Check this check-mandatory-fields-dynamic-programming

    post the code in your "checkMandatory " function.

    Regards,Anilkumar

    Add comment
    10|10000 characters needed characters exceeded