In our JEE project, we are using struts as our MVC framework, we use some open source projects for example display tag in our project. I have found a bug in the newest version of display tag, which now we are using: when the display tag shows a table of data, which one has for example 10 rows in each page, and the result pages are more than one, each time I click on any links of result pages of same result table, attributes of httpRequest each time duplicated, for example:
and ... when request is very long, the page doesn't work properly! I have fixed this bug as changing getParameterMap method in DefaultRequestHelper class by modifying line 133 from:
map.put(paramName, values);
to:
map.put(paramName, values[0]);
because each request parameter should have one value. please tell me if eny one else had same problem and check my could would fix it or not in your project!
Best,
A. Afshar
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have tried requestURI parameter, but the problem was still unresolved, until I change above code in the specified class.
by the way I have a suggestion in using this attribute, because many times developers doesn't really know what action is before their pages, or some times one page, may have many preActions, I created a new constructor for RequestHelperFactory class, which has three parameter, and one of them is "requestURI", and this attribute will fill by caller pf this constructor from application, and developers doesn't need to enter it each time they use <display:table.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In our JEE project, we are using struts as our MVC framework, we use some open source projects for example display tag in our project. I have found a bug in the newest version of display tag, which now we are using: when the display tag shows a table of data, which one has for example 10 rows in each page, and the result pages are more than one, each time I click on any links of result pages of same result table, attributes of httpRequest each time duplicated, for example:
http://....../myAction.do?showAll=true
after next click:
http://....../myAction.do?showAll=true&showAll=true
and the next:
http://....../myAction.do?showAll=true&showAll=true&showAll=true
&showAll=true
and ... when request is very long, the page doesn't work properly! I have fixed this bug as changing getParameterMap method in DefaultRequestHelper class by modifying line 133 from:
to:
because each request parameter should have one value. please tell me if eny one else had same problem and check my could would fix it or not in your project!
Best,
A. Afshar
I have tried requestURI parameter, but the problem was still unresolved, until I change above code in the specified class.
by the way I have a suggestion in using this attribute, because many times developers doesn't really know what action is before their pages, or some times one page, may have many preActions, I created a new constructor for RequestHelperFactory class, which has three parameter, and one of them is "requestURI", and this attribute will fill by caller pf this constructor from application, and developers doesn't need to enter it each time they use <display:table.
Try adding requestURI="" to your <display:table> tag.
Matt