Row row = iter.getCurrentRow(); if(row != null){ row.setAttribute("Id", 123); row.setAttribute("Nome", "Pedro Teste"); //name? }
DCBindingContainer DCB = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry(); DCIteratorBinding iterator = bc.findIteratorBinding("ViewObject1Iterator"); Row r = iterator.getCurrentRow(); r.setAttribute("attibName", attribValue);
AppModuleImpl appModule = (AppModuleImpl)(JSFUtils.getApplicationModule("AppModuleDataControl")); ViewObject someTableVO =appModule.findViewObject("someTableView1"); Row row= someTableVO.createRow(); row.setAttribute("A", variable1); row.setAttribute("B", variable2); row.setAttribute("C", variable3); row.setAttribute("D", variable4); someTableVO.insertRow(row); row.validate(); // This statement solved the problem appModule.getDBTransaction().commit(); someTableVO.executeQuery();
row.setAttribute("Id", 234); row.setAttribute("Nome", "VO test"); vo.insertRow(row); getDBTransaction().commit();
row.setAttribute("Media", createBlobDomain(myFile)); return null;
public Row newRow(Grid grid) { //clone from template final Row clone = (Row) _template.clone(); //avoid duplicate id error, will set to new id when render() //Bug #1962153: Data binding generates duplicate id in some case (add "_") if (clone.getId().length() > 0) { clone.setId(null); } //link cloned component with template //each Row and its descendants share the same templatemap Map<Object, Object> templatemap = new HashMap<Object, Object>(8); BindingRendererUtil.linkTemplates(clone, _template, templatemap, _binder); //link this template map to parent templatemap (Grid in Grid) Map parenttemplatemap = (Map) grid.getAttribute(DataBinder.TEMPLATEMAP); if (parenttemplatemap != null) { templatemap.put(DataBinder.TEMPLATEMAP, parenttemplatemap); } //kept clone kids somewhere to avoid create too many components in browser final List<Component> kids = new ArrayList<Component>(clone.getChildren()); clone.setAttribute(KIDS, kids); clone.getChildren().clear(); return clone; }
nr.setAttribute(BinderCtrl.VAR, varnm); nr.setAttribute(AbstractRenderer.IS_TEMPLATE_MODEL_ENABLED_ATTR, true); nr.setAttribute(AbstractRenderer.CURRENT_INDEX_RESOLVER_ATTR, new IndirectBinding(data) { public Binder getBinder() { return BinderUtil.getBinder(nr, true); nr.setAttribute(itervarnm, iterStatus); nr.setAttribute(TemplateResolver.TEMPLATE_OBJECT, row.removeAttribute(TemplateResolver.TEMPLATE_OBJECT)); row.setAttribute(Attributes.MODEL_RENDERAS, nr);
row.setAttribute(ATTR_OVERRIDE, true);
row.setAttribute(Attributes.MODEL_RENDERAS, nr);