Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 35500 invoked from network); 23 May 2003 00:13:48 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 23 May 2003 00:13:48 -0000 Received: (qmail 28018 invoked by uid 97); 23 May 2003 00:16:04 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@nagoya.betaversion.org Received: (qmail 28011 invoked from network); 23 May 2003 00:16:04 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 23 May 2003 00:16:04 -0000 Received: (qmail 35230 invoked by uid 500); 23 May 2003 00:13:46 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 35218 invoked from network); 23 May 2003 00:13:45 -0000 Received: from subdns1.tech.beacon-it.co.jp (61.120.119.66) by daedalus.apache.org with SMTP; 23 May 2003 00:13:45 -0000 Received: from tech.beacon-it.co.jp (stcdum92.tech.beacon-it.co.jp [61.120.119.92]) by subdns1.tech.beacon-it.co.jp (8.9.3 (PHNE_18546)/3.7Wpl2.01111618) with ESMTP id JAA11538 for ; Fri, 23 May 2003 09:11:20 +0900 (JST) Received: from nthd088 (utvsrv.tech.beacon-it.co.jp [172.22.160.202]) by tech.beacon-it.co.jp (8.9.3 (PHNE_22672)/3.7Wpl2.01030916) with SMTP id JAA29432 for ; Fri, 23 May 2003 09:11:09 +0900 (JST) Message-ID: <037501c320c0$3c066e90$58a016ac@tech.beaconit.co.jp> From: "Bill Keese" To: "Jakarta Commons Developers List" References: <20030522222534.23729.qmail@icarus.apache.org> Subject: [jelly] cvs commit: jakarta-commons/jelly/src/java/org/apache/commons/jelly/impl DynamicTag.java Date: Fri, 23 May 2003 09:14:10 +0900 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Bob, This checkin looks interesting but I'm not sure I understand it. Can I use it to iterate over the arguments to a user defined tag, like C's varargs? Something like this? argument is ${arg.getKey()} is ${arg.getValue()} Or is it something different? By the way, if I wrote some documentation about variable handling in jelly, is there a way to add it to the website? Bill ----- Original Message ----- From: To: Sent: Friday, May 23, 2003 7:25 AM Subject: cvs commit: jakarta-commons/jelly/src/java/org/apache/commons/jelly/impl DynamicTag.java > werken 2003/05/22 15:25:33 > > Modified: jelly/src/java/org/apache/commons/jelly/impl DynamicTag.java > Log: > Exposing dynamic tag attributes Map as ${attrs} > > Revision Changes Path > 1.7 +12 -0 jakarta-commons/jelly/src/java/org/apache/commons/jelly/impl/DynamicTag.java > > Index: DynamicTag.java > =================================================================== > RCS file: /home/cvs/jakarta-commons/jelly/src/java/org/apache/commons/jelly/impl/Dynam icTag.java,v > retrieving revision 1.6 > retrieving revision 1.7 > diff -u -r1.6 -r1.7 > --- DynamicTag.java 10 Mar 2003 13:00:51 -0000 1.6 > +++ DynamicTag.java 22 May 2003 22:25:33 -0000 1.7 > @@ -63,6 +63,7 @@ > > import java.util.HashMap; > import java.util.Map; > +import java.util.Iterator; > > import org.apache.commons.jelly.DynaTagSupport; > import org.apache.commons.jelly.JellyContext; > @@ -110,6 +111,17 @@ > > // create new context based on current attributes > JellyContext newJellyContext = context.newJellyContext(attributes); > + Map attrMap = new HashMap(); > + for ( Iterator keyIter = this.attributes.keySet().iterator(); > + keyIter.hasNext();) { > + String key = (String) keyIter.next(); > + if ( key.endsWith( "Attr" ) ) { > + Object value = this.attributes.get( key ); > + attrMap.put( key, value ); > + attrMap.put( key.substring( 0, key.length()-4 ), value ); > + } > + } > + newJellyContext.setVariable( "attrs", attrMap ); > getTemplate().run(newJellyContext, output); > } > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-dev-help@jakarta.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org