Expand my Community achievements bar.

SOLVED

Prepopulate a touch ui dialog with images

Avatar

Level 3

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

1 Accepted Solution

Avatar

Correct answer by
Level 10

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.

ADrag.png

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

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.

ADrag.png

Avatar

Level 10

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