Too many quotes when checkBox is selected!!!
 
 
 
public int doEndTag() throws javax.servlet.jsp.JspException {
      try {
         Field field = getField();
 
         /*
                            <input type="hidden" name="searchalgo_0_1" value="weakEnd"/>
                            <input type="hidden" name="searchmode_0_1" value="AND"/>
                            <input type="input" name="search_0_1"/>
         */
         StringBuffer tagBuf = new StringBuffer();
 
         StringBuffer paramNameBuf = new StringBuffer();
         paramNameBuf.append(field.getSearchFieldName());
 
         tagBuf.append("<input type=\"checkbox\" name=\"");
         tagBuf.append(paramNameBuf.toString());
         tagBuf.append("\" ");
         tagBuf.append("value=\"");
         tagBuf.append(getValue());
 
         if (Util.getTrue(getChecked())) {
            tagBuf.append("\" checked=\"checked");
         }
 
         tagBuf.append("\"");
         tagBuf.append(prepareStyles());
         tagBuf.append(prepareEventHandlers());
         tagBuf.append("/>\n");
 
         pageContext.getOut()
                    .write(renderPatternHtmlInputField());
         pageContext.getOut()
                    .write(RenderHiddenFields(field));
         pageContext.getOut()
                    .write(tagBuf.toString());
      } catch (java.io.IOException ioe) {
         throw new JspException("IO Error: " + ioe.getMessage());
      }
 
      return EVAL_PAGE;
   }

Attachment: DbSearchCheckBoxTag.java
Description: DbSearchCheckBoxTag.java

Reply via email to