How to hide set with no content

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2013 04:09 AM
Hi,
Im using Alfresco 4.0.e, Share.
I have added a panel-bordered set in my share form configuration. The fields belonging to the set are for properties in an aspect.
The set renders just fine when the document has the aspect, there is a panel with the set label and a border surrounding the fields.
My problem is when the document does not have the aspect and therefor the fields for those properties are not rendered - then the panel with the label and the border (with no content) are rendered anyway. Is there a way to prevent this? I guess I can write my own set-template with a check if the fields are present in the form and only render the panel and the border in that case? But is there an easier and more correct way to solve it?
Regards
Katarina Hallberg
Im using Alfresco 4.0.e, Share.
I have added a panel-bordered set in my share form configuration. The fields belonging to the set are for properties in an aspect.
The set renders just fine when the document has the aspect, there is a panel with the set label and a border surrounding the fields.
My problem is when the document does not have the aspect and therefor the fields for those properties are not rendered - then the panel with the label and the border (with no content) are rendered anyway. Is there a way to prevent this? I guess I can write my own set-template with a check if the fields are present in the form and only render the panel and the border in that case? But is there an easier and more correct way to solve it?
Regards
Katarina Hallberg
Labels:
- Labels:
-
Archive
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2013 01:09 PM
Hello,
unfortunately, no. We have written an adapted form template as well as custom set templates that cover this in our projects. The only other way we have found we can achieve this is by adding a form.get.js controller to the Alfresco Web Script which post-processes the form model to eliminate all those fields / sets before it is passed to the FTL.
Regards
Axel
unfortunately, no. We have written an adapted form template as well as custom set templates that cover this in our projects. The only other way we have found we can achieve this is by adding a form.get.js controller to the Alfresco Web Script which post-processes the form model to eliminate all those fields / sets before it is passed to the FTL.
Regards
Axel
