gt: 			IReportField[] fields = new IReportField[74];
context: // This code was generated by Barbara Worwood using IMS Development Environment (version 1.80 build 5007.25751)
  // Copyright (C) 1995-2014 IMS MAXIMS. All rights reserved.
  // WARNING: DO NOT MODIFY the content of this file
  
  package ims.RefMan.forms.catsreportcomponent;
  
  import ims.framework.*;
  import ims.framework.controls.*;
  import ims.framework.enumerations.*;
  import ims.framework.utils.RuntimeAnchoring;
  
  public class GenForm extends FormBridge
  {
  	private static final long serialVersionUID = 1L;
  
  	protected void fireCustomControlValueChanged()
  	{
  		super.fireValueChanged();
  	}
  	public boolean canProvideData(IReportSeed[] reportSeeds)
  	{
  		return new ReportDataProvider(reportSeeds, this.getFormReportFields()).canProvideData();
  	}
  	public boolean hasData(IReportSeed[] reportSeeds)
  	{
  		return new ReportDataProvider(reportSeeds, this.getFormReportFields()).hasData();
  	}
  	public IReportField[] getData(IReportSeed[] reportSeeds)
  	{
  		return getData(reportSeeds, false);
  	}
  	public IReportField[] getData(IReportSeed[] reportSeeds, boolean excludeNulls)
  	{
  		return new ReportDataProvider(reportSeeds, this.getFormReportFields(), excludeNulls).getData();
  	}
  	private void validateContext(ims.framework.Context context)
  	{
  		if(context == null)
  			return;
  		if(!context.isValidContextType(ims.RefMan.vo.CatsReferralRefVo.class))
  			throw new ims.framework.exceptions.CodingRuntimeException("The type 'ims.RefMan.vo.CatsReferralRefVo' of the global context variable 'RefMan.CatsReferral' is not supported.");
  	}
  	public boolean supportsRecordedInError()
  	{
  		return false;
  	}
  	public ims.vo.ValueObject getRecordedInErrorVo()
  	{
  		return null;
  	}
  	protected void setContext(FormLoader loader, Form form, ims.framework.interfaces.IAppForm appForm, UIFactory factory, Context context) throws Exception
  	{
  		setContext(loader, form, appForm, factory, context, Boolean.FALSE, new Integer(0), null, null, new Integer(0));
  	}
  	protected void setContext(FormLoader loader, Form form, ims.framework.interfaces.IAppForm appForm, UIFactory factory, Context context, Boolean skipContextValidation) throws Exception
  	{
  		setContext(loader, form, appForm, factory, context, skipContextValidation, new Integer(0), null, null, new Integer(0));
  	}
  	protected void setContext(FormLoader loader, Form form, ims.framework.interfaces.IAppForm appForm, UIFactory factory, ims.framework.Context context, Boolean skipContextValidation, Integer startControlID, ims.framework.utils.SizeInfo runtimeSize, ims.framework.Control control, Integer startTabIndex) throws Exception
  	{
  		if(loader == null); // this is to avoid eclipse warning only.
  		if(factory == null); // this is to avoid eclipse warning only.
  		if(runtimeSize == null); // this is to avoid eclipse warning only.
  		if(appForm == null)
  			throw new RuntimeException("Invalid application form");
  		if(startControlID == null)
  			throw new RuntimeException("Invalid startControlID");
  		if(control == null); // this is to avoid eclipse warning only.
  		if(startTabIndex == null)
  			throw new RuntimeException("Invalid startTabIndex");
  		this.context = context;
  		this.componentIdentifier = startControlID.toString();
  		this.formInfo = form.getFormInfo();
  		this.globalContext = new GlobalContext(context);
  	
  		if(skipContextValidation == null || !skipContextValidation.booleanValue())
  		{
  			validateContext(context);
  		}
  	
  		super.setContext(form);
  
  		ims.framework.utils.SizeInfo designSize = new ims.framework.utils.SizeInfo(800, 544);
  		if(runtimeSize == null)
  			runtimeSize = designSize;
  		form.setWidth(runtimeSize.getWidth());
  		form.setHeight(runtimeSize.getHeight());
  		super.setGlobalContext(ContextBridgeFlyweightFactory.getInstance().create(GlobalContextBridge.class, context, false));
  		super.setLocalContext(new LocalContext(context, form.getFormInfo(), componentIdentifier));
  
  
  		// Custom Controls
  		ims.framework.CustomComponent instance1 = factory.getEmptyCustomComponent();
  		RuntimeAnchoring anchoringHelper1 = new RuntimeAnchoring(designSize, runtimeSize, 8, 8, 352, 56, ims.framework.enumerations.ControlAnchoring.TOPLEFT);
  		ims.framework.FormUiLogic m_ccAuthoringForm = loader.loadComponent(102228, appForm, startControlID * 10 + 1000, anchoringHelper1.getSize(), instance1, -1, skipContextValidation);
  		//ims.framework.Control m_ccAuthoringControl = factory.getControl(CustomComponent.class, new Object[] { control, new Integer(startControlID.intValue() + 1000), new Integer(8), new Integer(8), new Integer(352), new Integer(56), ControlState.DISABLED, ControlState.DISABLED, ims.framework.enumerations.ControlAnchoring.TOPLEFT, new Integer(-1), m_ccAuthoringForm, instance1 } );
  		ims.framework.Control m_ccAuthoringControl = factory.getControl(CustomComponent.class, new Object[] { control, new Integer(startControlID.intValue() + 1001),  new Integer(anchoringHelper1.getX()), new Integer(anchoringHelper1.getY()), new Integer(anchoringHelper1.getWidth()), new Integer(anchoringHelper1.getHeight()), ControlState.DISABLED, ControlState.DISABLED, ims.framework.enumerations.ControlAnchoring.TOPLEFT, new Integer(-1), m_ccAuthoringForm, instance1, Boolean.TRUE } );
  		super.addControl(m_ccAuthoringControl);
  		Menu[] menus1 = m_ccAuthoringForm.getForm().getRegisteredMenus();
  		for(int x = 0; x < menus1.length; x++)
  		{
  			form.registerMenu(menus1[x]);
  		}
  
  		// Button Controls
  		RuntimeAnchoring anchoringHelper2 = new RuntimeAnchoring(designSize, runtimeSize, 632, 512, 75, 23, ims.framework.enumerations.ControlAnchoring.TOPLEFT);
  		super.addControl(factory.getControl(Button.class, new Object[] { control, new Integer(startControlID.intValue() + 1002), new Integer(anchoringHelper2.getX()), new Integer(anchoringHelper2.getY()), new Integer(anchoringHelper2.getWidth()), new Integer(anchoringHelper2.getHeight()), new Integer(-1), ControlState.HIDDEN, ControlState.ENABLED, ims.framework.enumerations.ControlAnchoring.TOPLEFT, "Save", Boolean.FALSE, null, Boolean.FALSE, Boolean.TRUE, Boolean.FALSE, null, ims.framework.utils.Color.Default, ims.framework.utils.Color.Default }));
  		RuntimeAnchoring anchoringHelper3 = new RuntimeAnchoring(designSize, runtimeSize, 720, 512, 75, 23, ims.framework.enumerations.ControlAnchoring.TOPLEFT);
  		super.addControl(factory.getControl(Button.class, new Object[] { control, new Integer(startControlID.intValue() + 1003), new Integer(anchoringHelper3.getX()), new Integer(anchoringHelper3.getY()), new Integer(anchoringHelper3.getWidth()), new Integer(anchoringHelper3.getHeight()), new Integer(-1), ControlState.HIDDEN, ControlState.ENABLED, ims.framework.enumerations.ControlAnchoring.TOPLEFT, "Cancel", Boolean.FALSE, null, Boolean.FALSE, Boolean.TRUE, Boolean.FALSE, null, ims.framework.utils.Color.Default, ims.framework.utils.Color.Default }));
  		RuntimeAnchoring anchoringHelper4 = new RuntimeAnchoring(designSize, runtimeSize, 8, 512, 75, 23, ims.framework.enumerations.ControlAnchoring.TOPLEFT);
  		super.addControl(factory.getControl(Button.class, new Object[] { control, new Integer(startControlID.intValue() + 1004), new Integer(anchoringHelper4.getX()), new Integer(anchoringHelper4.getY()), new Integer(anchoringHelper4.getWidth()), new Integer(anchoringHelper4.getHeight()), new Integer(-1), ControlState.UNKNOWN, ControlState.HIDDEN, ims.framework.enumerations.ControlAnchoring.TOPLEFT, "Edit", Boolean.FALSE, null, Boolean.FALSE, Boolean.TRUE, Boolean.FALSE, null, ims.framework.utils.Color.Default, ims.framework.utils.Color.Default }));
  
  		// Rich Text Controls
  		RuntimeAnchoring anchoringHelper5 = new RuntimeAnchoring(designSize, runtimeSize, 8, 72, 784, 432, ims.framework.enumerations.ControlAnchoring.TOPLEFT);
  		super.addControl(factory.getControl(RichTextControl.class, new Object[] { control, new Integer(startControlID.intValue() + 1005), new Integer(anchoringHelper5.getX()), new Integer(anchoringHelper5.getY()), new Integer(anchoringHelper5.getWidth()), new Integer(anchoringHelper5.getHeight()), new Integer(-1), ControlState.DISABLED, ControlState.ENABLED, ims.framework.enumerations.ControlAnchoring.TOPLEFT, Boolean.TRUE, Boolean.FALSE, new Integer(0)} ));
  	}
  
  
  	public ims.core.forms.authoringinfo.IComponent ccAuthoring()
  	{
  		return (ims.core.forms.authoringinfo.IComponent)((ims.framework.cn.controls.CustomComponent)super.getControl(0)).getLogic();
  	}
  	public void setccAuthoringValueChangedEvent(ims.framework.delegates.ValueChanged delegate)
  	{
  		((CustomComponent)super.getControl(0)).setValueChangedEvent(delegate);
  	}
  	public void setccAuthoringVisible(boolean value)
  	{
  		((ims.framework.Control)super.getControl(0)).setVisible(value);
  	}
  	public boolean isccAuthoringVisible()
  	{
  		return ((ims.framework.Control)super.getControl(0)).isVisible();
  	}
  	public void setccAuthoringEnabled(boolean value)
  	{
  		((ims.framework.Control)super.getControl(0)).setEnabled(value);
  	}
  	public boolean isccAuthoringEnabled()
  	{
  		return ((ims.framework.Control)super.getControl(0)).isEnabled();
  	}
  	public Button btnSave()
  	{
  		return (Button)super.getControl(1);
  	}
  	public Button btnCancel()
  	{
  		return (Button)super.getControl(2);
  	}
  	public Button btnEdit()
  	{
  		return (Button)super.getControl(3);
  	}
  	public RichTextControl richTextCatsReport()
  	{
  		return (RichTextControl)super.getControl(4);
  	}
  	public GlobalContext getGlobalContext()
  	{
  		return this.globalContext;
  	}
  	public static class GlobalContextBridge extends ContextBridge
  	{
  		private static final long serialVersionUID = 1L;
  	}
  	public LocalContext getLocalContext()
  	{
  		return (LocalContext)super.getLocalCtx();
  	}
  	public class LocalContext extends ContextBridge
  	{
  		private static final long serialVersionUID = 1L;
  		
  		public LocalContext(Context context, ims.framework.FormInfo formInfo, String componentIdentifier)
  		{
  			super.setContext(context);
  			String prefix = formInfo.getLocalVariablesPrefix();
  			cxl_DisplayReadOnly = new ims.framework.ContextVariable("DisplayReadOnly", prefix + "_lv_RefMan.CATSReportComponent.__internal_x_context__DisplayReadOnly_" + componentIdentifier + "");
  			cxl_SelectedCatsReportNote = new ims.framework.ContextVariable("SelectedCatsReportNote", prefix + "_lv_RefMan.CATSReportComponent.__internal_x_context__SelectedCatsReportNote_" + componentIdentifier + "");
  		}
  		
  		public boolean getDisplayReadOnlyIsNotNull()
  		{
  			return !cxl_DisplayReadOnly.getValueIsNull(context);
  		}
  		public Boolean getDisplayReadOnly()
  		{
  			return (Boolean)cxl_DisplayReadOnly.getValue(context);
  		}
  		public void setDisplayReadOnly(Boolean value)
  		{
  			cxl_DisplayReadOnly.setValue(context, value);
  		}
  		private ims.framework.ContextVariable cxl_DisplayReadOnly = null;
  		public boolean getSelectedCatsReportNoteIsNotNull()
  		{
  			return !cxl_SelectedCatsReportNote.getValueIsNull(context);
  		}
  		public ims.RefMan.vo.CatsReportNoteVo getSelectedCatsReportNote()
  		{
  			return (ims.RefMan.vo.CatsReportNoteVo)cxl_SelectedCatsReportNote.getValue(context);
  		}
  		public void setSelectedCatsReportNote(ims.RefMan.vo.CatsReportNoteVo value)
  		{
  			cxl_SelectedCatsReportNote.setValue(context, value);
  		}
  		private ims.framework.ContextVariable cxl_SelectedCatsReportNote = null;
  	}
  	private IReportField[] getFormReportFields()
  	{
  		if(this.context == null)
  			return null;
  		if(this.reportFields == null)
  			this.reportFields = new ReportFields(this.context, this.formInfo, this.componentIdentifier).getReportFields();
  		return this.reportFields;
  	}
  	private class ReportFields
  	{
  		public ReportFields(Context context, ims.framework.FormInfo formInfo, String componentIdentifier)
  		{
  			this.context = context;
  			this.formInfo = formInfo;
  			this.componentIdentifier = componentIdentifier;
  		}
  		public IReportField[] getReportFields()
  		{
  			String prefix = formInfo.getLocalVariablesPrefix();
  