private void handleHtmlSearchNotes(PageWrapper pageWrapper,RequestAndResponse requestAndResponse,String query,String paneId) throws IOException, ServletException {
  pageWrapper.addPageIntroText(servletText.introTextSearchNotes(false),servletText.introTextSearchNotes(true));
  try {
    final StringBuilder result=new StringBuilder();
    User queryUser=null;
    if (null != (queryUser=canUserSeeUsersData(requestAndResponse,true))) {
      final ResultsPaginator paginator=new ResultsPaginator(requestAndResponse,servletText.sentenceThereWereNoMatches(),result,servletText);
      try {
        final List<?> results=dbLogic.searchEntriesForUserByNote(queryUser.getId(),query,paginator.getStartPosition(),paginator.getMaxResults());
        entryListToHtmlAndJson(paneId,result,paginator,results);
      }
 catch (      EmptyQueryException e) {
        requestAndResponse.print(servletText.errorNeedLongerQuery());
      }
    }
    dbLogic.commit();
    requestAndResponse.print(result.toString());
  }
 catch (  final PersistenceException e) {
    requestAndResponse.print(servletText.errorInternalDatabase());
  }
}

private void handleHtmlSearchNotes ( PageWrapper pageWrapper , RequestAndResponse requestAndResponse , String query , String paneId ) throws IOException , ServletException { pageWrapper . addPageIntroText ( servletText . introTextSearchNotes ( false ) , servletText . introTextSearchNotes ( true ) ) ; try { final StringBuilder result = new StringBuilder ( ) ; User queryUser = null ; if ( null != ( queryUser = canUserSeeUsersData ( requestAndResponse , true ) ) ) { final ResultsPaginator paginator = new ResultsPaginator ( requestAndResponse , servletText . sentenceThereWereNoMatches ( ) , result , servletText ) ; try { final List < ? > results = dbLogic . searchEntriesForUserByNote ( queryUser . getId ( ) , query , paginator . getStartPosition ( ) , paginator . getMaxResults ( ) ) ; entryListToHtmlAndJson ( paneId , result , paginator , results ) ; } catch ( EmptyQueryException e ) { requestAndResponse . print ( servletText . errorNeedLongerQuery ( ) ) ; } } dbLogic . commit ( ) ; requestAndResponse . print ( result . toString ( ) ) ; } catch ( final PersistenceException e ) { requestAndResponse . print ( servletText . errorInternalDatabase ( ) ) ; } }
helper method . shows search results within notes .
