Lazy arb piece of code but hey well maybe it will help someone:
Put this in the component in your table you want to make non readonly when it is a new row:
readOnly="#{not yourBean.newRow}"
public boolean isNewRow() {
ViewRowImpl row = (ViewRowImpl) JSFUtils.resolveExpression("#{row.row}");
return row.getNewRowState() == Row.STATUS_INITIALIZED || row.getNewRowState() == Row.STATUS_NEW;
}
ViewRowImpl row = (ViewRowImpl) JSFUtils.resolveExpression("#{row.row}");
return row.getNewRowState() == Row.STATUS_INITIALIZED || row.getNewRowState() == Row.STATUS_NEW;
}
could also just use el : readOnly="#{not (row.row.newRowState < 1}"
Comments
Post a Comment