FolderHandlerExtension

From OpenKM Documentation
Revision as of 13:31, 2 December 2010 by Pavila (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Any extension that implements FolderHandlerExtension will be watching all events fired from folder tab

Method

onChange(FolderEventConstant event)

Each time it'll be some new folder event the method onChange it'll be fired by OpenKM

Example

public class TabFolderExample extends TabFolderExtension implements FolderHandlerExtension {
	VerticalPanel vPanel;
	
	public TabFolderExample() {
		vPanel = new VerticalPanel();
		vPanel.add(new HTML("hello world"));
		
		initWidget(vPanel);
	}

	@Override
	public String getTabText() {
		return "New folder tab";
	}

	@Override
	public void set(GWTFolder doc) {
		// TODO Auto-generated method stub
	}

	@Override
	public void setVisibleButtons(boolean visible) {
		// TODO Auto-generated method stub
	}

	@Override
	public void onChange(FolderEventConstant event) {
		if (event.equals(HasFolderEvent.TAB_CHANGED)) {
			Window.alert("tab changed - " + event.getType());
		}
	}
}