on 08-31-2012 8:15 AM
Hi,
How can i set an action on On Enter for all the attributes dynamically?The attributes are created statically only.
Lavanya,
for input field, we can assign an event/action to that..
if it is new dynamic InputField,
refer CL_WD_INPUT_FIELD class, method NEW_INPUT_FIELD-ON_ENTER(parameter)
If it is Static, already created InputField..
CL_WD_INPUT_FIELD - Method - MAP_ON_ENTER or SET_ON_ENTER
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Iavanya,
You cannot give all UI elements an onEnter event since only certain elements have this event. UI elements have only specific events for certain key presses. For example, InputFields have an event onEnter for when the ENTER key is pressed. But not every UI element and not every keyboard key has a corresponding event that can be triggered.
If you want to give your InputField elements onEnter events, the events don't need to be created dynamically. You can assign the same event or a different event to the fields, then in the action handler method for the event you can perform whatever logic you need.
Cheers,
Amy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Iavanya,
Yes, it is possible and the approach given by Chengalarayulu should work for you. I wonder though why you need to create the events dynamically? You could statically assign the onEnter events to each InputField and then do your logic for how to handle the event in the action handler method. The action handler method can even choose to do nothing with the event if that is one of your scenarios.
Cheers,
Amy
Hey Lavanya,
Why do you need to bind onaction methods to ui element Dynamically?
Can you elaborate a little bit more, so that i can think about your problem and can give you best solution as per my knowledge.
thanks
Abhishek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Lavanya,
I don't think so it's possible in Webyndpro for ABAP , Event triggering parts are already handles by Frame work and OnAction Events ( like..Modify , Init etc.. ) will be called automatically.
If you need a code on Enter event try putting the code inside the WDMODIFY method.
Thanks
~Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.