cancel
Showing results for 
Search instead for 
Did you mean: 

Mandatory uielement in webdynpro

Former Member
0 Kudos

Hi experts,

can any say how can i put the symbol * for mandatory uielement (label name *)

for example : name * :...........................

Dob* :..............................

Email * :.............................

thank you,

with regards

Vijai

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

If name - -


(say InputField)

for InputField set state required.

for label set labelfor property to the corresponding InputField.

While run time you will get what you need..

Thanks..

Answers (4)

Answers (4)

Former Member
0 Kudos

Vijay,

It is quite simple. In your Dynpro View it is the Input Field that controls the appearance of the red * after the field label text in the UI Label element.

You need an Input field of type Input Field.

Note this UI element's ID as you will need to select it in the label.

1. In the UI Element <b>InputField</b> properties there is a property called <b>state</b> this should be set to required.

2. Goto the UI Label element for that field, in the Label's properties you will see a field called <b>labelFor</b> you need to set this property to the id of the Input Field that is required. Thats it.

When the application is running you will see the red * symbol next to the field. Also when clicking a button tied to an action if the checkbox 'Without Validation' on the action is is unchecked the Dynpro Framework will auto validate and generate a message saying the field is required. It also helps if you make the context element representing the Input field's value of type Dictionary-SimpleType. You can a Simple Type of any Java type with build in Field and Column labels and validation criteria.

Former Member
0 Kudos

Hi,

create the UI element and set the property "State" to required.

Then create a label and set the property "labelFor" to the required UI element.

Deploy and run the application. You will see the mandatory '*' in after the label text.

Former Member
0 Kudos

Hi Vijay,

set the property state to required.

kind regards

Stefanie

former_member186016
Active Contributor
0 Kudos

You have to bind the UI element to a attribute of data dictionary type where the mandatory flag is specified

Regards,

Ashwani Kr Sharma

Former Member
0 Kudos

Hi all,

can u give step by step procudure for binding the UI element mandatory flag

and also how to set the state pro

thank u

with regards

vijai

former_member186016
Active Contributor
0 Kudos

For setting the property Required, select ui element and simply go to properties view.There you have this setting. Set it to "required".

Regards,

Ashwani Kr Sharma

Former Member
0 Kudos

Hai,

switch to layout tab

Insert child label

Insert child input field

select label ,ui element properties label for = inputfield

Select inputfield ,ui element properties state=required.

Deploy and run the application .

Label will display as a mandatory field.

Regards,

Naga

Former Member
0 Kudos

Hi Vijay,

1. First create the InputField UI element in the required view using NWDS environment.

2. Select this UI element in the outline tab.

3. Then click on the propertiese tab at the bottom of the NWDS environment.

4. Their under element propertiese set the property 'State' to required.

5. Then create Label UI element.

6. Under the element propertiese of the lable set the property 'labelFor' to the Id of the created InputField

by choosing from the dropdown.

For more info go thorugh

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/wd%20java/wd%20tutorials/a%20simple%20input%20form%20with%20message%20and%20error%20service%20support.pdf">Link1</a>