on 09-08-2011 3:47 PM
HI !
I have query that i have one drop down in screen, which is working fine. I have to retrieve table depends on the drop down value. The table should be displayed after the drop down value selected. Any one guide me with necessary screens and code to acheive this.
Thanks in advance
indiranjithn
Fairly easy to do.
The drop down control has an event called 'onSelect'. Create an action and assign that event property to the created action. In the action, you can put whatever code you like.
For your problem perhaps binding the table visibility to a context attribute and then setting that attribute value to if_wdl_core=>visibility_visible or if_wdl_core=>visibility_none based on input might do the trick.
There are quite a few ways you could do this, but the most important detail for you to resolve is setting up the event handler for the drop down control.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Indiaran,
You want to display Table when select value from dropdown right??
Create Transparent Container and place your table in TC.
Create one attribute say VISIBILE of type WDUI_VISIBILITY and bind this attribute to Transparent containers visible property.
And in onaction of Dropdown use set_attribute.
* set single attribute
lo_el_context->set_attribute(
name = `VISIBLE`
value = '2' ). // 2 for visible, 0 - none.
Cheers,
Kris.
hi sir,
I think this will be working, i did what you suggested me but i am getting run time error like could not find visible attribute .
I have created one attribue in component controller context but i could not drag and drop to the view context to bind that attribute.
And also tried like this i have created one node and added visible attribute and binded that attribure to Transparent container.
But no use the same dump getting. Please suggest me how to create attribute to bind in TC.
Thanks
Indiranjithn
hi
i have created attribute in view context and did binding. But the same dump could not find the attribute VISIBLE. I just debug my program it got dump while it excutes the code
context_node->set_attribute(
name = `VISIBLE`
value = '2' ). "// 2 for visible, 0 - none.
Please help me to solve this problem.
Regards
indiranjithn
Edited by: indiranjithn on Sep 9, 2011 9:36 AM
Hello Indiranjithn,
in which context node did you create the attribute. Did you create it directly under the CONTEXT node (Root node)? if so then you need to get the context element of this node and then call set_attribute
data lo_el_root type ref to if_wd_context_element.
lo_el_root = wd_context->get_element( ).
lo_el_root->set_attribute(
name = <NAME OF THE CONTEXT_ATTRIBUTE IN UPPER CASE>
value = '2' ). 2 for visible, 0 - none.
BR, Saravanan
Hi,
Create attribute under view context. attribute name 'VISIBILE' of type WDUI_VISIBILITY.
and add this code to your dropdown onaction.
DATA lo_el_context TYPE REF TO if_wd_context_element.
DATA ls_context TYPE wd_this->Element_context.
DATA lv_visible TYPE wd_this->Element_context-visible.
* get element via lead selection
lo_el_context = wd_context->get_element( ).
* set single attribute
lo_el_context->set_attribute(
name = `VISIBLE`
value = '2' ). // 0 - for none
Cheers,
Kris.
hi
I just generated the code through code wizard so i got the same code. But the result is Could not find attribute VISIBLE .
Can u just suggest me the Transparant container should be binded with the attribute VISIBLE, if so i did the same . What about table properties?...
Thanks in advance
indiranjithn
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.