cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

inline editing for single columns

Former Member
0 Likes
866

Hey guys,

is there any possible way to enable inline editing in the multireferenceeditor only for single columns in the cockpitNG and not for the complete row? Some columns should be limited to not be editable Or is there any way to configure it with user rights? I restricted the user to be able to change and read an attribute but the only thing that happens is that it shows "you have no permission" but I am still able to edit it via inline editing

View Entire Topic
former_member625836
Active Contributor
0 Likes

Hi ,

I'm afraid that it is not that simple to override a renderer in ExtendedMultireferenceEditor. After looking closer to the source, I have few comments to what you posted:

  • you may set spring-bean on column level, but it needs to point to a spring bean of com.hybris.cockpitng.widgets.common.WidgetComponentRenderer type

  • a bean specified on column level is used only to render a readable representation of column value (i.e. a label, icon, etc.) - it cannot define if and/or how a value is editable

  • you can change a default cell renderer for ExtendedMultireferenceEditor by defining a new bean of type com.hybris.cockpitng.editor.extendedmultireferenceeditor.renderer.CellRenderer (may extend com.hybris.cockpitng.editor.extendedmultireferenceeditor.renderer.DefaultCellRenderer), but please bare in mind that it will change it globally (for all instances of editor)

  • changing a cell editor for a single instance of editor would require defining your custom editor that would create your custom implementation of row renderer in com.hybris.cockpitng.editor.extendedmultireferenceeditor.DefaultExtendedMultiReferenceEditor#createReferenceLayout method.

Cheers, Jacek

Former Member
0 Likes

Hi Jacek, I found an other solution for that problem 🙂

But thanks for the effort

Cheers.

0 Likes

Hi what did you end up doing after all for this?