Monday, September 11, 2017

Workflow Customizations | Touch UI

The Scribcopia blog article is a good reference to start with workflow customization in touch UI. In this article, I am going to describe few additional steps which help you to perfect the authoring behavior.

1. Handling Validation of additional fields in start workflow dialog

You need to add in custom java-script clientlibs file with category- "cq.authoring.editor.core,cq.authoring.editor" (Obviously, the two categories will be added separately in your categories multifield property of your clientlibs.)

Below is the sample code to refer on what events you need to handle in your client library code. You need to change it as per your business requirements.

Below things are done in this code:

  • If author selects your custom workflow model- Show additional fields and disable the submit button in order to stop submitting the form without filling the mandatory field(s).
  • The second part of code handles enabling/ disabling of the workflow start button based on author filling out the mandatory field(s).

2. Adding additional fields in start workflow dialog

Please note that the custom class selectors for the additional fields are added in startworkflow.jsp file as mentioned in the Scribcopia blog post. Below is the sample code for the same:

Here two fields are added one of which reviewer is mandatory and the other is scheduled publish time.

3. Customizing User picker drop-down

If you happen to customize the user picker for your reviewer user picker drop-down based on a specific user group, refer this blog post- Group based userpicker.

No comments:

Post a Comment

CDN | Clearing Cloudflare cache

In order to clear Cloudflare cache automatically via code, follow below steps: 1. Develop Custom TransportHandler Develop a custom Trans...