Hi
Can anybody help me
I have datasource with xml dataformat and postxml protocol.
When I add new record by calling savedata() method for a form, this record appears in the grid. When I edit this new record and call savedata() I have in developer console: "23:38:25.281:XRP9:WARN:Log:findByKeys: passed record does not have a value for key field con_id". Durring "Add" operation server returns exactly same xml as one sended from client plus tag with proper primary key value. For example when client sends xml :
server returns:
As I mentioned before this record appears in the grid but after editing tag con_id is not sent to server during update operation. I am missing something obvious ?
this is my datasource look like this:
Can anybody help me
I have datasource with xml dataformat and postxml protocol.
When I add new record by calling savedata() method for a form, this record appears in the grid. When I edit this new record and call savedata() I have in developer console: "23:38:25.281:XRP9:WARN:Log:findByKeys: passed record does not have a value for key field con_id". Durring "Add" operation server returns exactly same xml as one sended from client plus tag with proper primary key value. For example when client sends xml :
Code:
<Connection_data> <con_name>My connection</con_name> <motor>Oracle</motor> <instance>XE</instance> <schemat>my schema</schemat> <hostip>10.34.23.12</hostip> <service>1521</service> <login>mylogin</login> <passwd>mypasswd</passwd> <user_login>userlogin</user_login> </Connection_data>
Code:
<Connection_data> <con_id>2</con_id> <con_name>My connection</con_name> <motor>Oracle</motor> <instance>XE</instance> <schemat>my schema</schemat> <hostip>10.34.23.12</hostip> <service>1521</service> <login>mylogin</login> <passwd>mypasswd</passwd> <user_login>userlogin</user_login> </Connection_data>
this is my datasource look like this:
Code:
public ConnectionDS(String id){ MyConstants mylocale = GWT.create(MyConstants.class); setID(id); setDataFormat(DSDataFormat.XML); OperationBinding fetchOB = new OperationBinding(); fetchOB.setOperationType(DSOperationType.FETCH); fetchOB.setDataProtocol(DSProtocol.POSTXML); OperationBinding updateOB = new OperationBinding(); updateOB.setOperationType(DSOperationType.UPDATE); updateOB.setDataProtocol(DSProtocol.POSTXML); OperationBinding addOB = new OperationBinding(); addOB.setOperationType(DSOperationType.ADD); addOB.setDataProtocol(DSProtocol.POSTXML); OperationBinding removeOB = new OperationBinding(); removeOB.setOperationType(DSOperationType.REMOVE); removeOB.setDataProtocol(DSProtocol.POSTXML); fetchOB.setDataURL(GWT.getModuleBaseURL() + "XmlServlet");//"/pl.com.intuicja.struktura_smartgwt.struktura/XmlServlet"); updateOB.setDataURL(GWT.getModuleBaseURL() + "UpdateServlet");//"/pl.com.intuicja.struktura_smartgwt.struktura/UpdateServlet"); addOB.setDataURL(GWT.getModuleBaseURL() + "AddServlet");//"/pl.com.intuicja.struktura_smartgwt.struktura/AddServlet"); removeOB.setDataURL(GWT.getModuleBaseURL() + "RemoveServlet");//"/pl.com.intuicja.struktura_smartgwt.struktura/RemoveServlet"); setOperationBindings(fetchOB,updateOB,addOB,removeOB); setTagName("Connection_data"); setRecordXPath("//user[user_name=" + "'" + userLogin + "']//connection"); DataSourceIntegerField pkcon_id = new DataSourceIntegerField("con_id"); pkcon_id.setPrimaryKey(true); pkcon_id.setHidden(true); DataSourceTextField con_name = new DataSourceTextField("con_name",mylocale.txtConName()); DataSourceTextField motor = new DataSourceTextField("motor", mylocale.txtMotor()); DataSourceTextField instance = new DataSourceTextField("instance", mylocale.txtInstance()); DataSourceTextField schemat = new DataSourceTextField("schemat",mylocale.txtSchema()); DataSourceTextField hostip = new DataSourceTextField("hostip",mylocale.txtHost()); DataSourceTextField service = new DataSourceTextField("service",mylocale.txtPort()); DataSourceTextField login = new DataSourceTextField("login",mylocale.txtLogin()); DataSourcePasswordField passwd = new DataSourcePasswordField("passwd",mylocale.txtPasswd()); setFields(pkcon_id,con_name,motor,instance,schemat,hostip,service,login,passwd); }
Comment