on 10-06-2009 11:44 AM
Hi,
I have a one Dropdown field and 3 input fields on the view.
on selecting the value from the dropdown field, remaining field values will be auto populated.
But While processing the Onselect event for the dropdown field, user is able place the cursor in the remaining finput fields which needs to be avoided.
I need to make the screen to be grayed out while processing the on select event.
That means, on selecting the value from dropdown , below three things should happen.
First: screen should grayed out
Second: values for the remaing fields should fetch
Third: After fetching the values for the remaining fields, screen should enable.
Please help me to achieve this.
Thanks & Regards
Warun.
if the other 3 fields under any transparaent container/Group , u cn bind ur transparent container/Group to WDY_BOOLEAN and cn proceed as depicted above , it shud help
regards,
amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Are the other 3 fields under any transparaent container(TCO)/Group.
If they are not there, keep them under the Group/TCO.
Create a context attribute for the ENABLE type wdy_boolean
Bind this to the TCO, ENABLE property of the Inout fields.
First instance set the ENABLED as false.
On the dropdown event, change this attribute value to true inorder to enable the TCO/Group and also set the attribute
values to which the Inputfield's value property is bound.
Hope this is clear.
Regards,
Lekha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
bind ur input fields and/or other UI elements to a context attribute of type WDY_BOOLEAN for this.
NOw in the method "ONaction event " , u set the input fields to ' '
DATA lo_nd_cn_input TYPE REF TO if_wd_context_node.
DATA lo_el_cn_input TYPE REF TO if_wd_context_element.
DATA ls_cn_input TYPE wd_this->element_cn_input.
DATA lv_ca_gddb LIKE ls_cn_input-ca_gddb.
* navigate from <CONTEXT> to <CN_INPUT> via lead selection
lo_nd_cn_input = wd_context->get_child_node( name = wd_this->wdctx_cn_input ).
* get element via lead selection
lo_el_cn_input = lo_nd_cn_input->get_element( ).
* get single attribute
lo_el_cn_input->set_attribute(
EXPORTING
name = `CA_GDDB`
IMPORTING
value = ' ').
here ca_gddb is ur context attribute under the node cn_input. U cn read the attribute using code wizard by pressing CNTRL + F7
and selcting the radio button read context att/node
after the values are fetched ( for indicator or flag for this u can make a attribute of type NUM under ATTRIBUTES tab and set its value to 1, suppose u set it to 0 initially )
thn u can enable ur fields , so tht user cn change it accordingly
* get single attribute
lo_el_cn_input->set_attribute(
EXPORTING
name = `CA_GDDB`
IMPORTING
value = ' X').
by making the attribute value 'X'
I hope it shud help
rgds,
amit
Edited by: amit saini on Oct 6, 2009 12:53 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks for the quick reply.
But my issue is not just making the fields input disabled..
I need all the below three things to be happened simultaniously on single action.
First: screen should grayed out
Second: values for the remaing fields should fetch
Third: After fetching the values for the remaining fields, screen should enable.
Basically the moment user selects (ONSELECT event triggers) a value from the dropdown, entire sceen should grayed out till the ONSELECT event processing completes then again enable the screen once the process completes.
Actually there is huge code on 'ONSELECT' event which is taking time to execute.
While execution screen should grayed out and after completing the execution again screen should enable.
This requirement is just to make the user feel that some processing is happening.
Thanks & regards
Warun.
This functionality is deep in the rendering framework of WDA and you really shouldn't try to change anything at that level. During the Wait Icon, no field input is possible - so the data integrety is safe. Do you only want to protect against the cursor positioning? If so you could try setting the focus during your server event.
Hi Thomas,
I guess focus will place the cursor on the mentioned UI element. If I am right this will not help me.
Its allowing to move the cursor, even if we use the focus technique.
Please correct me if we can avoid moving the cursor to other UI elements using focus technique.
Thanks for the patience
Thanks & Regards
Warun
The set foucs method should trigger JavaScript to fire on the client side after the server event is complete. This is after the wait icon is gone. Are you wanting to stop them from ever setting the focus on these fields? Or are you saying that the set focus simply isn't working? Have you tried to set the focus to a different field without manually changing the focus during the event just to make sure your set focus logic is working?
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
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.