@Override
 protected void evaluateExtraParams() {
   super.evaluateExtraParams();
   logger.info("");
   if (action != null) addParameter("action", findString(action));
   if (doafter != null) addParameter("doafter", findString(doafter));
   if (dobefore != null) addParameter("dobefore", findString(dobefore));
 }
Example #2
0
 @StrutsTagAttribute(description = "The name to set for element")
 public void setName(String name) {
   super.setName(name);
 }
Example #3
0
 @StrutsTagAttribute(description = "The id to use for the element")
 public void setId(String id) {
   super.setId(id);
 }
Example #4
0
 @StrutsTagAttribute(description = "The css style to use for element")
 public void setCssStyle(String cssStyle) {
   super.setCssStyle(cssStyle);
 }
Example #5
0
 @StrutsTagAttribute(description = "The css class to use for element")
 public void setCssClass(String cssClass) {
   super.setCssClass(cssClass);
 }
Example #6
0
 @Override
 @StrutsTagSkipInheritance
 public void setTheme(String theme) {
   super.setTheme(theme);
 }
Example #7
0
  protected void evaluateExtraParams() {
    super.evaluateExtraParams();

    if (toggle != null) {
      addParameter("toggle", findString(toggle));
    } else {
      addParameter("toggle", "fade");
    }

    if (selectedNotifyTopics != null) {
      addParameter("selectedNotifyTopics", findString(selectedNotifyTopics));
    }

    if (expandedNotifyTopics != null) {
      addParameter("expandedNotifyTopics", findString(expandedNotifyTopics));
    }

    if (collapsedNotifyTopics != null) {
      addParameter("collapsedNotifyTopics", findString(collapsedNotifyTopics));
    }

    if (rootNodeAttr != null) {
      addParameter("rootNode", findValue(rootNodeAttr));
    }

    if (childCollectionProperty != null) {
      addParameter("childCollectionProperty", findString(childCollectionProperty));
    }

    if (nodeTitleProperty != null) {
      addParameter("nodeTitleProperty", findString(nodeTitleProperty));
    }

    if (nodeIdProperty != null) {
      addParameter("nodeIdProperty", findString(nodeIdProperty));
    }

    if (showRootGrid != null) {
      addParameter("showRootGrid", findValue(showRootGrid, Boolean.class));
    }

    if (showGrid != null) {
      addParameter("showGrid", findValue(showGrid, Boolean.class));
    }

    if (blankIconSrc != null) {
      addParameter("blankIconSrc", findString(blankIconSrc));
    }

    if (gridIconSrcL != null) {
      addParameter("gridIconSrcL", findString(gridIconSrcL));
    }

    if (gridIconSrcV != null) {
      addParameter("gridIconSrcV", findString(gridIconSrcV));
    }

    if (gridIconSrcP != null) {
      addParameter("gridIconSrcP", findString(gridIconSrcP));
    }

    if (gridIconSrcC != null) {
      addParameter("gridIconSrcC", findString(gridIconSrcC));
    }

    if (gridIconSrcX != null) {
      addParameter("gridIconSrcX", findString(gridIconSrcX));
    }

    if (gridIconSrcY != null) {
      addParameter("gridIconSrcY", findString(gridIconSrcY));
    }

    if (expandIconSrcPlus != null) {
      addParameter("expandIconSrcPlus", findString(expandIconSrcPlus));
    }

    if (expandIconSrcMinus != null) {
      addParameter("expandIconSrcMinus", findString(expandIconSrcMinus));
    }

    if (iconWidth != null) {
      addParameter("iconWidth", findValue(iconWidth, Integer.class));
    }
    if (iconHeight != null) {
      addParameter("iconHeight", findValue(iconHeight, Integer.class));
    }
    if (toggleDuration != null) {
      addParameter("toggleDuration", findValue(toggleDuration, Integer.class));
    }
    if (templateCssPath != null) {
      addParameter("templateCssPath", findString(templateCssPath));
    }
    if (href != null) addParameter("href", findString(href));
    if (errorNotifyTopics != null) addParameter("errorNotifyTopics", findString(errorNotifyTopics));

    // generate a random ID if not explicitly set and not parsing the content
    Boolean parseContent = (Boolean) stack.getContext().get(Head.PARSE_CONTENT);
    boolean generateId = (parseContent != null ? !parseContent : true);

    addParameter("pushId", generateId);
    if ((this.id == null || this.id.length() == 0) && generateId) {
      // resolves Math.abs(Integer.MIN_VALUE) issue reported by FindBugs
      // http://findbugs.sourceforge.net/bugDescriptions.html#RV_ABSOLUTE_VALUE_OF_RANDOM_INT
      int nextInt = RANDOM.nextInt();
      nextInt = nextInt == Integer.MIN_VALUE ? Integer.MAX_VALUE : Math.abs(nextInt);
      this.id = "widget_" + String.valueOf(nextInt);
      addParameter("id", this.id);
    }

    if (this.childrenIds != null) addParameter("childrenIds", this.childrenIds);
  }