You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Bode, Bianca" <bi...@hp.com> on 2006/06/23 17:10:32 UTC
Date format bug?? (Headache. Tried all options.)
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: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Date format bug?? (Headache. Tried all options.)
Posted by Jesse Kuhnert <jk...@gmail.com>.
Yes, the documentation portion of things is on the "wish list".
http://wiki.apache.org/tapestry/Tapestry41WishList
It'll get fixed soon.
On 6/23/06, Bode, Bianca <bi...@hp.com> wrote:
>
> Djeeez! I feel stupid, but then again this whole validation/translator
> stuff isn't very well documented yet ;)
> I thought I read somewhere that the format binding was T3
> Anyway...Thanks for pointing in the right direction :)
>
> -----Original Message-----
> From: Jesse Kuhnert [mailto:jkuhnert@gmail.com]
> Sent: vrijdag 23 juni 2006 17:25
> To: Tapestry users
> Subject: Re: Date format bug?? (Headache. Tried all options.)
>
> Ah it is as I feared. I do not think the Insert component has a
> translator binding, but it does have a "format" binding.
>
> http://tapestry.apache.org/tapestry4/tapestry/ComponentReference/Insert.
> html
>
> On 6/23/06, Bode, Bianca <bi...@hp.com> wrote:
> >
> > 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:jkuhnert@gmail.com]
> > 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 <bi...@hp.com> 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: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
> >
> >
> > --
> > Jesse Kuhnert
> > Tacos/Tapestry, team member/developer
> >
> > Open source based consulting work centered around
> > dojo/tapestry/tacos/hivemind.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> --
> Jesse Kuhnert
> Tacos/Tapestry, team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
Jesse Kuhnert
Tacos/Tapestry, team member/developer
Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.
RE: Date format bug?? (Headache. Tried all options.)
Posted by "Bode, Bianca" <bi...@hp.com>.
Djeeez! I feel stupid, but then again this whole validation/translator
stuff isn't very well documented yet ;)
I thought I read somewhere that the format binding was T3
Anyway...Thanks for pointing in the right direction :)
-----Original Message-----
From: Jesse Kuhnert [mailto:jkuhnert@gmail.com]
Sent: vrijdag 23 juni 2006 17:25
To: Tapestry users
Subject: Re: Date format bug?? (Headache. Tried all options.)
Ah it is as I feared. I do not think the Insert component has a
translator binding, but it does have a "format" binding.
http://tapestry.apache.org/tapestry4/tapestry/ComponentReference/Insert.
html
On 6/23/06, Bode, Bianca <bi...@hp.com> wrote:
>
> 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:jkuhnert@gmail.com]
> 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 <bi...@hp.com> 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: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> --
> Jesse Kuhnert
> Tacos/Tapestry, team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
Jesse Kuhnert
Tacos/Tapestry, team member/developer
Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Date format bug?? (Headache. Tried all options.)
Posted by Jesse Kuhnert <jk...@gmail.com>.
Ah it is as I feared. I do not think the Insert component has a translator
binding, but it does have a "format" binding.
http://tapestry.apache.org/tapestry4/tapestry/ComponentReference/Insert.html
On 6/23/06, Bode, Bianca <bi...@hp.com> wrote:
>
> 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:jkuhnert@gmail.com]
> 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 <bi...@hp.com> 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: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> --
> Jesse Kuhnert
> Tacos/Tapestry, team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
Jesse Kuhnert
Tacos/Tapestry, team member/developer
Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.
Re: Date format bug?? (Headache. Tried all options.)
Posted by Jesse Kuhnert <jk...@gmail.com>.
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 <bi...@hp.com> 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:jkuhnert@gmail.com]
> 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 <bi...@hp.com> 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: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> --
> Jesse Kuhnert
> Tacos/Tapestry, team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
Jesse Kuhnert
Tacos/Tapestry, team member/developer
Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.
RE: Date format bug?? (Headache. Tried all options.)
Posted by "Bode, Bianca" <bi...@hp.com>.
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:jkuhnert@gmail.com]
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 <bi...@hp.com> 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: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
Jesse Kuhnert
Tacos/Tapestry, team member/developer
Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
RE: Date format bug?? (Headache. Tried all options.)
Posted by "Bode, Bianca" <bi...@hp.com>.
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:jkuhnert@gmail.com]
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 <bi...@hp.com> 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: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
Jesse Kuhnert
Tacos/Tapestry, team member/developer
Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Date format bug?? (Headache. Tried all options.)
Posted by Jesse Kuhnert <jk...@gmail.com>.
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 <bi...@hp.com> 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: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
Jesse Kuhnert
Tacos/Tapestry, team member/developer
Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.
RE: Date format bug?? (Headache. Tried all options.)
Posted by "Bode, Bianca" <bi...@hp.com>.
Nope, that also doesn't work, tried several formats
-----Original Message-----
From: Paul Ferraro [mailto:pmf8@columbia.edu]
Sent: vrijdag 23 juni 2006 17:14
To: Tapestry users
Subject: Re: Date format bug?? (Headache. Tried all options.)
Check the capitalization of your date format. It must comply with
java.text.SimpleDateFormat:
http://java.sun.com/j2se/1.5.0/docs/api/java/text/SimpleDateFormat.html
I think you want this:
<binding name="translator" value="translator:date,pattern=yyyy-MM-dd"/>
Bode, Bianca 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: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Date format bug?? (Headache. Tried all options.)
Posted by Paul Ferraro <pm...@columbia.edu>.
Check the capitalization of your date format. It must comply with
java.text.SimpleDateFormat:
http://java.sun.com/j2se/1.5.0/docs/api/java/text/SimpleDateFormat.html
I think you want this:
<binding name="translator" value="translator:date,pattern=yyyy-MM-dd"/>
Bode, Bianca 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: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org