Attachable by Mario David project migrated from cuba 6 to 7


I recently migrated my project from cuba 6 to 7. Now i’m trying to add this add-on to my project. I followed the steps as subscribed but no button is been added to my browser screen. The browser screen is as far as i can see still a cuba 6 screen.

This i followed:

Browse Screens

Annotate your browse screens with the @WithAttachments annotation or by implementing the WithAttachmentsSupport interface, depending on which version of CUBA screen APIs is used in the target screen.

@WithAttachments annotation (CUBA 6 screens)

@WithAttachments(listComponent = “productsTable”) class ProductBrowse extends AnnotatableAbstractLookup { }

For the @WithAttachments annotation you need to define the list component on which it should add the attachments button. Normally this is the id of the table you defined in your browse screen.


I’ve noticed that when i remove my report button from the controller of the browser screen the attachment button is shown.


private Button reportButton;
protected ButtonsPanel buttonsPanel;
private GroupTable districtMarowijnesTable;

public void init(Map<String, Object> params) {
    TablePrintFormAction action = new TablePrintFormAction("report", districtMarowijnesTable);


I assume you forgot to call super.init() within your overridden lifecycle method. This should solve the problem.

When switching to CUBA 7 based controller with the WithAttachmentSupport, this quirk is gone.


Thanks Mario. problem solved