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

I need to add a validation for a Particular value in Drop down Key.

1)

Requirement :

If user has selected a particular value then a pop-up should be initiated.

Ex : APPLE, ORANGE, GRAPE

I have wriiten the code to initiate pop-up message but i need to restrict for a particluar/ specific value.

Ex : Pop-up should be initiated only if User selects "APPLE".

2)

Is there a way that we can write a validation,

Ex : IF last value in a given input is numeric it should raise an error mesage?

Ex : CHAT - Is the correct way

CHA1 - This value should be validated saying that 'It is inavled value, kindly select correct value.'

In a given input if the last value is numeric then it should display an error message.

How can i write the IF conditions for the above two scenarios.

I am using NWDS 7.0

Any suggestions will be appreciated!

Thank you!

Best Regards,

KC

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Dec 17, 2012 at 10:54 AM

    Hi Krishna,

    1) you can get the value of selected element of the context that is binding in your drop dowm component when you select some value in drop down. To do this you need to create an action and bind this action in onSelect Event in WebDynpro. When the value is selected, the current element of the binding context of drop down will be change.

    To get the value of the selected context: wdThis.current<NAME OF CONTEXT ELEMENT>Element.get<ATTRIBUTE>(), for example wdThis.currentFruitElement.getFruitName().

    So, with this value you can use IF state to define the process.

    2) you can use a regex of java api to verify the pattern of the value.

    Regards

    Marcos

    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.