cancel
Showing results for 
Search instead for 
Did you mean: 

Nuxeo 5.8 - Single document suggestion - customisation in VIEW mode

milonette_
Star Collaborator
Star Collaborator

Hello,

Why is it not possible to customise "single doc suggestion" with a "selection formatter" and inline Javascript in nuxeo 58 ?

thank you

1 ACCEPTED ANSWER

Guillaume_Renar
Star Contributor
Star Contributor

Hi!

The "selection formatter" and "inline javascript" are widget properties to customize the select2 suggestion box.

Since view mode is readonly, select2 is not used to render the widget and it falls back to the way it was rendered in 5.6.

A workaround would be to force the widget mode to edit mode: edit

but then you'd be able to change the selection despite you're in view mode (which is functionally weird). To achieve a functionally acceptable solution, you could use the readonly mode of select2 true

Unfortunately, it won't work because this select2 "readonly" property is not supposed to be set as a widget property and is only determined by the widget mode.

I created NXP-13611 improvement to achieve this.

View answer in original post

2 REPLIES 2

Guillaume_Renar
Star Contributor
Star Contributor

Hi!

The "selection formatter" and "inline javascript" are widget properties to customize the select2 suggestion box.

Since view mode is readonly, select2 is not used to render the widget and it falls back to the way it was rendered in 5.6.

A workaround would be to force the widget mode to edit mode: edit

but then you'd be able to change the selection despite you're in view mode (which is functionally weird). To achieve a functionally acceptable solution, you could use the readonly mode of select2 true

Unfortunately, it won't work because this select2 "readonly" property is not supposed to be set as a widget property and is only determined by the widget mode.

I created NXP-13611 improvement to achieve this.

thank you !