Return-Path: Mailing-List: contact struts-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list struts-dev@jakarta.apache.org Received: (qmail 42236 invoked from network); 27 Jun 2000 02:05:37 -0000 Received: from mercury.sun.com (192.9.25.1) by locus.apache.org with SMTP; 27 Jun 2000 02:05:37 -0000 Received: from eastmail2.East.Sun.COM ([129.148.1.241]) by mercury.Sun.COM (8.9.3+Sun/8.9.3) with ESMTP id TAA23071 for ; Mon, 26 Jun 2000 19:05:37 -0700 (PDT) Received: from swanaba.east (swanaba.East.Sun.COM [129.148.162.54]) by eastmail2.East.Sun.COM (8.9.3+Sun/8.9.3/ENSMAIL,v1.7) with ESMTP id WAA08065 for ; Mon, 26 Jun 2000 22:05:36 -0400 (EDT) Received: from eng.sun.com (swantty.East.Sun.COM [129.148.162.52]) by swanaba.east (8.8.8+Sun/8.8.8) with ESMTP id WAA06766 for ; Mon, 26 Jun 2000 22:04:48 -0400 (EDT) Message-ID: <39580BF4.F871791@eng.sun.com> Date: Mon, 26 Jun 2000 19:05:40 -0700 From: "Craig R. McClanahan" X-Mailer: Mozilla 4.72 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: struts-dev@jakarta.apache.org Subject: Re: Idea for a new tag References: <20000626140301.36665.qmail@hotmail.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N Richard Backhouse wrote: > As I have been using struts for the development of an app I have had a > requirement for a more flexible link tag. What I mean by this is dynamically > adding to the supplied url parameter from say a bean property or possibly a > hashtable of name/value pairs. What I had in mind was : > > url="action.do" > target="target" > name="beanName" > property="hashtablePropertyName"> > > The name/value pairs would be added as parameters to the url : > > url="action.do?name1=value1&name2=value2 etc. > > What do you think ? > This idea is quite interesting. I've added this functionality to the basic bean. The collection that contains the name-value pairs must be a java.util.Map (Java2 required), and the values can either be single strings or a String array (for multiple values to the same parameter). For JDK 1.1 use, the tag has the same functionality, but is based on a Dictionary instead (which includes Hashtables). Consistent with other Struts beans, you can specify the Map or Dictionary in two different ways: * Only the "name" attribute -- the tag looks up a bean under this name in any scope. This bean must implement Map or Dictionary, depending on which tag you used. * Both "name" and "property" attributes. The property getter method for the specified property is called on the bean specified by the name attribute. As with the name-only approach, the getter must return a Map or Dictionary, depending on whether you use or . > > Richard Backhouse > Oak Grove Software The new functionality will be available in tonight's nightly build. Craig