SmartGet 3.0p 1-5-2012 nightly
Gwt 2.4
Firefox 6.0
I have the following scenario...
Two SectionStackSection- ProjectInfo and Manifest
In the ProjectInfo stack I created the following form and set it as the stacksections control
I use the eventBus to pass the fired event to my Manifest which implements the method "projectSelected" shown below.......
So when I go add a user to my Manifest, which is a ListGrid, I have the following customSQL query in my Manifest.ds.xml file...........
And when the ListGrid goes to save the user that I had input, it gives me the following error....
Is there something that I am missing? Any help would be appreciated. Thanks in advance...
Gwt 2.4
Firefox 6.0
I have the following scenario...
Two SectionStackSection- ProjectInfo and Manifest
In the ProjectInfo stack I created the following form and set it as the stacksections control
Code:
DynamicForm pForm = new DynamicForm(); pForm.setDataSource(projectsDS); pForm.setUseAllDataSourceFields(false); SelectItem project = new SelectItem("ProjectId"); project.setDisplayField("ProjectName"); project.setTitle("<font color=\"#FFFF00\">Current Project</font>"); project.setWidth(400); ListGridField pName = new ListGridField("ProjectName"); ListGridField pStart = new ListGridField("StartDate"); ListGridField pEnd = new ListGridField("EndDate"); ListGridField pCutOff = new ListGridField("CutoffDate"); ListGridField pStatus = new ListGridField("ProjectStatus"); project.setPickListFields(pName, pStart, pEnd, pCutOff, pStatus); project.setDefaultToFirstOption(true); project.addDataArrivedHandler(new DataArrivedHandler(){ public void onDataArrived(DataArrivedEvent event) { ResultSet rs = event.getData(); Record p = rs.get(0); eventBus.fireEvent(new ProjectSelectedEvent(p)); } }); project.addChangedHandler(new ChangedHandler() { public void onChanged(ChangedEvent event) { Criteria criteria = new Criteria(); criteria.addCriteria("ProjectId", (Integer)event.getValue()); projectsDS.fetchData(criteria, new DSCallback(){ public void execute(DSResponse response, Object rawData, DSRequest request) { Record record[] = response.getData(); eventBus.fireEvent(new ProjectSelectedEvent(record[0])); } }); } }); pForm.setFields(project); .... .... projectInfoSection.setControls(pForm);
Code:
public void projectSelected(ProjectSelectedEvent event) { Record projectRecord = event.getProjectRecord(); if(ClientSession.getSession().getUser().getUserRole().equals("project_admin")) { Criterion criteria = new Criterion("ProjectId", OperatorId.EQUALS, projectRecord.getAttribute("ProjectId")); manifest.fetchData(criteria); } else { AdvancedCriteria criteria = new AdvancedCriteria(OperatorId.AND, new Criterion[]{ new Criterion("ProjectId", OperatorId.EQUALS, projectRecord.getAttribute("ProjectId")), new Criterion("CompanyId", OperatorId.EQUALS, ClientSession.getSession().getUser().getCompanyId()) }); manifest.fetchData(criteria); } }
Code:
<operationBinding operationType="add" operationId="add_manifest"> <customSQL>INSERT INTO manifest (EmployeeId, ProjectId, EmployeeName, Position, DateOfBirth, VisaType, EmbarkDate, DisembarkDate, CompanyId, CabinAssignments) SELECT A1.EmployeeId as EmployeeId, $advancedCriteria.ProjectId as ProjectId, CONCAT(A1.FirstName, ' ', A1.LastName) as EmployeeName, A1.Position as Position, A1.DateOfBirth as DateOfBirth, $values.VisaType as VisaType, $values.EmbarkDate as EmbarkDate, $values.DisembarkDate as DisembarkDate, A1.CompanyId as CompanyId, $values.CabinAssignments as CabinAssignments from employees as A1 WHERE A1.EmployeeId=$values.EmployeeId </customSQL> </operationBinding>
Code:
20:14:49.595 [ERROR] [mproject] 20:14:49.596:XRP8:WARN:RPCManager:Unknown column '$advancedCriteria.ProjectId' in 'field list', response: {operationId: "add_manifest", clientContext: Obj, context: Obj, transactionNum: 10, httpResponseCode: 200, httpResponseText: "//isc_RPCResponseStart-->[{data:"Unknown..."[181], xmlHttpRequest: [object XMLHttpRequest], transport: "xmlHttpRequest", status: -1, clientOnly: undef, httpHeaders: Obj, isStructured: true, callbackArgs: null, results: Obj, data: "Unknown column '$advancedCriteria.Projec..."[60], invalidateCache: false, isDSResponse: true, queueStatus: -1, startRow: 0, endRow: 0, totalRows: 0} com.smartgwt.client.core.JsObject$SGWT_WARN: 20:14:49.596:XRP8:WARN:RPCManager:Unknown column '$advancedCriteria.ProjectId' in 'field list', response: {operationId: "add_manifest", clientContext: Obj, context: Obj, transactionNum: 10, httpResponseCode: 200, httpResponseText: "//isc_RPCResponseStart-->[{data:"Unknown..."[181], xmlHttpRequest: [object XMLHttpRequest], transport: "xmlHttpRequest", status: -1, clientOnly: undef, httpHeaders: Obj, isStructured: true, callbackArgs: null, results: Obj, data: "Unknown column '$advancedCriteria.Projec..."[60], invalidateCache: false, isDSResponse: true, queueStatus: -1, startRow: 0, endRow: 0, totalRows: 0} at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:525) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:292) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:546) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363) at java.lang.Thread.run(Thread.java:722)
Comment