RecordHandlerExtension

From OpenKM Documentation
Revision as of 07:33, 24 September 2012 by Jllort (talk | contribs) (Created page with 'Any extension that implements RecordHandlerExtension will be watching all events fired from record tab == Method == === onChange(RecordEventConstant event) === Each time it'll b…')

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

Any extension that implements RecordHandlerExtension will be watching all events fired from record tab

Method

onChange(RecordEventConstant event)

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

Example

public class TabRecordExample extends TabRecordExtension implements RecordHandlerExtension {
	VerticalPanel vPanel;
	
	public TabRecordExample() {
		vPanel = new VerticalPanel();
		vPanel.add(new HTML("hello world"));
		
		initWidget(vPanel);
	}

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

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

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

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