cancel
Showing results for 
Search instead for 
Did you mean: 

How to display subwidget's label of a widget List when empty

Mathilde_Viveri
Confirmed Champ
Confirmed Champ

Hello everyone,

I am trying to change the display of one widget. Here is my configuration on studio:

  • Widget type "List" - Display "Table" on a complex multivalued field. With "Hide Label" checked and "Hide subwidgets labels" at "No".

Here is what I see when i log on to the plateform:

  • View mode (all i can see is a bar, not showing the user there's tons of things to fill in here) View mode
  • Edit mode (here is what I would like to have on view mode! Well without the "Add" button of ) Edit mode

I would like to see on view mode, even when my field is empty, subwidgets labels.

How can I achieve that ? Is there an existing "custom properties" for this ?

Thank for your answer.

1 ACCEPTED ANSWER

Anahide_Tchertc
Elite Collaborator
Elite Collaborator

Hi, When there are no values to display in view mode, the widget will not show subwidget labels. You can always take example on the original xhtml template to reference a custom template changing the behaviour. Depending on your target version, you can find the original file at https://github.com/nuxeo/nuxeo/blob/release-8.10/nuxeo-jsf/nuxeo-platform-forms-layout-client/src/ma... for 8.10 for instance. Note l.59:

ui:fragment rendered="#{displaySubLabels and (isEditMode or not empty fieldOrValue)}"

I suggest that you rename the template to avoid overriding the behaviour of the widget in all cases.

Hope this helps

View answer in original post

3 REPLIES 3

Anahide_Tchertc
Elite Collaborator
Elite Collaborator

Hi, When there are no values to display in view mode, the widget will not show subwidget labels. You can always take example on the original xhtml template to reference a custom template changing the behaviour. Depending on your target version, you can find the original file at https://github.com/nuxeo/nuxeo/blob/release-8.10/nuxeo-jsf/nuxeo-platform-forms-layout-client/src/ma... for 8.10 for instance. Note l.59:

ui:fragment rendered="#{displaySubLabels and (isEditMode or not empty fieldOrValue)}"

I suggest that you rename the template to avoid overriding the behaviour of the widget in all cases.

Hope this helps

Thanks for your answer, I'll try that !

Tried it and it's working, thanks !

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.