/** * Process the start tag. * * @throws JspException if a JSP exception has occurred */ public int doStartTag() throws JspException { evaluateExpressions(); return (super.doStartTag()); }
/** * Process the end of this tag. * * @exception JspException if a JSP exception has occurred */ public int doEndTag() throws JspException { TagUtils.getInstance().write(pageContext, this.renderOptionElement()); return (EVAL_PAGE); }
setBundle(string); setDisabled(bool.booleanValue()); setKey(string); setLocale(string); setStyle(string); setStyleClass(string); setStyleId(string); setValue(string);
/** * Resets attribute values for tag reuse. */ public void release() { super.release(); setBundleExpr(null); setDisabledExpr(null); setKeyExpr(null); setLocaleExpr(null); setStyleExpr(null); setStyleClassExpr(null); setStyleIdExpr(null); setValueExpr(null); }
/** * Process the end of this tag. * @exception JspException if a JSP exception has occurred */ @Override public int doEndTag() throws JspException { HttpServletRequest request = (HttpServletRequest) pageContext.getRequest(); IDataComposer dataComposer = HDIVUtil.getRequestContext(request).getDataComposer(); // Acquire the select tag we are associated with SelectTag selectTag = (SelectTag) findAncestorWithClass(this, SelectTag.class); if (selectTag == null) { // This tag should only be nested in an select tag // If it's not, throw exception JspException e = new JspException(messages.getMessage("optionTag.select")); TagUtils.getInstance().saveException(pageContext, e); throw e; } String cipheredValue = dataComposer != null ? dataComposer.composeFormField(selectTag.getProperty(), value, false, null) : value; // If there isn't any content in the body of the tag option, and there isn't // any value for the property key, the value of the property value is shown. // This is, the encoded value is shown. That is the reason why we store the // plain value, without encoding. valueWithoutEncrypt = value; value = cipheredValue; return super.doEndTag(); }
/** * Resets attribute values for tag reuse. */ public void release() { super.release(); setBundleExpr(null); setDirExpr(null); setDisabledExpr(null); setFilterExpr(null); setLangExpr(null); setKeyExpr(null); setLocaleExpr(null); setStyleExpr(null); setStyleClassExpr(null); setStyleIdExpr(null); setValueExpr(null); }
private Tag createSelectTag( String name, String property, Map<String, String> attributes ) { // Select tag SelectTag select = new SelectTag(); // Empty option (if needed) if ( WidgetBuilderUtils.needsEmptyLookupItem( attributes ) ) { OptionTag emptyOption = new OptionTag(); emptyOption.setValue( "" ); JspUtils.addDeferredChild( select, emptyOption ); } // Options tag OptionsTag optionsTag = new OptionsTag(); optionsTag.setName( name ); optionsTag.setProperty( property ); // Optional labelName and labelProperty String labelName = attributes.get( STRUTS_LOOKUP_LABEL_NAME ); if ( labelName != null ) { optionsTag.setLabelName( labelName ); } String labelProperty = attributes.get( STRUTS_LOOKUP_LABEL_PROPERTY ); if ( labelProperty != null ) { optionsTag.setLabelProperty( labelProperty ); } JspUtils.addDeferredChild( select, optionsTag ); return select; }
/** * Process the start tag. * * @exception JspException if a JSP exception has occurred */ public int doStartTag() throws JspException { evaluateExpressions(); return(super.doStartTag()); }