Nuxeo 5.8 - Single document suggestion - customisation in VIEW mode

Hello,

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

thank you

0 votes

1 answers

1451 views

ANSWER



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:

    <widgetModes>
      <mode value="view">edit</mode>
    </widgetModes>

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

<property name="readonly">true</property>

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.

0 votes



thank you !
02/14/2014