on 05-21-2006 4:25 PM
Hi,
Is there a way to hide a whole table if it is empty?
Which method or path should I use in order to hide the table?
Thanks,
Erick
You could bind the "visible" property to a calculated context attribute that returns Visibility.NONE, if the data source node size equals 0.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Erick,
You do not use any method and but bind the property 'visible' of table to a context attribute.
Here are the detailed steps:
1) Goto the layout of your view.
2) Double click on table element.
3) On the RHS, you see many properties, goto property Visible and bind it to a context attribute. The purpose of this context attribute is to control visibility and hence you would have to add this to your context.
4) Set the value of this context attribute to Visible or not depending on the data. Check table documentation for more details.
Regards,
Srini.
In the NWDS you would do this as follows (I suppose in the ABAP IDE it's similar):
Add a new context attribute "TableVisibility" to the view controller context, choose type = "com.sap.ide.webdynpro.uielementdefinitions.Visibility", calculated=true, readOnly=true.
Select the table in the view designer and bind property "visible" to attribute "TableVisibility".
For the calculated attribute, a get-method is generated. In the implementation of this get-method, return WDVisibility.NONE if the table data source node is empty, WDVisibility.VISIBLE else.
Armin
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
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.