Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.1.1
-
Fix Version/s: TBD
-
Component/s: Paging/Sorting
-
Labels:None
-
Application server:Weblogic 9.2
Description
I'm using display tag with custom paging and running inside a portlet. My paging requires a searchId to be set as well as the page id, and this works fine when using it outside the portlet.
When using it inside the portlet, the initial display is fine. After selecting a page however, display tag dies with a concurrent modification exception. I tracked this down to the section in TableTag.initHref(..) where it's removing the un-encoded parameters - I have exclude set to *.
Attached is an updated PortletHref which follows the same procedure as DefaultHref and only pass back copies of the parameter map. This resolves the issue for me - paging now works.
When using it inside the portlet, the initial display is fine. After selecting a page however, display tag dies with a concurrent modification exception. I tracked this down to the section in TableTag.initHref(..) where it's removing the un-encoded parameters - I have exclude set to *.
Attached is an updated PortletHref which follows the same procedure as DefaultHref and only pass back copies of the parameter map. This resolves the issue for me - paging now works.
{code}
Iterator paramsIterator = baseHref.getParameterMap().keySet().iterator();
while (paramsIterator.hasNext())
{
String key = (String) paramsIterator.next(); // EXCEPTION HERE
// don't remove parameters added by the table tag
if (!this.paramEncoder.isParameterEncoded(key))
{
baseHref.removeParameter(key);
}
}
{code}
Caused by: java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
at java.util.HashMap$KeyIterator.next(HashMap.java:828)
at org.displaytag.tags.TableTag.initHref(TableTag.java:1172)
Can it be resolved by just using remove method of iterator instead of using removeParameter?