<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6971795843805337966</id><updated>2012-03-09T12:33:31.224-08:00</updated><title type='text'>Scott's Digital Community</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://scottsdigitalcommunity.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6971795843805337966/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://scottsdigitalcommunity.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Scott Macdonald</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://3.bp.blogspot.com/-L81EgMprC68/TZsOlZxUPuI/AAAAAAAAAAM/seRO_Lxss1U/s220/mia.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6971795843805337966.post-8721725897676574211</id><published>2012-03-06T19:16:00.003-08:00</published><updated>2012-03-07T08:12:39.093-08:00</updated><title type='text'>Programmatically Accessing Adobe CQ Content using the JCR API</title><content type='html'>&lt;div class="MsoNormal"&gt;You can programmatically modify nodes and properties located within the Adobe CQ 5.5 repository, which is part of the Adobe Digital Marketing Suite. To access the CQ repository, you use the Java Content Repository (JCR) API. You can use the Java JCR API to perform create, replace, update, and delete (CRUD) operations on content located within the DAY CQ repository. For more information about the Java JCR API, see &lt;a href="http://jackrabbit.apache.org/jcr-api.html"&gt;http://jackrabbit.apache.org/jcr-api.html&lt;/a&gt;.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;This development article creates a Java class that modifies nodes and properties within&amp;nbsp; Adobe&amp;nbsp;CQ. The Java class connects to a local instance of&amp;nbsp; Adobe&amp;nbsp;CQ and creates nodes and stores data values to node properties. You can store data by manipulating node properties.&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-size: large;"&gt;Creating a Repository instance&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;Although there are different ways to connect to a repository and establish a connection, this development article uses a static method that belongs to the &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;org.apache.jackrabbit.commons.JcrUtils&lt;/span&gt; class. The name of the method is &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;getRepository&lt;/span&gt;. This method takes a string parameter that represents the URL of the Adobe CQ server. For example &lt;i&gt;http://localhost:4503/crx/server&lt;/i&gt;.&amp;nbsp;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;The &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;getRepository &lt;/span&gt;method returns a &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;Repository &lt;/span&gt;instance, as shown in the following code example.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;//Create a connection to the Day CQ repository running on local host&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;Repository repository = JcrUtils.getRepository("http://localhost:4503/crx/server");&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: large;"&gt;Creating a Session instance&lt;/span&gt;&lt;/div&gt;&lt;div&gt;The &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;Repository&amp;nbsp;&lt;/span&gt;instance represents the CRX repository. You use the &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;Repository &lt;/span&gt;instance to establish a session with the repository. To create a session, invoke the &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;Repository &lt;/span&gt;instance’s &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;login &lt;/span&gt;method and pass a &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;javax.jcr.SimpleCredentials&lt;/span&gt; object. The &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;login &lt;/span&gt;method returns a &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;javax.jcr.Session&lt;/span&gt; instance.&amp;nbsp;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;You create a &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;SimpleCredentials &lt;/span&gt;object by using its constructor and passing the following string values:&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;The user name&amp;nbsp;&lt;/li&gt;&lt;li&gt;The corresponding password&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;When passing the second parameter, call the String object’s &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;toCharArray &lt;/span&gt;method. The following &amp;nbsp;code shows how to call the &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;login&lt;/span&gt; method that returns a &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;javax.jcr.Session&lt;/span&gt; instance.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;//Create a Session instance&lt;br /&gt;javax.jcr.Session session = repository.login( new SimpleCredentials("admin", "admin".toCharArray()));&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: inherit; font-size: large;"&gt;Creating a Node instance&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;You can use a &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;Session &lt;/span&gt;instance to create a &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;javax.jcr.Node&lt;/span&gt; instance. A &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;Node&lt;/span&gt;&lt;span style="font-family: inherit;"&gt;&amp;nbsp;&lt;/span&gt;instance enables you to perform node operations. For example, you can create a new node. To create a node that represents the root node, invoke the &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;Session &lt;/span&gt;instance's &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;getRootNode &lt;/span&gt;method, as shown in the following line of code.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;//Create a Node&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;Node root = session.getRootNode();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: inherit;"&gt;Once you create a &lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;Node&lt;/span&gt;&lt;span style="font-family: inherit;"&gt; instance, you can perform tasks such as creating another node and adding a value to it. For example, the following code creates two nodes and adds a value to the second node.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;// Store content&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;Node adobe = root.addNode("adobe");&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;Node day = adobe.addNode("day");&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;day.setProperty("message", "Adobe CQ is part of the Adobe Digital Marketing Suite!");&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style="font-family: inherit;"&gt;As shown in the previous code example, to store a data value to a node, invoke the &lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;Node&lt;/span&gt;&lt;span style="font-family: inherit;"&gt; object’s &lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;setProperty &lt;/span&gt;&lt;span style="font-family: inherit;"&gt;method. As the first parameter, specify a property name. In this example, notice that&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;message&lt;/span&gt;&lt;span style="font-family: inherit;"&gt; is specified. This value indicates that you want to set the message property. The second parameter is a string value that represents a data value to store.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: large;"&gt;Retrieving Node Values&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: inherit;"&gt;To retrieve a node and its value, invoke the &lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;Node&lt;/span&gt;&lt;span style="font-family: inherit;"&gt; instance’s &lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;getNode&lt;/span&gt;&lt;span style="font-family: inherit;"&gt; method and pass a string value that represents the fully-qualified path to the node. Consider the node structure created in the previous code example. To retrieve the &lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;day&lt;/span&gt;&lt;span style="font-family: inherit;"&gt; node, specify &lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;adobe/day&lt;/span&gt;&lt;span style="font-family: inherit;"&gt;, as shown in the following code&lt;/span&gt;&lt;span style="font-family: inherit;"&gt;:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;// Retrieve content&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;Node node = root.getNode("adobe/day");&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;System.out.println(node.getPath());&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;System.out.println(node.getProperty("message").getString());&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: inherit; font-size: large;"&gt;Adding the JCR JAR file&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: inherit;"&gt;To use the JCR API, add the &lt;i&gt;j&lt;/i&gt;&lt;/span&gt;&lt;i&gt;ackrabbit-standalone-2.4.0.jar&lt;/i&gt;&amp;nbsp;&lt;span style="font-family: inherit;"&gt;file to your Java application’s class path.&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: inherit;"&gt;You can obtain this JAR&amp;nbsp;file from the Java JCR API web page at &lt;a href="http://jackrabbit.apache.org/jcr-api.html"&gt;http://jackrabbit.apache.org/jcr-api.html&lt;/a&gt;.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: large;"&gt;Quick Start: Creating nodes in the DAY CQ Repository&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: inherit;"&gt;The following Java code example represents a Java class that is connects to the Adobe CQ server, creates a &lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;Session&lt;/span&gt;&lt;span style="font-family: inherit;"&gt; instance and adds new nodes. A node is assigned a data value and then the value of the node and its path is written out to the console.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;/*&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;* This Java Quick Start uses the&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;jackrabbit-standalone-2.4.0.jar&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;* file.&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;See the previous section for the location of this JAR file&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;*/&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;import javax.jcr.Repository;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;import javax.jcr.Session;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;import javax.jcr.SimpleCredentials;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;import javax.jcr.Node;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;import org.apache.jackrabbit.commons.JcrUtils;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;import org.apache.jackrabbit.core.TransientRepository;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;public class GetRepository {&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;public static void main(String[] args) throws Exception {&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;//Create a connection to the Day CQ repository running on local host&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;Repository repository = JcrUtils.getRepository("http://localhost:4503/crx/server");&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;//Create a Session&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;javax.jcr.Session session = repository.login( new SimpleCredentials("admin", "admin".toCharArray()));&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;try {&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;//Create a node that represents the root node&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;Node root = session.getRootNode();&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;// Store content&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;Node adobe = root.addNode("adobe");&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;Node day = adobe.addNode("day");&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;day.setProperty("message", "DAY CQ is part of the Adobe Digital Marketing Suite!");&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;// Retrieve content&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;Node node = root.getNode("adobe/day");&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;System.out.println(node.getPath());&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;System.out.println(node.getProperty("message").getString());&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;// Save the session changes and log out&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;session.save();&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;session.logout();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;catch(Exception e){&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;e.printStackTrace();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;}&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;}&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;View the new nodes in CRXDE Lite&lt;/b&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;After you run the full code example and create the nodes, you can view the new nodes in the CRXDE Lite, as shown in the following illustration.&amp;nbsp;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-h7adotDpnps/T1eBbwpLz5I/AAAAAAAAANA/vVqRslyeUBI/s1600/CRXDELite2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="232" src="http://1.bp.blogspot.com/-h7adotDpnps/T1eBbwpLz5I/AAAAAAAAANA/vVqRslyeUBI/s640/CRXDELite2.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style="font-family: inherit; font-size: large;"&gt;About the Author&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: inherit;"&gt;I (Scott Macdonald) am a senior content and community &amp;nbsp;lead at Adobe Systems with over 15 years in the high tech industry. I am also a programmer with knowledge in Java, JavaScript, C#,C++, HTML, XML and ActionScript. If &amp;nbsp;you would like to see more CQ or other Adobe Digital Marketing end to end walkthroughs like this, then leave a comment and let me know what content you would like to see.&lt;/span&gt;&lt;span style="font-size: large;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6971795843805337966-8721725897676574211?l=scottsdigitalcommunity.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scottsdigitalcommunity.blogspot.com/feeds/8721725897676574211/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://scottsdigitalcommunity.blogspot.com/2012/03/programmatically-accessing-day-cq.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6971795843805337966/posts/default/8721725897676574211'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6971795843805337966/posts/default/8721725897676574211'/><link rel='alternate' type='text/html' href='http://scottsdigitalcommunity.blogspot.com/2012/03/programmatically-accessing-day-cq.html' title='Programmatically Accessing Adobe CQ Content using the JCR API'/><author><name>Scott Macdonald</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://3.bp.blogspot.com/-L81EgMprC68/TZsOlZxUPuI/AAAAAAAAAAM/seRO_Lxss1U/s220/mia.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-h7adotDpnps/T1eBbwpLz5I/AAAAAAAAANA/vVqRslyeUBI/s72-c/CRXDELite2.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6971795843805337966.post-6718731815776284763</id><published>2012-02-28T14:13:00.010-08:00</published><updated>2012-02-29T09:02:03.774-08:00</updated><title type='text'>Integrating the JQuery Framework into DAY CQ</title><content type='html'>&lt;div class="MsoNormal"&gt;You can integrate the JQuery Framework into DAY CQ (5.4) thereby enabling you to build components that take advantage of the JQuery framework. The JQuery framework is a popular JavaScript library that simplifies the creation of powerful components. For example, you can build components that contain visual effects, data grids that display information, user forms that capture information from end users, and so on. For more information about JQuery, see &lt;a href="http://www.jquery.com/"&gt;www.jquery.com&lt;/a&gt;.&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;The component that is created in this development article renders text and uses a JQuery fade effect. That is, the text becomes visible over a period of five seconds. The objective of this article is not to demonstrate how to create a complex JQeury effect, but rather guide you through the process of creating a CQ page and then how to make use of the JQuery framework.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;NOTE&lt;/b&gt;: Before following along with this development article, make sure that you install DAY CQ 5.4 and have it running. Also, make sure that you have CRXDE, which is the development environment.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;To create a DAY CQ page that uses the JQuery framework, perform the following tasks:&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;/div&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="text-indent: -0.25in;"&gt;Create a&amp;nbsp;CQ 5.4&amp;nbsp;application that contains the page that displays the JQuery fade effect.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="text-indent: -0.25in;"&gt;Create a template on which the component that uses JQuery is based.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Create a render component that uses the template.&lt;/li&gt;&lt;li&gt;Add the JQuery framework to the component.&lt;/li&gt;&lt;li&gt;Modify the component to use JQuery application logic.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Create a site that contains a page that displays the component that contains a JQuery effect.&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Create a CQ 5.4 application&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;You can create a DAY CQ application that contains templates, components, and pages. Before you create application assets such as templates, components, and pages, you create an application, which is essentially a specific folder structure. You can create this folder by using CRXDE Lite.&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: large;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: small;"&gt;The following illustration shows a typical application folder&amp;nbsp;&lt;/span&gt;structure&amp;nbsp;&amp;nbsp;&lt;span style="font-size: small;"&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://2.bp.blogspot.com/-08dvwlAwGQ8/T01N8urVo9I/AAAAAAAAAMY/OWQ1VTZDcfA/s1600/CQAppSetup.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="376" src="http://2.bp.blogspot.com/-08dvwlAwGQ8/T01N8urVo9I/AAAAAAAAAMY/OWQ1VTZDcfA/s400/CQAppSetup.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: small;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-size: small;"&gt;The following describes each application folder:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Application name folder&lt;/b&gt;: contains&amp;nbsp;application&amp;nbsp;resources such as templates, pages, components, and so on.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;span style="font-size: small;"&gt;&lt;li&gt;&lt;b&gt;components folder&lt;/b&gt;: contains components that your application uses.&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;b&gt;page folder:&lt;/b&gt; contains page components. A page component is a script such as a JSP file.&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;b&gt;global&lt;/b&gt;: contains global components that your application uses&lt;/li&gt;&lt;li&gt;&lt;b&gt;template folder&lt;/b&gt;: contains templates that you can base page components on.&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;b&gt;src folder&lt;/b&gt;: contains source code that comprises an OSGi component (this development article does not use an OSGi component.&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;b&gt;install folder&lt;/b&gt;: contains a &amp;nbsp;compiled OSGi bundles container&amp;nbsp;&lt;/li&gt;&lt;/span&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: small;"&gt;The following illustration shows the folder structure. Notice that the application name is &lt;i&gt;JQueryApp&lt;/i&gt;.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://1.bp.blogspot.com/-0CFbsRKSoLE/T01Orz5twaI/AAAAAAAAAMg/9IInm3TYLlI/s1600/JQueryApp.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://1.bp.blogspot.com/-0CFbsRKSoLE/T01Orz5twaI/AAAAAAAAAMg/9IInm3TYLlI/s400/JQueryApp.png" width="205" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;b&gt;To create a CQ application&lt;/b&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;/div&gt;&lt;ol&gt;&lt;li&gt;To view the CQ welcome page, enter the URL &lt;i&gt;http://[host name]:[port]&lt;/i&gt; into a web browser. For example, &lt;i&gt;http://localhost:4502&lt;/i&gt;.&lt;/li&gt;&lt;li&gt;Select CRXDE Lite.&lt;/li&gt;&lt;li&gt;Right-click the apps folder (or the parent folder), select &lt;b&gt;Create&lt;/b&gt;, &lt;b&gt;Create Folder&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Enter the folder name into the &lt;b&gt;Create Folder&lt;/b&gt; dialog box. Enter &lt;i&gt;JQueryApp&lt;/i&gt;.&lt;/li&gt;&lt;li&gt;Repeat steps 1-4 for each folder specified in the previous illustration.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Click the &lt;b&gt;Save All&lt;/b&gt; button.&amp;nbsp;&lt;/li&gt;&lt;/ol&gt;&lt;b&gt;&lt;span style="font-size: large;"&gt;Create a template&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;div class="Body" style="margin-left: 0.5in; text-align: left; text-indent: -0.25in;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;span style="font-family: 'Times New Roman', serif; font-size: 12pt;"&gt;You can create a template by using CRXDE Lite. A CQ template enables you to define a consistent style for the pages in your application. A template comprises of nodes that specify the page structure. For more information about templates, see &lt;/span&gt;&lt;a href="http://dev.day.com/docs/en/cq/current/developing/templates.html" style="font-family: 'Times New Roman', serif; font-size: 12pt;"&gt;http://dev.day.com/docs/en/cq/current/developing/templates.html&lt;/a&gt;&lt;span style="font-family: 'Times New Roman', serif; font-size: 12pt;"&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Times New Roman', serif; font-size: 12pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;b&gt;To create a template&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;To view the CQ welcome page, enter the URL&lt;i&gt; http://[host name]:[port]&lt;/i&gt; into a web browser. For example,&lt;i&gt; http://localhost:4502&lt;/i&gt;.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;Select&lt;b&gt; CRXDE Lite&lt;/b&gt;.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;Right-click the template folder (within your application), select &lt;b&gt;Create&lt;/b&gt;, &lt;b&gt;Create Template&lt;/b&gt;.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;Enter the following information into the &lt;b&gt;Create Template&lt;/b&gt; dialog box:&lt;br /&gt;&lt;b&gt;Label&lt;/b&gt;: The name of the template to create. Enter&amp;nbsp;&lt;i&gt;mytemplate.&lt;/i&gt;&lt;br /&gt;&lt;b&gt;Title&lt;/b&gt;: The title that is assigned to the template.&lt;br /&gt;&lt;b&gt;Description&lt;/b&gt;: The description that is assigned to the template.&lt;br /&gt;&lt;b&gt;Resource Type&lt;/b&gt;: The component's path that is assigned to the template and copied to all implementing pages. Enter&lt;i&gt; jqueryapp/components/page/mytemplate&lt;/i&gt;.&lt;br /&gt;&lt;b&gt;Ranking&lt;/b&gt;: The order (ascending) in which this template will appear in relation to other templates. Setting this value to 1 ensures that the template appears first in the list.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;Add a path to &lt;b&gt;Allowed Paths&lt;/b&gt;. Click on the plus sign and enter the following value:&amp;nbsp;&lt;i&gt;/content(/.*)?&lt;/i&gt;.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;Click &lt;b&gt;Next &lt;/b&gt;for &lt;b&gt;Allowed Parents&lt;/b&gt;.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;Select &lt;b&gt;OK&lt;/b&gt; on &lt;b&gt;Allowed Children&lt;/b&gt;.&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;span style="font-family: 'Times New Roman', serif; font-size: large;"&gt;&lt;b&gt;Create a render component that uses the template&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;Components are re-usable modules that implement specific application logic to render the content of your Web site. You can think of a component as a collection of scripts (for example, JSPs, Java servlets, and so on) that performs a specific function. For more information about components, see&amp;nbsp;&lt;a href="http://dev.day.com/docs/en/cq/current/developing/components.html"&gt;http://dev.day.com/docs/en/cq/current/developing/components.html&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt; &lt;/span&gt; &lt;/ol&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;b&gt;Note&lt;/b&gt;:&amp;nbsp;&lt;/span&gt;&amp;nbsp;By default, a component has at least one default script whose file name reflects the component's name.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;b&gt;To create a render component&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;Right-click &lt;i&gt;/apps/jqueryapp/components/page&lt;/i&gt;, then select&amp;nbsp;&lt;b&gt;Create&lt;/b&gt;, &lt;b&gt;Create Component&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Enter the following information into the&lt;b&gt; Create Template&lt;/b&gt; dialog box:&lt;br /&gt;&lt;b style="font-family: 'Times New Roman', serif;"&gt;Label&lt;/b&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;: The name of the component to create. Enter&amp;nbsp;&lt;/span&gt;&lt;i style="font-family: 'Times New Roman', serif;"&gt;mytemplate.&lt;/i&gt;&lt;br style="font-family: 'Times New Roman', serif;" /&gt;&lt;b style="font-family: 'Times New Roman', serif;"&gt;Title&lt;/b&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;: The title that is assigned to the component.&lt;/span&gt;&lt;br style="font-family: 'Times New Roman', serif;" /&gt;&lt;b style="font-family: 'Times New Roman', serif;"&gt;Description&lt;/b&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;: The description that is assigned to the component (leave the remaining fields empty).&lt;/span&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Select &lt;b&gt;Next &lt;/b&gt;for &lt;b&gt;Advanced Component Settings&lt;/b&gt; and &lt;b&gt;Allowed Parents&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Select &lt;b&gt;OK &lt;/b&gt;on &lt;b&gt;Allowed Children&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Open the mytemplate.jps located at:&lt;i&gt; /apps/jqueryapp/components/page/mytemplate/mytemplate.jsp&lt;/i&gt;.&lt;/li&gt;&lt;li&gt;Enter the following JSP code:&lt;/li&gt;&lt;/ol&gt;&lt;div style="text-align: left;"&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;lt;title&amp;gt;Hello World !!!&amp;lt;/title&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;lt;h1&amp;gt;Hello JQuery !!!&amp;lt;/h1&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;lt;h2&amp;gt;This page contains a JQuery Fade Effect&amp;lt;/h2&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Add the JQuery framework to the component&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;You can add the JQeury framework to your application’s class path so that JQuery functionality is available to your components. For example, once you add JQuery, you can modify the JSP code that you added to the mytemplate component.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Note&lt;/b&gt;: Before you follow along with this section, make sure that you download the JQuery framework. For information, see &lt;a href="http://www.jquery.com/"&gt;www.jquery.com&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To add the JQeury framework to your component, you have to add a &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;cq:ClientLibraryFolder&lt;/span&gt; node to your component. In this development article, once you add this node, you set a couple properties that allows the script to find the JQuery library. Then you will modify the JSP code in the mytemplate component to use JQuery functionality.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To add a the JQuery framework, you have to add a new node name clientlibs to your component (as discussed below). You have to add two properties to this node as shown in the following table.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;table border="1" style="width: 200px;"&gt;&lt;tbody&gt;&lt;tr&gt;     &lt;td&gt;&lt;strong&gt;Name&lt;/strong&gt;&lt;/td&gt;     &lt;td&gt;&lt;strong&gt;Type&lt;/strong&gt;&lt;/td&gt;     &lt;td&gt;&lt;strong&gt;Value&lt;/strong&gt;&lt;/td&gt;   &lt;/tr&gt;&lt;tr&gt;     &lt;td&gt;dependencies &lt;/td&gt;     &lt;td&gt;String[] &lt;/td&gt;     &lt;td&gt;cq.jquery &lt;/td&gt;   &lt;/tr&gt;&lt;tr&gt;     &lt;td&gt;categories &lt;/td&gt;     &lt;td&gt;String[] &lt;/td&gt;     &lt;td&gt;jquerysamples &lt;/td&gt;   &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div&gt;&lt;br /&gt;The dependencies property informs CQ to make sure that the JQuery libraries are included in the page. The categories property is very important and informs CQ which clientlibs must be included with the JSP that is generated.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&amp;nbsp;To add the JQuery framework to the component&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;Right-click /apps/jqueryapp/components&amp;nbsp;then select &lt;b&gt;New&lt;/b&gt;, &lt;b&gt;Node&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Make sure the node type is &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;cq:ClientLibraryFolder&amp;nbsp;&lt;/span&gt;and name the node &lt;b&gt;clientlibs&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Right click on &lt;b&gt;clientlibs &lt;/b&gt;and select &lt;b&gt;Properties&lt;/b&gt;.Add the two properties specified in the previous table to the node.&amp;nbsp;&lt;/li&gt;&lt;li&gt;On your file system, navigate to the js folder where the JQeury JS file is located. Drag and drop the jquery-1.6.3.min.js (or the version you have) to the &lt;b&gt;clientlibs &lt;/b&gt;node by using CRXDE.&lt;/li&gt;&lt;li&gt;Add a TXT file to the &lt;b&gt;clientlibs &lt;/b&gt;node named js.txt. The contents of the js.txt file is the file name of the javascript file to include with your component. In this development article, the JS file is&amp;nbsp; jquery-1.6.3.min.js.&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Modify the component to use JQuery application logic&lt;/b&gt; &lt;/span&gt;&lt;br /&gt;Now you can use JQuery functionality in your component. To demonstrate how to use JQeury application logic in your component, this development environment modifies the&amp;nbsp;mytemplate.jps located at: &lt;i&gt;/apps/jqueryapp/components/page/mytemplate/mytemplate.jsp&lt;/i&gt;. Open thjs file and replace the code in the file with the following code:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;&amp;lt;%@include file="/libs/foundation/global.jsp"%&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;&amp;lt;cq:includeClientLib categories="jquerysamples" /&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;lt;title&amp;gt;Hello World !!!&amp;lt;/title&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;&amp;lt;script&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;$(document).ready(function() {&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; $('body').hide().fadeIn(5000);&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;});&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;&amp;lt;/script&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;lt;h1&amp;gt;Hello JQuery !!!&amp;lt;/h1&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;lt;h2&amp;gt;This page contains a JQuery Fade Effect&amp;lt;/h2&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;The bold code represents the new code. The code within the script tag is JQuery application logic and causes the HTML within the &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;lt;body&amp;gt;&lt;/span&gt; tag to appear over five seconds. Notice the line at the top of the JSP:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;lt;cq:includeClientLib categories="jquerysamples" /&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Notice the value of the categories attribute. This maps to the property that was added to the &lt;b&gt;clientlibs &lt;/b&gt;node. This is how CQ locates the JQuery framework.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Create a page that displays a JQuery effect&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;The final task that you perform in order to see a web page that contains the JQuery effect is to create a site that contains a page that is based on mytemplate (the template created earlier in this development&amp;nbsp;article). The following illustration represents the component that is created in this development&amp;nbsp;article&amp;nbsp;that fade in over 5 seconds (the fade in is the JQuery effect).&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://3.bp.blogspot.com/-6wolZMFLKBs/T01sfKJzcpI/AAAAAAAAAMo/M2m00_Zj_aI/s1600/JqueryEffect.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="120" src="http://3.bp.blogspot.com/-6wolZMFLKBs/T01sfKJzcpI/AAAAAAAAAMo/M2m00_Zj_aI/s400/JqueryEffect.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;To create a page that displays a JQuery effect&amp;nbsp;&lt;/b&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;To view the CQ welcome page, enter the URL&lt;i&gt; http://[host name]:[port]&lt;/i&gt; into a web browser. For example, &lt;i&gt;http://localhost:4502&lt;/i&gt;.&lt;/li&gt;&lt;li&gt;Select &lt;i&gt;Websites&lt;/i&gt;.&lt;/li&gt;&lt;li&gt;Right-click the template folder (within your application), select Create, Create Template.&lt;/li&gt;&lt;li&gt;From the left hand pane, select &lt;b&gt;Websites&lt;/b&gt;.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Select &lt;b&gt;New&lt;/b&gt;, &lt;b&gt;New Page&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Specify the title of the page in the &lt;b&gt;Title &lt;/b&gt;field.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Specify the name of the page in the &lt;b&gt;Name &lt;/b&gt;field.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Select&amp;nbsp;&lt;i&gt;mytemplate &lt;/i&gt;from the template list that appears. This value represents the template that is created in this development&amp;nbsp;article. If you do not see it, then repeat the steps in this development&amp;nbsp; article. For example, if you made a typing mistake when entering in path information when creating the template, the template will not show up in the &lt;b&gt;New Page&lt;/b&gt; dialog box.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Open the new page that you create by double-clicking it in the right pane. The new page opens in a web browser where you will see the results fade in over five seconds&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;b&gt;&lt;span style="font-size: large;"&gt;About the Author&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;I (Scott Macdonald) am a senior content and community &amp;nbsp;lead at Adobe Systems with over 15 years in the high tech industry. I am also a programmer with&amp;nbsp;knowledge&amp;nbsp;in Java, JavaScript, C#,C++, HTML, XML and ActionScript. If &amp;nbsp;you would like to see more CQ or other Adobe Digital Marketing end to end walkthroughs like this, then leave a comment and let me know what content you would like to see.&amp;nbsp;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6971795843805337966-6718731815776284763?l=scottsdigitalcommunity.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scottsdigitalcommunity.blogspot.com/feeds/6718731815776284763/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://scottsdigitalcommunity.blogspot.com/2012/02/integrating-jquery-framework-into-day.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6971795843805337966/posts/default/6718731815776284763'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6971795843805337966/posts/default/6718731815776284763'/><link rel='alternate' type='text/html' href='http://scottsdigitalcommunity.blogspot.com/2012/02/integrating-jquery-framework-into-day.html' title='Integrating the JQuery Framework into DAY CQ'/><author><name>Scott Macdonald</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://3.bp.blogspot.com/-L81EgMprC68/TZsOlZxUPuI/AAAAAAAAAAM/seRO_Lxss1U/s220/mia.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-08dvwlAwGQ8/T01N8urVo9I/AAAAAAAAAMY/OWQ1VTZDcfA/s72-c/CQAppSetup.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6971795843805337966.post-1909164381022183495</id><published>2011-12-13T11:08:00.001-08:00</published><updated>2011-12-13T11:19:39.646-08:00</updated><title type='text'>Create Mobile Applications for Data Services 4.6</title><content type='html'>Now you can view and interact with your mission critical enterprise data in any location at&amp;nbsp;any time! That is right, you can create mobile applications for Data Services 4.6. For example, you can create a mobile application for a tablet that lets you view and interact with your enterprise data. The following illustration shows the supported clients for Data Services 4.6.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-kLyF_YJ0N0Y/TuefaPk87sI/AAAAAAAAAJE/Gy7Be5NZQ-o/s1600/DataServices.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="386" src="http://2.bp.blogspot.com/-kLyF_YJ0N0Y/TuefaPk87sI/AAAAAAAAAJE/Gy7Be5NZQ-o/s640/DataServices.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;You use the AIR client-side API to create the mobile application as well as Flash Builder 4.6. You use the Java API to create server-side classes that retrieve financial data from a content provider and sends messages to a server destination. When the mobile application detects new messages, the application is updated in real time with financial data.&lt;br /&gt;&lt;br /&gt;For example, assume that the mobile application tracks multiple stocks. When the server retrieves updated data from the financial content provider, it creates an updated message and pushes the message to the destination. The mobile application detects the new message and displays changes to the stock price. &lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-EiDHMtIeCS0/Tueh7C_3e0I/AAAAAAAAAJM/lbjVZ2PAczg/s1600/wf.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="272" src="http://2.bp.blogspot.com/-EiDHMtIeCS0/Tueh7C_3e0I/AAAAAAAAAJM/lbjVZ2PAczg/s640/wf.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;The following illustration shows the mobile application that is created. Notice that this application is able to track multiple stock prices. When the user clicks on a row in the grid control, more detailed information is displayed in the mobile application. For example, you can view the stock price during the past five years in an Area control.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-BlywN46pt_o/TuefYTEGgiI/AAAAAAAAAI8/99hvLvQVztA/s1600/mobileApp2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://4.bp.blogspot.com/-BlywN46pt_o/TuefYTEGgiI/AAAAAAAAAI8/99hvLvQVztA/s640/mobileApp2.jpg" width="508" /&gt;&lt;/a&gt;&lt;/div&gt;To create this mobile application by using Data Services 4.6, then click on the following link to read the full article:&amp;nbsp;&lt;a href="http://66.147.244.74/~miaparan/documents/LiveStockQuoteQ4_2011.pdf"&gt;Creating Mobile Applications using Data Services 4.6 Message service&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;Scott Macdonald&lt;br /&gt;Senior Content Lead at Adobe Systems&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6971795843805337966-1909164381022183495?l=scottsdigitalcommunity.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scottsdigitalcommunity.blogspot.com/feeds/1909164381022183495/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://scottsdigitalcommunity.blogspot.com/2011/12/create-mobile-applications-for-data.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6971795843805337966/posts/default/1909164381022183495'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6971795843805337966/posts/default/1909164381022183495'/><link rel='alternate' type='text/html' href='http://scottsdigitalcommunity.blogspot.com/2011/12/create-mobile-applications-for-data.html' title='Create Mobile Applications for Data Services 4.6'/><author><name>Scott Macdonald</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://3.bp.blogspot.com/-L81EgMprC68/TZsOlZxUPuI/AAAAAAAAAAM/seRO_Lxss1U/s220/mia.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-kLyF_YJ0N0Y/TuefaPk87sI/AAAAAAAAAJE/Gy7Be5NZQ-o/s72-c/DataServices.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6971795843805337966.post-2336471994280728245</id><published>2011-11-29T18:07:00.000-08:00</published><updated>2011-11-30T18:13:51.712-08:00</updated><title type='text'>Your place to learn about using Adobe Digital Media Products</title><content type='html'>Some exciting news that I wanted to share with you. Going forward, you will find all sorts of videos,&amp;nbsp;articles, blog entries, and other content here at &lt;i&gt;Scott's Digital&amp;nbsp;Community&lt;/i&gt; that will help you with various Adobe products. &amp;nbsp;I am going to focus on creative products like After Effects,&amp;nbsp;Premier&amp;nbsp;Pro, Photoshop as well as the new creative cloud. As well, I am going to explore new Adobe touch products. If you have any content that you would like to see - please leave a comment and I will see if we can create content around that.&lt;br /&gt;&lt;br /&gt;Also, if you have questions about various Adobe products, please leave a comment and I will try my best to answer it or ask someone within Adobe and share the answer with you. That is, because I am a&amp;nbsp;Senior community lead at&amp;nbsp;Adobe - it is one of my jobs to make sure that you are successful.&lt;br /&gt;&lt;br /&gt;I have recently been very busy with Creative Suite products like After Effects. I am gathering ideas for future content that will be posted on this blog. &amp;nbsp;I know that there is a lot of demand for various how to content with products like After Effects (especially&amp;nbsp;around cutting edge use cases like creating stunning compositions using&amp;nbsp;particles&amp;nbsp;and other effects).&lt;br /&gt;&lt;br /&gt;As I find other third party&amp;nbsp;articles&amp;nbsp;that I find useful, I will add links from this blog. For example, check out the following video created in After Effects that uses a laser effect to burn the word "Adobe" into a Steel background:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;object width="320" height="266" class="BLOG_video_class" id="BLOG_video-ca006048bc2c6f9d" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"&gt;&lt;param name="movie" value="http://www.youtube.com/get_player"&gt;&lt;param name="bgcolor" value="#FFFFFF"&gt;&lt;param name="allowfullscreen" value="true"&gt;&lt;param name="flashvars" value="flvurl=http://v21.nonxt3.googlevideo.com/videoplayback?id%3Dca006048bc2c6f9d%26itag%3D5%26app%3Dblogger%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1333561892%26sparams%3Did,itag,ip,ipbits,expire%26signature%3D722A78E5853C972465E40D2C27646ACB45AB033A.46F967E11E74367C6BE0331C29CC402DE70FB974%26key%3Dck1&amp;amp;iurl=http://video.google.com/ThumbnailServer2?app%3Dblogger%26contentid%3Dca006048bc2c6f9d%26offsetms%3D5000%26itag%3Dw160%26sigh%3DcOYRHxaF8uKrJGzJSa6lZDxmsb4&amp;amp;autoplay=0&amp;amp;ps=blogger"&gt;&lt;embed src="http://www.youtube.com/get_player" type="application/x-shockwave-flash"width="320" height="266" bgcolor="#FFFFFF"flashvars="flvurl=http://v21.nonxt3.googlevideo.com/videoplayback?id%3Dca006048bc2c6f9d%26itag%3D5%26app%3Dblogger%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1333561892%26sparams%3Did,itag,ip,ipbits,expire%26signature%3D722A78E5853C972465E40D2C27646ACB45AB033A.46F967E11E74367C6BE0331C29CC402DE70FB974%26key%3Dck1&amp;iurl=http://video.google.com/ThumbnailServer2?app%3Dblogger%26contentid%3Dca006048bc2c6f9d%26offsetms%3D5000%26itag%3Dw160%26sigh%3DcOYRHxaF8uKrJGzJSa6lZDxmsb4&amp;autoplay=0&amp;ps=blogger"allowFullScreen="true" /&gt;&lt;/object&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;This was created by using After Affects CS5. If you are interested in knowing how this is done, then see the following link:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.youtube.com/watch?v=Wv25C34X2UI&amp;amp;feature=relmfu"&gt;http://www.youtube.com/watch?v=Wv25C34X2UI&amp;amp;feature=relmfu&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is a great After Effect tutorial and is the type of content that you will find here.&lt;br /&gt;&lt;br /&gt;On another note - Data Services 4.6 is scheduled to be released soon. When it does, you will find a great&amp;nbsp;article&amp;nbsp;here that discusses how to create an AIR mobile application for Data Services. The AIR mobile application subscribes to a Message service destination that enables the mobile application to view real-time data that is sent to the destination by the server. I hope you like that&amp;nbsp;article.&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;Scott Macdonald&lt;br /&gt;Senior Content Lead at Adobe Systems&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6971795843805337966-2336471994280728245?l=scottsdigitalcommunity.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scottsdigitalcommunity.blogspot.com/feeds/2336471994280728245/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://scottsdigitalcommunity.blogspot.com/2011/11/your-place-to-learn-about-using-adobe.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6971795843805337966/posts/default/2336471994280728245'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6971795843805337966/posts/default/2336471994280728245'/><link rel='alternate' type='text/html' href='http://scottsdigitalcommunity.blogspot.com/2011/11/your-place-to-learn-about-using-adobe.html' title='Your place to learn about using Adobe Digital Media Products'/><author><name>Scott Macdonald</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://3.bp.blogspot.com/-L81EgMprC68/TZsOlZxUPuI/AAAAAAAAAAM/seRO_Lxss1U/s220/mia.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6971795843805337966.post-5080089348654607442</id><published>2011-10-25T16:55:00.000-07:00</published><updated>2011-11-22T07:13:28.288-08:00</updated><title type='text'>Displaying a Message Box in a Flash Builder 4.5 Mobile application</title><content type='html'>I am working on a new development article that will be posted late Nov or early December 2011 that&amp;nbsp;discusses&amp;nbsp;how to create a message-based Tablet application using Data Services 4.6. This application will use the Message service and display stock data. The stock data will come from a real financial data provider such as&amp;nbsp;Yahoo Finance as&amp;nbsp;opposed&amp;nbsp;to an XML file.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;The great thing about creating a mobile application by using Flash Builder is that you can write once and then deploy to different Mobile devices including Android devices and iDevice devices, such as an iPad. That is correct -- you can create an application in Flash Builder and then deploy it to an iPad.&lt;br /&gt;&lt;br /&gt;The tablet application will consist of three views as shown in the following diagram.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-cKobVfTtQI4/TqdGX7iJJUI/AAAAAAAAAFA/WQNJc6GJEIU/s1600/android.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://3.bp.blogspot.com/-cKobVfTtQI4/TqdGX7iJJUI/AAAAAAAAAFA/WQNJc6GJEIU/s640/android.png" width="444" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;One of the objectives of &lt;i&gt;Scott's Digital Community&lt;/i&gt; is to specify tips and tricks that I find useful as I develop applications by using Adobe technology. As I found, creating a pop up message (or Message Box) in a mobile application is not as straightforward as you may think. To begin, a mobile application does not support &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;mx.controls.Alert&lt;/span&gt;. As a result, you have to create pop up messages by using another technique.&lt;br /&gt;&lt;br /&gt;That other way is by using a &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;fx:Component&lt;/span&gt; instance. You can think of a&amp;nbsp;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;fx:Component&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&amp;nbsp;as a class. You can create an instance of this class and then use the instance to display messages. The following code represent the&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;fx:Component&lt;/span&gt;&amp;nbsp;instance.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;lt;fx:Declarations&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;!-- This component represents a popup to show the user a message in a mobile application --&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;lt;fx:Component className="AlertMsg"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;s:SkinnablePopUpContainer x="70" y="400"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp; &amp;lt;s:TitleWindow title="My Message" close="close()"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;s:VGroup horizontalAlign="center" paddingTop="8" paddingBottom="8" paddingLeft="8" paddingRight="8" gap="5" width="100%"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&amp;lt;s:Label text="{localVar}" /&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&amp;lt;s:Button label="OK" click="close()"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&amp;lt;/s:VGroup&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&amp;lt;fx:Script&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;&amp;lt;![CDATA[ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;// Variable in the renderer scope.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;[Bindable] public var localVar:String="";&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;     &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;public function setValue(val:String)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;     &lt;/span&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;     &lt;/span&gt;this.localVar=val;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;     &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;]]&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&amp;lt;/fx:Script&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;lt;/s:TitleWindow&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;lt;/s:SkinnablePopUpContainer&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;lt;/fx:Component&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&amp;lt;/fx:Declarations&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Then you can declare an instance of &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;AlertMsg &lt;/span&gt;and then call its &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;SetValue &lt;/span&gt;method and pass a string that represents the message that you want to display in your pop up message. For example:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;//THIS IS HOW YOU SET A POPUP MESSAGE IN A MOBILE APP&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;var msg:AlertMsg = new AlertMsg();&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;msg.setValue("Hi There") ;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;msg.open(this, false);&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;I hope that you find this useful. Stay tuned for more useful information on Scott's Digital Community.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;test&amp;nbsp;&lt;a href="http://66.147.244.74/~miaparan/documents/readme.pdf"&gt;Test&lt;/a&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6971795843805337966-5080089348654607442?l=scottsdigitalcommunity.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scottsdigitalcommunity.blogspot.com/feeds/5080089348654607442/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://scottsdigitalcommunity.blogspot.com/2011/10/displaying-message-box-in-flash-builder.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6971795843805337966/posts/default/5080089348654607442'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6971795843805337966/posts/default/5080089348654607442'/><link rel='alternate' type='text/html' href='http://scottsdigitalcommunity.blogspot.com/2011/10/displaying-message-box-in-flash-builder.html' title='Displaying a Message Box in a Flash Builder 4.5 Mobile application'/><author><name>Scott Macdonald</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://3.bp.blogspot.com/-L81EgMprC68/TZsOlZxUPuI/AAAAAAAAAAM/seRO_Lxss1U/s220/mia.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-cKobVfTtQI4/TqdGX7iJJUI/AAAAAAAAAFA/WQNJc6GJEIU/s72-c/android.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6971795843805337966.post-7475890050611079285</id><published>2011-10-10T11:34:00.000-07:00</published><updated>2011-10-10T13:00:25.738-07:00</updated><title type='text'>Welcome to the first Blog of Scott's Digital Community</title><content type='html'>Hi and welcome to my Blog named &lt;i&gt;Scott's Digital Community&lt;/i&gt;. My name is Scott Macdonald and I am a Senior Content Lead at Adobe. I have close to 15 years in the High Tech industry and 8 with Adobe. Among my responsibilities at Adobe are working with the community, writing technical&amp;nbsp;documentation such as ActionScript, Java, .NET, HTML/XML, and so on, and other tasks such as helping out on the&amp;nbsp;on-line&amp;nbsp;forums, etc.&lt;br /&gt;&lt;br /&gt;I love to get out and work directly with the community when I get the chance. I just got back from MAX 2011 and I really enjoyed working with those attending the labs and other sessions. I have attended the past 3 years at MAX and have meet a lot of interesting people working with various Adobe products. Speaking of&amp;nbsp;interesting, this was taken at the MAX 2011 party.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-Pxh70C6QJJE/TpM5PsHMs7I/AAAAAAAAAE0/J_l-8iERVNg/s1600/Max.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://2.bp.blogspot.com/-Pxh70C6QJJE/TpM5PsHMs7I/AAAAAAAAAE0/J_l-8iERVNg/s400/Max.jpg" width="300" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Anyhow - my Blog is going to focus on how to use Adobe products to perform specific tasks. The format will range. That is, some topics will be shorter blog items, others will be technical articles, while others will be How To videos. The topics will range in subject matter as well. Some may be how to create a Mobile application for IOS or Android devices that&amp;nbsp;receive&amp;nbsp;data from&amp;nbsp;back ends&amp;nbsp;such as Data Services, while others may be how to&amp;nbsp;programmatically&amp;nbsp;extract data from a PDF form. Some may be tips that I find useful on how to use the CS products such Premire Pro (which is the software that I use to create videos).&lt;br /&gt;&lt;br /&gt;If you are interested in a specific subject, email me at scottm@adobe.com and place &lt;i&gt;Scott's&amp;nbsp;Digital&amp;nbsp;Community&lt;/i&gt; in the subject line.&lt;br /&gt;&lt;br /&gt;For all of my videos that appear on this Blog, the following After Effects intro will be used.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;object width="320" height="266" class="BLOG_video_class" id="BLOG_video-963d180ce47e1046" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"&gt;&lt;param name="movie" value="http://www.youtube.com/get_player"&gt;&lt;param name="bgcolor" value="#FFFFFF"&gt;&lt;param name="allowfullscreen" value="true"&gt;&lt;param name="flashvars" value="flvurl=http://v12.nonxt4.googlevideo.com/videoplayback?id%3D963d180ce47e1046%26itag%3D5%26app%3Dblogger%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1333561892%26sparams%3Did,itag,ip,ipbits,expire%26signature%3D65980CBEB5F9A253090B9DF2820BA042520EB5DE.6B79C7675ECC8AB8E477850AC03023C3360A2008%26key%3Dck1&amp;amp;iurl=http://video.google.com/ThumbnailServer2?app%3Dblogger%26contentid%3D963d180ce47e1046%26offsetms%3D5000%26itag%3Dw160%26sigh%3D-gR4HTaG25TlcEksfYFysuq-RsA&amp;amp;autoplay=0&amp;amp;ps=blogger"&gt;&lt;embed src="http://www.youtube.com/get_player" type="application/x-shockwave-flash"width="320" height="266" bgcolor="#FFFFFF"flashvars="flvurl=http://v12.nonxt4.googlevideo.com/videoplayback?id%3D963d180ce47e1046%26itag%3D5%26app%3Dblogger%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1333561892%26sparams%3Did,itag,ip,ipbits,expire%26signature%3D65980CBEB5F9A253090B9DF2820BA042520EB5DE.6B79C7675ECC8AB8E477850AC03023C3360A2008%26key%3Dck1&amp;iurl=http://video.google.com/ThumbnailServer2?app%3Dblogger%26contentid%3D963d180ce47e1046%26offsetms%3D5000%26itag%3Dw160%26sigh%3D-gR4HTaG25TlcEksfYFysuq-RsA&amp;autoplay=0&amp;ps=blogger"allowFullScreen="true" /&gt;&lt;/object&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;Scott&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6971795843805337966-7475890050611079285?l=scottsdigitalcommunity.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://scottsdigitalcommunity.blogspot.com/feeds/7475890050611079285/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://scottsdigitalcommunity.blogspot.com/2011/10/welcome-to-first-blog-of-scotts-digital.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6971795843805337966/posts/default/7475890050611079285'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6971795843805337966/posts/default/7475890050611079285'/><link rel='alternate' type='text/html' href='http://scottsdigitalcommunity.blogspot.com/2011/10/welcome-to-first-blog-of-scotts-digital.html' title='Welcome to the first Blog of Scott&apos;s Digital Community'/><author><name>Scott Macdonald</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://3.bp.blogspot.com/-L81EgMprC68/TZsOlZxUPuI/AAAAAAAAAAM/seRO_Lxss1U/s220/mia.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-Pxh70C6QJJE/TpM5PsHMs7I/AAAAAAAAAE0/J_l-8iERVNg/s72-c/Max.jpg' height='72' width='72'/><thr:total>1</thr:total></entry></feed>
