Posts Tagged ‘to’

When to Use the Flex Asset Model in Fatwire?

Flex assets means FLEXIBLE ASSETS. Meaning, that we can add fields at any moment to the asset. You can update your site at any time, adding new fields, without disturbing the existing content.

FLEX ASSET MODEL has been the favorite model for the developers who concentrate on developing WEB EXPERIENCE MANAGEMENT applications. The Flex model helps in achieving the website’s goal of targeting the audience/visitors, and hence improving the overall business by the websites. The Flex Asset Model is the choice of developers, when the data has the following characteristics:

  • MANY ATTRIBUTES:  The assets have very large number of attributes, like some hundreds of attributes.
  • NEEDS HIERARCHY:  The assets need to inherit attributes from their parents.
  • UNPREDICTED ATTRIBUTES: This means that we know that we cannot predict what attributes might be necessary in the future.
  • NAVIGATION: Visitors browse your site by navigating through “drill-down” searches that are based on the attribute values of your data.
  • ENGAGE: You want to use Engage.

If implemented correctly, the Flex asset model yields major benefits for the business through websites.

But, to build a Flex asset model, a lot of complex work needs to be done. The following needs to be kept in mind, while choosing this Flex asset model.

  • COMPLEX DATABASE: The underlying database structure of flex assets is pretty complex.
  • SLOW RATE: Asset creation is slower that Basic assets.
  • SEARCH: Searching attributes requires complex code.


The render:lookup tag is one of the important tag, which is used in looking up a  map value for a given Template or CSElement. We will now see the syntax of this tag, and its usage.


This render:calltemplate tag is used to Look up a map value for a given Template or CSElement.


The following is the JSP syntax of the render:calltemplate tag. This is in reference with the “Tag Reference” guide.

        key="name of lookup key"
        varname="output variable name"
        site="site name"
       [tid="id of template or cselement"]

We will now discuss the some important arguments which are specified above.

1. Key:  The name of the key corresponding to the value. The key is the only thing that can be hard-coded in a template; hard-coding asset names, types, or values is discouraged.

2. Varname: The output variable name to contain the value corresponding to the key.

3. Site: The name of the site corresponding to this mapping. (mapped values differ across sites).

4. Tid: The id of the template that owns the mapping (defaults to the id of the current template). If this tag is present in a CSElement, then the default is the CSElement id, and ttype must be set to CSElement.

Example usage of render:callelement:
<%-- Look up the name of the layout template --%>

<%-- Look up the name of the wrapper page's site entry.
     Note we want the asset name only, so we must specify
     the match filter. --%>


The render:calltemplate is one of the well know tag, which is frequently used by the fatwire coders. We will now see the syntax of this tag, and its usage.


This render:calltemplate tag is used when we would like to invoke a Template, or a CSElement, as either a PAGELET (A small part of the page), or an Element, for rendering an asset.

Though we have another tag  “render:callelement” to invoke CSElements, this render:callelement tag is used to invoke both Templates and CSElements as well.


The following is the JSP syntax of the render:calltemplate tag. This is in reference with the “Tag Reference” guide.

        site="site name"
        slotname="name of slot"
        tid="caller Template or CSElement id"
       [ttype="caller Template or CSElement"]
       [c="asset type"]
       [cid="asset id"]
       [tname="target Template or CSElement name"]
       [context="context override"]
       [style="pagelet or element or embedded"]
       [variant="template variant name"]
       [packedargs="packed arguments"]>

   [<render:argument name="variable1" value="value1"/>]


We will now discuss the some important arguments which are specified above.

1. site:  This is a required field. This specifies the name of the site containing the Template to be invoked.

2. slotname: This is also a required field. This attribute defines an user friendly name for the “slot” that is being filled with the called template.

3. tid: This is also a required field. This specifies the id of the template in which this tag is located. If this tag is located in a CSElement, then the value of this attribute should be the id of the CSElement, and ttype should be set to CSElement.

4. context: This is an optional field. If c, cid, and tname are not specified, then this attribute value will be examined to determine which template to call and which asset to render using the specified template.

5. tname: This is an optional field. This field specifies the name of the Template to be called. Typeless templates must be prefixed with a ‘/’. This is required if c and cid are set. If these three attributes are not set, the called template will be determined by looking at context data.

6. style: This is an optional field. The possible values for this field are pagelet, element, embedded.

7. c: This is an optional field. This field specifies the asset type to be rendered by the called Template. The value of this attribute will be passed to the called code.

8. cid: This is an optional field. This field specifies the id of the asset to be rendered by the called Template. The value of this attribute will be passed to the called code. This is required if c is set.

Example usage of render:callelement:

<render:calltemplate tname='<%=ics.GetVar(“ViewTypeVar”)%>’

In our next post, we will learn how to deal with the “render:lookup” tag, which is frequently used in combination with “render:calltemplate” tag.

When we create a site in alfresco share, and start inviting users to the site, the following error will be displayed “0 invites sent, 1 failure”.  This message leaves us to a bit of frustration, after creating sites, users, and when thinking of inviting users to the sites. This article gives the resolution for such a type of error message.

This error occurs because, the Outbound E-mail Configuration has not been set in file. The quick turnaround for this issue would be to add a few lines of code to the file, and add another file outboundSMTP-context.xml, if it doesn’t already exist.

Add the following to file:

//Add to the end of file
# Email settings mail.port=465 mail.protocol=smtps mail.username=XXX mail.password=XXX mail.encoding=UTF-8    mail.smtps.auth=true mail.smtps.starttls.enable=true

If a file named outboundSMTP-context.xml doesn’t exist in C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\subsystems\email\OutboundSMTP folder, then add the following file and name it as outboundSMTP-context.xml

//  <bean id="mailService">          <property name="host">              <value>${}</value>          </property>          <property name="port">             <value>${mail.port}</value>         </property>       <property name="protocol">         <value>${mail.protocol}</value>      </property>          <property name="username">              <value>${mail.username}</value>           </property>         <property name="password">              <value>${mail.password}</value>         </property>          <property name="defaultEncoding">             <value>${mail.encoding}</value>         </property>       <property name="javaMailProperties">          <props>               <prop key="mail.smtps.auth">${mail.smtps.auth}</prop>             <prop key="mail.smtps.starttls.enable">${mail.smtps.starttls.enable}</prop>          <prop key="mail.smtp.socketFactory.port">${mail.smtp.socketFactory.port}</prop>          <prop key="mail.smtp.socketFactory.class">${mail.smtp.socketFactory.class}</prop>           <prop key="mail.smtp.socketFactory.fallback">${mail.smtp.socketFactory.fallback}</prop>          </props>      </property>     </bean>

Now, restart alfresco and try inviting users. After inviting the users in share, it should display the following message “1 invites sent, 0 failure”.

Alfresco has recently released the Alfresco 4.0 version, and also came up with nightly build packs such as 4.0.b, 4.0.c. This informative article will be used for those users who are planning to upgrade Alfresco 3.4 to 4.0.

Alfresco has released the newer version with POSTGRESQL database, where the older versions used MYSQL database. So, in the future releases, Alfresco might go with POSTGRESQL. Instead of using the POSTGRESQL, the users still have the facility of using existing database installed in their machines such as MySql, Oracle, etc.

This upgrade procedure uses existing MYSQL database (instead of migrating the whole database to POSTGRESQL), by pointing the Alfresco installation to the MYSQL database. The upgrade from 3.4 to the higher versions like 4.0b will not work. However, applying a patch before the upgrade will help in completing the process successfully.

The following is the procedure for upgrading from 3.4 to 4.0b.

  1. Stop the Alfresco server.
  2. Keep the MySql server up and running, as we are going to use this as the database for 4.0 installation.
  3. Download ALFRESCO COMMUNITY EDITION 4.0.a, and install in the machine which has 3.4 is installed.
  4. At the time of installation, give the following details:
    username: alfresco
    password: root
    name:      alfresco
    url:           jdbc:mysql://localhost:3306/alfresco
  5. After the installation is complete, Copy the contentstore and contentstore.deleted folders in alf_data folder of C:\Alfresco3.4 to C:\Alfresco4.0. 
  6. Now, do the following changes in file.
    1. Make sure that the "dir.root" location is pointing to the correct location where the alf_data is stored. For example, dir.root=C:/Alfresco4.0/alf_data.
    2. Add the following line at the end of the file, to re-index the content.
    3. Add the following line at the end of the file, to set the indexing system as LUCENE. (Lucene is the indexing system for versions prior to 4.0)
    4. Comment out the following lines
    5.                ### Solr indexing ##
    6. Save the file.
  7. Place the MySql connector in tomcat/lib folder.
  8. Download the patch-ALF-11029-context.xml file from here, and place the file into <tomcat>/shared/classes/alfresco/extension.
  9. Start the Alfresco instance.
  10. If any errors appear, check the log file.
  11. Once the restart is done properly, and after the lucene indexes folder is created in the alf_data folder, remove the above line index.recovery.mode=FULL in, to ensure that the indexing will not be done every time when the alfresco server is restarted.
  12. If the application is not deployed properly, and if the log file says something related indexing MPEG extension, then search for the file patch-services-context.xml, and replace the value of reindex to false for mpeg.
  13. Restart the system.

Verify whether all the data (Sites, content, etc..) is accessible through Alfresco Explorer and Share or not.

Comments are welcome. Please share your views.