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

Validation for DropDown Box

hi,

I want to do validation for dropdownbox. What I have done:

public void checkSelected(java.string.fieldName)

{

Print Message from Message Pool.

}

onActionsubmit()

{

checkSelected(IPrivateView.IMaritalStatusElement.Value)

checkSelected(IPrivateView.IBloodGroupElement.Value)

}

How can I pass node dynamically so that this single method"checkSelected" works for two DropDownbox?

Please help me...

Regards

Manish

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2008 at 06:59 AM

    Hi,

    You can't. There are 2 dropdownboxes and both are mapped with two different attributes, so you need to make a call to checkSelected(java.string.fieldName)

    two times.

    thanks & regards,

    Manoj

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi manish,

      take the refference of ur DropDownByIndex in wdModifyView. at runtime map an action event using mappingOfAction method. take 2 different event id's for different ddBoxes. pass that event id at runtime to event handler.

      u can check dynamic binding of events ,in case u want any calrification

      regards

      Sumit

  • author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2008 at 07:20 AM

    Hi,

    use as follows

    public void validate(IWDNode node, String attrName)

    {

    // To access a value

    node.getCurrentElement().getAttributeValue(attrName);

    //To get attrinfo

    node.getNodeInfo().getAttribute(attrName);

    }

    invoke the above function

    validate(<YourNode>,<Your Attribute part of 1param node>);

    Regards

    Ayyapparaj

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 29, 2008 at 05:19 PM

    Hi Manish, i explained how to do that here

    [Dynamic validation regardless UI element.|;

    Check my post at the bottom.

    Regards

    Julio César Herrera

    Add a comment
    10|10000 characters needed characters exceeded

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.