AEM 61 - Touch UI Composite Multifield - Select not working | Community
Skip to main content
jydps87387977
March 14, 2016
Solved

AEM 61 - Touch UI Composite Multifield - Select not working

  • March 14, 2016
  • 4 replies
  • 3122 views

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.

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

4 replies

jydps87387977
March 14, 2016

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).

jydps87387977
March 14, 2016

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); } }

 

 
smacdonald2008
March 14, 2016

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.