Ok, this might be something I'm trying to do sideways, but I have the situation, where a few datasources contain metadata (EntityAttributes and AttributeTypes) , that I generate the rest of my business logic-related datasources with. So ideally, I would want to load the full set of data from those datasources on the application load, but allow the user to customize it (create/update/delete), and load the changes from the server, if any - but avoiding the first fetch request. Since I already do a call to the serverside to retrieve various configuration parameters from the serverside on module load, I figured it would be cool to return the data that would be otherwise queried using separate fetches in one go, and return the startRow, endRow, totalRows and the data for my configuration datasources in that call. I can construct DSResponse from that data successfully. There are a few methods that seemingly match my requirements, namely:
I was using something along the lines while testing:
but rs.get(0) always triggers a fetch.
There is also the
but I don't have a requestId there, and it fails if I pass a null or empty string here.
Any hints would be greatly appreciated.
regards,
Andrius J.
Code:
DataSource.updateCaches(DSResponse dsResponse)
Code:
myDatasoure.updateCaches(new DSResponse(JSON.decode(result.getAttributeTypes()))); ResultSet rs = new ResultSet(myDatasoure); rs.get(0);
There is also the
Code:
DataSource.processResponse(String requestId, DSResponse responseProperties)
Any hints would be greatly appreciated.
regards,
Andrius J.
Comment