Java Code Examples for ims.framework.controls.DynamicGridCell.getTypedText()

The following are Jave code examples for showing how to use getTypedText() of the ims.framework.controls.DynamicGridCell class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 6 votes
@Override
protected void onDyngrdGlossaryCellTextSubmited(DynamicGridCell cell) 
{
	if(cell.getRow() != null && cell.getRow().getParent() != null)
	{
		if(cell.getRow().getParent().getValue() instanceof ProfileType)
		{
			if (cell.getTypedText() == null || cell.getTypedText().length() < 3)
			{
				engine.showMessage("Please enter at least 3 characters for search criteria");
				return;
			}
			populateQueryComboBox(cell, domain.listMedicAndSpec((ProfileType) cell.getRow().getParent().getValue(), cell.getTypedText()));
		}
	}
}
 
Example 2
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 6 votes
protected void onDyngrdCollectCellTextSubmited(DynamicGridCell cell)
{
	if (cell.getColumn().equals(getColumn(QUERY_COL)))
	{
		cell.getItems().clear();
		String value = cell.getTypedText();
		PersonName name = new PersonName();
		MemberOfStaffShortVo filter = new MemberOfStaffShortVo();
		name.setSurname(value);
		filter.setIsActive(Boolean.TRUE);
		filter.setName(name);
		MemberOfStaffShortVoCollection voColl = domain.listMembersOfStaff(filter);
		for (int i = 0; i < voColl.size(); i++)
		{
			cell.getItems().newItem(voColl.get(i));
		}
		int cellItemSize = cell.getItems().size();
		if (cellItemSize > 0)
		{
			if (cellItemSize == 1)
				cell.setValue(cell.getItems().get(0));
			cell.showOpened();
		}
	}
}
 
Example 3
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 6 votes
protected void onDyngrdCollectCellTextSubmited(DynamicGridCell cell)
{
	if (cell.getColumn().equals(getColumn(QUERY_COL)))
	{
		cell.getItems().clear();
		String value = cell.getTypedText();
		PersonName name = new PersonName();
		MemberOfStaffShortVo filter = new MemberOfStaffShortVo();
		name.setSurname(value);
		filter.setIsActive(Boolean.TRUE);
		filter.setName(name);
		MemberOfStaffShortVoCollection voColl = domain.listMembersOfStaff(filter);
		for (int i = 0; i < voColl.size(); i++)
		{
			cell.getItems().newItem(voColl.get(i));
		}
		int cellItemSize = cell.getItems().size();
		if (cellItemSize > 0)
		{
			if (cellItemSize == 1)
				cell.setValue(cell.getItems().get(0));
			cell.showOpened();
		}
	}
}
 
Example 4
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 6 votes
protected void onDyngrdCollectCellTextSubmited(DynamicGridCell cell)
{
	if (cell.getColumn().equals(getColumn(QUERY_COL)))
	{
		cell.getItems().clear();
		String value = cell.getTypedText();
		PersonName name = new PersonName();
		MemberOfStaffShortVo filter = new MemberOfStaffShortVo();
		name.setSurname(value);
		filter.setIsActive(Boolean.TRUE);
		filter.setName(name);
		MemberOfStaffShortVoCollection voColl = domain.listMembersOfStaff(filter);
		for (int i = 0; i < voColl.size(); i++)
		{
			cell.getItems().newItem(voColl.get(i));
		}
		int cellItemSize = cell.getItems().size();
		if (cellItemSize > 0)
		{
			if (cellItemSize == 1)
				cell.setValue(cell.getItems().get(0));
			cell.showOpened();
		}
	}
}
 
Example 5
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 6 votes
protected void onDyngrdCollectCellTextSubmited(DynamicGridCell cell)
{
	if (cell.getColumn().equals(getColumn(QUERY_COL)))
	{
		cell.getItems().clear();
		String value = cell.getTypedText();
		PersonName name = new PersonName();
		MemberOfStaffShortVo filter = new MemberOfStaffShortVo();
		name.setSurname(value);
		filter.setIsActive(Boolean.TRUE);
		filter.setName(name);
		MemberOfStaffShortVoCollection voColl = domain.listMembersOfStaff(filter);
		for (int i = 0; i < voColl.size(); i++)
		{
			cell.getItems().newItem(voColl.get(i));
		}
		int cellItemSize = cell.getItems().size();
		if (cellItemSize > 0)
		{
			if (cellItemSize == 1)
				cell.setValue(cell.getItems().get(0));
			cell.showOpened();
		}
	}
}
 
Example 6
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
protected void onDyngrdAssociationsCellTextSubmited(DynamicGridCell cell)
{
	if (!(cell.getRow().getParent().getValue() instanceof AssociationCategory))
		return;
	
	if (cell.getTypedText() == null || cell.getTypedText().length() < 3)
	{
		engine.showMessage("Please enter at least 3 characters to search upon.");
		return;
	}
	
	try
	{
		switch ((AssociationCategory) cell.getRow().getParent().getValue())
		{
			case CLINICS:
				populateQueryComboboxClinics(cell, listClinicsByName(cell.getTypedText()));
				break;
				
			case CONSULTANTS:
				populateQueryComboboxConsultants(cell, listConsultantsByName(cell.getTypedText()));
				break;
				
			case SPECIALTY:
				populateQueryComboboxSpecialties(cell, listSpecialtyByName(cell.getTypedText()));
				break;
		}
	}
	catch (CodingRuntimeException exception)
	{	engine.showMessage(exception.getMessage());	}
	
	form.dyngrdAssociations().setSelectedRow(null);
	updateContextMenuState();
}
 
Example 7
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
@Override
protected void onDyngrdHeadersCellTextSubmited(DynamicGridCell cell) 
{
	if(cell.getRow() != null && cell.getRow().getParent() != null && (cell.getRow().getParent().getValue() instanceof TemplateCategoryVo || cell.getRow().getParent().getValue() instanceof ReportTemplateVo))
	{
		if (cell.getTypedText() == null || cell.getTypedText().length() < 3)
		{
			engine.showMessage("Please enter at least 3 characters for search criteria");
			return;
		}
		populateQueryComboBox(cell, ims.correspondence.vo.lookups.LookupHelper.getHeader(domain.getLookupService()));
	}
}
 
Example 8
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
@Override
protected void onDyngrdDetailsCellTextSubmited(DynamicGridCell cell)
{
	if (!(cell.getRow().getParent().getValue() instanceof AccessCategory))
		return;
	
	if (cell.getTypedText() == null || cell.getTypedText().trim().length() < 3)
	{
		engine.showMessage("Please enter at least 3 characters to search upon.");
		return;
	}


	try
	{
		switch((AccessCategory) cell.getRow().getParent().getValue())
		{
			case CLINICS:
					populateQueryComboboxClinics(cell, listClinicsByName(cell.getTypedText()));
				break;
				
			case CONSULTANTS:
					populateQueryComboboxConsultants(cell, listConsultantsByName(cell.getTypedText()));
				break;
				
			case SPECIALTY:
					populateQueryComboboxSpecialties(cell, listSpecialtyByName(cell.getTypedText()));
				break;
		}
	}
	catch (CodingRuntimeException e)
	{	engine.showMessage(e.getMessage());	}
	
	form.dyngrdDetails().setSelectedRow(null);
	updateControlsState();
}
 
Example 9
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
protected void onDyngrdInviteesCellTextSubmited(DynamicGridCell cell)
{
	cell.getItems().clear();
	if (cell.getTypedText() == null || cell.getTypedText().equals(""))
	{
		engine.showMessage("Please enter at least one character to search on.");
		return;
	}

	HcpLiteVoCollection collHcps = domain.listHcpLiteVoByName(cell.getTypedText());
	if (collHcps != null && collHcps.size() > 0)
	{
		for (int i = 0; i < collHcps.size(); i++)
		{
			cell.getItems().newItem(collHcps.get(i));
		}
		if (collHcps.size() == 1)
		{
			cell.setValue(collHcps.get(0));
		}
		else if (collHcps.size() > 1)
			cell.showOpened();
	}
	else
		engine.showMessage("No matching records found");

}
 
Example 10
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
protected void onDyngrdInviteesCellTextSubmited(DynamicGridCell cell) 
{
	cell.getItems().clear();
	if (cell.getTypedText() == null || cell.getTypedText().equals(""))
	{
		engine.showMessage("Please enter at least one character to search on.");
		return;
	}

	if (cell.getIdentifier() != null && cell.getIdentifier().equals(HcpLiteVo.class))
	{
		HcpLiteVoCollection collHcps = domain.listHcpLiteVoByName(cell.getTypedText());
		//MemberOfStaffShortVoCollection voCollMos = domain.listMos(cell.getTypedText());
		if (collHcps != null && collHcps.size() > 0)
		{
			for (int i = 0; i < collHcps.size(); i++)
			{
				cell.getItems().newItem(collHcps.get(i));
			}
			if (collHcps.size() == 1)
			{
				cell.setValue(collHcps.get(0));
				onDyngrdInviteesCellValueChanged(cell);
			}
			else if (collHcps.size() > 1)
				cell.showOpened();
		}
		else
			engine.showMessage("No matching records found");
	}
}
 
Example 11
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 4 votes
private void searchAndDisplayHcpInGridQCmb(DynamicGridCell cell) throws PresentationLogicException
{
	String typedText = cell.getTypedText();
	
	cell.getItems().clear();
	cell.setTypedText(null);
	
	if (form.getLocalContext().getCurrentEditedConsultantIsNotNull() && 
			(form.getLocalContext().getCurrentEditedConsultant().getValue() instanceof ConsultantProcedureCategoryVo))
	{
		HcpLiteVo savedConsultant = ((ConsultantProcedureCategoryVo)form.getLocalContext().getCurrentEditedConsultant().getValue()).getPerformingHCP();
		if (savedConsultant != null)
		cell.getItems().newItem(savedConsultant);
	}
	
	

	HcpLiteVoCollection result;
	try
	{
		
		result = domain.listHcpLiteNotConfigured(typedText);
	}
	catch (DomainInterfaceException e)
	{
		throw new PresentationLogicException(e);
	}
	
	
	if (result!=null)
	{
		for (int i = 0; i < result.size(); i++)
		{
			cell.getItems().newItem(result.get(i));
		}
	}
	if (cell.getItems().size() > 0)
	{
	if (cell.getItems().size() == 1)
	{
		cell.setValue(cell.getItems().get(0).getValue());
	}
	else
	{
		cell.showOpened();
	}
	}
	DynamicGridRow selectedRow = form.dyngrdMain().getSelectedRow();
	if (selectedRow!=null)
	{
	form.dyngrdMain().setSelectedRow(null);
	form.dyngrdMain().setSelectedRow(selectedRow);
	}
}
 
Example 12
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 4 votes
protected void onDyngrdReportToCellTextSubmited(DynamicGridCell cell)
{
	cell.getItems().clear();

	if (cell.getTypedText() == null || cell.getTypedText().equals(""))
	{
		engine.showMessage("Please enter at least one character to search on.");
		return;
	}

	if (cell.getIdentifier() != null && cell.getIdentifier().equals(MemberOfStaffRefVo.class))
	{
		MemberOfStaffShortVoCollection voCollMos = domain.listMos(cell.getTypedText());
		if (voCollMos != null && voCollMos.size() > 0)
		{
			voCollMos.sort();
			for (int i = 0; i < voCollMos.size(); i++)
			{
				cell.getItems().newItem(voCollMos.get(i), voCollMos.get(i).toString());
			}
			if (voCollMos.size() == 1)
			{
				cell.setValue(voCollMos.get(0));
				onDyngrdReportToCellValueChanged(cell);
			}
			else if (voCollMos.size() > 1)
				cell.showOpened();
		}
		else
			engine.showMessage("No matching records found");
	}
	else if (cell.getIdentifier() != null && (cell.getIdentifier().equals(LocationType.WARD) || (cell.getIdentifier().equals(LocationType.OUTPATIENT_DEPT))))
	{
		LocShortVoCollection voCollLocations = null;

		DynamicGridCell cellHosp = cell.getRow().getCells().get(form.lyrDetails().tabGenDetails().dyngrdReportTo().getColumns().getByIdentifier(REPORTTO_COLUMN));
		if (cell.getIdentifier().equals(LocationType.WARD))
			voCollLocations = domain.listWardsForHospitalByNameShort((LocationRefVo) cellHosp.getValue(), cell.getTypedText());
		else if (cell.getIdentifier().equals(LocationType.OUTPATIENT_DEPT))
			voCollLocations = domain.listOutpatDeptsForHospitalByNameShort((LocationRefVo) cellHosp.getValue(), cell.getTypedText());

		if (voCollLocations != null && voCollLocations.size() > 0)
		{
			voCollLocations.sort();
			for (int i = 0; i < voCollLocations.size(); i++)
			{
				cell.getItems().newItem(voCollLocations.get(i), voCollLocations.get(i).toString());
			}
			if (voCollLocations.size() == 1)
			{
				cell.setValue(voCollLocations.get(0));
				onDyngrdReportToCellValueChanged(cell);
			}
			else if (voCollLocations.size() > 1)
				cell.showOpened();
		}
		else
			engine.showMessage("No matching locations found");
	}
	else
	{
		GpShortVoCollection voCollGps = domain.listGPsBySurname(cell.getTypedText());
		if (voCollGps != null && voCollGps.size() > 0)
		{
			voCollGps.sort();
			for (int i = 0; i < voCollGps.size(); i++)
			{
				cell.getItems().newItem(voCollGps.get(i), voCollGps.get(i).toString());
			}
			if (voCollGps.size() == 1)
			{
				cell.setValue(voCollGps.get(0));
				onDyngrdReportToCellValueChanged(cell);
			}
			else if (voCollGps.size() > 1)
				cell.showOpened();
		}
		else
			engine.showMessage("No matching records found");
	}
}