Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
Hi All,
In Windchill 12 below are the Deprecated API's and any alternative API's available ?
1) The field FormResultAction.FORWARD is deprecated
2) The field FormResultAction.JAVASCRIPT is deprecated
3) The field FormResultAction.NONE is deprecated
4) The field FormResultAction.REFRESH_CURRENT_PAGE is deprecated -
5) The method setNextAction(FormResultAction) from the type FormResult is deprecated
6) The method getJavascript() from the type FormResult is deprecated
7) The method getNextAction() from the type FormResult is deprecated
😎 The method setURL(String) from the type FormResult is deprecated
We use a few of these "deprecated" items, and the information in deprecated-list.html isn't very helpful in guiding our development around these deprecated items.
HI,
Were you able to get any alternatives for these APIs. ?
Thanks.
I guess the alternative for the function .setNextAction() is
com.ptc.core.components.forms.DynamicRefreshInfo
dynamicRefreshInfo = new DynamicRefreshInfo(NmOid.newNmOid(workable.getPersistInfo()
.getObjectIdentifier()),
null,
DynamicRefreshInfo.Action.UPDATE);
formResult.addDynamicRefreshInfo(dynamicRefreshInfo);
To run a script after submit is not that easy and also the script needs to be added to jsp or a jsfrag. It is described in the WHC
Replacements for FormResultAction.JAVASCRIPT
Perhaps somebody can provide here an example.
Thanks bmr.