on 09-23-2005 7:53 AM
Hi All,
I have a view ,in that view I have 1 View Container UI Element.In ViewContainer I have a Table.
I have a button in my view.onclick of that button I want to open a view Container's table.
Could anyone please suggest me what are all the steps i have to follow for this?
Regards,
Karthick
Hello Karthick,
1) Create custom controller.
2) Create attribute with type Visibility in custom controller.
3) Add custom controller in "required controllers" for embedded view and for container view.
4) Create attribute with type Visibility in embedded view and container view.
5) Map visibility attribute from custom controller to container view and from custom controller to embedded view.
6) in container view in wdDoInit put wdContext.currentContextElement().setVisible(WDVisibility.VISIBLE);
7) In action handler for button put something like:
final int ordinal = wdContext.currentContextElement().getVisible().ordinal();
wdContext.currentContextElement().setVisible(WDVisibility.valueOf(ordinal%2 + 1));
While clicking on button table would be shown or hidden.
Best regards, Maksim Rashchynski.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Karthick,
If I undersand you correct, If you would open another view under current viewContainer on click of another button it is even more simplier - you don`t need custom controller in this case because you can manage visibility directly in view. Follow Vijith`s instructions: create attribute with type visibility in view context, map visibility property of embedded viewContainer to this attribute, set in wdInit method visibility context attribute to none, in action handler for button set visibility context attribute to visible.
Best regards, Maksim Rashchynski.
Hi Karthick,
1.Create a value attribute by name say "visible".
2.Got to properties of this attribute and click on the button with three dot in the Type property.
3.A screen will come with Dictionary and under it Local dictionary.
4.In the local dictionary select com.sap.ide.webdynpro.uielementdefinitions.
5.Here select the value visibility.
6.Now you can change it programattically.
Regards,
Jaydeep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Karthick,
Why dont you put your table in the view itself instead of viewcontainer ui element. And change the visibility of the table by creating a simple type of WDVisibility, map it with visibility property of the table and changing that to WDVisibility.visible on the click of the button.
Regards,
Jaydeep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
1.Create a context attribute of type Visibility.
2.Map this attribute to the visible property of the View Container UI element.
3.You can change the visibility of the View Container UI element by writing the folllowing code in the action of the button
wdContext.currentContextElement().set"Attribute"(WDVisibility.Visible)
But i think it is better to add the table in the view itself and change the Visibility as Jaydeep has suggested.
Regards,
Vijith
Hi all,
If you give me any sample code,that will be much helpful to me.
Thankx,
Karthick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
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.