Tuesday, 20 December 2016

Thank you AEM Community members

As 2016 draws to a close (Community team will be off from DEC 22-Jan 3) - I want to thank all AEM community members for your great community participation in our internal AEM Community and the external ones like all the FB groups.
I would like to thank members like Lo Ki and Ratna Kumar Kotla and many others for helping drive AEM HELPX content and Ask the AEM Commuity Experts.
I am very happy to see what AEM community members like Ratna Kumar Kotla did with his AEM community rewards. He was able to put it towards this awesome device.





Lo Ki won AEM community of the year and will be getting an awesome award as well.
I am looking forward to 2017 and continue working with AEM Community members around the world, In the mean time - i encourage everyone to sign up for the immerse contest --



Adobe Digital Marketing Community

Join the Adobe Digital Marketing Community. Start by clicking this banner



I (Scott Macdonald) am a Senior Digital Marketing Community Manager at Adobe Systems with over 18 years in the high tech industry. I am also a programmer with knowledge in Java, JavaScript, C#,C++, HTML, XML and ActionScript. If  you would like to see more CQ or other Adobe Digital Marketing end to end articles like this, then leave a comment and let me know what content you would like to see.


TwitterFollow the Digital Marketing Customer Care team on Twitter @AdobeMktgCare.




TwitterFollow me on Twitter @smac2020  

Friday, 16 December 2016

Win Passes to Experience Manager Immerse 2017

During the month of January 2017, the AEM community team is running a special contest open to AEM developers. Have you:


  • written an AEM mobile application
  • a custom  HTL component 
  • integrate with other frameworks such as Angular 2
  • an AEM social component 
  • an OSGi bundle that uses AEM APIs 
  • any other type of AEM content that you want to share with the AEM community



If so, consider entering the AEM Immerse contest.



To enter the contest, fill out this online form:

Entry Form

Be creative and show us and the AEM community how you use AEM. We are looking forward to seeing your submissions.

The top three winners will receive a pass to Immerse - the AEM virtual conference:

https://docs.adobe.com/dev/products/aem/events/0416.html

Official Rules


Participation constitutes entrant’s full and unconditional agreement to and acceptance of these Official Rules. The ADOBE EXPERIENCE MANAGER CODE COMMUNITY CONTEST
starts at 12 a.m. PST on JAN 1, 2017 and ends at 11:59 p.m. PST on JAN 31, 2017.

(1) Eligibility:  The AEM Community Code Contest (now referred to as the Contest) is open to AEM community members from the United States, India, Canada, Australia, and European Union countries whom are at least eighteen (18) years of age (or the age of majority in his/her jurisdiction).

(2) How To Enter; Entry Limits:
To enter the contest, fill in the online form (link above). You can then submit the final AEM code by JAN 31, 2017. To submit AEM code, package up your AEM application in a package and email the package to scottm@adobe.com. In the email, describe your application and how it works. To be considered a wining submission, the code must be functional and work within AEM 6.x. Code that works with previous AEM versions is not considered valid for the purposes of this Contest. This Contest is not open to Adobe employees.

Limit on Entries:  You may only submit one submission. Multiple submissions are not allowed.

(3) Prize:  Three (3) total prize will be awarded in this Contest as follows:
Prize:  Winners will each receive:

  • 1st place - Immerse Pass + 100 USA Amazon Gift CARD! 
  • 2nd place - Immerse Pass
  • 3rd place - Immerse Pass

Odds of winning a prize in this contest will depend on the total number of eligible entries received.
All prize entries, including functioning AEM code is at the community members’ sole discretion. All prizes are awarded “as is” with no warranty or guarantee, either express or implied. The prizes are delivered via email. Winners are responsible for all applicable federal, state, territorial, provincial, municipal and local taxes, any costs associated with currency exchange, or any other costs and expenses associated with prize receipt, acceptance and/or use not specified herein as being provided.

(4) Selection of Winner:
Early FEB  2017, three (3) potential winners will be selected by a committee of Adobe AEM employees. Potential winners will be notified by a direct message from Adobe through his/her email account.

  (5)  Entrants’ and Winners’ Agreement to these Official Rules and the Decisions of Sponsor: Participation in the Contest and/or receipt of any prize constitute each Entrant’s and winner’s full and unconditional agreement to and acceptance of these Official Rules, Sponsor’s online Terms of Use and Privacy Policy (available by region and incorporated herein by reference), and Sponsor’s decisions, which are final and binding in all matters related to the Contest. Sponsor will not enter into any correspondence. Winning a prize is contingent upon Entrant(s) fulfilling all applicable requirements as set forth herein.

 (6)  General Conditions; Sponsor’s Right to Cancel, Terminate or Modify the Contest, Disqualify Entrants or Eliminate or Void Entries: Proof of submission of an Entry is not proof of delivery or receipt of such Entry by Sponsor. Entries generated by script, macro or other automated means, or otherwise intended to subvert or circumvent the entry process or any stated entry limits are void. Use of a false email account will disqualify an Entry. In the event of a dispute as to any Entry, or the identity of a Participant, the Entry at issue will be declared to be made by the authorized account holder and natural person assigned by an Internet access provider to the email addressed associated with the Entry and he/she must comply with these Official Rules. Participants may be required to show proof of being the authorized account holder. Sponsor has the right, in its sole discretion, to reject or void any Entry, and/or to disqualify any Entrant who (whether in fact or by attempt) subverts, circumvents, or tampers with the entry process or the lawful operation of the Contest, or who it finds to be acting in an unsportsmanlike or disruptive manner or in a manner otherwise in violation of these Official Rules.

 (7)  Release of Claims; Limitations of Liability; Warranty and Indemnity: Adobe does not guarantee that only by submitting code you will win the Contest. Adobe is not in any way responsible or liable for: (i) any loss (including loss of opportunity), injury, damage (including, but not limited to, direct, indirect or consequential loss), cost, expense, or claim arising from or in relation to the Contest, participation in the Contest or any Contest -related activity, or (ii) the authorized or unauthorized or fraudulent actions of Participants or other third parties, or (iii) events requiring a cancellation or postponement of the Contest, or (iv) for Entries that are lost, late, intercepted, incomplete, incorrect, delayed, illegible, garbled, damaged, misdirected or not otherwise received by Sponsor, or (v) for difficulties or impediments of any kind, whether human, electrical or technical in nature, relating to or in connection with the Contest, its administration, the processing of Entries or the announcement of prizes or winners.
Participants assume sole liability and accept all risk of loss for injuries, including personal injuries and/or damage to property, caused or claimed to be caused by participating in the Contest, or the acceptance, shipping and handling, receipt, possession, loss, use or misuse of any prize. By participating in the Contest, each Participant agrees to the maximum extent allowable under applicable law, to indemnify and keep indemnified, to defend, release and hold the Released Parties at all times harmless from and against any liability, personal injury, death, damages, losses, claims, demands, causes of action, suits or proceedings, costs and expenses (including reasonable attorney’s fees) arising from, accruing out of, or in any way connected with his/her participation in the Contest, or for the shipping and handling, receipt, possession, loss, use or misuse of any prize awarded.

(8)  Governing Law; Venue; Disputes: All issues and questions concerning the construction, validity, interpretation, and enforceability of these Official Rules, or the rights and obligations of Sponsor and Participants hereunder, shall be governed by, and construed in accordance with, the laws of the state of California, United States of America, without giving effect to any choice of law or conflict of law rules or provisions (whether of the State of California or any other jurisdiction) that would cause the application of laws of any jurisdiction other than the State of California, and all claims must be resolved in the appropriate State Court located in Santa Clara County, California.

(9)  Personal Data: AEM code and other IP data collected from Participants may be used in public-facing Adobe AEM content including: Adobe AEM developer articles, Knowledge base articles, or videos. The community whom contributed the code featured in the article will have their name appear in the article.
By entering, each Participant consents to the collection, use and disclosure of his/her personal information as described herein. Nothing in these Official Rules shall be deemed to restrict or exclude any Participant’s statutory consumer rights pertaining to personal data. Except as otherwise stated in these Official Rules or on the Site, personal information collected by Sponsor from Participants online is subject to Sponsor’s online Privacy Policy at http://www.adobe.com/privacy/policy.html.



© Adobe Systems Incorporated. All Rights Reserved. All trademarks are the property of their respective owners.

Tuesday, 13 December 2016

Creating Adobe Experience Manager HTL Components that send Email messages based on templates

You can create an Adobe Experience Manager (AEM) HTML Template Language (HTL) component that lets web site visitors populate a form and submit the data. The OSGi bundle contains a Sling  Servlet that sends an email message to email recipients. The email message is based on an AEM email template that is located in the AEM JCR repository.

An email template is simply a text file located in the AEM JCR. For example, consider the following template.

<html> 

<body>
<p> 
<b>Time:</b> ${time}
Forum URL: ${host.prefix}${forum.url}
</p>
A new reply was posted by ${modifiedBy.fullname} for CQ Forum topic "${topic.subject}".
-------------------------------------------------------------------------------------
${post.message} 
-------------------------------------------------------------------------------------
This is an automatically generated message. Please do not reply. 
Please follow this link to view all replies to this topic.
${host.prefix}${topic.url}
</body>
</html>


Email templates are located at the following JCR location: 

/etc/notification/email


An email template is a JCR node of type nt:file. Each node has a text file as shown in the following illustration. 



This development article discusses how to programmatically send an AEM email message that is based on a template. Futhermore, it also discusses how to populate the variables in the template with values. To send email messages that are based on AEM email templates, you use the MessageGatewayService API.  


Video



Adobe Digital Marketing Community

Join the Adobe Digital Marketing Community. Start by clicking this banner



I (Scott Macdonald) am a Senior Digital Marketing Community Manager at Adobe Systems with over 18 years in the high tech industry. I am also a programmer with knowledge in Java, JavaScript, C#,C++, HTML, XML and ActionScript. If  you would like to see more CQ or other Adobe Digital Marketing end to end articles like this, then leave a comment and let me know what content you would like to see.


TwitterFollow the Digital Marketing Customer Care team on Twitter @AdobeMktgCare.




TwitterFollow me on Twitter @smac2020  

Friday, 4 November 2016

Ask the AEM Community Expert Nov Session: Best Practices for using Experience Manager and Adobe Campaign

Join Varun Mitra, Tech Training Instructor and Developer, Adobe Worldwide Field Enablement  as he provides information about using Adobe Experience Manager and Adobe Campaign together for digital marketing solutions. 

To watch this session - click:

https://communities.adobeconnect.com/p8kf4kcd4w6/?launcher=false&fcsContent=true&pbMode=normal&proto=true



Adobe Digital Marketing Community

Join the Adobe Digital Marketing Community. Start by clicking this banner



I (Scott Macdonald) am a Senior Digital Marketing Community Manager at Adobe Systems with over 18 years in the high tech industry. I am also a programmer with knowledge in Java, JavaScript, C#,C++, HTML, XML and ActionScript. If  you would like to see more CQ or other Adobe Digital Marketing end to end articles like this, then leave a comment and let me know what content you would like to see.


TwitterFollow the Digital Marketing Customer Care team on Twitter @AdobeMktgCare.




TwitterFollow me on Twitter @smac2020 

Tuesday, 1 November 2016

Extending the Multi Site Manager using the Experience Manager MSM API

You can use the Adobe Experience Manager Muli Site Manager (MSM) API to create a custom service that is invoked when you perform a MSM operation such as create a LiveCopy page. Multi Site Manager  enables you to easily manage multiple web sites that share common content. MSM lets you define relations between the sites so that content changes in one site are automatically replicated in other sites.

For example, web sites are often provided in multiple languages for international audiences. When the number of sites in the same language is low (three to five), a manual process for syncronizing content across sites is possible. However, as soon as the number of sites grows or when multiple languages are involved, it becomes more efficient to automate the process.

A service that works with Experience Manager MSM functionality is implemented as an OSGi bundle and uses APIs located in the  com.day.cq.wcm.api package.

Note: For information about MSM functionality, see Multi-Site Management.

The main MSM API objects interact as follows:

Blueprint
A Blueprint defines the pages from which a live copy can inherit content. The use of a blueprint is optional but is required to push modifications to live copies that are inheriting from this blueprint or to define the default rollout configuration for the live copy that is in relation with the blueprint.

LiveCopy
A LiveCopy is the configuration of the relationship (LiveRelationship) between a page and its blueprint page. Use the LiveCopy class to access to the path of the page, the path of the blueprint page, the Rollout Configs, and whether child pages are also included in the LiveCopy.

LiveRelationship
The LiveRelationship represents the relationship between a resource and a blueprint. LiveRelationship objects provide access to the Rollout Configs, LiveCopy, and LiveStatus objects of the relationship. It also provides access to the paths of the target and source pages.

For example, a Live Copy is created in /content/copy from the blueprint at /content/geometrixx. The resources /content/geometrixx/en/jcr:content and /content/copy/en/jcr:content form a relationship.

LiveStatus
LiveStatus objects provide access to the runtime status of a LiveRelationship. Use to query the synchronization status of a Live Copy.

LiveAction
A LiveAction is an action that is executed on each resource that is involved in the rollout.
LiveActionFactory
Creates LiveAction objects given a LiveAction configuration. Configurations are stored as resources in the repository.

This development article steps you through how to use the MSM API. To read this article, click https://helpx.adobe.com/experience-manager/using/Extending_MSM.html.



Adobe Digital Marketing Community

Join the Adobe Digital Marketing Community. Start by clicking this banner



I (Scott Macdonald) am a Senior Digital Marketing Community Manager at Adobe Systems with over 18 years in the high tech industry. I am also a programmer with knowledge in Java, JavaScript, C#,C++, HTML, XML and ActionScript. If  you would like to see more CQ or other Adobe Digital Marketing end to end articles like this, then leave a comment and let me know what content you would like to see.


TwitterFollow the Digital Marketing Customer Care team on Twitter @AdobeMktgCare.


TwitterFollow me on Twitter @smac2020 

Thursday, 13 October 2016

Creating an Adobe Experience Manager RSS component using JQuery

You can create an Adobe Experience Manager (AEM) component that is able to retrieve data from a RSS feed and display data in the component's view. A RSS uses standard web feed styles to publish data such as:

  • blog entries
  • news headlines
  • audio
  • video

When developing a custom AEM component, you can select a third-party library and use that library within AEM. This is a benefit of developing an AEM component as it offers you better flexiblity to address your business requirements. In this use case, the following third-party library is used:

http://jquery-plugins.net/FeedEK/FeedEk_demo.html

The following illustration shows the component created in this development article.


To read this development article, click  https://helpx.adobe.com/experience-manager/using/aem_rss.html.

NOTE: To learn how to develop an AEM Headline component (another example of displaying RSS type data), see http://scottsdigitalcommunity.blogspot.com/2016/03/creating-aem-headline-component.html


Adobe Digital Marketing Community

Join the Adobe Digital Marketing Community. Start by clicking this banner



I (Scott Macdonald) am a Senior Digital Marketing Community Manager at Adobe Systems with over 18 years in the high tech industry. I am also a programmer with knowledge in Java, JavaScript, C#,C++, HTML, XML and ActionScript. If  you would like to see more CQ or other Adobe Digital Marketing end to end articles like this, then leave a comment and let me know what content you would like to see.


TwitterFollow the Digital Marketing Customer Care team on Twitter @AdobeMktgCare.


TwitterFollow me on Twitter @smac2020 


Wednesday, 12 October 2016

Integrating Adobe Experience Manager and Adobe Campaign Standard to create Newletters

You can integrate Adobe Experience Manager and Campaign to create business solutions that require newsletters promoting a new product. For example, assume that you want to create an email campaign  to raise awareness of the product. Using AEM and Campaign, you can address this use case. You can create the news letter using AEM components such as text and image components.




This development article will walk you though how to integrate AEM and Campaign. To read this development artilce, click https://helpx.adobe.com/experience-manager/using/aem_campaign.html.

Adobe Digital Marketing Community

Join the Adobe Digital Marketing Community. Start by clicking this banner



I (Scott Macdonald) am a Senior Digital Marketing Community Manager at Adobe Systems with over 18 years in the high tech industry. I am also a programmer with knowledge in Java, JavaScript, C#,C++, HTML, XML and ActionScript. If  you would like to see more CQ or other Adobe Digital Marketing end to end articles like this, then leave a comment and let me know what content you would like to see.


TwitterFollow the Digital Marketing Customer Care team on Twitter @AdobeMktgCare.

TwitterFollow me on Twitter @smac2020 

Tuesday, 4 October 2016

Creating Adobe Experience Manager Packages using a Java API

You can dynamically create an Adobe Experience Manager package by using a Java API. That is, you can create an OSGi bundle that contains code that builds an AEM package. Building a package using code lets build a package without having an AEM administrator build a package manually, For example, some use cases are to build packages every week automatically. Using the Java API, you can perform this use case, as shown in the following illustration.


This AEM client invokes a sling servlet that dynamically builds an AEM package. To read this AEM developer article, click https://helpx.adobe.com/experience-manager/using/dynamic_aem_packages.html.


Adobe Digital Marketing Community

Join the Adobe Digital Marketing Community. Start by clicking this banner



I (Scott Macdonald) am a Senior Digital Marketing Community Manager at Adobe Systems with over 18 years in the high tech industry. I am also a programmer with knowledge in Java, JavaScript, C#,C++, HTML, XML and ActionScript. If  you would like to see more CQ or other Adobe Digital Marketing end to end articles like this, then leave a comment and let me know what content you would like to see.


TwitterFollow the Digital Marketing Customer Care team on Twitter @AdobeMktgCare.


TwitterFollow me on Twitter @smac2020 

Wednesday, 28 September 2016

Comparative Architecture Analysis of large scale Experience Manager Installations -- Oct Version of Ask the AEM Community Experts

This session of Ask the AEM Community Experts will share large scale architectures from the author's experiences with various companies like Cisco and Symantec and compare and contrast the architecture across: Infrastructure Architecture Scaling
Ecommerce integrations and migration approach from legacy into Adobe Experience Manager, Digital Marketing Cloud Integrations such as personalization, analytics, and DMP.


Presented by: Anshul Chhabra with Symantec, and Anil Kalbag with Cisco Systems.

To watch this session, click:

https://communities.adobeconnect.com/p7c405qpiwy/?launcher=false&fcsContent=true&pbMode=normal


Adobe Digital Marketing Community

Join the Adobe Digital Marketing Community. Start by clicking this banner



I (Scott Macdonald) am a Senior Digital Marketing Community Manager at Adobe Systems with over 18 years in the high tech industry. I am also a programmer with knowledge in Java, JavaScript, C#,C++, HTML, XML and ActionScript. If  you would like to see more CQ or other Adobe Digital Marketing end to end articles like this, then leave a comment and let me know what content you would like to see.


TwitterFollow the Digital Marketing Customer Care team on Twitter @AdobeMktgCare.


TwitterFollow me on Twitter @smac2020 

Tuesday, 27 September 2016

Adding Google reCAPTCHA to an AEM web site

You can use Google reCAPTCHA  to your AEM site to protect your website from automated script attacks while letting real users pass through with ease. The reCAPTCHA library is a free service that protects your website from spam and abuse. By using reCAPTCHA, you can improve the security of your AEM site.



As shown in the previous illustration, when using reCAPTCHA, a user is prompted to enter a code into an AEM page. If the code is valid, a message appears.  If the user enters an invalid code, a message appears letting the user know an invalid code was entered.



To read this development article, click https://helpx.adobe.com/experience-manager/using/aem_recaptcha.html.

To watch the video, see:




Adobe Digital Marketing Community

Join the Adobe Digital Marketing Community. Start by clicking this banner



I (Scott Macdonald) am a Senior Digital Marketing Community Manager at Adobe Systems with over 18 years in the high tech industry. I am also a programmer with knowledge in Java, JavaScript, C#,C++, HTML, XML and ActionScript. If  you would like to see more CQ or other Adobe Digital Marketing end to end articles like this, then leave a comment and let me know what content you would like to see.


TwitterFollow the Digital Marketing Customer Care team on Twitter @AdobeMktgCare.


TwitterFollow me on Twitter @smac2020 



Monday, 19 September 2016

Integrating SOLR with Adobe Experience Manager

You can integrate SOLR with Adobe Experience Manager to improve searching. Solr is the popular, blazing-fast, open source enterprise search platform built on Apache Lucene. Solr is highly reliable, scalable and fault tolerant, providing distributed indexing, replication and load-balanced querying, automated fail-over and recovery, centralized configuration and more. Solr powers the search and navigation features of many of the world's largest internet sites. For more information, see http://lucene.apache.org/solr/.

The following illustration shows the SOLR client.


To read this article, click https://helpx.adobe.com/experience-manager/using/aem_solr.html.

To watch the video - click:




Adobe Digital Marketing Community

Join the Adobe Digital Marketing Community. Start by clicking this banner



I (Scott Macdonald) am a Senior Digital Marketing Community Manager at Adobe Systems with over 18 years in the high tech industry. I am also a programmer with knowledge in Java, JavaScript, C#,C++, HTML, XML and ActionScript. If  you would like to see more CQ or other Adobe Digital Marketing end to end articles like this, then leave a comment and let me know what content you would like to see.


TwitterFollow the Digital Marketing Customer Care team on Twitter @AdobeMktgCare.
TwitterFollow me on Twitter @smac2020 

Tuesday, 13 September 2016

Integrating Jasper Reports into Adobe Experience Manager

You can create a custom Jasper Reports service for Adobe Experience Manager (AEM) that builds dynamic reports.  A benefit of creating a custom service is you can develop it to meet your business requirements and integrate the reporting service to use data queried from an AEM service. For example, you can create an AEM reporting solution that queries enterprise data from a database that a digital marketer is interested in viewing and produces a PDF report, as shown in the following illustration.



To build an AEM component that is able to produce PDF reports using Jasper Reports, you need to use the Jasper Reports API http://jasperreports.sourceforge.net/api/.


The custom AEM Service invokes the operation of the OSGi bundle that uses the Jasper Reports API. Then the service persists the Jasper Report in the AEM DAM by using the AssetManager API, as shown in this illustration. 




NOTE; For information about Jasper Reports, see http://community.jaspersoft.com/project/jasperreports-library


Adobe Digital Marketing Community

Join the Adobe Digital Marketing Community. Start by clicking this banner



I (Scott Macdonald) am a Senior Digital Marketing Community Manager at Adobe Systems with over 18 years in the high tech industry. I am also a programmer with knowledge in Java, JavaScript, C#,C++, HTML, XML and ActionScript. If  you would like to see more CQ or other Adobe Digital Marketing end to end articles like this, then leave a comment and let me know what content you would like to see.


TwitterFollow the Digital Marketing Customer Care team on Twitter @AdobeMktgCare.
TwitterFollow me on Twitter @smac2020 

Friday, 9 September 2016

Check out the new AEM Community You Tube Channel

Hey AEM Community, you may have noticed that we are starting to convert all of our AEM HELPX How To articles to videos. See:

https://www.youtube.com/channel/UCDtISU9W-zzo1PIU3pGHUbA/videos

 This is done for several reasons:
  1. We got feedback that community members want to see the AEM concepts in video. For example - they want to see the code run, component work, and so on.  As one community member stated - "By watching the videos, I get the concepts faster".
  2. This proves that the code in the articles work and by following the article, you should get the same results. 
  3. Some people prefer consuming information in video format. 

Now our objective is to build up the largest collection of How To AEM videos on the internet. As such, we like to get your Community AEM videos too. If you want to contribute videos on AEM/How To AEM videos on the AEM Community Channel, send me and my associate - Kautuk - an email at scottm@adobe.com and ksahni@adobe.com.

Also - for all community members reading this, please subscribe to the new channel. 


Adobe Digital Marketing Community

Join the Adobe Digital Marketing Community. Start by clicking this banner



I (Scott Macdonald) am a Senior Digital Marketing Community Manager at Adobe Systems with over 18 years in the high tech industry. I am also a programmer with knowledge in Java, JavaScript, C#,C++, HTML, XML and ActionScript. If  you would like to see more CQ or other Adobe Digital Marketing end to end articles like this, then leave a comment and let me know what content you would like to see.


TwitterFollow the Digital Marketing Customer Care team on Twitter @AdobeMktgCare.
TwitterFollow me on Twitter @smac2020






Creating an AEM 6.2 HTML Template Language component that uses a Multi-Field dialog

You can create an Adobe Experience Manager (AEM) 6.2 Touch UI component that can be used within the AEM Touch UI view. Furthermore, you can use the AEM HTML Template Language (HTL - formally known as Sightly) to develop the AEM component. For example, consider an author whom enters information into a multi-field control in the component's dialog, as shown in this illustration.



To read the development for AEM 6.2 - click https://helpx.adobe.com/experience-manager/using/htl_multifield62.html.

To watch the video - click:



Adobe Digital Marketing Community

Join the Adobe Digital Marketing Community. Start by clicking this banner



I (Scott Macdonald) am a Senior Digital Marketing Community Manager at Adobe Systems with over 18 years in the high tech industry. I am also a programmer with knowledge in Java, JavaScript, C#,C++, HTML, XML and ActionScript. If  you would like to see more CQ or other Adobe Digital Marketing end to end articles like this, then leave a comment and let me know what content you would like to see.


TwitterFollow the Digital Marketing Customer Care team on Twitter @AdobeMktgCare.
TwitterFollow me on Twitter @smac2020

Tuesday, 6 September 2016

Creating an AEM HTML Template Language Component that displays data from a Restful Web Service

You can create an Adobe Experience Manager (AEM) HTML Template Language (HTL)   component that displays data retrieved from a third-party Restful web service. For example, assume you want to display data based on the distance between two cities on your web site. In this situation, you can develop an AEM HTL component that displays data between two cities, as shown in this illustration.


In this use case, the HTL component contains a class that extends WCMUsePojo. This class uses Java application logic to send a HTTP Request to a third-party Restful web service. The web service returns the following data in JSON format. 

 {  
   "destination_addresses":[  
      "Dallas, TX, USA"
   ],
   "origin_addresses":[  
      "Ottawa, ON, Canada"
   ],
   "rows":[  
      {  
         "elements":[  
            {  
               "distance":{  
                  "text":"2,714 km",
                  "value":2713758
               },
               "duration":{  
                  "text":"1 day 1 hour",
                  "value":89044
               },
               "status":"OK"
            }
         ]
      }
   ],
   "status":"OK"
}

The HTL component uses the Java library GSON to parse the JSON data and then displays the data in the client so it appears in the AEM web page. 




Adobe Digital Marketing Community

Join the Adobe Digital Marketing Community. Start by clicking this banner



I (Scott Macdonald) am a Senior Digital Marketing Community Manager at Adobe Systems with over 18 years in the high tech industry. I am also a programmer with knowledge in Java, JavaScript, C#,C++, HTML, XML and ActionScript. If  you would like to see more CQ or other Adobe Digital Marketing end to end articles like this, then leave a comment and let me know what content you would like to see.


TwitterFollow the Digital Marketing Customer Care team on Twitter @AdobeMktgCare.
TwitterFollow me on Twitter @smac2020