on 02-26-2015 6:35 PM
Hi Experts,
I have an application where, when i click on SAVE button...Error Message is getting displayed and when i click it again...its allowing me to save the application....
scenario : 1
I need to grey out(disable) the SAVE button whenever , error msg getting displayed....
Scenario : 2
Else, whenever error message getting displayed...SAVE action shoukd not take place...
Can u suggest an idea to achieve the same ....
Regards,
Karthik S
Hi Karthik,
create context attribute of type WDY_BOOLEAN and bind it to the ENABLED property of the save button. When error message is displayed, set the attribute to space.
But you haven't explained, when the button will be enabled again? You should also care about this. Otherwise it remains disabled after the first error message displayed.
Regards,
Dennis
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Karthik,
you can simply do this by using data binding.
Follow these steps:
- create attribute e.g. SAVE_BUTTON of type WDY_BOOLEAN in the component controller context
- map this attribute into your view controller
- go into layout, select your save button and bind the property ENABLED to your attribute SAVE_BUTTON
- whenever your error occurs set the context attribute to blank (button will be disabled)
- to activate the button set the attribute to X
Setting the context attribute can be done via wizzard.
Best regards,
Dennis
Hi Dennis,
When the Save button is pressed, Error message gets displayed ...then as per my code "Save button gets greyed out ."
Error Message is thrown from the BAPI in the application ...
when i delete that particular Line item...again i need to Enable that SAVE button ...
Can u suggest an idea on it ...
I have attached the screen shot for referenc ...
When
Regards,
KArthik S
Hi,
that's what I meant in my first post: take care to enable the button again.
So, from your screenshot I assume you use the Webdynpro ALV and the delete button is standard ALV action.
My approach:
In our first applications we cared about enabled/disabled buttons, too.
But meanwhile we keep them enabled all the time and show some kind of message that there is nothing to save when they click on a button. It's much easier but your business has to accept it 😉
Kind regards,
Dennis
Hi,
Is your SAVE button is FPM Tool bar button or normal button?
If FPM button, which FPM framework are your using?
Thanks
KH
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Karthik,
YOu can enable/disable by binding NULL to "enabled" attribute of the button.
its also possible to setting the attribute.
CL_WD_BUTTON->SET_ENABLED ( 'X' for Enable, ' ' for disable).
Thank you,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.