示例#1
0
  private void renderDocument(int i)
      throws IOException, ParseException, SyntaxError, SearchLibException {
    ResultDocument doc = result.getDocument(i, null);
    for (ReturnField field : searchRequest.getReturnFieldList()) {
      renderField(doc, field);
      if (field.getName() != null && !field.getName().equals("")) writer.print(',');
    }
    for (SnippetField field : searchRequest.getSnippetFieldList()) {
      renderSnippetValue(doc, field);
      String fName = field.getName();
      if (fName != null && fName.length() > 0) writer.print(',');
    }

    writer.print('\n');
  }
 @Command
 public void onSnippetRemove(@BindingParam("field") SnippetField field) throws SearchLibException {
   synchronized (this) {
     ((AbstractSearchRequest) getRequest()).getSnippetFieldList().remove(field.getName());
     reload();
   }
 }