Expand my Community achievements bar.

SOLVED

AEM 61 - Touch UI Composite Multifield - Select not working

Avatar

Level 4

Hi,

In AEM 6.1, I am referring the code from the following links, and tried the following to preselect the 'select', but it didn't work.

The following link is not working:

61 package install - https://drive.google.com/file/d/0B4d6KmbLkAumRk5OeUlQY3N1c3c/view?usp=sharing
61 demo - https://drive.google.com/file/d/0B4d6KmbLkAumLV9LUW5HeDFMVU0/view?usp=sharing

 

Can you please check.

 

Thank you.

1 Accepted Solution

Avatar

Correct answer by
Level 10
4 Replies

Avatar

Correct answer by
Level 10

Avatar

Level 4

61 package install - https://drive.google.com/file/d/0B4d6KmbLkAumRk5OeUlQY3N1c3c/view?usp=sharing
61 demo - https://drive.google.com/file/d/0B4d6KmbLkAumLV9LUW5HeDFMVU0/view?usp=sharing

With Multifield, using Sightly is recommended way of doing stuff.

As of now, my application is not using Sightly, and I am trying to achieve the solution by JS only ( prepopulating the fields, and storing).

Avatar

Level 4

Hi,

I need a good working example with Multifield 'select'. 

Problem: The multifield 'select' is not getting pre-selected with the right value.

Code example:

var type = $field.prop("type"); console.log('fieldtype is : ' + type); //handle single selection dropdown if (type == "select-one") { setSelect($field, value); } else { $field.val(value); }

function setSelect($field, value) {

var select = $field.closest(".coral-Select").data("select"); if (select) { select.setValue(value); } }

 

 

Avatar

Level 10

Community is working on select components in the Touch UI: 

http://scottsdigitalcommunity.blogspot.ca/2016/03/dynamically-updating-aem-touchui-select.html

We know that Touch UI/granite API examples are needed and they are being produced. 

IN mean time-  i recommend that you look at the GIT project Praveen pointed you too. Using Granite APIs is at the clientlib level. It does not matter if the component code is Sighly or JSP. The ClientLib code remains the same.