Sun Java System Portal Server 7.1 Developer Sample Guide

ProcedureTo Remove author from the Advanced Search Interface

  1. Comment out or remove the author related HTML from the advancedSearch.jsp file.

    For example:


    <!--     -->
    <!-- To disclude the "author" row, remark out the following section -->
    <!--     -->
    <TR>
        <td valign=middle align=right height=40><FONT color=<%=tFontColor%> face=<%=tFontFace%>><nobr> <LABEL FOR="advAuthor">Author</LABEL>
        <SELECT NAME="authorOp">
        <OPTION VALUE=<%=SearchContext.CONTAIN%> <%=formbean.authorOpSelection(SearchContext.CONTAIN)%>>does</OPTION>
        <OPTION VALUE=<%=SearchContext.NOTCONTAIN%> <%=formbean.authorOpSelection(SearchContext.NOTCONTAIN)%>>does not</OPTION>
        </SELECT>contain&nbsp;</FONT></nobr></TD>
        <td valign=middle align=left height=40><INPUT TYPE="text" NAME="authorVal" id="advAuthor" VALUE= "<%=SearchContext.htmlEncode(formbean.getAuthorVal())%>"></TD>
    </TR>
  2. Comment out author- related lines in advQuery.jsp file.


    if (!formbean.getAuthorVal().equals("")) {
        h = new HashMap();
        h.put(SearchContext.OPERAND, "author");
        h.put(SearchContext.OPERATION, formbean.getAuthorOp());
        h.put(SearchContext.VALUE, formbean.getAuthorVal());
        l.add(h);
    }
  3. Run the touch command.

    For example, type touch *.jsp.

  4. Reload the Desktop to verify the change.