on 05-25-2007 4:14 PM
Dear experts ,
I want make transaperant container visible or invisible based some boolean value .
I have gone thr' class CL_WD_UIELEMENT and CL_WD_TRANSPARENT_CONTAINER. I have found method SET_VISIBLE .
Let suppose name of my transperant container TC_COSTCENTER .Please let me know what code I have to write . Where should I write ?
I am writing it code in WD_INIT as this process is based on value that I get on boolean value which tell decide visibility of Transperant container.
Waiting for reply . Urgetly .
Points will be given surely .
Cheers
Parry
The easiest way is to Bind the property Visible to a boolean attribute of your context and fill this attribute from ABAP as needed.
Otherwise you are going to use Dynamic Programming that is for WDA "experts"...
Sergio
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Parry,
The dynamic programming way is follows:
you need to first get a reference to the root element 'ROOTUIELEMENTCONTAINER' from the view reference available within the wddomodifyview method. the variable returned is of type cl_w_uielement_container. you can use the method get_root_element( ) of the interface if_wd_view for this purpose.
next get a reference to the transparent container by using the method get_child of the class cl_wd_uielement_container( using the variable returned from the prevoius call) and cast it to a variable of the class cl_wd_transparent_container. to this method you need to pass the id of your transparent container.
Once you have the reference you can use the method set_visible( ) to make the container visible or invisible at runtime.
However you need to be careful about the placement of this code within the wddomodifyview method because it would get executed every time. Thus the best way is to store the reference to view in a component controller the first time and later on use this attribute anywhere within your component.
Regards,
Shweta
hi Shweta,,
We are facing some problem in visibility of transparent container.
We want to invisible the transparent container on a click of button, but we dont know how to store the reference to view in a component controller the first time and later on use this attribute anywhere within our component.
We are only able to place the code in modifyview.
Please help us in this regard...
thanks
Gaurav
Hi,
create an attribute X type wdy_boolean.
bind this attribute to property visible of transparent container.
then using set_attribute(name = 'X' value = ' ' ) to make tranparent container invisible
and pass the value = 'X' to make transparent container visible.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Solved
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Friends ,
My problem was resovled .It was nt by dynamic programming .It by seeting value if WDUI_VISIBLITY value as 01 , 02 .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.