Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Granite multifield widget not working on DialogParticipant workflow step in touch UI

Avatar

Level 2

I am creating a workflow with dialog participant step having dialog compatible with classic UI and Touch UI both. I want a simple multifield widget in dialog with textfield.

Touch UI dialog is opening fine in Touch UI while trying to complete step but multifield widget is showing without Add Field button.

Having the same field structure with component dialog on a page seem to work fine.

I am suspecting it could be due to the way a custom dialog is injected  in workflow participant dialog step,

I would appreciate any help on this!

Below is the snippet of the field and how field is showing on the dialog

                    <adhoc-notifications-emails

                        jcr:primaryType="nt:unstructured"

                        sling:resourceType="granite/ui/components/foundation/form/multifield"

                        fieldLabel="Adhoc Notificiation Email Addresses">

                        <field

                            jcr:primaryType="nt:unstructured"

                            sling:resourceType="granite/ui/components/foundation/form/textfield"

                            name="translation-review-adhoc-additional-emails"

                            required="false"/>

                    </adhoc-notifications-emails>

Multifield_DialogParticipantStep.jpg

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Sure Scott.

<?xml version="1.0" encoding="UTF-8"?>

<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"

    jcr:primaryType="nt:unstructured"

    jcr:title="Touch UI Dialog Listeners"

    sling:resourceType="cq/gui/components/authoring/dialog">

    <content

        jcr:primaryType="nt:unstructured"

        sling:resourceType="granite/ui/components/coral/foundation/container">

        <items jcr:primaryType="nt:unstructured">

            <reviewer

                jcr:primaryType="nt:unstructured"

                sling:resourceType="granite/ui/components/coral/foundation/form/select"

                fieldLabel="Select Reviewer"

                grpName="my-reviewer"

                name="./jcr:content/mywfreviewer">

                <datasource

                    jcr:primaryType="nt:unstructured"

                    sling:resourceType="/apps/common/workflow/group/fetchusers"/>

            </reviewer>

            <approver

                jcr:primaryType="nt:unstructured"

                sling:resourceType="granite/ui/components/coral/foundation/form/select"

                fieldLabel="Select Approver"

                grpName="my-approver"

                name="./jcr:content/mywfapprover">

                <datasource

                    jcr:primaryType="nt:unstructured"

                    sling:resourceType="/apps/common/workflow/group/fetchusers"/>

            </approver>

            <multifieldcollection

                jcr:primaryType="nt:unstructured"

                sling:resourceType="granite/ui/components/coral/foundation/form/multifield"

                composite="{Boolean}true"

                fieldDescription="Click + to add a new page"

                fieldLabel="Multifield collection"

                name="./multiCol">

                <field

                    jcr:primaryType="nt:unstructured"

                    sling:resourceType="granite/ui/components/coral/foundation/container"

                    name="./items">

                    <items jcr:primaryType="nt:unstructured">

                        <linkurl

                            jcr:primaryType="nt:unstructured"

                            sling:resourceType="granite/ui/components/coral/foundation/form/pathfield"

                            fieldDescription="Select Link Path"

                            fieldLabel="Link Url"

                            name="./linkUrl"/>

                        <enterlinktext

                            jcr:primaryType="nt:unstructured"

                            sling:resourceType="granite/ui/components/coral/foundation/form/textfield"

                            fieldDescription="Enter Link Text"

                            fieldLabel="Link Text"

                            name="./linkText"/>

                        <new-window

                            jcr:primaryType="nt:unstructured"

                            sling:resourceType="granite/ui/components/coral/foundation/form/radiogroup"

                            fieldDescription="Select Link Path"

                            fieldLabel="Open in New Window"

                            name="./newTar">

                            <items jcr:primaryType="nt:unstructured">

                                <Yes

                                    jcr:primaryType="nt:unstructured"

                                    text="Yes"

                                    value="1"/>

                                <No

                                    jcr:primaryType="nt:unstructured"

                                    text="No"

                                    value="0"/>

                            </items>

                        </new-window>

                    </items>

                </field>

            </multifieldcollection>

        </items>

    </content>

</jcr:root>

View solution in original post

7 Replies

Avatar

Level 10

In another thread - we determined that the JS is not loading. Seens to be a bug with dialogs like this and workflows. If you get no answer - then open a ticket.

Avatar

Community Advisor

Hi,

Please check your multifield node structure , it is not correct. Working for me.

Screenshot 2018-10-16 at 10.19.17 PM.png

Avatar

Level 10

Arun - can you share your dialog in this thread so ppl can test that one that works for you.

Avatar

Correct answer by
Community Advisor

Sure Scott.

<?xml version="1.0" encoding="UTF-8"?>

<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"

    jcr:primaryType="nt:unstructured"

    jcr:title="Touch UI Dialog Listeners"

    sling:resourceType="cq/gui/components/authoring/dialog">

    <content

        jcr:primaryType="nt:unstructured"

        sling:resourceType="granite/ui/components/coral/foundation/container">

        <items jcr:primaryType="nt:unstructured">

            <reviewer

                jcr:primaryType="nt:unstructured"

                sling:resourceType="granite/ui/components/coral/foundation/form/select"

                fieldLabel="Select Reviewer"

                grpName="my-reviewer"

                name="./jcr:content/mywfreviewer">

                <datasource

                    jcr:primaryType="nt:unstructured"

                    sling:resourceType="/apps/common/workflow/group/fetchusers"/>

            </reviewer>

            <approver

                jcr:primaryType="nt:unstructured"

                sling:resourceType="granite/ui/components/coral/foundation/form/select"

                fieldLabel="Select Approver"

                grpName="my-approver"

                name="./jcr:content/mywfapprover">

                <datasource

                    jcr:primaryType="nt:unstructured"

                    sling:resourceType="/apps/common/workflow/group/fetchusers"/>

            </approver>

            <multifieldcollection

                jcr:primaryType="nt:unstructured"

                sling:resourceType="granite/ui/components/coral/foundation/form/multifield"

                composite="{Boolean}true"

                fieldDescription="Click + to add a new page"

                fieldLabel="Multifield collection"

                name="./multiCol">

                <field

                    jcr:primaryType="nt:unstructured"

                    sling:resourceType="granite/ui/components/coral/foundation/container"

                    name="./items">

                    <items jcr:primaryType="nt:unstructured">

                        <linkurl

                            jcr:primaryType="nt:unstructured"

                            sling:resourceType="granite/ui/components/coral/foundation/form/pathfield"

                            fieldDescription="Select Link Path"

                            fieldLabel="Link Url"

                            name="./linkUrl"/>

                        <enterlinktext

                            jcr:primaryType="nt:unstructured"

                            sling:resourceType="granite/ui/components/coral/foundation/form/textfield"

                            fieldDescription="Enter Link Text"

                            fieldLabel="Link Text"

                            name="./linkText"/>

                        <new-window

                            jcr:primaryType="nt:unstructured"

                            sling:resourceType="granite/ui/components/coral/foundation/form/radiogroup"

                            fieldDescription="Select Link Path"

                            fieldLabel="Open in New Window"

                            name="./newTar">

                            <items jcr:primaryType="nt:unstructured">

                                <Yes

                                    jcr:primaryType="nt:unstructured"

                                    text="Yes"

                                    value="1"/>

                                <No

                                    jcr:primaryType="nt:unstructured"

                                    text="No"

                                    value="0"/>

                            </items>

                        </new-window>

                    </items>

                </field>

            </multifieldcollection>

        </items>

    </content>

</jcr:root>

Avatar

Level 2

Thank you Arun,

I noticed that you were using Coral UI components which seemed to be working fine,

And I was using granite ui components which didn't work, I had this question stemming whether to use Granite or Coral widget components.

Do you happen to know which of the two is preferred, I am going to ask this question on forum anyway.

Thanks again.

Avatar

Community Advisor

HI,

I would go for Granite(Coral3) over it previous version of Coral2.

It should work with coral2 as well, because If you see your dialog, it should be in below structure in coral2

1. Add the following properties to the adhoc-notifications-emails node.

  • sling:resourceType (String) - granite/ui/components/foundation/form/multifield
  • class (String) - full-width
  • fieldLabel (String) -URLs
  • fieldDescription (String) - Click '+' to add a new mail

2. Click on the following node: adhoc-notifications-emails.

3. Right click and select Create, Create Node.

4. Enter the following values:

  • Name: field
  • Type: nt:unstructured

5. Add the following properties to the field node.

  • sling:resourceType (String) -granite/ui/components/foundation/form/fieldset
  • name (String) - ./myUserSubmenu
  • acs-commons-nested (String) - ""

6. Click on the following node: adhoc-notifications-emails/field.

7. Right click and select Create, Create Node.

8. Enter the following values:

  • Name: layout
  • Type: nt:unstructured

9. Add the following properties to the field node.

  • sling:resourceType (String) - granite/ui/components/foundation/layouts/fixedcolumns
  • method (String) - absolute

10. Click on the following node: /adhoc-notifications-emails/field.

11. Right click and select Create, Create Node.

12. Enter the following values:

  • Name: items
  • Type: nt:unstructured

13. Click on the following node: adhoc-notifications-emails/field/items.

14. Right click and select Create, Create Node.

15. Enter the following values:

  • Name: column
  • Type: nt:unstructured

16. Add the following property to the column node.

  • sling:resourceType (String) - granite/ui/components/foundation/container

17. Click on the following node: adhoc-notifications-emails/field/items/column.

18. Right click and select Create, Create Node.

19. Enter the following values:

  • Name: items
  • Type: nt:unstructured

20. Click on the following node: adhoc-notifications-emails/field/items/column/items.

21. Right click and select Create, Create Node.

22. Enter the following values:

  • Name: email
  • Type: nt:unstructured

23. Add the following properties to the email node:

  • sling:resourceType (String) - granite/ui/components/foundation/form/textfield
  • name (String) - .translation-review-adhoc-additional-emails
  • fieldLabel (String) - Addition Email
  • fieldDescription (String) - email

Avatar

Level 2

Thanks for details,

I want to clarify that the simple structure (without fieldset) I have mentioned is working fine with a component dialog on a page.

when I include the dialog on workflow participant dialog step only then its not working, possibly because the original dialog is injected/nested within workflow dialog step, definitely something that need to be fixed.