You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Natia Gdzelishvili <ng...@gmail.com> on 2008/04/07 11:09:55 UTC
T5.0.11 beanEditForm
I am using beanedit form, i have a simple code
AddCelebrity.tml
<t:beaneditform t:id="celebrity" t:submitLabel="Save" />
AddCelebrity.java
public class AddCelebrity {
@Persist
private Celebrity celebrity;
public Celebrity getCelebrity() {
return celebrity;
}
public void setCelebrity(Celebrity celebrity) {
this.celebrity = celebrity;
}
}
Celebrity.java
public class Celebrity {
private long id;
private String firstName;
private String lastName;
private Date dateOfBirth;
private Occupation occupation;
private String biography;
private boolean birthDateVerified;
public Celebrity() {
}
public Celebrity(String firstName, String lastName,Date dateOfBirth,
Occupation occupation) {
this.firstName = firstName;
this.lastName = lastName;
this.dateOfBirth = Formats.parseDate("12/02/1981");
this.occupation = occupation;
}
....
setter and getter methods
}
I was using tapestry 5.0.10 everything worked fine, but when I upgraded
application to 5.0.11 I'm getting error:
org.apache.tapestry.internal.services.RenderQueueException Render queue
error in SetupRender[AddCelebrity:celebrity.editor]: Exception instantiating
instance of ge.bog.celebrities.entity.Celebrity (for component
'AddCelebrity:celebrity.editor'): Error invoking constructor
ge.bog.celebrities.entity.Celebrity(String, String, Date, Occupation) (at
Celebrity.java:35) (for service 'BeanModelSource'): No service implements
the interface java.util.Date.
.......
java.lang.RuntimeException No service implements the interface
java.util.Date.
......
Please help
thank in advance
Re: T5.0.11 beanEditForm
Posted by Michael Gerzabek <mi...@gmx.net>.
Hi Natia,
I'm not an expert here but learning on my own.
It looks like T5 complains about the constructor of Celebrity. If you
only use the default constructor your classes work.
I did it that way:
public class AddCelebrity {
@Persist
private Celebrity celebrity;
@Inject
private BeanModelSource _beanModelSource; // to get rid of
attributes not needed
@Inject
private ComponentResources _resources; // to get hold of custom labels
@Retain
private BeanModel<Celebrity> _model; // to transport it to the
beaneditform
void pageLoaded() {
_model = _beanModelSource.create( Celebrity.class, true,
_resources );
_model.exclude( "id" ); // don't show the id column
}
public BeanModel<Celebrity> getModel() {
return _model;
}
public Celebrity getCelebrity() {
return celebrity;
}
public void setCelebrity( Celebrity celebrity ) {
this.celebrity = celebrity;
}
}
Regards,
Michael
Gdzelishvili schrieb:
> Can anyone help?
>
> On Mon, Apr 7, 2008 at 1:09 PM, Natia Gdzelishvili <ng...@gmail.com>
> wrote:
>
>
>> I am using beanedit form, i have a simple code
>>
>> AddCelebrity.tml
>> <t:beaneditform t:id="celebrity" t:submitLabel="Save" />
>>
>> AddCelebrity.java
>> public class AddCelebrity {
>> @Persist
>> private Celebrity celebrity;
>>
>> public Celebrity getCelebrity() {
>> return celebrity;
>> }
>>
>> public void setCelebrity(Celebrity celebrity) {
>> this.celebrity = celebrity;
>> }
>>
>> }
>>
>> Celebrity.java
>> public class Celebrity {
>> private long id;
>> private String firstName;
>> private String lastName;
>> private Date dateOfBirth;
>> private Occupation occupation;
>> private String biography;
>> private boolean birthDateVerified;
>>
>> public Celebrity() {
>> }
>>
>> public Celebrity(String firstName, String lastName,Date dateOfBirth,
>> Occupation occupation) {
>> this.firstName = firstName;
>> this.lastName = lastName;
>> this.dateOfBirth = Formats.parseDate("12/02/1981");
>> this.occupation = occupation;
>> }
>> ....
>> setter and getter methods
>> }
>>
>> I was using tapestry 5.0.10 everything worked fine, but when I upgraded
>> application to 5.0.11 I'm getting error:
>>
>> org.apache.tapestry.internal.services.RenderQueueException Render queue
>> error in SetupRender[AddCelebrity:celebrity.editor]: Exception instantiating
>> instance of ge.bog.celebrities.entity.Celebrity (for component
>> 'AddCelebrity:celebrity.editor'): Error invoking constructor
>> ge.bog.celebrities.entity.Celebrity(String, String, Date, Occupation) (at
>> Celebrity.java:35) (for service 'BeanModelSource'): No service implements
>> the interface java.util.Date.
>> .......
>> java.lang.RuntimeException No service implements the interface
>> java.util.Date.
>> ......
>>
>> Please help
>> thank in advance
>>
>>
>>
>>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5.0.11 beanEditForm
Posted by Natia Gdzelishvili <ng...@gmail.com>.
Can anyone help?
On Mon, Apr 7, 2008 at 1:09 PM, Natia Gdzelishvili <ng...@gmail.com>
wrote:
> I am using beanedit form, i have a simple code
>
> AddCelebrity.tml
> <t:beaneditform t:id="celebrity" t:submitLabel="Save" />
>
> AddCelebrity.java
> public class AddCelebrity {
> @Persist
> private Celebrity celebrity;
>
> public Celebrity getCelebrity() {
> return celebrity;
> }
>
> public void setCelebrity(Celebrity celebrity) {
> this.celebrity = celebrity;
> }
>
> }
>
> Celebrity.java
> public class Celebrity {
> private long id;
> private String firstName;
> private String lastName;
> private Date dateOfBirth;
> private Occupation occupation;
> private String biography;
> private boolean birthDateVerified;
>
> public Celebrity() {
> }
>
> public Celebrity(String firstName, String lastName,Date dateOfBirth,
> Occupation occupation) {
> this.firstName = firstName;
> this.lastName = lastName;
> this.dateOfBirth = Formats.parseDate("12/02/1981");
> this.occupation = occupation;
> }
> ....
> setter and getter methods
> }
>
> I was using tapestry 5.0.10 everything worked fine, but when I upgraded
> application to 5.0.11 I'm getting error:
>
> org.apache.tapestry.internal.services.RenderQueueException Render queue
> error in SetupRender[AddCelebrity:celebrity.editor]: Exception instantiating
> instance of ge.bog.celebrities.entity.Celebrity (for component
> 'AddCelebrity:celebrity.editor'): Error invoking constructor
> ge.bog.celebrities.entity.Celebrity(String, String, Date, Occupation) (at
> Celebrity.java:35) (for service 'BeanModelSource'): No service implements
> the interface java.util.Date.
> .......
> java.lang.RuntimeException No service implements the interface
> java.util.Date.
> ......
>
> Please help
> thank in advance
>
>
>
Re: T5.0.11 beanEditForm
Posted by Natia Gdzelishvili <ng...@gmail.com>.
I'll try it
On Fri, Apr 11, 2008 at 1:38 AM, Filip S. Adamsen <fs...@fsadev.com> wrote:
> This has been fixed in 5.0.12 where you can now add the @Inject annotation
> to the constructor that Tapestry should use for auto-instantiating your
> object.
>
> -Filip
>
>
> On 2008-04-07 11:09, Natia Gdzelishvili wrote:
>
> > I am using beanedit form, i have a simple code
> >
> > AddCelebrity.tml
> > <t:beaneditform t:id="celebrity" t:submitLabel="Save" />
> >
> > AddCelebrity.java
> > public class AddCelebrity {
> > @Persist
> > private Celebrity celebrity;
> >
> > public Celebrity getCelebrity() {
> > return celebrity;
> > }
> >
> > public void setCelebrity(Celebrity celebrity) {
> > this.celebrity = celebrity;
> > }
> >
> > }
> >
> > Celebrity.java
> > public class Celebrity {
> > private long id;
> > private String firstName;
> > private String lastName;
> > private Date dateOfBirth;
> > private Occupation occupation;
> > private String biography;
> > private boolean birthDateVerified;
> >
> > public Celebrity() {
> > }
> >
> > public Celebrity(String firstName, String lastName,Date dateOfBirth,
> > Occupation occupation) {
> > this.firstName = firstName;
> > this.lastName = lastName;
> > this.dateOfBirth = Formats.parseDate("12/02/1981");
> > this.occupation = occupation;
> > }
> > ....
> > setter and getter methods
> > }
> >
> > I was using tapestry 5.0.10 everything worked fine, but when I upgraded
> > application to 5.0.11 I'm getting error:
> >
> > org.apache.tapestry.internal.services.RenderQueueException Render queue
> > error in SetupRender[AddCelebrity:celebrity.editor]: Exception
> > instantiating
> > instance of ge.bog.celebrities.entity.Celebrity (for component
> > 'AddCelebrity:celebrity.editor'): Error invoking constructor
> > ge.bog.celebrities.entity.Celebrity(String, String, Date, Occupation)
> > (at
> > Celebrity.java:35) (for service 'BeanModelSource'): No service
> > implements
> > the interface java.util.Date.
> > .......
> > java.lang.RuntimeException No service implements the interface
> > java.util.Date.
> > ......
> >
> > Please help
> > thank in advance
> >
> >
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
Re: T5.0.11 beanEditForm
Posted by "Filip S. Adamsen" <fs...@fsadev.com>.
This has been fixed in 5.0.12 where you can now add the @Inject
annotation to the constructor that Tapestry should use for
auto-instantiating your object.
-Filip
On 2008-04-07 11:09, Natia Gdzelishvili wrote:
> I am using beanedit form, i have a simple code
>
> AddCelebrity.tml
> <t:beaneditform t:id="celebrity" t:submitLabel="Save" />
>
> AddCelebrity.java
> public class AddCelebrity {
> @Persist
> private Celebrity celebrity;
>
> public Celebrity getCelebrity() {
> return celebrity;
> }
>
> public void setCelebrity(Celebrity celebrity) {
> this.celebrity = celebrity;
> }
>
> }
>
> Celebrity.java
> public class Celebrity {
> private long id;
> private String firstName;
> private String lastName;
> private Date dateOfBirth;
> private Occupation occupation;
> private String biography;
> private boolean birthDateVerified;
>
> public Celebrity() {
> }
>
> public Celebrity(String firstName, String lastName,Date dateOfBirth,
> Occupation occupation) {
> this.firstName = firstName;
> this.lastName = lastName;
> this.dateOfBirth = Formats.parseDate("12/02/1981");
> this.occupation = occupation;
> }
> ....
> setter and getter methods
> }
>
> I was using tapestry 5.0.10 everything worked fine, but when I upgraded
> application to 5.0.11 I'm getting error:
>
> org.apache.tapestry.internal.services.RenderQueueException Render queue
> error in SetupRender[AddCelebrity:celebrity.editor]: Exception instantiating
> instance of ge.bog.celebrities.entity.Celebrity (for component
> 'AddCelebrity:celebrity.editor'): Error invoking constructor
> ge.bog.celebrities.entity.Celebrity(String, String, Date, Occupation) (at
> Celebrity.java:35) (for service 'BeanModelSource'): No service implements
> the interface java.util.Date.
> .......
> java.lang.RuntimeException No service implements the interface
> java.util.Date.
> ......
>
> Please help
> thank in advance
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org