Friday, 15 August 2014

Cygwin - change home directory after installation

http://stackoverflow.com/questions/1494658/how-can-i-change-my-cygwin-home-folder-after-installation

  1. Go to Control Panel --> System and Security --> System (or press the [WINDOWS]+PAUSE|BREAK] keys)
  2. Click Advanced system settings (located at the left)
  3. Click Environment Variables (toward the bottom)
  4. In the User Variables area click "New…"
  5. For Variable name enter HOME
  6. For Variable value enter %USERPROFILE%
  7. Click OK in all the open dialog boxes to apply this new setting

cp /etc/passwd /etc/passwd.bak
mkpasswd -l -p $(cygpath -H)  > /etc/passwd 
mkpasswd -d -p $(cygpath -H)  >> /etc/passwd 

cp /etc/group /etc/group.bak
mkgroup -l > /etc/group 
mkgroup -d >> /etc/group


Exit Cygwin and start it up again.

Monday, 11 August 2014

Adobe AEM/CQ - setting up Maven POM

Content Package


http://www.wemblog.com/2012/04/how-to-change-package-install-behavior.html

<build>
    <plugins>
      <plugin>
         <groupId>com.day.jcr.vault</groupId>
         <artifactId>content-package-maven-plugin</artifactId>
         <extensions>true</extensions>
         <executions>
             <execution>
                 <goals>
                    <goal>package</goal>
                 </goals>
             </execution>
          </executions>
          <configuration>
             <!-- parameters and values common to all goals, as required -->
          </configuration>
      </plugin>
    </plugins>
</build>

Note:
Need <extensions> in order for <packaging>content-package<packaging> to work

Adobe documentation:
http://docs.adobe.com/docs/en/aem/6-0/develop/how-tos/vlt-mavenplugin.html

Getting the latest content-package-maven-plugin:
http://repo.adobe.com/nexus/content/groups/public/com/day/jcr/vault/content-package-maven-plugin/


Bundle

http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.felix</groupId>
            <artifactId>maven-bundle-plugin</artifactId>
            <extensions>true</extensions>
        </plugin>
    </plugins>
</build>

Adobe documentation:
http://docs.adobe.com/docs/en/cq/aem-how-tos/development/how-to-build-aem-projects-using-apache-maven.html

Checking the latest version of maven-bundle-plugin:
http://felix.apache.org/downloads.cgi#maven


Sunday, 27 July 2014

Adobe AEM/CQ - extjs multifield + compositefield with multiple textfields

Suppose we have a form (name: 'formName') with a multifield as follow:

var multifield = new CQ.form.Multifield {
    fieldLabel : 'Multiple: ',
    orderable : false,
    name : 'multifieldExample',
    fieldConfig : {
        xtype : 'compositefield',
        layout: 'form',
        items : [{
          xtype: 'textfield',
          fieldLabel: 'field1: '
        }, {
          xtype: 'textfield',
          fieldLabel: 'field2: '
        }]
    },
    width: 650
}

Here is how we can retrieve the value of the first instance of field2:

formName.getForm().findField('multifieldExample').findByType('compositefield')[0].items.itemAt[1].getValue();

We can retrieve the items under a component via .items.itemAt[i]


Monday, 16 June 2014

Adobe AEM/CQ - ACS dispatcher flush rules

We use this to flush associate paths for a given node.

E.g.
When an activation occurs for path /content/abc, we can configure with this ACS package to also flushes the dispatcher cache for path /content/xyz.

Read more about this add-on here:


Configurations:

/system/console --> ACS dispatcher flush rules










/etc/replication/agents.publish.html






Tuesday, 10 June 2014

Adobe AEM/CQ - bulk editing

http://localhost:4502/etc/importers/bulkeditor.html

This can be use to bulk edit multiple nodes that have been created in the CQ repository.