cancel
Showing results for 
Search instead for 
Did you mean: 

MVEL and Nuxeo : access multi valued complex property

pibou_Bouvret
Elite Collaborator
Elite Collaborator

Hi,

i have a document type with a multi valued complex field (validation). The widget is in edit mode, but i don t want the user to be able to delete existing values, just add new ones. I guess i have to use some MVEL condition about the display mode of the subwidget but i lack documentation about the use of MVEL in Nuxeo : Syntax of MVEL itself but also what objects can be adressed, etc.

Thx

1 ACCEPTED ANSWER

Anahide_Tchertc
Elite Collaborator
Elite Collaborator

Hi,

MVEL is only used in automation operations. Layouts only handle standard EL expressions.

If you'd like the delete buttons to be removed, i'm afraid you'll have to define a new widget template: the current list widget always displays delete buttons, but that would be a nice improvement to make this configurable.

You can take example on the original widget template at https://github.com/nuxeo/nuxeo-jsf/blob/release-5.5/nuxeo-platform-forms-layout-client/src/main/reso.... Search for "remove" to get the link that should be hidden in your case.

HTH

View answer in original post

2 REPLIES 2

Anahide_Tchertc
Elite Collaborator
Elite Collaborator

Hi,

MVEL is only used in automation operations. Layouts only handle standard EL expressions.

If you'd like the delete buttons to be removed, i'm afraid you'll have to define a new widget template: the current list widget always displays delete buttons, but that would be a nice improvement to make this configurable.

You can take example on the original widget template at https://github.com/nuxeo/nuxeo-jsf/blob/release-5.5/nuxeo-platform-forms-layout-client/src/main/reso.... Search for "remove" to get the link that should be hidden in your case.

HTH

Thx for the clarification about EL / MVEL