You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Stephan Windmüller <st...@tu-dortmund.de> on 2010/11/26 10:07:00 UTC

Unable to set format parameter of DateField

Hi!

I am trying to set the format of two DateFields with this code

-----

@Property
private DateFormat dateFieldFormat;

@Inject
private Locale currentLocale;

void onPrepare() {
	myFormat = DateFormat.getDateInstance(DateFormat.DEFAULT, currentLocale);
}

-----

In the tml I tried to define it with any of these combinations:

<t:datefield t:id="date" format="dateFieldFormat"/>
<t:datefield t:id="date" t:format="dateFieldFormat"/>
<t:datefield t:id="date" format="${dateFieldFormat}"/>
<t:datefield t:id="date" t:format="${dateFieldFormat}"/>

None of these works. In one case it tries to parse the string
"dateFieldFormat", in another the String "java.text.DateField@..."

I could not find and example code for this in the documentation. Am I
using the dateFormat wrong?

Regards
 Stephan

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


Re: Jetty and live class re-loading (again)

Posted by Kalle Korhonen <ka...@gmail.com>.
Jetty is a fine choice, but Tomcat works just the same for live class
reloading: http://tynamo.org/Developing+with+Tomcat+and+Eclipse

Kalle


On Fri, Nov 26, 2010 at 8:31 AM, Richard Hill <ri...@su3analytics.com> wrote:
>
> Hi All,
>
> I today have attempted switching from Tomcat to Jetty in order to take
> advantage of live class reloading. However sadly live reloading is not
> working for me at the moment.
>
> I'm not using run jetty run or maven, I downloaded and unpacked jetty
> myself, and installed it in eclipse using the Jetty Server Adaptor from
> webtide.
>
> In eclipse I have "Build Automatically" selected. Jetty is configured to
> "Automatically republish when resources change". And my jetty VM args
> includes:
>
> -Dorg.mortbay.jetty.webapp.parentLoaderPriority=true
>
> The really annoying issue is that even a static asset change such
> as .css modification requires what seems to be a full rebuild and
> deploy, which takes a good 10 seconds.
>
> Is there some hidden config option I am overlooking? Any gotchas that
> people have experienced with getting this working?
>
>
> Thanks
>
>
> ---------------------------------------------------------------------
> 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: Jetty and live class re-loading (again)

Posted by Richard Hill <ri...@su3analytics.com>.
Of course, having mucked around for over an hour, finally caved in and
decided to ask the mailing list, I immediately found the problem:

You need to include your web project in the Jetty classpath, not just
project dependencies.

(This was T5.1 btw)

Thanks all




-----Original Message-----
From: Richard Hill <ri...@su3analytics.com>
Reply-to: rich@su3analytics.com
To: Tapestry users <us...@tapestry.apache.org>
Subject: Jetty and live class re-loading (again)
Date: Fri, 26 Nov 2010 16:31:05 +0000

Hi All,

I today have attempted switching from Tomcat to Jetty in order to take
advantage of live class reloading. However sadly live reloading is not
working for me at the moment.

I'm not using run jetty run or maven, I downloaded and unpacked jetty
myself, and installed it in eclipse using the Jetty Server Adaptor from
webtide.  

In eclipse I have "Build Automatically" selected. Jetty is configured to
"Automatically republish when resources change". And my jetty VM args
includes:

-Dorg.mortbay.jetty.webapp.parentLoaderPriority=true

The really annoying issue is that even a static asset change such
as .css modification requires what seems to be a full rebuild and
deploy, which takes a good 10 seconds.

Is there some hidden config option I am overlooking? Any gotchas that
people have experienced with getting this working?


Thanks


---------------------------------------------------------------------
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


Jetty and live class re-loading (again)

Posted by Richard Hill <ri...@su3analytics.com>.
Hi All,

I today have attempted switching from Tomcat to Jetty in order to take
advantage of live class reloading. However sadly live reloading is not
working for me at the moment.

I'm not using run jetty run or maven, I downloaded and unpacked jetty
myself, and installed it in eclipse using the Jetty Server Adaptor from
webtide.  

In eclipse I have "Build Automatically" selected. Jetty is configured to
"Automatically republish when resources change". And my jetty VM args
includes:

-Dorg.mortbay.jetty.webapp.parentLoaderPriority=true

The really annoying issue is that even a static asset change such
as .css modification requires what seems to be a full rebuild and
deploy, which takes a good 10 seconds.

Is there some hidden config option I am overlooking? Any gotchas that
people have experienced with getting this working?


Thanks


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


Re: Unable to set format parameter of DateField

Posted by Stephan Windmüller <st...@tu-dortmund.de>.
On 26.11.2010 10:46, Ulrich Stärk wrote:

> The default binding prefix for the format parameter is literal; use
> t:format="prop:dateFieldFormat".

This explains a lot, thanks.

> Also, in your onPrepare method you are setting the myFormat field
> while your DateFormat field is called dateFieldFormat.

I coded the mail by hand. ;)

- Stephan

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


Re: Unable to set format parameter of DateField

Posted by Ulrich Stärk <ul...@spielviel.de>.
The default binding prefix for the format parameter is literal; use t:format="prop:dateFieldFormat". 
Also, in your onPrepare method you are setting the myFormat field while your DateFormat field is 
called dateFieldFormat.

Uli

On 26.11.2010 10:07, Stephan Windmüller wrote:
> Hi!
>
> I am trying to set the format of two DateFields with this code
>
> -----
>
> @Property
> private DateFormat dateFieldFormat;
>
> @Inject
> private Locale currentLocale;
>
> void onPrepare() {
> 	myFormat = DateFormat.getDateInstance(DateFormat.DEFAULT, currentLocale);
> }
>
> -----
>
> In the tml I tried to define it with any of these combinations:
>
> <t:datefield t:id="date" format="dateFieldFormat"/>
> <t:datefield t:id="date" t:format="dateFieldFormat"/>
> <t:datefield t:id="date" format="${dateFieldFormat}"/>
> <t:datefield t:id="date" t:format="${dateFieldFormat}"/>
>
> None of these works. In one case it tries to parse the string
> "dateFieldFormat", in another the String "java.text.DateField@..."
>
> I could not find and example code for this in the documentation. Am I
> using the dateFormat wrong?
>
> Regards
>   Stephan
>
> ---------------------------------------------------------------------
> 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