Finally fixed that with a workaround. Since i have two displaytag tables on the same page, it was more complicated than expected.
I added on the displaytag the clearStatus="${clear1Status}", where clear1Statusis the status of the first table.
Then had to add some extra code on my jsp
<%
String firstNumParameter = new org.displaytag.util.ParamEncoder("tableRow").encodeParameterName(org.displaytag.tags.TableTagParameters.PARAMETER_PAGE);
if(request.getParameter(firstNumParameter ) == null) {
pageContext.setAttribute("clear1Status", "true");
}else{
pageContext.setAttribute("clear1Status", "false");
}
%>
That solved my problem. At least in my scenario.