I think that's a great idea.

And to go one step beyond, you wouldn't have to call the child elements
"arg0", "arg1"...you could just use "arg" (or probably something like
"bean:arg").

-- 
Tim Moore / Blackboard Inc. / Software Engineer
1899 L Street, NW/ 5th Floor / Washington, DC 20036
Phone 202-463-4860 ext. 258 / Fax 202-463-4863


> -----Original Message-----
> From: Aapo Laakkonen [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 29, 2001 9:56 AM
> To: [EMAIL PROTECTED]
> Subject: Custom tag question
> 
> 
> Is it possible to have custom tags that can have both child 
> elements and
> attributes? I mean that in some cases it would be more elegant to use
> elements instead of attributes:
> 
> <bean:message key="text.welcome">
>     <arg0><bean:write name="un" property="firstname"/></arg0>
>     <arg1><bean:write name="un" property="firstname"/></arg1>
> </bean:message>
> 
> or:
> 
> <bean:message>
>     <key>text.welcome</key>
>     <arg0><bean:write name="un" property="firstname"/></arg0>
>     <arg1><bean:write name="un" property="firstname"/></arg1>
> </bean:message>
> 
> instead of this:
> 
> <bean:message key="text.welcome"
>                         arg0="<% = un.firstname %>"
>                         arg1="<% = un.lastname %>"
> </bean:message>
> 
> Or it would be even more flexible if you could use both of 
> them (at the same
> time).
> This was just an example and at least I have found many 
> places where I'd
> like to
> use child elements instead of attributes.
> 
> Or is it just me who thinks that those runtime expressions 
> are pretty ugly?
> 
> -- Aapo Laakkonen, +358 (50) 33 99 682, ProjectCast Ltd, 
> Helsinki, Finland.
> 

Reply via email to