You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by david joffrin <da...@hotmail.com> on 2005/02/07 15:12:00 UTC

Change the format of a @ValidField component with a DateValidator

Hi,

I am sure simple issues, but I could not figure it out during the WE.

Here  a sample fro one of my page specification:
<page-specification>
....
    <bean name="dateValidator" 
class="org.apache.tapestry.valid.DateValidator">
        <set-property name="required" expression="false"/>
<!--        <set-property name="format" 
expression="ognl:@com.etil.sudetp.presentation.utils.Display@DATEFORMAT"/> 
-->
<!--        <set-property name="displayFormat" expression="dd/MM/yyyy"/> -->
    </bean>
    <component id="validity" type="ValidField">
        <binding name="value" expression="validity"/>
        <binding name="validator" expression="beans.dateValidator"/>
        <static-binding name="displayName" value="Validity"/>
    </component>
...
</page-specification>

If I removed the first comment, I have a "malformed" OGNL expression
If I removed the second comment, tapestry complains that it can not parse 
the expression; The stack trace shows 
ognl.ObjectPropertyAccessor.getProperty()

Any one could help please?

Thanks in advance.
David



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


Re: Change the format of a @ValidField component with a DateValidator

Posted by Christian Haselbach <ch...@tngtech.com>.
Quoting david joffrin <da...@hotmail.com>:
> <!--        <set-property name="format"
> expression="ognl:@com.etil.sudetp.presentation.utils.Display@DATEFORMAT"/>
> -->

'ognl:' is superfluous here, since the expression attribute expects an ognl
expression.

HTH

Ciao Christian

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