struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mraible <m...@raibledesigns.com>
Subject Re: [s2] s:component and reading parameters
Date Mon, 06 Aug 2007 21:01:04 GMT

That worked - thanks!

Now I can't get the following to work - is it possible?

<s:property value="fieldErrors['%{parameters.name}'][0]"/>

I need to use this syntax to render errors next to fields since the default
<s:fielderrors> (simple) tag wraps the error with an <li> even when there's
only one error. This makes it difficult to put errors next to fields (w/o
customizing a theme).

Matt


Musachy Barroso wrote:
> 
> try :
> 
> <s:param name="name" value="'foo'"/>
> 
> musachy
> 
> On 8/6/07, mraible <matt@raibledesigns.com> wrote:
>>
>> I'm trying to use the <s:component> tag to create a re-usable set of
>> fields
>> in a form. In my JSP:
>>
>>   <s:component template="addposition.jsp">
>>     <s:param name="name" value="foo"/>
>>   </s:component>
>>
>> In template/simple/addposition.jsp, I have:
>>
>> <%@ taglib uri="/struts-tags" prefix="s" %>
>>
>> Name: <s:property value="%{parameters.name}"/>
>>
>> For some reason, this doesn't work.
>>
>> Is there something I'm doing wrong? Can templates be JSPs or do they have
>> to
>> be FreeMarker/Velocity?
>>
>> Correct me if I'm wrong, but doesn't Struts' <s:component> tag accomplish
>> the same thing that can be accomplished with JSTL's <c:import> and
>> <c:param>
>> tags? If so, it seems that JSP 2.0 tag files are a much more elegant
>> solution than <s:component> or <c:import>.
>>
>> Thanks,
>>
>> Matt
>> --
>> View this message in context:
>> http://www.nabble.com/-s2--s%3Acomponent-and-reading-parameters-tf4226480.html#a12023494
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
> 
> 
> -- 
> "Hey you! Would you help me to carry the stone?" Pink Floyd
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-s2--s%3Acomponent-and-reading-parameters-tf4226480.html#a12024122
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message