aem

How to display a tooltip with the value of a slider field in a Classic UI AEM dialog?

守給你的承諾、 提交于 2019-12-25 04:03:29
问题 I use Slider xtype in dialog.xml Is it possible to automatically display the value of this slider? for example - like a tooltip when the value changes <slider jcr:primaryType="cq:Widget" fieldLabel="Tile Background Transparency" name="./slider" width="{Long}200" value="42" increment="1" minValue="0" maxValue="100" xtype="slider"/> 回答1: You can use the sliderfield xtype which provides this functionality. The useTips property allows to enforce the desired behaviour. <slider jcr:primaryType="cq

storing custom data in AEM 6.1 JCR repository

試著忘記壹切 提交于 2019-12-25 03:36:25
问题 We just got AEM 6.1, and went through developer training, as well. I am coming from another CMS background (Sharepoint) and wanted to learn / know, if i need to create a list to store data into it, and refer that programatically, somewhere on the page or other common libraries in my project , how do i do that and where do i store the data , is that in the /etc folder. Not clear, I guess, what i learnt from the training is that data is stored in node types as Key / Value pair, so for example

Load select options dynamically from external service in Touch UI dialog in AEM?

喜你入骨 提交于 2019-12-25 03:15:39
问题 My problem is to load a select field in touch UI dialog with dynamic options. These options are coming from a external URL via webservices, I am consuming this RESTful services using url defined in one of our global javascript objects like $.get(mec.serviceConfig.baseUrl + '/movies'; Please understand that the options are coming from third party webservice please do not mention datasource. Whenever I search for loading select options dynamically I get this tutorial Link to Tutorial This is is

AEM (cq5) Working with information within a component

旧巷老猫 提交于 2019-12-25 02:56:06
问题 I have a component in which I am able to get some basic information about its parent resource. var parent = granite.resource.getParent(); I am now trying to get the property "path" (parent.path) within the JavaScript that accompanies my component however the data is not available inside the script but within the HTML that renders the component the property "path" is available. Could some one shine some light on why it is possible within the HTML but not the JavaScript? 回答1: You should be able

Sightly Implicit Objects

故事扮演 提交于 2019-12-25 02:45:12
问题 I am trying to implement my own version of WCM's navigation component, whose logic can be found here, subbing my own logic instead: import java.util.*; import com.day.cq.wcm.api.Page; import com.day.cq.wcm.api.PageFilter; import com.adobe.cq.sightly.WCMUsePojo; public class Navigation extends WCMUsePojo{ private Iterator<Page> items; @Override public void activate() throws Exception { Page navRootPage = getCurrentPage().getAbsoluteParent(2); items = navRootPage.listChildren(new PageFilter());

How to render a simple JSP page in CQ?

↘锁芯ラ 提交于 2019-12-25 01:34:28
问题 We have deployed an AngularJS app to CQ5. At the moment, the views for this app are just static HTML files and stored underneath, say, /apps/myapp/views/ : /apps/myapp/views/list.html /apps/myapp/views/view.html etc. Angular then sends AJAX requests to the server and loads and renders these views as needed. We want to add some dynamic content to these pages. For example: <% if (isGordonFreeman()) { %> <button>Launch the Hadron Collider!</button> <% } %> How can this be done in CQ? 回答1: You

How to export AEM tags into Excel

≯℡__Kan透↙ 提交于 2019-12-24 19:53:04
问题 Yesterday I had to export all AEM tags into Excel file. While surfing for the best solution to do this, I've found out that almost everyone advices writing custom code that takes all of tags and enters it into Excel file. I consider that solution good, but since there are a lot of people that do things like this for the first time and it will probably take some time for them to figure out how to do this. For them, let's share some workarounds for this problem. 回答1: To get a comma separated

AEM 6.3 - ResourceResolverFactory is null in Service and throwing LoginException in Sling Model class

♀尐吖头ヾ 提交于 2019-12-24 19:03:01
问题 1) I am trying to inject ResourceResolverFactory in SlingModel class like this: package com.aem.sites.models; import java.util.HashMap; import java.util.Map; import javax.annotation.PostConstruct; import javax.inject.Inject; import javax.inject.Named; import org.apache.sling.api.resource.LoginException; import org.apache.sling.api.resource.Resource; import org.apache.sling.api.resource.ResourceResolver; import org.apache.sling.api.resource.ResourceResolverFactory; import org.apache.sling

How to display values in a List of a SlingModel using Sightly

拈花ヽ惹草 提交于 2019-12-24 17:16:13
问题 I am not able to display values in a lit that are part of a POJO/SlingModel. Please help. Desired Output Commodity 1 Product 1, Product 2, Product 3 Commodity 2 Product 2, Product 4, Product 5 Sightly Code <!-- LIST :: SLING MODEL -- FINAL --> <div data-sly- use.model="${'com.tti.tticommons.service.models.LeadTimeTrendsModel' @ rawJson=ws.JSON}" data-sly-unwrap> <div data-sly-list.commodity="${model.getProductsList}"> <div class="panel panel-default"> <div class="panel-heading"> <h3 class=

How to add new property to JCR node through CQ.extjs?

五迷三道 提交于 2019-12-24 17:14:17
问题 I need to add a new property to a existing node in JCR:content from javascript(ExtJS). 回答1: Use HTTP POST method (via AJAX) and Sling POST servlet, like: CQ.HTTP.post('/content/path/to/my/page/jcr:content', null, { newProperty: '123' }); 来源: https://stackoverflow.com/questions/20398657/how-to-add-new-property-to-jcr-node-through-cq-extjs