Home

WYSIWYG HTML Source Editor Considered Harmful

Most Web Content Management system's Rich Text or WYSIWYG editors have an optional feature to allow authors to directly edit the HTML instead of using the WYSIWYG.  Among one of the first decisions made on a WCMS implementation project is to enable or disable this feature.  Proponents of the HTML editor argue for author flexibility and for freedom to directly enter markup.  I would argue, however, the HTML editor should not be enabled.What's Wrong with...

Workflow Launcher Blues

When creating workflow launchers I recently thought it a good idea to organize them within the /etc/workflow/launcher/config node by creating sub-node's to contain the customized launcher's organized by company name. Given the fact that the models support this, I figured this would be similar.  The only need, I thought, similar to the model sub-nodes is that the subnode of config would have to be of the same type as the config node itself.  With the...

Increasing Recent Requests in the Felix Console

I argued with myself for some time before commiting to writing this post.  Part of me thought it kind of silly to post such a thing.  Then I reflected on the hour or so I wandered around trying to figure out how to get this darned thing to do what I needed it to.  So, now you won't have to wonder how the heck to get this to work properly.  This was tested on CQ...

Releasing an Adobe CQ5 Project with Apache Maven

Apache Maven's release plugin is a powerful tool for automatically incrementing version, tagging code and creating a release. Unfortunately, this plugin is not very forgiving and doesn't do a good job of telling you what you did wrong when it fails. Setting up Maven to release your CQ5 project can seem daunting, but if you follow a few simple rules it can be easy to set up and save you a ton of time in the...

Dumping CQ Configuration

Often when providing remote support, you may want to send a complete snapshot of a CQ instance's configuration and state to others to help debugging.  Generating a report of the complete status of the OSGi configuration, environment state and logs is as easy as invoking a single url. The OSGi console will generate a report of the following items when you invoke: {SERVER}:{PORT}/system/console/config/configuration-status.zipAll Log FilesWire AdminThreadsSystem PropertiesSling Thread PoolsSling SettingsSling Servlet FiltersSling Scheduler JobsSling Resource Resolver...

CQ5.5 OSGi (/system/console) Permissions

In the past, I've had several clients requesting access to the OSGi console, or /system/console, for users other then the built in "admin" user.  This is a fairly straightforward configuration but there is limited information about it online.  Out of the box CQ permissions unfortunately do not handle the OSGi / Felix stack.  Because of this, assigning a user to the "administrators" group in CQ is not enough to grant them access to the OSGi...

Building a dialogue to have 2 or more images

Most of time when I build a component I only require a single image so the dialog I build will look something like this<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"    jcr:primaryType="cq:TabPanel"    activeTab="{Long}0"    helpPath="en/cq/current/wcm/default_components.html#Text Image"    xtype="tabpanel">    <items jcr:primaryType="cq:WidgetCollection">        <tab1            jcr:primaryType="cq:Widget"            ddGroups="[media]"            fileNameParameter="/fileName"            fileReferenceParameter="/fileReference"            name="/file"            requestSuffix=".img.png"            sizeLimit="100"            title="Image"            xtype="html5smartimage">        </tab1>        <tab2            jcr:primaryType="cq:Widget"            title="Advanced Image Properties"   ...

MessageGatewayService vs MessageGateway

When creating services which use the CQ5's MessageGateway API to send emails, it can be tempting to use the following to directly reference the MessageGateway you need in your service: @ReferenceMessageGateway<HtmlEmail> messageGateway; Unfortunately, this can cause issues as the MessageGateway will not be available if the Day CQ Mail Service is not configured.   If the Day CQ Mail Service is not configured the MessageGateway service will not be registered in OSGi.  This will mean...

Creating a CQ 5.5.x ClientContext Compatible JSONP Servlet

The bulk of what needs to be done for creating a JSONP servlet isn't much different than creating a POJEES - 'Plain Old JavaEE Servlet'.  In fact, the servlet I created ran under Tomcat 6.0.38. So we wont cover any of the Servlet method names implemented/overridden or configuration of the Servlet. The first problem I had was figuring out what the content type should be.  This took some digging, but the following header finally got...

JVM Remote JMX Monitoring - Part 2

The last post talked to the ability to connect to a "remote" JVM, that is, a JVM not running behind a firewall.  This could either be a home or corporate network.   The key point being that all TCP/IP ports on the machine running the JVM are accessible by another machine that will be running JConsole or JVisualVM.This post, however, covers accessing a JVM behind a firewall - specifically AWS.  This means that only certain ports...

Sending Email with the Adobe CQ API

Sending emails through Adobe CQ can be easy, however there really isn't an example which brings the entire process together.  This blog post will guide you through the process of configuring Adobe CQ to send email, creating a component for sending email, creating an email template and finally creating a servlet which will send the email.First, though, what are the benefits of the Adobe CQ Email API?  The Adobe CQ API provides a method for...

Toggle CQ Author and Preview Bookmarklet

When using Adobe CQ5, you often want to be able to switch between author and preview mode.  Unfortunately, the preview included in the Sidekick does not provide a complete preview as it does not remove the Sidekick or the Content Finder.I created a bookmarklet which will switch the page between authoring mode and a preview where the Sidekick and Content Finder are removed and the WCMMode is set to disabled.  This bookmarklet preserves query string...

JVM Remote JMX Monitoring

Setting this up will allow the use of JConsole and JVisualVM to be used for remote monitoring.Benefits: First, running these tools remotely reduces the overall CPU and memory overhead on the remote box.  Second, you do not need physical access to the system to perform monitoring.You should be sensitive to the following: security issues around allowing remote access to a JVM, and governance with IT departments to prevent too many connections to the remote JVM....

Calling all CQ5 Developers: OSGi v. JSPs Webinar

Do you develop components for Adobe CQ5 and wish there were a better way of abstracting your commonly used Java code?  Have you heard of OSGi, but haven't had a chance to actually implement it on your project?  Six Dimensions and 6D Lab's upcoming webinar OSGi v. JSPs, might be just the thing you need!About the WebinarThis webinar is the third in our series of CQ5 webinars and will cover best practices in developing and...

Select from Pages in a CQ5 Dialog

When constructing a dialog, you may want to present users with a list of pages to select from.  Browse and path fields work well for selecting from a tree, but often you may need to show just the pages from a single folder or from some discrete list.Using the optionsProviderOne way to do this is to create a selection field and populate the value through a JavaScript function in the optionsProvider field.  This field is...