Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 91677 invoked from network); 30 Aug 2007 06:12:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Aug 2007 06:12:54 -0000 Received: (qmail 37305 invoked by uid 500); 30 Aug 2007 06:12:40 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 37278 invoked by uid 500); 30 Aug 2007 06:12:40 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 37267 invoked by uid 99); 30 Aug 2007 06:12:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Aug 2007 23:12:40 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [64.26.60.145] (HELO smtpauth01.csee.onr.siteprotect.com) (64.26.60.145) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Aug 2007 06:13:34 +0000 Received: from jaho (83-70-52-186.b-ras1.dbn.dublin.eircom.net [83.70.52.186]) (Authenticated sender: jamesholmes@jamesholmes.com) by smtpauth01.csee.onr.siteprotect.com (Postfix) with ESMTP id 32B3C1C8040 for ; Thu, 30 Aug 2007 00:51:17 -0500 (CDT) From: "James Holmes" To: "'Struts Users Mailing List'" Subject: RE: Adding additional parameters to struts 2 tags and accessing them in the ftl files Date: Thu, 30 Aug 2007 02:12:22 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 In-Reply-To: <46D656BD.80707@blueskyminds.com.au> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 Thread-Index: AcfqxzwJhsEJDhZRQEmcZY7lmIpTigABTncw Message-Id: <20070830055118.32B3C1C8040@smtpauth01.csee.onr.siteprotect.com> X-Virus-Checked: Checked by ClamAV on apache.org Take a look at this JIRA issue: https://issues.apache.org/struts/browse/WW-2132 I'm working on adding JSP 2.0's dynamic attributes functionality to Struts 2.1. James -----Original Message----- From: Jeromy Evans [mailto:jeromy.evans@blueskyminds.com.au] Sent: Thursday, August 30, 2007 1:34 AM To: Struts Users Mailing List Subject: Re: Adding additional parameters to struts 2 tags and accessing them in the ftl files It's not as easy as that. Each struts2 tag is: - defined in the struts-tags.tld file, including all available attributes; and - backed by one or more classes that implements the tag's functionality Unfortunately, you can't add an attribute and expect it to be available in the FTL. Instead you'd have to change the tag library and extend the class or create your own to support the additional attribute. Take a look at the source for FieldError.java Perhaps all you really need is or . http://struts.apache.org/2.0.9/docs/set.html ie. Set a value before and modify the template for FieldError to get it. hope that helps, Jeromy Evans afp wrote: > Guys any ideas on how to do the below?? > > > > afp wrote: > >> Reposting as last post was not very clear >> >> Hi, >> >> I am trying to add some custom parameters/attributes to the struts2 >> tags like etc... >> >> Some tihing like the below wud have been perfect >> >> >> >> and I shud be able to access the parameter abc from within the ftl file >> like this >> <#if parameters.abc?exists && parameters.abc == "def"> >> ${parameters.abc} >> >> >> This is not quite happenning for me, I tried giving the additional >> parameter using the tag >> >> >> > but still I am not able to access the passed parameter in the ftl file and >> the condition always fails. >> >> Can anyone let me know on how I can pass on extra parameters to an ftl >> file and access it in the ftl file. >> >> TIA, >> Arup >> >> >> > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org