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

The following are Jave code examples for showing how to use clear() 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
private void removeMoveButtons(DynamicGridRow row) 
{
	DynamicGridCell resultCell = row.getCells().get(getColumn(COL_RESULT_DATA));
	DynamicGridCell sourceCell = row.getCells().get(getColumn(COL_SOURCE_PATIENT));
	DynamicGridCell destinationCell = row.getCells().get(getColumn(COL_DESTINATION_PATIENT));
	if(resultCell != null && resultCell.getValue() != null && sourceCell != null && resultCell.getValue().equals(sourceCell.getValue()) && destinationCell != null && resultCell.getValue().equals(destinationCell.getValue()))
	{
		DynamicGridCell cell = row.getCells().get(getColumn(COL_SOURCE_BUTTONS));
		if(cell != null)
			cell.clear();
		
		cell = row.getCells().get(getColumn(COL_DESTINATION_BUTTONS));
		if(cell != null)
			cell.clear();
	}
}
 
Example 2
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 4 votes
protected void onDyngrdOrganisationLocationCellValueChanged(DynamicGridCell cell)
{
	if (cell.getType().equals(DynamicCellType.ENUMERATION))
	{
		DynamicGridRow row = cell.getRow();
		if ( (row != null) && (row.getValue() != null) )
		{
			form.dyngrdOrganisationLocation().setSelectedRow(row);

			if (cell.getValue() != null)
				row.setChecked(true);
			else
				row.setChecked(false);
			
			//Find the previous accreditation for this Row....if it was ACCREDITED stop and insist on an end date being saved first
			
			if (ConfigFlag.UI.MANDATORY_MOS_ACCREDITATION_STATUS.getValue())
			{
				if (getColByIdentifier(COL_ACCREDITATION) != null && getColByIdentifier(COL_ACCREDITATION_CASETYPES) != null)
				{
					DynamicGridCell cellAccreditation = row.getCells().get(form.dyngrdOrganisationLocation().getColumns().getByIdentifier(COL_ACCREDITATION));

					if (cellAccreditation.getValue() != null && (((AccreditationLocationStatus) cellAccreditation.getValue()).equals(AccreditationLocationStatus.RESTICT_ACCRED) || ((AccreditationLocationStatus) cellAccreditation.getValue()).equals(AccreditationLocationStatus.RESTRICT_ACCRED_REFERRING)))
					{
						row.getCells().newCell(getColByIdentifier(COL_ACCREDITATION_CASETYPES), DynamicCellType.BUTTON);
					}
					else
					{
						DynamicGridCell caseTypeCell = row.getCells().get(form.dyngrdOrganisationLocation().getColumns().getByIdentifier(COL_ACCREDITATION_CASETYPES));
						
						if (caseTypeCell != null)
							caseTypeCell.clear();
					}

					DynamicGridCell cellCases = row.getCells().get(form.dyngrdOrganisationLocation().getColumns().getByIdentifier(COL_ACCREDITATION_CASETYPES));

					if (form.dyngrdOrganisationLocation().getSelectedRow().getValue() instanceof HcpLocationVo)
		           	{
		           		((HcpLocationVo)form.dyngrdOrganisationLocation().getSelectedRow().getValue()).setCaseTypes(null);
		           	}
					else
					if (cellCases != null)
						cellCases.setIdentifier(null);

				}
			}
		}
	}
	
}