Example #1
0
 public void createOrUpdate() {
   if (current.getPkid() != null) {
     super.update();
   } else {
     super.create();
   }
   sendNotification();
 }
Example #2
0
 @Override
 public String getAsString(FacesContext facesContext, UIComponent component, Object object) {
   if (object == null) {
     return null;
   }
   if (object instanceof TimeOff) {
     TimeOff o = (TimeOff) object;
     return getStringKey(o.getPkid());
   } else {
     throw new IllegalArgumentException(
         "object "
             + object
             + " is of type "
             + object.getClass().getName()
             + "; expected type: "
             + TimeOff.class.getName());
   }
 }