Java Code Examples for ims.framework.enumerations.DynamicCellType.QUERYCOMBOBOX

The following are Jave code examples for showing how to use QUERYCOMBOBOX of the ims.framework.enumerations.DynamicCellType 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 6 votes
protected void onDyngrdAssociationsCellValueChanged(DynamicGridCell cell)
{
	if (cell.getType() != DynamicCellType.QUERYCOMBOBOX)
		return;
	
	if (!(cell.getRow().getParent().getValue() instanceof AssociationCategory))
		return;
	
	switch ((AssociationCategory) cell.getRow().getParent().getValue())
	{
		case CLINICS:
			updateClinicAssociationRowValue(cell.getRow());
			break;
			
		case CONSULTANTS:
			updateConsultantAssociationRowValue(cell.getRow());
			break;
			
		case SPECIALTY:
			updateSpecialtyAssociationRowValue(cell.getRow());
			break;
	}
	
	form.dyngrdAssociations().setSelectedRow(null);
	updateContextMenuState();
}
 
Example 2
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
@Override
protected void onDyngrdDetailsCellValueChanged(DynamicGridCell cell)
{
	if (cell.getType() != DynamicCellType.QUERYCOMBOBOX)
		return;

	if (!(cell.getRow().getParent().getValue() instanceof AccessCategory))
		return;
	
	switch ((AccessCategory) cell.getRow().getParent().getValue())
	{
		case CLINICS:
			updateClinicAccessRowValue(cell.getRow());
			break;
			
		case CONSULTANTS:
			updateConsultantAccessRowValue(cell.getRow());
			break;
			
		case SPECIALTY:
			updateSpecialtyAccessRowValue(cell.getRow());
			break;
	}
	
	form.dyngrdDetails().setSelectedRow(null);
	updateControlsState();
}
 
Example 3
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
private DynamicCellType getSeedSearchCellType(ReportSeedParsedVo seed)
{
	// If the seed is marked as 'search'-able seed
	if (seed.getSearchTypeIsNotNull())
	{
		// If the seed is 'search'-able partial date - search type will be the string "PD"
		if (seed.getSearchType().equalsIgnoreCase("PD"))
			return DynamicCellType.PARTIALDATE;
		
		// If the seed is 'search'-able by a collection of strings - the search type will be the string "S"
		if (seed.getSearchType().equalsIgnoreCase("S"))
		{
			// WDEV-14289'
			// For 'Lookup instance' we use a combo-box 
			if (seed.getBOName().equalsIgnoreCase("ims.domain.lookups.LookupInstance"))
			{
				return DynamicCellType.ENUMERATION;
			}
			
			return DynamicCellType.QUERYCOMBOBOX;
		}
	}

	// Keep this for old reports legacy
	if(seed.getType().equalsIgnoreCase(INTEGER) &&
			(seed.getName().equalsIgnoreCase("DOB") || seed.getName().equalsIgnoreCase("DOB_START") || seed.getName().equalsIgnoreCase("DOB_END")
			|| seed.getName().equalsIgnoreCase("DATE_OF_BIRTH_FROM") || seed.getName().equalsIgnoreCase("DATE_OF_BIRTH_TO") || "PD".equalsIgnoreCase(seed.getSearchType())))
	{
		return DynamicCellType.PARTIALDATE;
	}


	return getReportSeed().getCellType(seed);
}
 
Example 4
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 5 votes
/**
 * WDEV-12753
 * Function used to determine the type of cell used as a value for seed
 */
private DynamicCellType getSeedSearchCellType(ReportSeedParsedVo seed)
{
	// If the seed is marked as 'search'-able seed
	if (seed.getSearchTypeIsNotNull())
	{
		// If the seed is 'search'-able partial date - search type will be the string "PD"
		if (seed.getSearchType().equalsIgnoreCase("PD"))
			return DynamicCellType.PARTIALDATE;
		
		// If the seed is 'search'-able by a collection of strings - the search type will be the string "S"
		if (seed.getSearchType().equalsIgnoreCase("S"))
		{
			// WDEV-14289'
			// For 'Lookup instance' we use a combo-box 
			if (seed.getBOName().equalsIgnoreCase("ims.domain.lookups.LookupInstance"))
			{
				return DynamicCellType.ENUMERATION;
			}
			
			return DynamicCellType.QUERYCOMBOBOX;
		}
	}

	// Keep this for old reports legacy
	if(seed.getType().equalsIgnoreCase(INTEGER) &&
			(seed.getName().equalsIgnoreCase("DOB") || seed.getName().equalsIgnoreCase("DOB_START") || seed.getName().equalsIgnoreCase("DOB_END")
			|| seed.getName().equalsIgnoreCase("DATE_OF_BIRTH_FROM") || seed.getName().equalsIgnoreCase("DATE_OF_BIRTH_TO") || "PD".equalsIgnoreCase(seed.getSearchType())))
	{
		return DynamicCellType.PARTIALDATE;
	}


	return getReportSeed().getCellType(seed);
}
 
Example 5
Project: AvoinApotti   File: ReportSeedsHelper.java   Source Code and License Vote up 5 votes
private DynamicCellType getBoReportType(ReportSeedParsedVo voReportSeed)
{
	String boName = voReportSeed.getBOName();
	String boField = voReportSeed.getBOField();

	if (boName != null && boField != null)
	{
		if (boName.equals(HCP_BO) && boField.equals("id"))
			return DynamicCellType.QUERYCOMBOBOX;

		if (boName.equals(GP_BO) && boField.equals("id"))
			return DynamicCellType.QUERYCOMBOBOX;

		if (boName.equals(MEDIC_BO) && boField.equals("id"))
			return DynamicCellType.QUERYCOMBOBOX;

		if (boName.equals(MOS_BO) && boField.equals("id"))
			return DynamicCellType.QUERYCOMBOBOX;

		if (boName.equals(ORG_BO) && boField.equals("id"))
			return DynamicCellType.QUERYCOMBOBOX;

		if (boName.equals(LOCATION_BO) && boField.equals("id"))
			return DynamicCellType.QUERYCOMBOBOX;

		if (boName.equals(LOC_SITE_BO) && boField.equals("id"))
			return DynamicCellType.QUERYCOMBOBOX;
		
		if (boName.equals(LOOKUPINSTANCE_BO) && boField.equals("id"))
			return DynamicCellType.ENUMERATION;
				
	}

	return DynamicCellType.INT;
}