cancel
Showing results for 
Search instead for 
Did you mean: 

How to make screen disable-process-enable on one single action.

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi,

Greying out...option is not there...You have to do it...through the above ways only....

Youcan use the CELLDESIGN property also...

Regards,

Lekha.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

When a server side event occurs in Web Dypnro, the framework automatically displays the waiting icon over the screen and blocks any further input. Is this not happening for you?

Former Member
0 Kudos

Hi

It is displaying the wait icon, but user can place the cursor in the other fields while processing , so user doesn't want that.

user wants the screen to be grayed out while processing.

Thanks & Regards

Warun

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

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.

Former Member
0 Kudos

Hi Thomos,

Thanks for the reply.

Can you please let me know how to set the focus on a field during the server event.

I am glad if you could provide example.

Thanks & Regards

Warun

Former Member
0 Kudos

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

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

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?

Former Member
0 Kudos

Hi,

Set focus logic is just placing the cursor on the specified field during the screen refresh.

My sample Code in WDDOMODIFYVIEW.

view_element = view->get_element( 'DROPDOWN' ).

if view_element is bound.

view->request_focus_on_view_elem( view_element ).

endif.

Thanks & regards

Warun.

Former Member
0 Kudos

Requirement is on hold for time being