Java Code Examples for ims.configuration.gen.ConfigFlag.reloadFlags()

The following are Jave code examples for showing how to use reloadFlags() of the ims.configuration.gen.ConfigFlag class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 4 votes
protected void onContextMenuItemClick(int menuItemID, Control sender) throws PresentationLogicException 
{
	form.getLocalContext().setLastMenuId(menuItemID);
	
	if (menuItemID == GenForm.ContextMenus.ConfigFlag.Update)
	{
		if(form.getLocalContext().getisSystemFlag() && !form.getLocalContext().getPasswordEntered())
		{
			form.getGlobalContext().Core.setYesNoDialogMessage("Incorrect use of System Flags can cause application failure. Please use with caution.");
			engine.open(form.getForms().Core.YesNoDialog);
		}
		else
		{
			editFlag();
		}
	
	}
	else if (menuItemID == GenForm.ContextMenus.ConfigFlag.Reload)
	{
		try
		{
			ConfigFlag.reloadFlags();
			setupRootRows();
		}
		catch (Exception e)
		{
			throw new RuntimeException(e);
		}
	}
	else if (menuItemID == GenForm.ContextMenus.ConfigFlag.Reset)
	{
		if(form.getLocalContext().getisSystemFlag() && !form.getLocalContext().getPasswordEntered())
		{
			form.getGlobalContext().Core.setYesNoDialogMessage("Incorrect use of System Flags can cause application failure. Please use with caution.");
			engine.open(form.getForms().Core.YesNoDialog);
		}
		else
		{
			resetFlag();
		}
	}
	else if (menuItemID == GenForm.ContextMenus.ConfigFlag.Import)
	{
		Object[] params = new Object[1]; 
		params[0] = ims.admin.vo.enums.ConfigFlags.IMPORT;
		engine.open(form.getForms().Admin.ConfigFlagsImportExport, params);
	}
}