Sun Java System Portal Server 7 Developer Sample Guide

ProcedureTo Remove author from the Advanced Search Interface

Steps
  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.


    // h = new HashMap();
        // h.put(SearchContext.OPERAND, "author");
        // h.put(SearchContext.OPERATION, formbean.getAuthorOp());
        // h.put(SearchContext.VALUE, formbean.getAuthorVal());
        // l.add(h);
    
        h = new HashMap();
        h.put(SearchContext.OPERAND, "title");
  3. Run the touch command.

    For example, type touch *.jsp.

  4. Reload the Desktop to verify the change.