Commit f2af16bf authored by Maxym Borodenko's avatar Maxym Borodenko Committed by Matija Obreza

HTTP error 500

parent d0dc1c52
......@@ -442,7 +442,7 @@ public class ExplorerController extends BaseController implements InitializingBe
AppliedFilters appliedFilters = mapper.readValue(jsonFilter, AppliedFilters.class);
try {
return new ResponseEntity<Page>(filterService.listAccessionDetails(appliedFilters, new PageRequest(page - 1, Integer.min(results, maxPageSize), new Sort("seqNo"))), HttpStatus.OK);
} catch (MaxPageLimitException ex) {
} catch (final Exception ex) {
ErrorResponse error = new ErrorResponse();
error.setErrorCode(HttpStatus.BAD_REQUEST.value());
error.setMessage(ex.getMessage());
......
......@@ -16,7 +16,6 @@
package org.genesys2.server.servlet.controller;
import java.text.MessageFormat;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -87,7 +86,7 @@ public class UserControllerAdvice extends BaseController {
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
@ExceptionHandler(value = { Throwable.class })
public ModelAndView handleAll(final HttpServletRequest req, final Throwable e) {
_logger.error(MessageFormat.format("{} on {} {}", e.getMessage(), req.getMethod(), req.getRequestURL()), e);
_logger.error("{} on {} {}", e.getMessage(), req.getMethod(), req.getRequestURL());
final ModelAndView mav = new ModelAndView("/errors/error");
mav.addObject("exception", e);
return mav;
......
......@@ -724,6 +724,7 @@ $(document).ready(function() {
var submitSubmit= $('.searchbox-submit');
var inputBox = $('.searchbox-input');
var searchBox = $('.searchbox');
var body = $('body');
var isOpen = false;
submitIcon.click(function(){
if (isOpen === false){
......@@ -756,7 +757,7 @@ $(document).ready(function() {
}
});
$('body').on('input', '.searchbox-input', function() {
body.on('input', '.searchbox-input', function() {
var inputVal = $('.searchbox-input').val();
inputVal = $.trim(inputVal).length;
if (inputVal !== 0){
......@@ -767,7 +768,17 @@ $(document).ready(function() {
}
});
$('body').on('click', '.get_widget', function() {
body.on('input paste', '#paginate2-input-field', function(e) {
e.preventDefault();
if (/\D/g.test(this.value)) {
// Filter non-digits from input value.
this.value = this.value.replace(/\D/g, '');
} else if (this.value === '0') {
this.value = '';
}
});
body.on('click', '.get_widget', function() {
var clientId = $(this).val();
$.ajax('/' + document.documentElement.lang + '/get_widget', {
type : 'GET',
......
......@@ -644,6 +644,8 @@
if (/\D/g.test(this.value)) {
// Filter non-digits from input value.
this.value = this.value.replace(/\D/g, '');
} else if (this.value === '0') {
this.value = '';
}
});
......
......@@ -56,7 +56,7 @@
<li><span class="pagination-input">
<form method="get" action="">
<input class="text-center" type="text" name="page"
<input class="text-center" type="text" name="page" id="paginate2-input-field"
placeholder="<c:out value="${page.number + 1}" />" value="<c:out value="${page.number + 1}" />" />
</form>
</span></li>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment