Difference between revisions of "FolderHandlerExtension"

From OpenKM Documentation
Jump to: navigation, search
(Created page with 'Any extension that implements FolderHandlerExtension will be watching all events fired from folder tab == Method == onChange(FolderEventConstant event) == onChange(FolderEven…')
 
 
Line 1: Line 1:
 
Any extension that implements FolderHandlerExtension will be watching all events fired from folder tab
 
Any extension that implements FolderHandlerExtension will be watching all events fired from folder tab
 
  
 
== Method ==
 
== Method ==
onChange(FolderEventConstant event)
+
=== onChange(FolderEventConstant event) ===
 
 
 
 
== onChange(FolderEventConstant event) ==
 
 
Each time it'll be some new folder event the method onChange it'll be fired by OpenKM
 
Each time it'll be some new folder event the method onChange it'll be fired by OpenKM
 
 
  
 
== Example ==
 
== Example ==
 
<source lang="java">
 
<source lang="java">
 
public class TabFolderExample extends TabFolderExtension implements FolderHandlerExtension {
 
public class TabFolderExample extends TabFolderExtension implements FolderHandlerExtension {
 
 
VerticalPanel vPanel;
 
VerticalPanel vPanel;
 
 
Line 32: Line 25:
 
public void set(GWTFolder doc) {
 
public void set(GWTFolder doc) {
 
// TODO Auto-generated method stub
 
// TODO Auto-generated method stub
 
 
}
 
}
  
Line 49: Line 41:
 
</source>
 
</source>
  
 
+
[[Category: Extension Guide]]
[[Category: OpenKM plugin extensions]]
 

Latest revision as of 13:31, 2 December 2010

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());
		}
	}
}