[ http://jira.codehaus.org/browse/DISPL-163?page=all ] fabrizio giustina closed DISPL-163: -----------------------------------
Marking fixed issue as closed. > request parameters not apanded correctly for paging links > --------------------------------------------------------- > > Key: DISPL-163 > URL: http://jira.codehaus.org/browse/DISPL-163 > Project: DisplayTag > Type: Bug > Components: Paging/Sorting > Versions: 1.0 RC2 > Reporter: abhishek sehgal > Assignee: fabrizio giustina > Fix For: 1.0 > > > We are trying to work around and use display tag to implement the display of > dynamic colums. i.e. out of the available columns we display tonly the > columns selected by the user. This works fine for the first page of the > results, as teh column names are available in request but it does not work > for the paging links as the values for a multi value parameter 'tofield' are > lost. > I have fixed this issue by making the following change to Href.java > public void addParameterMap(Map parametersMap) > { > // handle nulls > if (parametersMap == null) > { > return; > } > // copy value, escaping html > Iterator mapIterator = parametersMap.entrySet().iterator(); > while (mapIterator.hasNext()) > { > Map.Entry entry = (Map.Entry) mapIterator.next(); > String key = StringEscapeUtils.escapeHtml((String) > entry.getKey()); > // don't overwrite parameters > if (!this.parameters.containsKey(key)) > { > Object value = entry.getValue(); > > if (value != null) > { > if (value.getClass().isArray()) > { > > String[] values = (String[]) value; > for (int i = 0; i < values.length; i++) > { > values[i] = > StringEscapeUtils.escapeHtml(values[i]); > } > this.parameters.put(key, values); > } > else > { > value = > StringEscapeUtils.escapeHtml(value.toString()); > this.parameters.put(key, value); > } > } > > } > } > } > For multi value parameters the original code was escaping the HTML and > assigning into values but was still adding the value array. I changes the > code to add the values array in case we have a multi value parameter. I have > this code available. Either you can make the change available in a new > release or let me know a way I can submit this code. I tried to connect to > the cvs repository as an anonymous user but got a login failure. > The fix is important as this is required to pass parameters with special > characters in the paging links. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information _______________________________________________ displaytag-devel mailing list displaytag-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/displaytag-devel