Advertisement
psi_mmobile

Untitled

Jan 29th, 2020
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. protected int createRemoteUnit(AppModuleImpl am) {
  2. ViewObject vo = am.getRemoteUnitView1();
  3. Row row = vo.createRow();
  4. row.setNewRowState(Row.STATUS_INITIALIZED);
  5. row.setAttribute("AdminCenterId", UserBean.getCurrent().getAdminCenterId());
  6. vo.insertRow(row);
  7. am.getTransaction().postChanges();
  8. log.debug("RemoteUnitId? : " + row.getAttribute("RemoteUnitId"));
  9. int remoteUnitId = (Integer)row.getAttribute("RemoteUnitId");
  10. return remoteUnitId;
  11. } // so far so good, pravi se nov remote unit
  12.  
  13. v createVehicle(AppModuleImpl am, ViewObject catVo, int remoteUnitId) se set-va -> vehicleRow.setAttribute("RemoteUnitId", remoteUnitId);
  14.  
  15. So far so good, obache...
  16.  
  17. v tab-a za remote unit se polzva same view, koeto se polzva za create. Pri syzdavaneto na remote unit-a se create-va row, ama ne se set-va da e current. Possible flaw?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement