@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));
 }
Ejemplo n.º 2
0
 @StrutsTagAttribute(description = "The name to set for element")
 public void setName(String name) {
   super.setName(name);
 }
Ejemplo n.º 3
0
 @StrutsTagAttribute(description = "The id to use for the element")
 public void setId(String id) {
   super.setId(id);
 }
Ejemplo n.º 4
0
 @StrutsTagAttribute(description = "The css style to use for element")
 public void setCssStyle(String cssStyle) {
   super.setCssStyle(cssStyle);
 }
Ejemplo n.º 5
0
 @StrutsTagAttribute(description = "The css class to use for element")
 public void setCssClass(String cssClass) {
   super.setCssClass(cssClass);
 }
Ejemplo n.º 6
0
 @Override
 @StrutsTagSkipInheritance
 public void setTheme(String theme) {
   super.setTheme(theme);
 }
Ejemplo n.º 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);
  }