diff --git a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/StaticResourceComponent.java b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/StaticResourceComponent.java
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/StaticResourceComponent.java
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/StaticResourceComponent.java
@@ -93,12 +93,6 @@
     final long t1 = System.currentTimeMillis();
 
     try {
-      // note the document.write content must be divided up like this, if the document.write
-      // contains a complete string like <script or </script> then the browser will execute
-      // them
-      // directly and not the document.write, see here:
-      // http://www.codehouse.com/javascript/articles/external/
-
       if (isClassicMode()) {
         // set in the session that we are looking at the new ui
         // note injecting the HttpSession through Weld does not work
@@ -110,7 +104,6 @@
       }
 
       final String appName = getApplicationName();
-
       String staticResourceFileName = resourceProvider.getStaticResourceCachedInfo(appName);
       if (staticResourceFileName == null) {
         staticResourceFileName = getStaticResourceFileName();
@@ -119,29 +112,7 @@
         }
       }
 
-      StringBuilder result = new StringBuilder();
-      final String scriptPath = getContextUrl() + GEN_TARGET_LOCATION.substring(1) + "/"
-          + staticResourceFileName + ".js";
-
-      if (isClassicMode()) {
-        result.append("document.write(\"<LINK rel='stylesheet' type='text/css' href='"
-            + getContextUrl()
-            + "org.openbravo.client.kernel/OBCLKER_Kernel/StyleSheetResources?_skinVersion="
-            + KernelConstants.SKIN_DEFAULT + "&_mode=" + KernelConstants.MODE_PARAMETER_CLASSIC
-            + "'></link>\");\n");
-        result
-            .append("var isomorphicDir='../web/org.openbravo.userinterface.smartclient/isomorphic/';\n");
-
-        final String scDevModulePackage = "org.openbravo.userinterface.smartclient.dev";
-        if (KernelUtils.getInstance().isModulePresent(scDevModulePackage)
-            && KernelUtils.getInstance().getModule(scDevModulePackage).isInDevelopment()) {
-          result
-              .append("document.write('<'+'SCRIPT SRC=' + window.isomorphicDir + 'ISC_Combined.uncompressed.js><'+'/SCRIPT>');");
-        }
-      }
-      result.append("document.write(\"<s\" + \"cript type='text/javascript' src='" + scriptPath
-          + "'><\\/s\"+\"cript>\");");
-      return result.toString();
+      return generateResult(staticResourceFileName);
     } catch (Exception e) {
       log.error("Error generating component; " + e.getMessage(), e);
     } finally {
@@ -151,6 +122,45 @@
     return "";
   }
 
+  /**
+   * Returns the result of the component generation. This method should be overridden by the classes
+   * extending this one in order to return its own result.
+   * 
+   * @param staticResourceFileName
+   *          The name of the static resource file already generated by the component.
+   * @return a String containing the result of the component generation. By default, it returns a
+   *         javascript expression that writes an <script> that imports the generated static
+   *         resource file.
+   */
+  protected String generateResult(String staticResourceFileName) {
+    // note the document.write content must be divided up like this, if the document.write
+    // contains a complete string like <script or </script> then the browser will execute
+    // them directly and not the document.write, see here:
+    // http://www.codehouse.com/javascript/articles/external/
+    StringBuilder result = new StringBuilder();
+    final String scriptPath = getContextUrl() + GEN_TARGET_LOCATION.substring(1) + "/"
+        + staticResourceFileName + ".js";
+    if (isClassicMode()) {
+      result.append("document.write(\"<LINK rel='stylesheet' type='text/css' href='"
+          + getContextUrl()
+          + "org.openbravo.client.kernel/OBCLKER_Kernel/StyleSheetResources?_skinVersion="
+          + KernelConstants.SKIN_DEFAULT + "&_mode=" + KernelConstants.MODE_PARAMETER_CLASSIC
+          + "'></link>\");\n");
+      result
+          .append("var isomorphicDir='../web/org.openbravo.userinterface.smartclient/isomorphic/';\n");
+
+      final String scDevModulePackage = "org.openbravo.userinterface.smartclient.dev";
+      if (KernelUtils.getInstance().isModulePresent(scDevModulePackage)
+          && KernelUtils.getInstance().getModule(scDevModulePackage).isInDevelopment()) {
+        result
+            .append("document.write('<'+'SCRIPT SRC=' + window.isomorphicDir + 'ISC_Combined.uncompressed.js><'+'/SCRIPT>');");
+      }
+    }
+    result.append("document.write(\"<s\" + \"cript type='text/javascript' src='" + scriptPath
+        + "'><\\/s\"+\"cript>\");");
+    return result.toString();
+  }
+
   public String getId() {
     return KernelConstants.RESOURCE_COMPONENT_ID;
   }
