/** @return null if no JavaScript is needed */
 private String generateStyleAbleJavaScript() {
   // Enable / disable StyleAble javascript based on property flag.
   if (styleAble && styleAbleContentSummary) {
     StyleAbleProvider sp = portalService.getStylableService();
     if (sp != null) {
       String userId = getCurrentUserId();
       try {
         return sp.generateJavaScript(userId);
         // ca.utoronto.atrc.transformable.common.prefs.Preferences
         // prefsForUser = TransformAblePrefsService
         // .getTransformAblePreferences(userId);
         // return StyleAbleService.generateJavaScript(prefsForUser);
       } catch (Exception e) {
         return null;
       }
     }
   }
   return null;
 }
  private String generateStyleAbleStyleSheet() {
    if (styleAble) {
      StyleAbleProvider sp = portalService.getStylableService();
      if (sp != null) {
        String userId = getCurrentUserId();
        try {

          return sp.generateStyleSheet(userId);
          // ca.utoronto.atrc.transformable.common.prefs.Preferences
          // prefsForUser = TransformAblePrefsService
          // .getTransformAblePreferences(userId);
          // return StyleAbleService.generateStyleSheet(prefsForUser);
        } catch (Exception e) {
          return null;
        }
      }
    }
    return null;
  }