@Override protected GUIContainerComponent getDynamicContents(IElement el) { GUIPanelComponent rootPanel = GUIPanelComponent.createFlow(null); rootPanel.setStyle("filesystem_breadcrumb"); Folder f = (Folder)el; if (f == null) { return rootPanel; } try { f.title.val(); // We first check whether this object exist. } catch(GeneralActionExecutionException gaee) { GUIBufferComponent nullBuffer = GUIBufferComponent.create(rootPanel, true, (IElement)null); GUIComponentBinding.create(nullBuffer.opOutput(), this.ipRelay1()); return rootPanel; // If the object does not exist, we just return empty panel. } GUILabelComponent thisFolder = GUILabelComponent.create(rootPanel, getFolderName(f)); thisFolder.setStyle("displayInline"); Folder current = f.superItem.val(); while (current != null) { GUILabelComponent separator = new GUILabelComponent(); separator.setLabel("/"); separator.setStyle("displayInline"); rootPanel.addFirst(separator); GUIButtonComponent link = new GUIButtonComponent(); link.setDisplayAsLink(true); link.setText(getFolderName(current)); link.setStyle("displayInline"); rootPanel.addFirst(link); GUIBufferComponent buffer = GUIBufferComponent.create(rootPanel, false, current); GUIComponentBinding.create(buffer.opOutput(), this.ipRelay2()); GUIComponentBinding.create(link.opClick(), buffer.ipSend()); current = current.superItem.val(); } GUIBufferComponent currentFolderBuffer = GUIBufferComponent.create(rootPanel, true, f); GUIComponentBinding.create(currentFolderBuffer.opOutput(), this.ipRelay1()); return rootPanel; } private String getFolderName(Folder f) { return f.superItem.val() == null ? getRootFolderName(f) : f.title.val().toString(); } private String getRootFolderName(Folder f) { if (f.owner.val() != null) { return f.owner.val().name.val().toString(); } return ""; // this shuold never happen }