}
public Object getValueAt(int column, int row) {
if ((getJbsObjects().size() > 0) && (row < getJbsObjects().size())) {
try {
Contact contact = (Contact) this.getJbsObjects().get(row);
switch (column) {
case 0:
String name = "";
if (contact.getName2() != null) {
name = contact.getName2();
}
if (contact.getName1() != null) {
if (!name.equals(""))
name+=" ";
name += contact.getName1();
}
if ((contact.getFirstName() != null) && (!contact.getFirstName().trim().equals(""))) {
name = name + ", " + contact.getFirstName();
}
if (name.equals(""))
name="test";
return name;
case 1:
String sType = JbsL10N.getString("ContactType.CT_CONTACT");
if (contact instanceof HierarchyCustomer)
sType = JbsL10N.getString("ContactType.CT_CUSTOMER");
else if (contact instanceof Customer)
sType = JbsL10N.getString("ContactType.CT_CUSTOMER");
else if (contact instanceof Employee)
sType = JbsL10N.getString("ContactType.CT_EMPLOYEE");
return sType;
case 2:
if ((contact.getAddress()!=null) && (contact.getAddress().getStreet()!=null))
return contact.getAddress().getStreet();
else if ((contact instanceof Address) && (((Address)contact).getStreet()!=null))
return ((Address)contact).getStreet();
else
return "";
case 3:
String zip = "";
Address address = null;
if (contact instanceof Address)
address = (Address)contact;
else
address = contact.getAddress();
String city = "";
if (address!=null) {
if (address.getZip() != null) {
zip = address.getZip();