on 03-01-2007 8:59 AM
Hi All,
i am developing WDA application. i have requirement as when user will select the option from dropdown box (Cust type) and if it is B (say Business) then and then only i have to show two inputboxes. and if again he chooses anothe option i have to make them invisible. do i need to use Invisble UIelement? could you please help me regarding this problem.
Thanks in advance.
Chandra.
Hi.
Another way would be to bind the visible property of these inputfields to a context
attribute of type WDUI_VISIBILITY.
In your action handler you would just set this attribute to 1 for invisible or 2 for
visible in the context regarding the selected value of the dropdown box.
Cheers,
Sascha
Message was edited by:
Sascha Dingeldey
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Below is the code,
method ONACTIONDISPLAY_BUSINESS .
DATA:
node_cust_type TYPE REF TO if_wd_context_node,
elem_cust_type TYPE REF TO if_wd_context_element,
stru_cust_type TYPE if_customerview=>element_cust_type .
navigate from <CONTEXT> to <CUST_TYPE> via lead selection
node_cust_type = wd_context->get_child_node( name = if_customerview=>wdctx_cust_type ).
get element via lead selection
elem_cust_type = node_cust_type->get_element( ).
get all declared attributes
elem_cust_type->get_static_attributes(
IMPORTING
static_attributes = stru_cust_type ).
DATA:
elem_context TYPE REF TO if_wd_context_element,
stru_context TYPE if_customerview=>element_context ,
item_business_name1 LIKE stru_context-business_name1.
"type WDUI_VISIBILITY
get element via lead selection
elem_context = wd_context->get_element( ).
get single attribute
elem_context->get_attribute(
EXPORTING
name = `BUSINESS_NAME1`
IMPORTING
value = item_business_name1 ).
case stru_cust_type-value. "Value of the Dropdown
when 'B'. "Business then Show
item_business_name1 = 02.
when 'I'. "else do not show
item_business_name1 = 01.
endcase.
endmethod.
Hi,
you should design the layout with the two inputfields, but with the attribute visible on false.
when you have your event, you can handle it like this:
first of all get your instance of the view in wddomodifyview as an attribute
in the action handler, get the static attributes:
selected_element_dropdown = wd_event->get_context_element( 'CONTEXT_ELEMENT' ).
selected_element_dropdown->get_static_attributes( importing static_attributes = ls_structure ).
case ls_structure-key.
when 'needs to be visible'.
lo_inputfield = wd_this->m_view->get_element( 'is fof inputfield' ).
lo_inputfield->set_visible( abap_true ).
when 'needs to be hidden'.
lo_inputfield = wd_this->m_view->get_element( 'is fof inputfield' ).
lo_inputfield->set_visible( abap_false ).
endcase.
grtz
Koen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.