on 02-03-2013 11:34 PM
Hi All,
I have created 3 select options.
I have created 2 radio buttons show and Hide. On the Hide button all the select option should get hidden.
When I click on Hide Radio button, the error is 'Could not find attribute - Shipping' . Where 'Shipping' is an UI of type 'viewcontainerUIElement' type element.
I guess it might be due the UI element is not bind. But in UI 'viewcontainerUIElement' there is no Binding concept only.
Thanks in advance.
Thanks and Regards
Rajender Patyal
Hi Rajender,
For hiding any UI element try the following steps.
1. Declare a context attribute of type WDUI_VISIBILITY
2. Bind the attribute with the visibility property of the UI elements which you want to hide or show.
3. in the coding set this attribute value to 2 or 1 for hiding or showing the particular UI element.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Follow the instructions provided by Nihar. Bind the visibility property for ViewContainerUIElement to the context attribute "VISIBILITY" ( of type WDUI_VISIBILITY).
On the OnSelect action of Radio button, set the value of above context attribute.
DATA : lv_visibility TYPE wdui_visibility.
**if radio button for Hide Selected **
lv_visibility = '01'. "Hide.
**if radio button for Show Selected **
lv_visibility = '02'. "Show.
wd_context->set_attribute(
EXPORTING
value = lv_visibility
name = 'VISIBILITY' ).
Regards, Vinod
Hi Rajendar,
Rajender Patyal wrote:
Hi
Below is the piece of code I have written.
Where
Lo_el_radio_node_1 - type - if_wd_context_element
Attribute Name - 'Agent_1' is UI 'viewcontainerUIElement'.
Is your attribute 'AGENT_1' present inside the context structure or this is the UI element name u r passing.
The error which you have mentioned generally comes when at run time any attribute is niot found inside a context structure.
Take a attribute inside your node of type 'WDY_BOOLEAN' and bind it with 'Visibility' property of your view container. Set the value of this attribute from any action
& method as suggested by Vinod .
Regards,
Monishankar Chatterjee
Hi Vinod,
Thanks for the reply. Problem is solved. But I am facing problem while enabling and disabling select options
I have created 2 select options and 2 Radio buttons.
Radio button
1.
2.
select option
A.
B.
The requirement is if I select radio button 1 A should be enable and B disabled. and vice versa.
I have created a an attribute ENA with Wdy_Boolean and bind to the enale properties of the select options to the Node.
I have written the below code on the action of the button lv_enable = 2 or 1
lv_enable = 02.
wd_context->set_attribute(
EXPORTING
name = 'ENA'
Value = lv_enable
).
Thanks.
Since your requirement is to show/hide specific select-options, this solution will not work as select-options are created using re-usable component WDR_SELECT_OPTIONS. You may have to toggle between remove_selection_screen_item/add_selection_field methods of interface if_wd_select_options.
Regards, Vinod
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.