you're welcome

----- Original Message ----- From: "Laurie Harper" <[EMAIL PROTECTED]>
To: <user@struts.apache.org>
Sent: Sunday, September 11, 2005 3:45 PM
Subject: Re: Wrapping Struts tags in tag files


That's only relevant to Tiles, though; it doesn't help for general JSP tags.

L.

Martin Gainty wrote:
It appears the definition may be out of scope /out of context
This can be achieved thru tiles by 'Put an attribute' into enclosing attribute container tag
(where container tag can be <insert> or <definition>)
http://struts.apache.org/api/org/apache/struts/taglib/tiles/PutTag.html

(Unless of course there is a problem with resolving your RTExpr)
Anyone else?
M-
----- Original Message ----- From: "Laurie Harper" <[EMAIL PROTECTED]>
To: <user@struts.apache.org>
Sent: Saturday, September 10, 2005 10:03 PM
Subject: Wrapping Struts tags in tag files


This isn't really Struts specific, but I'm trying to wrap some of the Struts HTML tags with tag files (in order to compose them into more complex 'controls') and I'm running into a slight problem... Some attributes are mutually exclusive (e.g. 'alt' vs. 'altKey'). I can't see a way to pass attributes through from the tag file to the Struts tag that works with this constraint. For example, if I write a tag file like this:

<[EMAIL PROTECTED] name="property" required="true" rtexprvalue="true"%>
<[EMAIL PROTECTED] name="alt" required="false" rtexprvalue="true"%>
<[EMAIL PROTECTED] name="altKey" required="false" rtexprvalue="true"%>
...
<html:text property="${property}" alt="${alt} altKey="${altKey}" .../>

then, regardless of whether I set alt and/or altKey in the call to the tag file, the html:text tag complains that I can't specify both attributes. I've tried passing in the values using "${empty alt ? null : alt}" but get the same result.

Does anyone know a way to work around this (i.e. a 'correct' way to pass-through attributes from tag files to custom tags)?

Failing that, how big a deal would it be to change the Struts tags to treat the empty string equivalently to 'null' when performing these checks? [I'll happy put together a patch to do that]

L.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to