You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by James Sherwood <js...@rgisolutions.com> on 2008/10/24 21:32:37 UTC
T5: Beaneditform and Date problem
Hello,
I have an object Celebrity with the fields:
private long id;
private String firstName;
private String lastName;
private Date dateOfBirth;(java.util.Date)
When I use the tag:
<t:beaneditform t:id="celebrity"/>
And access the page I get the console error:
No service implements the interface java.util.Date.
And a Tapestry error:
Render queue error in SetupRender[AddCelebrity:celebrity.editor]: Exception
instantiating instance of com.packtpub.celebrities.model.Celebrity (for
component 'AddCelebrity:celebrity.editor'): Error invoking constructor
com.packtpub.celebrities.model.Celebrity(String, String, Date, Occupation)
(at Celebrity.java:23) (for service 'BeanModelSource'): No service
implements the interface java.util.Date.
Any ideas what I am doing wrong?
Thanks,
--James
Re: AppModule & Setting the Locale
Posted by su...@gmx.de.
This code does not work....unfortunately:
public RequestFilter buildTimingFilter(final Logger log)
{
return new RequestFilter()
{
@Inject
private PersistentLocale persistentLocale;
public boolean service(Request request, Response response, RequestHandler handler)
throws IOException
{
if (request.getServerName().equals("www.domain.co.uk")){
persistentLocale.set(Locale.ENGLISH);
}
else {
persistentLocale.set(Locale.GERMAN);
}
....
-------- Original-Nachricht --------
> Datum: Fri, 24 Oct 2008 23:47:47 +0200
> Von: superoverdrive@gmx.de
> An: users@tapestry.apache.org
> Betreff: AppModule & Setting the Locale
> How can the Locale be overwritten/set inside of AppModule?
>
> Is there a list of services that can be overwritten/set/accessed inside of
> AppModule ?
>
> Thanks!
>
> Tobias
>
> ---------------------------------------------------------------------
> 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
AppModule & Setting the Locale
Posted by su...@gmx.de.
How can the Locale be overwritten/set inside of AppModule?
Is there a list of services that can be overwritten/set/accessed inside of AppModule ?
Thanks!
Tobias
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5: Beaneditform and Date problem
Posted by Andy Pahne <ap...@net22.de>.
You can also annotate the zero argument constructor with @Inject.
Thiago H. de Paula Figueiredo wrote:
> One solution is to remove any constructor that takes arguments. Other
> is to write a method like
>
> @OnEvent(component = "celebrity", value = Form.PREPARE) {
> yourEditedObject = new Celebrity(...);
> }
>
> Em Fri, 24 Oct 2008 16:32:37 -0300, James Sherwood
> <js...@rgisolutions.com> escreveu:
>
>> Hello,
>>
>>
>> I have an object Celebrity with the fields:
>>
>>
>> private long id;
>>
>> private String firstName;
>>
>> private String lastName;
>>
>> private Date dateOfBirth;(java.util.Date)
>>
>>
>> When I use the tag:
>>
>>
>> <t:beaneditform t:id="celebrity"/>
>>
>>
>> And access the page I get the console error:
>>
>>
>> No service implements the interface java.util.Date.
>>
>>
>> And a Tapestry error:
>>
>>
>> Render queue error in SetupRender[AddCelebrity:celebrity.editor]:
>> Exception
>> instantiating instance of com.packtpub.celebrities.model.Celebrity (for
>> component 'AddCelebrity:celebrity.editor'): Error invoking constructor
>> com.packtpub.celebrities.model.Celebrity(String, String, Date,
>> Occupation)
>> (at Celebrity.java:23) (for service 'BeanModelSource'): No service
>> implements the interface java.util.Date.
>>
>>
>> Any ideas what I am doing wrong?
>>
>>
>> Thanks,
>>
>> --James
>>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5: Beaneditform and Date problem
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
One solution is to remove any constructor that takes arguments. Other is
to write a method like
@OnEvent(component = "celebrity", value = Form.PREPARE) {
yourEditedObject = new Celebrity(...);
}
Em Fri, 24 Oct 2008 16:32:37 -0300, James Sherwood
<js...@rgisolutions.com> escreveu:
> Hello,
>
>
> I have an object Celebrity with the fields:
>
>
> private long id;
>
> private String firstName;
>
> private String lastName;
>
> private Date dateOfBirth;(java.util.Date)
>
>
> When I use the tag:
>
>
> <t:beaneditform t:id="celebrity"/>
>
>
> And access the page I get the console error:
>
>
> No service implements the interface java.util.Date.
>
>
> And a Tapestry error:
>
>
> Render queue error in SetupRender[AddCelebrity:celebrity.editor]:
> Exception
> instantiating instance of com.packtpub.celebrities.model.Celebrity (for
> component 'AddCelebrity:celebrity.editor'): Error invoking constructor
> com.packtpub.celebrities.model.Celebrity(String, String, Date,
> Occupation)
> (at Celebrity.java:23) (for service 'BeanModelSource'): No service
> implements the interface java.util.Date.
>
>
> Any ideas what I am doing wrong?
>
>
> Thanks,
>
> --James
>
--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
Consultor, desenvolvedor e instrutor em Java
http://www.arsmachina.com.br/thiago
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org