01-29-2016 01:44 AM - edited 01-29-2016 01:53 AM
Hi all,
I need to reload defined features after creating/editing of another feature. Example: I edit the feature simpleId 200 and after editing is done I need to reload features simpleId 300 and 400 (simpleId 200 is reloaded by default).
I have tried to write something like
COPEdit.startEdit(result.layer, actions, IG.convertToArray(result.geometryid), null, IG.url('SmartClient/SaveGeometries').includeWorkflowContext({ includeId: true, postForm: false }).toString({ absolute: true }), true, copFeatureId) .done(function () { return SC.Map.closeWebBrowser(); }) .fail(function (message, exception) { SC.handleFail(new SC.Throwable(message)); }); }) .done(function () { SC.reloadFeatures(['144','581']); }) .fail(function (jqXHR, textStatus, errorThrown) { var jsonResponse = {}; try {
Solved! Go to Solution.
02-10-2016 03:01 AM
Hi Jakub,
There is the possiblity to define feature dependencies, i.e. one feature depends on another and gets automaticly reloaded if the parent feature is reloaded. To define this you need to fill the column PARENT_ID in the table RPI_FEATURE. Simply set PARENT_ID of the features 300 and 400 to the ID of the feature 200. You can't to this with that GMSC administrator. You'll need to use plain SQL.
Best regards,
Gerd
05-10-2016 11:13 PM
Hi Gerd,
thanks for your answer and sorry for the late reaction. I made a mistake in description ... your solution definitely works in the described case, but ...
I have few features (e.g. ID 500,600,700) and after editing of those features I need to refresh another sepcific feature (ID 1000). But in this case I would have to set more features to the PARENT_ID attribute to the row of feature ID 1000.
With PARENT_ID attribute you are able to use it in case or relationship 1:N (one edited feature reloads more related-child features), but not in case N:1 (more edited features reload the same feature).
Don't you have another nice tip as the previous one for the case N:1?
Thanks & regards,
Jakub
05-16-2016 06:28 AM
Hi Jakub,
probably not nice, but you can actually load the form again, reload the features and close the web browser in the custom script.
ciao,
Stefano
05-17-2016 03:27 AM - edited 05-17-2016 03:30 AM
Hi Stefano,
I have invested some time and modified the whole EditPlugin.class. I created the new custom class and overrided the endEdit() method in Java and created new editing scripting object. I don't want to publish the solution until I will discuss it with the development team. But actually it works.
05-17-2016 07:15 AM
Hi Jakub,
that is definetely the best solution!
ciao,
Stefano
07-31-2016 05:01 AM - edited 07-31-2016 03:40 PM
Hi all,
I have finally found some time to prepare it for the community.
https://bitbucket.org/jhettler/hgdn_gmsc_java/overview
Hope this helps someone.
Cheers,
Jakub
11-04-2019 04:03 AM
Hi Jakub,
the sample is very useful, however just curious for Offline mode, does your sample plugin work on offline?
I just search on the existing offline-form.js the javascript function for IG.captureOfflineGeometry is calling :
OfflineSmartClient.startEdit(geometrycapture.layer, geometryActions, geometryId, null, JSON.stringify(serializeOffline()));
so wondering if Geomedia Smart client has another edit plugin for offline also?
Thanks & Regards,
Cath.