내 커뮤니티 업적 표시줄을 확대합니다.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

Limit pathfield to 1 inside a multifield

Avatar

Level 9

Hi All,

In my dialog.xml, we have the below :

 <multi
                        jcr:primaryType="cq:Widget"
                        fieldLabel="Page Path"
                        name="./relatedPath"
                        xtype="multifield">
                        <fieldConfig
                            jcr:primaryType="nt:unstructured"
                            xtype="pathfield"/>
                    </multi>

#1]We should be able to restrict the pathfield we can choose to 1 here. 

Any reference/snippet/thoughts on this will be really helpful.

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Level 8

if you only want to allow 1 path to be chosen, don't put the path field in a mutlfield.  Just have it be a pathfield.

<relatedPage jcr:primaryType="cq:Widget" fieldLabel="Page Path" name="./relatedPath" xtype="pathfield"> </relatedPage>

No need to over complicate.

원본 게시물의 솔루션 보기

4 답변 개

Avatar

Level 4

I am not clear in what you are looking for. Seem you want to know how to restrict a path field values where the path field is used in a multi-field control. 

Avatar

Level 9

Avatar

정확한 답변 작성자:
Level 8

if you only want to allow 1 path to be chosen, don't put the path field in a mutlfield.  Just have it be a pathfield.

<relatedPage jcr:primaryType="cq:Widget" fieldLabel="Page Path" name="./relatedPath" xtype="pathfield"> </relatedPage>

No need to over complicate.

Avatar

Level 10

I agree with @leaasling. Keep the path field out of the multifield so you dont have to put the extra 'limitation' to it.