public Object getValueAt(int column, int row) {
if ((getJbsObjects().size() > 0) && (row < getJbsObjects().size())) {
try {
Letter letter = (Letter) this.getJbsObjects().get(row);
Address address = null;
if (letter.getContact()!=null) {
if (letter.getContact() instanceof Address)
address = (Address)letter.getContact();
else
address=letter.getContact().getAddress();
}
switch (column) {
case 0:
String sDate = "";
if (letter.getLetterDate()!=null)
sDate = ClientGlobals.getDateFormat().format(letter.getLetterDate().getTime());
return sDate;
case 1:
if (letter.getLetterSubject()!=null)
return letter.getLetterSubject();
else
return null;
case 2:
String sName = "";
if (address!=null) {
sName=address.getName1();
if ((address.getFirstName()!=null) && (!address.getFirstName().equals("")))
sName+=", "+address.getFirstName();
}
return sName;
case 3:
String sCity = "";
if (address!=null) {
if ((address.getCity()!=null) && (!address.getCity().equals("")))
sCity+=address.getCity();
if ((address.getZip()!=null) && (!address.getZip().equals(""))) {
if (!sCity.equals(""))
sCity = " "+sCity;
sCity=address.getZip()+sCity;
}
}
return sCity;
default:
return "";