on 12-13-2005 12:09 AM
Hi all -
This is my first Web Dynpro, so I'm sorry if the question is silly. I am trying to set an input field on my view to required, and so within the properties I have changed the state from normal* to required. This will put a red asterisk next to the label for the Input Field, to show it is required! However, if left blank, nothing happens - it processes as normal.
Do I have to build the error handling in myself for when the required field isn't populated? This simply struck me as something that I would think would be provided within standard Web Dynpro functionality, but it appears it isn't, or I'm doing something incorrectly.
If any could offer any advice, I'd greatly appreciate it. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Abigail,
As far as it your first post on SDN forums, please read this https://www.sdn.sap.com/irj/sdn/crphelp
VS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi abigail
Go the web dynpro explorer there u have dictionary.u create a simple data types.
In the simpletype u select definition tab.
*select build in type as string
*Then set the maximum and minimum length(give minimum length as 1)
map this simple type to the value attribute of the input field .
It will automatically throws message when u not given value to input field
hope this help u better
Regards,
Arun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
In the message pool give the required message u wanted to be displayed and give the message type as error.
In the view controller create a method with return type Boolean
In the implementation of ur view controller give the following code
public boolean <method name>( )
{
IWDMessageManager mesMgr =
wdThis.wdGetAPI().getComponent().getMessageManager();
if (wdContext.current<nodename>Element().get<attribute name>() instanceof String) {
return true;
}
else {
mesMgr.reportContextAttributeMessage(
this.wdContext.current<nodename>Element(),
this.wdContext.node<nodename>().getNodeInfo().getAttribute("<att. name>"),
IMessage<component name>.DESIRED_NAME,
null,
true);
return false;
}
}
Hope this helps u.
Regards,
Rathna.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.