Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
Using DefaultObjectFormProcessor we have defined an action when user clicks menu/command. Based on status of EPMDocument we need to add hook/catch before the action method gets executed. Provide Javascript prompt (Yes/No). I need to invoke JAVASCRIPT action in preProcess() method. Based on Yes/No input the next Process method gets called or abort.
Solved! Go to Solution.
You can write server side validator and register it with action to achieve this.
Let me know if you need more info.
Hello Harshal,
It is not very clear what exactly you want to acheive. If you could elaborate your problem statement liitle bit more, it will be easier to help you out.
I just need to create UI menu action by clicking on it shall perform certain validation on CAD Document and based on that it shall prompt yes/no dialog to user. Based on the user input yes/no final action shall be committed.
You can write server side validator and register it with action to achieve this.
Let me know if you need more info.
I thought about this but not sure if this can be dynamic and will allow user to override.
Harshal, if you have only one validation logic, then writing a validator and hooking it up with the action is a way to go.But if you want to write a generic validation logic or some other developers wants to add to some additional validation logic then, FILTERS are best option.
Can you please point to documentation/snippet/use case how use FLITERS, is it used in OOTB functionality/class, please let me know.
Thanks!@
Refer to the Customization guide, u will get your answers.
Just to clarify things a bit, there is no difference between your class file for filters and that of validators.
Look for "include filter" string in to any of the *config-actions.xml and you will get to see how and where it has been used OOTB.