cancel
Showing results for 
Search instead for 
Did you mean: 

disabling an table in a screen

Former Member
0 Kudos

hi,

i am working in webdynpros where i have a scenario like this.

i have only one view and in that view i have taken three transparent contaienrs and each transparetn container has a table and other transparetn contaienr has some input fiields and text view fields.Now my question is when i am testing my aplkcation for the first time i do not want all the fields to be displayed first on the screen though there are on the same view.I just want only one transparent container to be seen and then when i click on continue i shoulld see the next transparent container and after that when i fill the needed fields then continue i need to see the third container.Can you please tell me how to work with the visibility of the fields and also the containers..

Regards,

Madhuri Oruganti

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

read the filelds which r binded to WDY_BOOLEAN


*   set single attribute
    lo_el_cn_gddb->get_attribute(
      EXPORTING
        name =  `CA_GDDB`
      IMPORTING
        value = lv_ca_gddb ).

u can do it thru code wizard

IF lv_ca_gddb ID NOT INITIAL


*   set single attribute
    lo_el_cn_gddb->set_attribute(
      EXPORTING
        name =  `CA_ATTR3`
      
        value = ' 02' ).

here I am firstly reading the attribute which is binded to ur input field and if input field is filled thn , set transparent container 3 to visible , u can do in ur appropriate onAction method

I hope it helps.

regards,

amit

Former Member
0 Kudos

hi ,

proceed like this :

1 create two attributes of type WDUI_VISBILITY under the context node , say attr2 , and attr2 .

2 bind these with visible property of ur tansparent containers TC2 and TC3 .

3 u have to set the attribute to 01 to make ur UI invisible and vice versa 02 to make UI visible.

4 u have to initially make invisible ur tc2 and tc3

to set the attributes to 01 , press CNTRL + F7 , select the tab read context node/attribute , select the corresponding attribute

read it and set it to 01 , using set_attribute method


*   set single attribute
    lo_el_cn_gddb->set_attribute(
      EXPORTING
        name =  `CA_GDDB`
      
        value = ' 01' ).

u can alternatively do it like this


wd_context->set_attribute( name = '<attribute name>' value = if_wdl_core=>visibility_visible )." to make it visible.
 
wd_context->set_attribute( name = '<attribute name>' value = if_wdl_core=>visibility_none ). "to make it invisible

5 In the onaction method of ur CONTINUE button , make tc2 visible by setting the attr2 to '02'

6 *similrly proceed for transparent container 3 , u can use the attribute WDY_BOOLEAN wid ur input field .using get_attribute method , check if all fields r filled , and make ur tc3 visible*

regards,

amit

Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

1 .Create three Attributes of type wdy_boolean : lv1 , lv2, lv33.

2. Bind them to the Visibility Property of Transparent Containers

3. Now by default they will will be invisible (ABAP_FALSE)

4. On the click of button continue , set the lv2 Visible(ABAP_TRUE).

DATA lo_el_context TYPE REF TO if_wd_context_element.

DATA ls_context TYPE wd_this->element_context.

DATA lv_LV1 LIKE ls_context-LV1.

  • get element via lead selection

lo_el_context = wd_context->get_element( ).

  • get single attribute

lo_el_context->set_attribute(

name = `LV2`

value = ABAP_TRUE

).

ONCE YOU ENETER THE VALUES IN INPUT FIELD THE third transperant container must be visible.

So check if the fields are INITIAL OR NOT INITIAL AND MAKE ABAP_TRUE. .

lo_el_cvheader_info->get_static_attributes(

IMPORTING

static_attributes = ls_cvheader_info ).

IF ls_cvheader_info IS NOT INITIAL.

lo_el_context->set_attribute(

name = `LV3`

value = ABAP_TRUE ).

ENDIF.

Regards,

Priya

Former Member
0 Kudos

hi,

1.Make three Attributes of type wdui_visibility : At1 , At2, At3.

2. Bind the Visibility Property of Transparent Container with these Attributes:

TC1 with AT1 , TC2 with Att2 and TC3 with AT3.

3. Now by default set the visiblity of Att2 and Att3 as Invisiible ( 01).

4. On the click of button, set the Att2 Visible(02).

USe these Values for Visible and Invisible :

visible: none

CL_WD_VIEW_CONTAINER_UIELEMENT=>E_VISIBLE-NONE

visible: visible

CL_WD_VIEW_CONTAINER_UIELEMENT=>E_VISIBLE-VISIBLE

Refer this code :

DATA lo_el_context TYPE REF TO if_wd_context_element.

DATA ls_context TYPE wd_this->element_context.

DATA lv_att1 LIKE ls_context-att1.

  • get element via lead selection

lo_el_context = wd_context->get_element( ).

  • get single attribute

lo_el_context->set_attribute(

name = `ATT1`

value = CL_WD_VIEW_CONTAINER_UIELEMENT=>E_VISIBLE-NONE

).

Edited by: Saurav Mago on Nov 5, 2009 1:01 PM