modify validation processing
This commit is contained in:
parent
2f8c08a8bd
commit
9d0ac1c4a4
5 changed files with 47 additions and 2 deletions
|
@ -52,6 +52,8 @@ public class CacheAction extends FessSearchAction {
|
|||
return redirectToLogin();
|
||||
}
|
||||
|
||||
validate(form, messages -> {}, () -> asHtml(path_Error_ErrorJsp));
|
||||
|
||||
Map<String, Object> doc = null;
|
||||
try {
|
||||
doc =
|
||||
|
|
|
@ -17,13 +17,27 @@ package org.codelibs.fess.app.web.cache;
|
|||
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
import org.lastaflute.web.validation.Required;
|
||||
|
||||
public class CacheForm implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
//@Required(target = "go,cache")
|
||||
//@Maxbytelength(maxbytelength = 100)
|
||||
@Required
|
||||
@Size(max = 100)
|
||||
public String docId;
|
||||
|
||||
public String[] hq;
|
||||
|
||||
// for error page
|
||||
|
||||
public String q;
|
||||
|
||||
public String num;
|
||||
|
||||
public String sort;
|
||||
|
||||
public String lang;
|
||||
|
||||
}
|
||||
|
|
|
@ -34,4 +34,14 @@ public class GoForm {
|
|||
public String queryId;
|
||||
|
||||
public Integer order;
|
||||
|
||||
// for error page
|
||||
|
||||
public String q;
|
||||
|
||||
public String num;
|
||||
|
||||
public String sort;
|
||||
|
||||
public String lang;
|
||||
}
|
||||
|
|
|
@ -52,6 +52,8 @@ public class ScreenshotAction extends FessSearchAction {
|
|||
return redirectToLogin();
|
||||
}
|
||||
|
||||
validate(form, messages -> {}, () -> asHtml(path_Error_ErrorJsp));
|
||||
|
||||
final Map<String, Object> doc =
|
||||
fessEsClient.getDocument(fessConfig.getIndexDocumentSearchIndex(), fessConfig.getIndexDocumentType(),
|
||||
queryRequestBuilder -> {
|
||||
|
|
|
@ -17,11 +17,28 @@ package org.codelibs.fess.app.web.screenshot;
|
|||
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
import org.lastaflute.web.validation.Required;
|
||||
|
||||
public class ScreenshotForm implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Required
|
||||
@Size(max = 100)
|
||||
public String docId;
|
||||
|
||||
@Required
|
||||
public String queryId;
|
||||
|
||||
// for error page
|
||||
|
||||
public String q;
|
||||
|
||||
public String num;
|
||||
|
||||
public String sort;
|
||||
|
||||
public String lang;
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue