@Override public Boolean getObject() { McSubTaskDefAnswerDefinitionsItem answerDef = nestedModel.getObject(); NamedString ns = answerDef.getItemCorrect(); if (ns != null) return Boolean.TRUE; else return Boolean.FALSE; }
/* * (non-Javadoc) * * @see org.apache.wicket.model.Model#setObject(java.io.Serializable) */ @Override public void setObject(Boolean iscorrect) { McSubTaskDefAnswerDefinitionsItem answerDef = nestedModel.getObject(); if (iscorrect) { answerDef.setItemCorrect(answerDef.getItemIncorrect()); answerDef.setItemIncorrect(null); } else { answerDef.setItemIncorrect(answerDef.getItemCorrect()); answerDef.setItemCorrect(null); } }