ItEr49S18AdaptacionServiciosREST: Made 'code' field editable for Criteria and CriterionTypes.

This commit is contained in:
Jacobo Aragunde Pérez 2010-03-05 21:11:47 +01:00 committed by Javier Moran Rua
parent 03fb5ffd6c
commit 8d950f1b2b
2 changed files with 17 additions and 4 deletions

View file

@ -178,9 +178,21 @@ public class CriterionTreeController extends GenericForwardComposer {
// Treecell with the code of the Criterion
Treecell cellForCode = new Treecell();
cellForCode.setStyle("center");
Label codeLabel = new Label();
codeLabel.setValue(criterionForThisRow.getCriterion().getCode());
cellForCode.appendChild(codeLabel);
Textbox codeLabel = new Textbox();
cellForCode.appendChild(Util.bind(codeLabel,
new Util.Getter<String>() {
@Override
public String get() {
return criterionForThisRow.getCriterion().getCode();
}
}, new Util.Setter<String>() {
@Override
public void set(String value) {
criterionForThisRow.getCriterion().setCode(value);
}
}));
cellForName.setParent(tr);
cellForCode.setParent(tr);

View file

@ -62,7 +62,8 @@
</row>
<row>
<label value="${i18n:_('Code')}" />
<label value="@{controller.criterionType.code}"/>
<textbox value="@{controller.criterionType.code}" width="390px"
constraint="no empty:${i18n:_('cannot be null or empty')}" />
</row>
</rows>
</grid>