Hi All,
I am currently generating UI elements dynamically. I have few elements in these dynamically generated elements which are mandatory. Does anyone has information about how to programmatically check whether the entries have been made before the user is allowed to proceed to the next step? I have maintained the state property of the InputField and the webdynpro application doesnot automatically checks for the entries.
Any help will be greatly appreciated.
Thanks and regards,
Hemanth
Hi Hemanth,
there are at least two ways to do this:
1. Define some simple types in the local dictionary with minLength > 0 and use this simple types as the property types of the context attributes. If you bind the UI elements to this context attributes, the WD runtime will do the checks automatically.
2. Check the contents of the UI elements with required input manually (by checking the contents of the bound context attributes). Use the report(Invalid)ContextAttribute... methods of the Message" target="_blank">https://media.sdn.sap.com/html/submitted_docs/60_sp2_javadocs/webdynpro/com/sap/tc/webdynpro/progmodel/api/IWDMessageManager.html">Message Manager API to report missing data.
Hope that helps.
Regards
Stefan
PS: The state property is just a visual indicator for required/not required fields and doesn't trigger any automatic validation.
Add a comment