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
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Implement Pathbrowser

s1101v
Level 3
Level 3

Hello Community - I have a requirement to create a utility page that has a button on it. On click of the button, we need to open a pathbrowser and let the authors select the page/html. There is no dialog option for this scenario. The utility is based on JSP. Has anyone implemented such scenarios? If so, could you please provide some samples for the same?

1 Accepted Solution
BrianKasingli
Correct answer by
Community Advisor
Community Advisor

@s1101v with Touch UI, your dialogue can be set up using the "Path Field", Granite UI 1.0 syntax:

 

<pathfield-example-logoPath
    jcr:primaryType="nt:unstructured"
    sling:resourceType="granite/ui/components/coral/foundation/form/pathfield"
    fieldLabel="Logo Path"
    name="./logoPath"
    required="true"
    rootPath="/content/dam"/>

 

Source: https://sourcedcode.com/blog/aem/aem-granite-ui-1-0-form-components-xml-reference-guide#granite-ui-p... 

View solution in original post

7 Replies
BrianKasingli
Correct answer by
Community Advisor
Community Advisor

@s1101v with Touch UI, your dialogue can be set up using the "Path Field", Granite UI 1.0 syntax:

 

<pathfield-example-logoPath
    jcr:primaryType="nt:unstructured"
    sling:resourceType="granite/ui/components/coral/foundation/form/pathfield"
    fieldLabel="Logo Path"
    name="./logoPath"
    required="true"
    rootPath="/content/dam"/>

 

Source: https://sourcedcode.com/blog/aem/aem-granite-ui-1-0-form-components-xml-reference-guide#granite-ui-p... 

View solution in original post

v1101
Level 5
Level 5
@BrianKasingli - I am not looking for the Touch UI dialog syntax. My requirement is to open the pathbrowser ui to let the authors to select the pages. Like a browse option to select the pages. In JSP, I have a button, on click of button, I need to open the popup for the page selection.
v1101
Level 5
Level 5
@BrianKasingli - On click of button, what should I call to invoke/open the popup window? As this is not a touch ui dialog.
BrianKasingli
Community Advisor
Community Advisor

Why can't you allow authors to author the page in a standardise AEM way? Why re-create the wheel when tools are available for you?

v1101
Level 5
Level 5
@@BrianKasingli - This is basically a utility page. Authors will select the page, we need to bring the active elements that belong to the page. Also there wont be any authorable items in the page. It is kind of a form.
BrianKasingli
Community Advisor
Community Advisor
viki1101, in this case, then you would need to create a custom servlet that will expose the targeted pages within a drop down list, SELECT html element. Using JavaScript you can fill in the select drop down to show option for the authors to choose.