I am creating a new tag in jsp, named `RequiredLabel` , but I can not pass tag 
attribute to struts label ( The css are based on YAML)
 
The tag will be used as:
    <myTag:RequiredLabel name="amount"/>
 
The label should be get from struts as it must be localized.
 
    <%@tag description="Renders a label with required css and error label" 
pageEncoding="UTF-8"%>
    <%@attribute name="name" required="true" %>
    <%@taglib prefix="s" uri="/struts-tags"%>
    
     <!--Here ${name} works fine --> 
    <p class="ym-message" id="${name}Error" />
    <!-- Here I can not pass the name to s:label tag -->
    <s:label key="form.label.%{name}" cssClass="ym-required" />
 
 
I tried `#attr.name` and `#param.name` but none of them worked!
 
Do you know any solution ?!
 

 
~Regards,
~~Alireza Fattahi

Reply via email to