on 04-01-2009 4:57 PM
New to Java web dynpro. I have a web dynpro component which is embedded in portal. This component is a step of series of steps there. Now I want to validate a field of this component to see whether it is not empty or not. What do I have to do? There is no action in the view of the component controller like button clicked or something else similar. Any help appreciated. Thanks!
Hi,
If you are doing that in ESS webdynpro then you need to do that in OnFlush() function for validate in the component controller..
Otherwise let me know what validation you want.If it is input field then u can validate using onEnter property of input field.
Thanks
Kanai
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I got the answer, thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Assume you have node "A" which has attribute "name"
create a Simple type expand u r project-> Dictionories->data types-> Simple Type
and specify max and minimum length if you need to perform validation on length.
go to the properties of context attribute "name" and select type as simple type that you created.
Then perform null value validation in submit.
Object attributeValue = wdContext.nodeA().getCurrentElement().getAttributeValue("Name");
int length = (attributeValue == null) ? 0 : ((String)attributeValue).length();
if (length == 0) {
wdcompoentAPI.getmessagemanager.raiseException( "Name should not be blank",true);
}
Regards,
Sandeep Reddy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What kind of validation you want to do?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
you have the onEnter property for the input filed right there u can write your validations.
and also your question is not clear, please make it clear,
Cheers,
Appu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks! In normal Wed Dynpro component we have action when we click button or do whatever on the view then we can validate user input based on that action. Now it is special web dynpro component which is embedded in portal. We have no action to validate. I tried to figure it out to put validation code into post processing event. Is it the right place to put the code?
Hi,
Your Question is not clear..
What i understood is that u have an Input Field in your View and you need to wrie a validation for that..?
If that is the case, Go to the properties tab of the Input Field and there you can seee an OnEnter action.
Create a new action here and write your logic under this action
Jithin
User | Count |
---|---|
85 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.