private MultiLevelEntityEditor buildAsnMLEE() { // Build AsnLine EntityType EntityType asnEntityType = new EntityType("ASN", ASN.class, null, null, null, "whasn"); EntityType asnLineEntityType = new EntityType("ASNLine", ASNLine.class, null, null, null, "whasnline"); // Build AsnLine MasterDetailComponent MasterDetailComponent asnLineMasterDetail = new MasterDetailComponent("addasnlinespage-asnmasterdetail", "ASN"); asnLineMasterDetail.setMasterComponent(buildAsnForm(asnEntityType)); asnLineMasterDetail.setLineEditorPanel(buildAsnLineEditors(asnEntityType, asnLineEntityType)); MultiLevelEntityEditor editorComponent = new MultiLevelEntityEditor(); editorComponent.setContent(asnLineMasterDetail); return editorComponent; }
@Override public void updateBreadCrumb(MasterDetailComponent[] masterDetailComponentArray) { if (masterDetailComponentArray.length <= 1) { this.breadCrumb.setVisible(false); } else { this.breadCrumb.clearBreadCrumb(); EntityEditorBreadCrumbItem item = null; for (final MasterDetailComponent masterDetailComponent : masterDetailComponentArray) { item = new EntityEditorBreadCrumbItem(false, masterDetailComponent.getName()); item.addListener( new ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(ClickEvent event) { MultiLevelEditorView.this.owner.onRenderEditor(masterDetailComponent); } }); this.breadCrumb.addItem(item); } this.breadCrumb.setVisible(true); } }