See
http://tapestry.apache.org/tapestry4/tapestry/apidocs/org/apache/tapestry/components/Insert.html

There is no translator binding on the @Insert component. You must use
"format" instead.

On 6/23/06, Bode, Bianca <[EMAIL PROTECTED]> wrote:


To simplify things, I just tested the following:

Home.java has java.util.Date date.

In Home.html  I try this: <span jwcid="@Insert" value="ognl:date"
translator="translator:date, pattern=dd-MM-yyyy"/>

And it displays:
Fri Jun 23 17:24:29 CEST 2006

Which is funny because this isn't the same format as I mentioned before
when using the Table component.





-----Original Message-----
From: Bode, Bianca
Sent: vrijdag 23 juni 2006 17:20
To: Tapestry users
Subject: RE: Date format bug?? (Headache. Tried all options.)

Here's a piece of the .jwc

<component-specification
class="com.hp.eclaims.web.components.WorkListTable"
    allow-body="yes"
    allow-informal-parameters="yes">

    <description>add a description</description>
    <inject property="visitObject" type="state" object="session-data"/>
    <inject property="claimDetailsPage" type="page"
object="ClaimDetailsForAll"/>
    <inject property="workListHelper" object="spring:workListHelper"/>
    <inject property="claimHelper" object="spring:claimDisplayHelper"/>
    <parameter name="workList" required="yes"/>
    <bean name="dateTranslator"
class="org.apache.tapestry.form.translator.DateTranslator">
            <set name="pattern" value="literal:yyyy-MM-dd"/>
    </bean>

    <component id="result" type="Contrib:Table">
        <binding name="source" value="workList"/>
        <binding name="columns" value="literal:claimId"/>
        <binding name="columnsClass" value="literal:title"/>
        <binding name="style" value="literal:border:1px;"/>
    </component>

    <component id="claimIdColumnValue" type="Block"/>
    <component id="claimLink" type="DirectLink">
        <binding name="listener" value="listener:onShowDetails"/>
        <binding name="parameters"
value="components.result.tableRow.claimId"/>
    </component>
....
    <component id="creditReleaseDate" type="Insert">
        <binding name="value"
value="components.result.tableRow.creditReleaseDate"/>
          <binding name="translator" value="bean:dateTranslator"/>
    </component>
......
.....




-----Original Message-----
From: Jesse Kuhnert [mailto:[EMAIL PROTECTED]
Sent: vrijdag 23 juni 2006 17:15
To: Tapestry users
Subject: Re: Date format bug?? (Headache. Tried all options.)

What component are you binding the "translator" parameter to? For tables
I usually use the "columns" parameter to pass in an ognl string that
includes calls to format my dates with a formatter object I've
statically setup in a page. Something like
columns="col1:formatter.format(col1), col2:col2 " ?

On 6/23/06, Bode, Bianca <[EMAIL PROTECTED]> wrote:
>
> Hi guys,
>
> I've tried everything I could come up with to display my Dates in a
> certain format.
> Unfortunately, none of them are working: what am I doing wrong??
>
> Currently displayed like this: 2006-06-15 09:33:37.0
>
> Already tried:
>
> In .jwc:
> <bean name="dateTranslator"
> class="org.apache.tapestry.form.translator.DateTranslator">
>             <set name="pattern" value="literal:yyyy-mm-dd"/> </bean>
> <binding name="translator" value="bean:dateTranslator"/>
>
> Also tried in .jwc:
> <binding name="translator" value="translator:date,
> pattern=yyyy-mm-dd"/>
>
> Also tried setting the translator in the template instead of the page.
> None of this seems to work.
>
> I was thinking maybe this doens't work because I'm trying to display
> these Dates insides a Contrib:Table....
> Anyone?
>
> Best regards, Bianca.
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Jesse Kuhnert
Tacos/Tapestry, team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Jesse Kuhnert
Tacos/Tapestry, team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.

Reply via email to