Allow checkboxes to be populated from a request attribute ---------------------------------------------------------
Key: DISPL-602 URL: http://jira.codehaus.org/browse/DISPL-602 Project: DisplayTag Issue Type: Improvement Components: Decorators Affects Versions: 1.2 Reporter: Stephanie Sherriff Priority: Minor At the moment the checkboxes are set as 'checked' from parameters in the request. I have a case where I come back to a displaytag list, and I want to be able to populate these, but not by creating a whole bunch of parameters in the url, but by setting a request attribute of type String[] that holds all of the matching values. For my own purposes I have created this functionality by just doing the following: String[] params = (String[])pageContext.getRequest().getAttribute(fieldName); if(params == null) { params = pageContext.getRequest().getParameterValues(fieldName); } instead of: String[] params = (String[])pageContext.getRequest().getAttribute(fieldName); A better way might be to have another element in the decorator, a boolean, that sets whether you want to first check request attributes before parameters, but for my own case, I just altered it to have anything in the attributes override the parameters. -- 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 ------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com _______________________________________________ displaytag-devel mailing list displaytag-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/displaytag-devel