Hello Ned,

Tuesday, December 12, 2000, 12:47:05 PM, you wrote:

NS> Thanks, that would be great.

NS> I reckon that there should be some kind of method to allow the bean property 
NS> to specify it's format... somehow. I'll have a think.

This tag extends bean:write tag and adds one attribute above it -
format. If you use this tag as bean:write - without format attribute -
then locale from session will be used as base for printing of date and
number values. If format is specified then this format string will be
used as base for values printing. Format string rules you can find in
API doc for Java.

Add class from attachment to struts framework and extend
struts-bean.tld with next strings -

    <tag>
        <name>format</name>
        <tagclass>org.apache.struts.taglib.bean.FormatTag</tagclass>
        <bodycontent>empty</bodycontent>
        <attribute>
            <name>filter</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>
        </attribute>
        <attribute>
            <name>name</name>
            <required>true</required>
            <rtexprvalue>true</rtexprvalue>
        </attribute>
        <attribute>
            <name>property</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>
        </attribute>
        <attribute>
            <name>scope</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>
        </attribute>
        <attribute>
            <name>format</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>
        </attribute>
    </tag>


-- 
Best regards,
 Oleg                            mailto:[EMAIL PROTECTED]

FormatTag.java

Reply via email to