/** * Overriding method of the heart of the matter. Gets the relative property * and leaves the rest up to the original tag implementation. Sweet. * @return int JSP continuation directive. * This is in the hands of the super class. */ public int doStartTag() throws JspException { // get the original properties originalName = getName(); originalProperty = getProperty(); // request HttpServletRequest request = (HttpServletRequest)pageContext.getRequest(); // set the properties NestedPropertyHelper.setNestedProperties(request, this); // let the super do it's thing return super.doStartTag(); }
/** * Release the tag's resources and reset the values. */ public void release() { super.release(); // reset the originals originalName = null; originalProperty = null; }
/** * Complete the processing of the tag. The nested tags here will restore * all the original value for the tag itself and the nesting context. * @return int to describe the next step for the JSP processor * @throws JspException for the bad things JSP's do */ public int doEndTag() throws JspException { // do the super's ending part int i = super.doEndTag(); // reset the properties setName(originalName); setProperty(originalProperty); // continue return i; }
setMultiple(string); setName(string); setProperty(string); setSize(string); setValue(string);
/** * Process the start tag. * * @throws JspException if a JSP exception has occurred */ public int doStartTag() throws JspException { evaluateExpressions(); return (super.doStartTag()); }
results.append(" disabled=\"disabled\""); if (this.selectTag().isMatched(this.value)) { results.append(" selected=\"selected\"");
String cipheredValue = dataComposer != null ? dataComposer.composeFormField(selectTag.getProperty(), value, false, null) : value;
public Tag processWidget( Tag tag, String elementName, Map<String, String> attributes, MetawidgetTag metawidget ) { String name = attributes.get( NAME ); String pathPrefix = metawidget.getPathPrefix(); if ( pathPrefix != null ) { name = pathPrefix + name; } if ( tag instanceof BaseInputTag ) { ( (BaseInputTag) tag ).setProperty( name ); } else if ( tag instanceof SelectTag ) { ( (SelectTag) tag ).setProperty( name ); } else if ( tag instanceof CheckboxTag ) { ( (CheckboxTag) tag ).setProperty( name ); } return tag; } }
/** * @see org.apache.struts.taglib.html.SelectTag#doEndTag() */ @Override public int doEndTag() throws JspException { int returnVal = super.doEndTag(); if (!getDisabled() && !getReadonly()) { String name = prepareName(); if (StringUtils.isNotBlank(name)) { ActionForm form = WebUtils.getKualiForm(pageContext); if(form!=null && form instanceof PojoForm) { ((PojoForm) form).registerEditableProperty(name); } } } return returnVal; }
/** * Process the start tag. * * @exception JspException if a JSP exception has occurred */ public int doStartTag() throws JspException { evaluateExpressions(); return(super.doStartTag()); }
if (selectTag().isMatched(valueWithoutEncrypt)) { results.append(" selected=\"selected\"");
cipheredValue = dataComposer != null ? dataComposer.composeFormField(selectTag.getProperty(), value, false, null) : value;
/** * Process the start of this tag. * * @exception JspException if a JSP exception has occurred * @see org.hdiv.dataComposer.IDataComposer#composeFormField(String, String, boolean, String) */ @Override public int doStartTag() throws JspException { HttpServletRequest request = (HttpServletRequest) pageContext.getRequest(); IDataComposer dataComposer = HDIVUtil.getRequestContext(request).getDataComposer(); // this property is editable and we must check it if (dataComposer != null) { dataComposer.composeFormField(prepareName(), "", false, null, getMultiple() == null && getSize() == null); } return super.doStartTag(); }
super.release(); setAltExpr(null); setAltKeyExpr(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(); }
super.release(); setAltExpr(null); setAltKeyExpr(null);
addOption(sb, stringLabel, stringValue, selectTag.isMatched(stringValue));