/** Load data count and rel fields, required for data. Requires that views are loaded. */ private void loadDataAndMeta() { if (this.callId == 0) { this.showLoadingDialog(LOADING_DATA); String className; className = Session.current.tempModel.getClassName(); this.callId = DataLoader.loadRelFields(this, className, new Handler(this), false); } }
/** Load views and all data when done (by cascading the calls in handler) */ private void loadViewAndData() { if (this.callId == 0) { this.showLoadingDialog(LOADING_DATA); String className = Session.current.tempModel.getClassName(); this.callId = DataLoader.loadView(this, className, this.viewId, "form", new Handler(this), false); } }
private void loadData() { if (this.callId == 0) { String className; Integer id; className = Session.current.tempModel.getClassName(); id = (Integer) Session.current.tempModel.get("id"); // Add id to list to load for edit List<Integer> ids = new ArrayList<Integer>(); if (id != null) { ids.add(id); } // Call (relies on DataLoader returning well with no id) this.callId = DataLoader.loadData( this, className, ids, this.relFields, this.view, new Handler(this), false); } }