Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Object Id not received in front end after saving object in DB

    Hello,

    I am using chrome browser and SmartClient Version: v11.0p_2017-02-11/PowerEdition Deployment (built 2017-02-11)

    There is a grid in my project(let say A grid). Autosave option is set to true for this grid. There is a nested grid inside this grid(let say B grid). Now after adding new row in A grid and saving that record in DB using RPCrequest and i am returning full object in dsResponse to client. Then also while expanding B grid i did not find Id of That record.

    Please help me out.

    Code on server side:

    public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
    RPCManager rpc;
    try {
    rpc = new RPCManager(request, response);
    } catch (Exception e) {
    return null;
    }

    for (Iterator i = rpc.getRequests().iterator(); i.hasNext();) {
    Object req = i.next();
    if (req instanceof RPCRequest)
    throw new Exception("This example expects only DSRequests");
    DSRequest dsRequest = (DSRequest) req;​
    DSResponse dsResponse = new DSResponse();
    dsResponse.setSuccess();​
    VendorMaterial vendorMaterial = new VendorMaterial();
    Map requestValues = dsRequest.getValues();
    getVendorMaterialObject(vendorMaterial, requestValues);
    if (!vendorMaterial.isEmptyRecord()) {
    this.vendorManagerImpl.saveVendorMaterial(vendorMaterial);
    dsResponse.setData(vendorMaterial);
    }​

    }

    #2
    The data from the server should be there if you actually returned it, so most likely, you didn't actually return the data you thought you did. You can use the RPC tab of the Developer Console to see the actual data delivered to the browser.

    Comment

    Working...
    X