on 04-14-2010 4:53 PM
Hi Friends,
I have one doubt in Validation. When Click on u201CActionSearchViewDemandForeCastu201D
This Button I want some error Message in FV.
So I have to develop Some code but it is not working. Pls give any help.
This is Validation Method
public void Validation( )
{
//@@begin Validation()
IWDMessageManager manager = wdComponentAPI.getMessageManager();
String Bucket = wdContext.currentYmm_Sc_Bapi_Dmndstk_Getlist_InputElement().getP_Bucket();
manager.reportSuccess(" Bucket = " +Bucket);
if( Bucket == null && Bucket.equals(""))
{
// manager.reportSuccess(" Please Enter id ");
//manager.reportException(" Please enter id ",true);
manager.reportMessage(IMessageCom_ViewDemandForeCast.BUCKET,null,true);
}
This Validation Method I was called to Search Method
i.e
public void onActionSearchViewDemandForeCast(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onActionSearchViewDemandForeCast(ServerEvent)
//$$begin ActionButton(-1313177891)
wdThis.Validation();
wdThis.wdGetCom_ViewDemandForeCastController().executeYmm_Sc_Bapi_Dmndstk_Getlist_Input();
//$$end
//@@end
}
But I m not getting error message when click on Search Button
Req: I want to display error message when click on Search button
Reagards
Vijay Kalluri
Hi Vijay,
Check this line in your code:
if( Bucket == null && Bucket.equals(""))
The Bucket string can never be null and equal to an empty string. I think you want an OR here instead of the AND.
-Greg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vijay
Please print the value of the Bucket
If it null or empty that causing the problem than try with and check the logic what yuu wanted to do exactly
if( Bucket.equals(null)) && Bucket.equals(""))
Hope it helps
Regards
Arun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.