private PresentationObject getContractTable(IWContext iwc, int iCategoryId) { List L = ContractFinder.listOfStatusContracts(this.sGlobalStatus, iCategoryId);
private PresentationObject getContractTable(IWContext iwc, int iCategoryId) { List L = ContractFinder.listOfStatusContracts(sGlobalStatus, iCategoryId);
	private PresentationObject getContractTable(IWContext iwc, int iCategoryId)	{		List L = ContractFinder.listOfStatusContracts(this.sGlobalStatus, iCategoryId);		List tags = ContractFinder.listOfContractTagsInList(iCategoryId);		DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT, iwc.getCurrentLocale());		Contract C = null;		ContractTag tag;		boolean hasTags = tags != null;		int tagCount = hasTags ? tags.size() : 0;		Table T = new Table();		T.setCellspacing(0);		T.setCellpadding(2);		String field;		if (L != null)		{			int len = L.size();			T = new Table(5 + tagCount, len + 2);			T.setCellspacing(1);			T.setCellpadding(0);			int row = 1;			int col = 1;			T.add(Edit.titleText(iwrb.getLocalizedString("nr", "Nr")), col++, row);			col++;			T.add(Edit.titleText(iwrb.getLocalizedString("validfrom", "Valid from")), col++, row);			T.add(Edit.titleText(iwrb.getLocalizedString("validfrom", "Valid to")), col++, row);			T.add(Edit.titleText(iwrb.getLocalizedString("changed", "Changed")), col++, row);			String[] tagKeys = new String[tagCount];			for (int k = 0; k < tagCount; k++)			{				tag = (ContractTag) tags.get(k);				T.add(Edit.titleText(tag.getName()), col++, row);				tagKeys[k] = String.valueOf(tag.getID());			}			row++;			col = 1;			Image propImage = core.getImage("/shared/edit.gif");			for (int i = 0; i < len; i++)			{				C = (Contract) L.get(i);				T.add(Edit.formatText(i + 1), col++, row);				if (isAdmin)				{					T.add(getPropertyLink(propImage, C), col, row);				}				col++;				T.add(Edit.formatText(df.format(C.getValidFrom())), col++, row);				T.add(Edit.formatText(df.format(C.getValidTo())), col++, row);				T.add(Edit.formatText(df.format(C.getStatusDate())), col++, row);				for (int k = 0; k < tagCount; k++)				{					field = C.getMetaData(tagKeys[k]);					T.add(Edit.formatText(field), col++, row);				}				row++;				col = 1;			}			col = 4;			T.setHorizontalZebraColored(Edit.colorLightBlue, Edit.colorWhite);			T.setRowColor(1, Edit.colorBlue);			T.setRowColor(row, Edit.colorRed);			T.mergeCells(1, row, 8, row);			T.setWidth(1, "15");			T.add(Edit.formatText(" "), 1, row);			T.setColumnAlignment(1, "left");			T.setHeight(row, Edit.bottomBarThickness);			T.setWidth("100%");		}		else		{			T.add(Edit.formatText(iwrb.getLocalizedString("no_contracts", "No contracts")));		}		return T;	}