ItEr40S05ValidacionEProbasFuncionaisItEr39S05: [Bug #209] Modify material in general view has no effect
This commit is contained in:
parent
f7c5d7c82d
commit
b6ed83337e
3 changed files with 9 additions and 3 deletions
|
|
@ -104,7 +104,7 @@ public class MaterialsController extends
|
|||
for (Iterator i = rows.getChildren().iterator(); i.hasNext(); ) {
|
||||
final Row row = (Row) i.next();
|
||||
final Material material = (Material) row.getValue();
|
||||
Button btnDelete = (Button) row.getChildren().get(5);
|
||||
Button btnDelete = (Button) row.getChildren().get(6);
|
||||
if (!material.isNewObject()) {
|
||||
btnDelete.setDisabled(true);
|
||||
btnDelete.setImage("/common/img/ico_borrar_out.png");
|
||||
|
|
|
|||
|
|
@ -202,7 +202,11 @@ public class MaterialsModel implements IMaterialsModel {
|
|||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public Collection<? extends Material> getMaterials() {
|
||||
return materialDAO.getAll();
|
||||
List<Material> result = new ArrayList<Material>();
|
||||
for (MaterialCategory each: materialCategories.asList()) {
|
||||
result.addAll(each.getMaterials());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,17 +90,19 @@
|
|||
<newdatasortablecolumn label="${i18n:_('Description')}" />
|
||||
<newdatasortablecolumn label="${i18n:_('Unit price')}" />
|
||||
<newdatasortablecolumn label="${i18n:_('Unit type')}" />
|
||||
<newdatasortablecolumn label="${i18n:_('Category')}" />
|
||||
<newdatasortablecolumn label="${i18n:_('Disabled')}" />
|
||||
<newdatasortablecolumn label="" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row self="@{each='material'}" value="@{material}">
|
||||
<row self="@{each='material'}" value="@{material}" >
|
||||
<textbox id="code" value="@{material.code}"
|
||||
constraint="no empty:${i18n:_('cannot be null or empty')}" />
|
||||
<textbox value="@{material.description}" />
|
||||
<doublebox value="@{material.defaultUnitPrice}" />
|
||||
<listbox mold="select" model="@{unitTypes}"
|
||||
selectedItem="@{material.unitType}"/>
|
||||
<label value="@{material.category.name}" />
|
||||
<checkbox checked="@{material.disabled}" />
|
||||
<button sclass="icono"
|
||||
image="/common/img/ico_borrar1.png"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue