Fragment read-only


I am using a fragments to design an edit screen, that works perfectly fine. In the browser screen, I have two areas, the usual browse screen with the corresponding table and in the second area I am using one fragment to display additional informations of the selected row in the table. That works.

However, the fragment and the fields it contains are editable. Is there any way to make the fragment read-only? Disabling the fragment will gray all the contents, which is not nice.

Thanks for the help.


Hi Sammy,

The Fragment is a ComponentContainer and has the getComponents() method. So you can iterate all its components, test whether the component is an instance of Component.Editable interface, and call setEditable(false).

1 Like