cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Using DefaultObjectFormProcessor we need to provide Javascript prompt (Yes/No)

hdamle
1-Visitor

Using DefaultObjectFormProcessor we need to provide Javascript prompt (Yes/No)

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.

ACCEPTED SOLUTION

Accepted Solutions
Prabhash
12-Amethyst
(To:hdamle)

You can write server side validator and register it with action to achieve this.

Let me know if you need more info.

View solution in original post

7 REPLIES 7
Prabhash
12-Amethyst
(To:hdamle)

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.

hdamle
1-Visitor
(To:Prabhash)

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.

Prabhash
12-Amethyst
(To:hdamle)

You can write server side validator and register it with action to achieve this.

Let me know if you need more info.

hdamle
1-Visitor
(To:Prabhash)

I thought about this but not sure if this can be dynamic and will allow user to override.

Prabhash
12-Amethyst
(To:hdamle)

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.

hdamle
1-Visitor
(To:Prabhash)

Can you please point to documentation/snippet/use case how use FLITERS, is it used in OOTB functionality/class, please let me know.

Thanks!@

Prabhash
12-Amethyst
(To:hdamle)

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.

Announcements


Top Tags