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

The following are Jave code examples for showing how to use setOptions() 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 5 votes
/**
 * WDEV-12907
 * Function used to populate Over45 field
 * @param required
 * @param isOver45 - value to be set; if it is <b>null</b> then it will default accordingly to patient age (Yes when age is over 45, No when age is at most 45)
 */
private void populateOver45(Boolean required, Boolean isOver45)
{
	YesNoCollection lookup = ims.core.vo.lookups.LookupHelper.getYesNo(this.domain.getLookupService());

	DynamicGridRow over45Row = form.lyrMain().tabTumourDetails().lyrPrognosticTNM().tabTNM().dynGrdPreTreatment().getRows().newRow();
	DynamicGridCell typeNameCell = over45Row.getCells().newCell(getColumn(COLTYPE_NAME), DynamicCellType.HTMLVIEW);
	typeNameCell.setBackColor(Color.Gray);
	typeNameCell.setOptions(DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	typeNameCell.setValue("<b><p align=center>Over 45</p></b>");

	DynamicGridCell typeValueCell = over45Row.getCells().newCell(getColumn(COLTYPE_VALUE), DynamicCellType.ENUMERATION);
	for (int i = 0; i < lookup.size(); i++)
	{
		typeValueCell.getItems().newItem(lookup.get(i), lookup.get(i).getText());
	}

	if (Boolean.TRUE.equals(required))
	{
		if (isOver45 != null)
		{
			typeValueCell.setValue(Boolean.TRUE.equals(isOver45) ? YesNo.YES : YesNo.NO);
		}
		else
		{
			if (form.getGlobalContext().Core.getPatientShort().getAgeIsNotNull())
			{
				typeValueCell.setValue(form.getGlobalContext().Core.getPatientShort().getAge().intValue() >= 45 ? YesNo.YES : YesNo.NO);
			}
		}
	}

	typeValueCell.setAutoPostBack(true);
	typeValueCell.setIdentifier(OVER45);
}
 
Example 2
Project: AvoinApotti   File: Logic.java   View Source Code Vote up 5 votes
private void populateOverall(TumourGroupSiteOverallStagingVo value)
{
	DynamicGridRow overallRow = form.lyrMain().tabTumourDetails().lyrPrognosticTNM().tabTNM().dynGrdPreTreatment().getRows().newRow();
	overallRow.setIdentifier(OVERALL_VALUE);
	DynamicGridCell typeNameCell = overallRow.getCells().newCell(getColumn(COLTYPE_NAME), DynamicCellType.HTMLVIEW);
	typeNameCell.setBackColor(Color.Gray);
	typeNameCell.setOptions(DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	typeNameCell.setValue("<b><p align=center>Overall Stage</p></b>");

	DynamicGridCell typeValueCell = overallRow.getCells().newCell(getColumn(COLTYPE_VALUE), DynamicCellType.ENUMERATION);
	if (value != null)
		typeValueCell.setIdentifier(value);
	else
		typeValueCell.setIdentifier(OVERALL_VALUE);

	typeValueCell.setAutoPostBack(true);
	if (value != null)
	{
		typeValueCell.getItems().newItem(value, value.toString());
		typeValueCell.setValue(value);
	}

	TNMCertaintyFactorCollection certaintyFactor = ims.oncology.vo.lookups.LookupHelper.getTNMCertaintyFactor(this.domain.getLookupService());

	DynamicGridCell certainNameCell = overallRow.getCells().newCell(getColumn(COLCERTAIN_NAME), DynamicCellType.HTMLVIEW);
	certainNameCell.setBackColor(Color.Gray);
	certainNameCell.setOptions(DynamicGridCellOptions.READ_ONLY_DATA_CELL);
	certainNameCell.setValue("<b><p align=center>Overall Certainty</p></b>");

	DynamicGridCell certainValueCell = overallRow.getCells().newCell(getColumn(COLCERTAIN_VALUE), DynamicCellType.ENUMERATION);
	certainValueCell.setIdentifier(OVERALLCERTAIN_VALUE);
	bindCertaintyFactor(certaintyFactor, certainValueCell, form.getLocalContext().getSelectedRecordIsNotNull() && form.getLocalContext().getSelectedRecord().getID_PrimaryTumourDetailsIsNotNull() ? (form.getLocalContext().getSelectedRecord().getPreTreatmentOverAllCertIsNotNull() ? form.getLocalContext().getSelectedRecord().getPreTreatmentOverAllCert() : null) : null);
}