Prepopulate a touch ui dialog with images | Community
Skip to main content
Level 2
June 2, 2017
Solved

Prepopulate a touch ui dialog with images

  • June 2, 2017
  • 2 replies
  • 1783 views

Hi,

I have a requirement that I need to prepopulate the dialog image values with the default values given in the dialog. i.e. on the very first load of the dialog, I should see the images in the dialog with the default values given.

My component would be a cq:include in the page and not drag-dropped.

Is there a way to do so ?

Thanks and Regards,

Ankush Dhingra

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

When you have a dialog in the Touch UI that involves images - you are using this type:

FileUpload — Granite UI 1.0 documentation

This requires an author to select a file to upload. For example - dragging from the Content Finder.

THis is the out of the box functionality. Looking at the reference - there do not seem to be a default image field.

2 replies

smacdonald2008
smacdonald2008Accepted solution
Level 10
June 2, 2017

When you have a dialog in the Touch UI that involves images - you are using this type:

FileUpload — Granite UI 1.0 documentation

This requires an author to select a file to upload. For example - dragging from the Content Finder.

THis is the out of the box functionality. Looking at the reference - there do not seem to be a default image field.

smacdonald2008
Level 10
June 2, 2017

Now having explained the way the OOTB functionality works - you can create a custom Sling Resource type to address your needs. With the Touch UI, you can develop a custom sling resource type using JQuery plugins. You could use something like this for picking images:

Image Picker

To learn how to build custom sling resource types for a Touch UI component dialog - see this where we use a color picker as an example -- Scott's Digital Community: Creating a custom Experience Manager sling:resourceType for Touch UI