gt: 			String prefix = formInfo.getLocalVariablesPrefix();
context: //#############################################################################
  //#                                                                           #
  //#  Copyright (C) <2014>  <IMS MAXIMS>                                       #
  //#                                                                           #
  //#  This program is free software: you can redistribute it and/or modify     #
  //#  it under the terms of the GNU Affero General Public License as           #
  //#  published by the Free Software Foundation, either version 3 of the       #
  //#  License, or (at your option) any later version.                          # 
  //#                                                                           #
  //#  This program is distributed in the hope that it will be useful,          #
  //#  but WITHOUT ANY WARRANTY; without even the implied warranty of           #
  //#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            #
  //#  GNU Affero General Public License for more details.                      #
  //#                                                                           #
  //#  You should have received a copy of the GNU Affero General Public License #
  //#  along with this program.  If not, see <http://www.gnu.org/licenses/>.    #
  //#                                                                           #
  //#############################################################################
  //#EOH
  // 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.emergency.forms.attendancekpiconfiguration;
  
  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;
  
  	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();
  	}
  	public static class cmbEmergencyDepartmentComboBox extends ComboBoxBridge
  	{
  		private static final long serialVersionUID = 1L;
  		
  		public void newRow(ims.core.vo.LocationLiteVo value, String text)
  		{
  			super.control.newRow(value, text);
  		}
  		public void newRow(ims.core.vo.LocationLiteVo value, String text, ims.framework.utils.Image image)
  		{
  			super.control.newRow(value, text, image);
  		}
  		public void newRow(ims.core.vo.LocationLiteVo value, String text, ims.framework.utils.Color textColor)
  		{
  			super.control.newRow(value, text, textColor);
  		}
  		public void newRow(ims.core.vo.LocationLiteVo value, String text, ims.framework.utils.Image image, ims.framework.utils.Color textColor)
  		{
  			super.control.newRow(value, text, image, textColor);
  		}
  		public boolean removeRow(ims.core.vo.LocationLiteVo value)
  		{
  			return super.control.removeRow(value);
  		}
  		public ims.core.vo.LocationLiteVo getValue()
  		{
  			return (ims.core.vo.LocationLiteVo)super.control.getValue();
  		}
  		public void setValue(ims.core.vo.LocationLiteVo value)
  		{
  			super.control.setValue(value);
  		}
  	}
  	private void validateContext(ims.framework.Context context)
  	{
  		if(context == null)
  			return;
  	}
  	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(848, 632);
  		if(runtimeSize == null)
  			runtimeSize = designSize;
  		form.setWidth(runtimeSize.getWidth());
  		form.setHeight(runtimeSize.getHeight());
  		super.setFormReferences(FormReferencesFlyweightFactory.getInstance().create(Forms.class));
  		super.setImageReferences(ImageReferencesFlyweightFactory.getInstance().create(Images.class));
  		super.setGlobalContext(ContextBridgeFlyweightFactory.getInstance().create(GlobalContextBridge.class, context, false));
  		super.setLocalContext(new LocalContext(context, form.getFormInfo(), componentIdentifier));
  
  		// Context Menus
  		contextMenus = new ContextMenus();
  		contextMenus.Emergency.contextMenuAttendanceKPIConfiguration = factory.createMenu(startControlID.intValue() + 1);
  		contextMenus.Emergency.contextMenuAttendanceKPIConfigurationEDITItem = factory.createMenuItem(startControlID.intValue() + 1, "Edit", true, false, new Integer(102150), true, false);
  		if(factory.getUIEngine().getLoggedInRole().hasMenuActionRight(appForm, new ims.framework.MenuAction(4550001)))
  			contextMenus.Emergency.contextMenuAttendanceKPIConfiguration.add(contextMenus.Emergency.contextMenuAttendanceKPIConfigurationEDITItem);
  		contextMenus.Emergency.contextMenuAttendanceKPIConfigurationDELETEItem = factory.createMenuItem(startControlID.intValue() + 2, "Remove", true, false, new Integer(102148), true, false);
  		if(factory.getUIEngine().getLoggedInRole().hasMenuActionRight(appForm, new ims.framework.MenuAction(4550002)))
  			contextMenus.Emergency.contextMenuAttendanceKPIConfiguration.add(contextMenus.Emergency.contextMenuAttendanceKPIConfigurationDELETEItem);
  		form.registerMenu(contextMenus.Emergency.contextMenuAttendanceKPIConfiguration);
  
  
  		// Label Controls
  		RuntimeAnchoring anchoringHelper1 = new RuntimeAnchoring(designSize, runtimeSize, 8, 10, 143, 17, ims.framework.enumerations.ControlAnchoring.TOPLEFT);
  		super.addControl(factory.getControl(Label.class, new Object[] { control, new Integer(startControlID.intValue() + 1000), new Integer(anchoringHelper1.getX()), new Integer(anchoringHelper1.getY()), new Integer(anchoringHelper1.getWidth()), new Integer(anchoringHelper1.getHeight()), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.TOPLEFT, "Emergency Department:", new Integer(1), null, new Integer(0)}));
  
  		// Button Controls
  		RuntimeAnchoring anchoringHelper2 = new RuntimeAnchoring(designSize, runtimeSize, 741, 600, 75, 23, ims.framework.enumerations.ControlAnchoring.BOTTOMRIGHT);
  		super.addControl(factory.getControl(Button.class, new Object[] { control, new Integer(startControlID.intValue() + 1001), new Integer(anchoringHelper2.getX()), new Integer(anchoringHelper2.getY()), new Integer(anchoringHelper2.getWidth()), new Integer(anchoringHelper2.getHeight()), new Integer(startTabIndex.intValue() + 7), ControlState.HIDDEN, ControlState.ENABLED, ims.framework.enumerations.ControlAnchoring.BOTTOMRIGHT, "Cancel", 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, 662, 600, 75, 23, ims.framework.enumerations.ControlAnchoring.BOTTOMRIGHT);
  		super.addControl(factory.getControl(Button.class, new Object[] { control, new Integer(startControlID.intValue() + 1002), new Integer(anchoringHelper3.getX()), new Integer(anchoringHelper3.getY()), new Integer(anchoringHelper3.getWidth()), new Integer(anchoringHelper3.getHeight()), new Integer(startTabIndex.intValue() + 6), ControlState.HIDDEN, ControlState.ENABLED, ims.framework.enumerations.ControlAnchoring.BOTTOMRIGHT, "Save", 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, 600, 75, 23, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT);
  		super.addControl(factory.getControl(Button.class, new Object[] { control, new Integer(startControlID.intValue() + 1003), new Integer(anchoringHelper4.getX()), new Integer(anchoringHelper4.getY()), new Integer(anchoringHelper4.getWidth()), new Integer(anchoringHelper4.getHeight()), new Integer(startTabIndex.intValue() + 5), ControlState.UNKNOWN, ControlState.HIDDEN, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT, "Edit", Boolean.TRUE, null, Boolean.FALSE, Boolean.TRUE, Boolean.FALSE, null, ims.framework.utils.Color.Default, ims.framework.utils.Color.Default }));
  		RuntimeAnchoring anchoringHelper5 = new RuntimeAnchoring(designSize, runtimeSize, 8, 600, 75, 23, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT);
  		super.addControl(factory.getControl(Button.class, new Object[] { control, new Integer(startControlID.intValue() + 1004), new Integer(anchoringHelper5.getX()), new Integer(anchoringHelper5.getY()), new Integer(anchoringHelper5.getWidth()), new Integer(anchoringHelper5.getHeight()), new Integer(startTabIndex.intValue() + 4), ControlState.UNKNOWN, ControlState.HIDDEN, ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT, "New", Boolean.TRUE, null, Boolean.FALSE, Boolean.TRUE, Boolean.FALSE, null, ims.framework.utils.Color.Default, ims.framework.utils.Color.Default }));
  
  		// ComboBox Controls
  		RuntimeAnchoring anchoringHelper6 = new RuntimeAnchoring(designSize, runtimeSize, 160, 8, 352, 21, ims.framework.enumerations.ControlAnchoring.TOPLEFT);
  		ComboBox m_cmbEmergencyDepartmentTemp = (ComboBox)factory.getControl(ComboBox.class, new Object[] { control, new Integer(startControlID.intValue() + 1005), new Integer(anchoringHelper6.getX()), new Integer(anchoringHelper6.getY()), new Integer(anchoringHelper6.getWidth()), new Integer(anchoringHelper6.getHeight()), new Integer(startTabIndex.intValue() + 1), ControlState.ENABLED, ControlState.DISABLED,ims.framework.enumerations.ControlAnchoring.TOPLEFT ,Boolean.TRUE, Boolean.TRUE, SortOrder.NONE, Boolean.FALSE, new Integer(1), null, Boolean.FALSE, new Integer(-1)});
  		addControl(m_cmbEmergencyDepartmentTemp);
  		cmbEmergencyDepartmentComboBox cmbEmergencyDepartment = (cmbEmergencyDepartmentComboBox)ComboBoxFlyweightFactory.getInstance().createComboBoxBridge(cmbEmergencyDepartmentComboBox.class, m_cmbEmergencyDepartmentTemp);
  		super.addComboBox(cmbEmergencyDepartment);
  
  		// Dynamic Grid Controls
  		RuntimeAnchoring anchoringHelper7 = new RuntimeAnchoring(designSize, runtimeSize, 8, 40, 808, 552, ims.framework.enumerations.ControlAnchoring.ALL);
  		super.addControl(factory.getControl(DynamicGrid.class, new Object[] { control, new Integer(startControlID.intValue() + 1006), new Integer(anchoringHelper7.getX()), new Integer(anchoringHelper7.getY()), new Integer(anchoringHelper7.getWidth()), new Integer(anchoringHelper7.getHeight()), new Integer(startTabIndex.intValue() + 2), ControlState.READONLY, ControlState.DISABLED, ims.framework.enumerations.ControlAnchoring.ALL, contextMenus.Emergency.contextMenuAttendanceKPIConfiguration, Boolean.FALSE, Boolean.FALSE, Boolean.TRUE}));
  
  		// Image Buttons Controls
  		RuntimeAnchoring anchoringHelper8 = new RuntimeAnchoring(designSize, runtimeSize, 818, 40, 28, 28, ims.framework.enumerations.ControlAnchoring.TOPRIGHT);
  		super.addControl(factory.getControl(ImageButton.class, new Object[] { control, new Integer(startControlID.intValue() + 1007), new Integer(anchoringHelper8.getX()), new Integer(anchoringHelper8.getY()), new Integer(anchoringHelper8.getWidth()), new Integer(anchoringHelper8.getHeight()), new Integer(startTabIndex.intValue() + 3), ControlState.UNKNOWN, ControlState.UNKNOWN, ims.framework.enumerations.ControlAnchoring.TOPRIGHT, this.getImages().Core.DeleteRecordEnabled24, this.getImages().Core.DeleteRecordDisabled24, "Remove the KPI details for the selected KPI", Boolean.FALSE, Boolean.FALSE, Boolean.TRUE, Boolean.FALSE, null}));
  	}
  
  
  
  	public Forms getForms()
  	{
  		return (Forms)super.getFormReferences();
  	}
  
  	public Images getImages()
  	{
  		return (Images)super.getImageReferences();
  	}
  	public Button btnCancel()
  	{
  		return (Button)super.getControl(1);
  	}
  	public Button btnSave()
  	{
  		return (Button)super.getControl(2);
  	}
  	public Button btnEdit()
  	{
  		return (Button)super.getControl(3);
  	}
  	public Button btnNew()
  	{
  		return (Button)super.getControl(4);
  	}
  	public cmbEmergencyDepartmentComboBox cmbEmergencyDepartment()
  	{
  		return (cmbEmergencyDepartmentComboBox)super.getComboBox(0);
  	}
  	public DynamicGrid dyngrdKPI()
  	{
  		return (DynamicGrid)super.getControl(6);
  	}
  	public ImageButton imbDelete()
  	{
  		return (ImageButton)super.getControl(7);
  	}
  
  	public static class Forms implements java.io.Serializable
  	{
  		private static final long serialVersionUID = 1L;
  		protected final class LocalFormName extends FormName
  		{
  			private static final long serialVersionUID = 1L;
  		
  			private LocalFormName(int name)
  			{
  				super(name);
  			}
  		}
  
  		private Forms()
  		{
  			Emergency = new EmergencyForms();
  		}
  		public final class EmergencyForms implements java.io.Serializable
  		{
  			private static final long serialVersionUID = 1L;
  			private EmergencyForms()
  			{
  				KPIDataEntryDialog = new LocalFormName(129128);
  			}
  			public final FormName KPIDataEntryDialog;
  		}
  
  		public EmergencyForms Emergency;
  	}
  
  
  	public static class Images implements java.io.Serializable
  	{
  		private static final long serialVersionUID = 1L;
  		private final class ImageHelper extends ims.framework.utils.ImagePath
  		{
  			private static final long serialVersionUID = 1L;
  			
  			private ImageHelper(int id, String path, Integer width, Integer height)
  			{
  				super(id, path, width, height);
  			}
  		}
  		private Images()
  		{
  			Core = new CoreImages();
  		}
  		public final class CoreImages implements java.io.Serializable
  		{
  			private static final long serialVersionUID = 1L;
  			private CoreImages()
  			{
  				DeleteRecordEnabled24 = new ImageHelper(102527, "Images/Core/field_close_enabled_24.png", new Integer(24), new Integer(24));
  				DeleteRecordDisabled24 = new ImageHelper(102528, "Images/Core/field_close_disabled_24.png", new Integer(24), new Integer(24));
  			}
  			public final ims.framework.utils.Image DeleteRecordEnabled24;
  			public final ims.framework.utils.Image DeleteRecordDisabled24;
  		}
  		public final CoreImages Core;
  	}
  	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_CurrentAttendanceKPIConfig = new ims.framework.ContextVariable("CurrentAttendanceKPIConfig", prefix + "_lv_Emergency.AttendanceKPIConfiguration.__internal_x_context__CurrentAttendanceKPIConfig_" + componentIdentifier + "");
  		}
  		
  		public boolean getCurrentAttendanceKPIConfigIsNotNull()
  		{
  			return !cxl_CurrentAttendanceKPIConfig.getValueIsNull(context);
  		}
  		public ims.emergency.vo.AttendanceKPIConfigVo getCurrentAttendanceKPIConfig()
  		{
  			return (ims.emergency.vo.AttendanceKPIConfigVo)cxl_CurrentAttendanceKPIConfig.getValue(context);
  		}
  		public void setCurrentAttendanceKPIConfig(ims.emergency.vo.AttendanceKPIConfigVo value)
  		{
  			cxl_CurrentAttendanceKPIConfig.setValue(context, value);
  		}
  		private ims.framework.ContextVariable cxl_CurrentAttendanceKPIConfig = null;
  	}
  
  	public final class ContextMenus implements java.io.Serializable
  	{
  		private static final long serialVersionUID = 1L;
  		public EmergencyNamespace Emergency = new EmergencyNamespace();
  		public final class EmergencyNamespace implements java.io.Serializable
  		{
  			private static final long serialVersionUID = 1L;
  			public final class AttendanceKPIConfiguration implements java.io.Serializable
  			{
  				private static final long serialVersionUID = 1L;
  				public static final int EDIT = 1;
  				public static final int DELETE = 2;
  			}
  			public void disableAllAttendanceKPIConfigurationMenuItems()
  			{
  				this.contextMenuAttendanceKPIConfigurationEDITItem.setEnabled(false);
  				this.contextMenuAttendanceKPIConfigurationDELETEItem.setEnabled(false);
  			}
  			public void hideAllAttendanceKPIConfigurationMenuItems()
  			{
  				this.contextMenuAttendanceKPIConfigurationEDITItem.setVisible(false);
  				this.contextMenuAttendanceKPIConfigurationDELETEItem.setVisible(false);
  			}
  			private Menu contextMenuAttendanceKPIConfiguration;
  			public ReadOnlyMenuItem getAttendanceKPIConfigurationEDITItem()
  			{
  				return this.contextMenuAttendanceKPIConfigurationEDITItem;
  			}
  			private MenuItem contextMenuAttendanceKPIConfigurationEDITItem;
  			public ReadOnlyMenuItem getAttendanceKPIConfigurationDELETEItem()
  			{
  				return this.contextMenuAttendanceKPIConfigurationDELETEItem;
  			}
  			private MenuItem contextMenuAttendanceKPIConfigurationDELETEItem;
  		}
  	}
  
  	private ContextMenus contextMenus;
  	public ContextMenus getContextMenus()
  	{
  		return this.contextMenus;
  	}
  
  	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()
  		{
  