protected void evaluateExtraParams() { super.evaluateExtraParams(); // 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); } Tree parentTree = (Tree) findAncestor(Tree.class); parentTree.addChildrenId(this.id); }
public void evaluateExtraParams() { super.evaluateExtraParams(); addParameter(AbstractTopicsBean.PARAM_JQUERY_ACTION, JQUERYACTION); if (title != null) { addParameter(PARAM_TITLE, findString(title)); } if (onClickTopics != null) { addParameter(PARAM_ON_CLICK_TOPICS, findString(onClickTopics)); } Accordion accordion = (Accordion) findAncestor(Accordion.class); if (accordion != null) { addParameter("header", accordion.getHeader()); } if (StringUtils.isBlank(this.id)) { // 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 = ID_PREFIX_ACCORDION_ITEM + String.valueOf(nextInt); addParameter(AbstractTopicsBean.PARAM_ID, this.id); } }
protected void evaluateExtraParams() { super.evaluateExtraParams();
public void evaluateExtraParams() { super.evaluateExtraParams(); addParameterIfPresent(PARAM_ON_BEFORE_TOPICS, this.onBeforeTopics); addParameterIfPresent(PARAM_ON_AFTER_VALIDATION_TOPICS, this.onAfterValidationTopics); addParameterIfPresent(PARAM_ON_COMPLETE_TOPICS, this.onCompleteTopics); addParameterIfPresent(PARAM_ON_SUCCESS_TOPICS, this.onSuccessTopics); addParameterIfPresent(PARAM_ON_ERROR_TOPICS, this.onErrorTopics); addParameterIfPresent(PARAM_ON_CHANGE_TOPICS, this.onChangeTopics); addParameterIfPresent(PARAM_ON_ALWAYS_TOPICS, this.onAlwaysTopics); addParameterIfPresent(PARAM_ON_ENABLE_TOPICS, this.onEnableTopics); addParameterIfPresent(PARAM_ON_DISABLE_TOPICS, this.onDisableTopics); addParameterIfPresent(PARAM_ON_BLUR_TOPICS, this.onBlurTopics); addParameterIfPresent(PARAM_ON_FOCUS_TOPICS, this.onFocusTopics); }
public void evaluateExtraParams() { super.evaluateExtraParams();
protected void evaluateExtraParams() { super.evaluateExtraParams();