예제 #1
0
 @SuppressWarnings("unchecked")
 public SubjectProperty<? extends Serializable> getSubjectProperty() {
   if (subjectProperty == null) {
     subjectProperty = new SubjectProperty<V>(wrappedCriterion);
     try {
       if (panelType.equals(DPANEL)) subjectProperty.setValue((V) new GregorianCalendar());
       // else if(getPanelType().equals(DICHPANEL))
       // subjectProperty.setValue(wrappedCriterion.getConfiguredValues().get(0));
       // else if(getPanelType().equals(FREEPANEL))
       // subjectProperty.setValue((V) new String());
       // else if(getPanelType().equals(ORDPANEL))
       // subjectProperty.setValue(wrappedCriterion.getConfiguredValues().get(0));
     } catch (ConstraintViolatedException e) {
       e.printStackTrace();
     }
   }
   return subjectProperty;
 }
예제 #2
0
 @SuppressWarnings("unchecked")
 public void inclusionConstraintChanged(ValueChangeEvent event) {
   try {
     List<V> l = new ArrayList<V>();
     l.add((V) event.getNewValue());
     wrappedCriterion.setInclusionConstraintAbstract(
         wrappedCriterion.getContstraintType().getConstructor(List.class).newInstance(l));
   } catch (InstantiationException e) {
     e.printStackTrace();
   } catch (IllegalAccessException e) {
     e.printStackTrace();
   } catch (IllegalArgumentException e) {
     e.printStackTrace();
   } catch (SecurityException e) {
     e.printStackTrace();
   } catch (InvocationTargetException e) {
     e.printStackTrace();
   } catch (NoSuchMethodException e) {
     e.printStackTrace();
   } catch (ConstraintViolatedException e) {
     e.printStackTrace();
   }
 }