Re: problem with example .TML

2008-04-22 Thread János Jarecsni
thx for the info, I can live with this for now :)
cheers,
janos

On 22/04/2008, Filip S. Adamsen <[EMAIL PROTECTED]> wrote:
>
> Hmm, looks like this was added in 5.0.12 which hasn't been released yet.
> Sorry about that.
>
> Not quite sure how to solve your problem, then.
>
> -Filip
>
> On 2008-04-22 15:43, János Jarecsni wrote:
>
> > The compiler is not so much interesting, Tapestry is 5.0.11 :)
> >
> > On 22/04/2008, János Jarecsni <[EMAIL PROTECTED]> wrote:
> >
> > > Hi Filip,
> > >
> > > the compiler (Netbeans 6) complains about @Inject that "annotation
> > > type
> > > not available for this kind of declaration".
> > >
> > > cheers,
> > > janos
> > >
> > > On 22/04/2008, Filip S. Adamsen <[EMAIL PROTECTED]> wrote:
> > >
> > > > Hi János,
> > > >
> > > > Sure can:
> > > >
> > > > public class MyClass {
> > > >  ...
> > > >
> > > >  @Inject
> > > >  public MyClass() {
> > > >  }
> > > >
> > > >  public MyClass(Date date) {
> > > >   ...
> > > >  }
> > > >
> > > >  ...
> > > > }
> > > >
> > > > Something like that.
> > > >
> > > > -Filip
> > > >
> > > > János Jarecsni skrev:
> > > >
> > > >  hi Filip,
> > > > > and how to do that? could you include (inject :P) an example for
> > > > > that?
> > > > > thx!
> > > > > Janos
> > > > >
> > > > > On 22/04/2008, Filip S. Adamsen <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > >  Hi,
> > > > > >
> > > > > > You can also put an @Inject annotation on the constructor you
> > > > > > want
> > > > > > Tapestry to use when auto-instantiating your class. This way you
> > > > > > can
> > > > > > have
> > > > > > multiple constructors.
> > > > > >
> > > > > > -Filip
> > > > > >
> > > > > > János Jarecsni skrev:
> > > > > >
> > > > > >  Hi Michael,
> > > > > >
> > > > > > > I googled for this problem and found a response to a similar
> > > > > > > problem
> > > > > > > from
> > > > > > > you. I followed the instructions there, and succeeded. (I had
> > > > > > > to
> > > > > > > remove
> > > > > > > the
> > > > > > > constructor which takes arguments! from the Celebrity class -
> > > > > > > until
> > > > > > > there
> > > > > > > was this ctr besides the no-arg, it still tried to use it, no
> > > > > > > matter
> > > > > > > what
> > > > > > > the model wanted to do).
> > > > > > >
> > > > > > > Now the beaneditor call is like this:
> > > > > > >
> > > > > > >  
> > > > > > >  
> > > > > > >  
> > > > > > >
> > > > > > > Thx!
> > > > > > > Janos
> > > > > > > PS: I used this info:
> > > > > > > http://www.nabble.com/T5.0.11-beanEditForm-td16536531.html
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > On 22/04/2008, János Jarecsni <[EMAIL PROTECTED]>
> > > > > > > wrote:
> > > > > > >
> > > > > > >  Hi Michael,
> > > > > > >
> > > > > > > > I had a look... but it does not make too much sense for me
> > > > > > > > :)
> > > > > > > > Where do
> > > > > > > > I
> > > > > > > > use model.remove() now? Or do you mean I should change the
> > > > > > > > remove
> > > > > > > > attribute
> > > > > > > > in
> > > > > > > >
> > > > > > > >   > > > > > > > remove="id"
> > > > > > > >
> > > > > > > > to exclude="id"? (I tried even this, but nothing changed).
> > > > > > > >
> > > > > > > > As far as I see this, there is some complain about no
> > > > > > > > service
> > > > > > > > implementing
> > > > > > > > java.util.Date (whatever that should mean). It is obviously
> > > > > > > > trying to
> > > > > > > > instantiate a model class to use for bean editing. This
> > > > > > > > worked
> > > > > > > > so far,
> > > > > > > > now
> > > > > > > > it can't instantiate.
> > > > > > > >
> > > > > > > > thx!
> > > > > > > > janos
> > > > > > > >
> > > > > > > > On 22/04/2008, Michael Gerzabek <[EMAIL PROTECTED]>
> > > > > > > > wrote:
> > > > > > > >
> > > > > > > >  Hi Janos,
> > > > > > > >
> > > > > > > > > take a look at the upgrade notes. Close to the bottom the
> > > > > > > > > change of
> > > > > > > > > the
> > > > > > > > > BeanModel signature is documented. Now you need
> > > > > > > > > mode.exlude(..)
> > > > > > > > > instead of
> > > > > > > > > model.remove(..).
> > > > > > > > >
> > > > > > > > > Regards,
> > > > > > > > > Michael
> > > > > > > > >
> > > > > > > > > [1]
> > > > > > > > >
> > > > > > > > > http://tapestry.apache.org/tapestry5/tapestry-core/upgrade.html
> > > > > > > > >
> > > > > > > > > János Jarecsni schrieb:
> > > > > > > > >
> > > > > > > > >  Hi,
> > > > > > > > >
> > > > > > > > >  I have upgraded from 5.0.10 to 5.0.11 and a .TML which
> > > > > > > > > > worked
> > > > > > > > > > before
> > > > > > > > > > now
> > > > > > > > > > throws this:
> > > > > > > > > >
> > > > > > > > > > An unexpected application exception has occurred.
> > > > > > > > > >
> > > > > > > > > > Render queue error in
> > > > > > > > > > SetupRender[AddCelebrity:celebrity.editor]:
> > > > > > > > > > Exception
> > > > > > > > > > instantiating instance of
> > > > > > > > > > com.packtpub.celebrities.model.Celebrity
> > > > > > > > > 

Re: problem with example .TML

2008-04-22 Thread Filip S. Adamsen
Hmm, looks like this was added in 5.0.12 which hasn't been released yet. 
Sorry about that.


Not quite sure how to solve your problem, then.

-Filip

On 2008-04-22 15:43, János Jarecsni wrote:

The compiler is not so much interesting, Tapestry is 5.0.11 :)

On 22/04/2008, János Jarecsni <[EMAIL PROTECTED]> wrote:

Hi Filip,

the compiler (Netbeans 6) complains about @Inject that "annotation type
not available for this kind of declaration".

cheers,
janos

On 22/04/2008, Filip S. Adamsen <[EMAIL PROTECTED]> wrote:

Hi János,

Sure can:

public class MyClass {
 ...

 @Inject
 public MyClass() {
 }

 public MyClass(Date date) {
   ...
 }

 ...
}

Something like that.

-Filip

János Jarecsni skrev:


hi Filip,
and how to do that? could you include (inject :P) an example for that?
thx!
Janos

On 22/04/2008, Filip S. Adamsen <[EMAIL PROTECTED]> wrote:


Hi,

You can also put an @Inject annotation on the constructor you want
Tapestry to use when auto-instantiating your class. This way you can
have
multiple constructors.

-Filip

János Jarecsni skrev:

 Hi Michael,

I googled for this problem and found a response to a similar
problem
from
you. I followed the instructions there, and succeeded. (I had to
remove
the
constructor which takes arguments! from the Celebrity class -
until
there
was this ctr besides the no-arg, it still tried to use it, no
matter
what
the model wanted to do).

Now the beaneditor call is like this:

  
  
  

Thx!
Janos
PS: I used this info:
http://www.nabble.com/T5.0.11-beanEditForm-td16536531.html



On 22/04/2008, János Jarecsni <[EMAIL PROTECTED]> wrote:

 Hi Michael,

I had a look... but it does not make too much sense for me :)
Where do
I
use model.remove() now? Or do you mean I should change the
remove
attribute
in

 
wrote:

 Hi Janos,

take a look at the upgrade notes. Close to the bottom the
change of
the
BeanModel signature is documented. Now you need
mode.exlude(..)
instead of
model.remove(..).

Regards,
Michael

[1]
http://tapestry.apache.org/tapestry5/tapestry-core/upgrade.html

János Jarecsni schrieb:

 Hi,


I have upgraded from 5.0.10 to 5.0.11 and a .TML which
worked
before
now
throws this:

An unexpected application exception has occurred.

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:18) (for service 'BeanModelSource'): No
service
implements the interface java.util.Date.

The .TML code:

http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
 
 Celebrity Collector: Adding New
Celebrity
 
 
 
 Adding New Celebrity

 
 
 
 
 
   
 
 

and the model class (Celebrity):

package com.packtpub.celebrities.model;

import java.util.Date;

public class Celebrity {
 private Date dateOfBirth;
 // some fields omitted

 public Celebrity() {
 }

 public Celebrity(String firstName, String lastName,
 Date dateOfBirth, Occupation occupation) {
 this.firstName = firstName;
 this.lastName = lastName;
 this.dateOfBirth = dateOfBirth;
 this.occupation = occupation;
 }

 public Date getDateOfBirth() {
 return dateOfBirth;
 }

 public void setDateOfBirth(Date dateOfBirth) {
 this.dateOfBirth = dateOfBirth;
 }
 // more methods follow
}


Can you tell me what am I doing wrong?
thx
janos




-

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]




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



Re: problem with example .TML

2008-04-22 Thread János Jarecsni
The compiler is not so much interesting, Tapestry is 5.0.11 :)

On 22/04/2008, János Jarecsni <[EMAIL PROTECTED]> wrote:
>
> Hi Filip,
>
> the compiler (Netbeans 6) complains about @Inject that "annotation type
> not available for this kind of declaration".
>
> cheers,
> janos
>
> On 22/04/2008, Filip S. Adamsen <[EMAIL PROTECTED]> wrote:
> >
> > Hi János,
> >
> > Sure can:
> >
> > public class MyClass {
> >  ...
> >
> >  @Inject
> >  public MyClass() {
> >  }
> >
> >  public MyClass(Date date) {
> >...
> >  }
> >
> >  ...
> > }
> >
> > Something like that.
> >
> > -Filip
> >
> > János Jarecsni skrev:
> >
> > > hi Filip,
> > > and how to do that? could you include (inject :P) an example for that?
> > > thx!
> > > Janos
> > >
> > > On 22/04/2008, Filip S. Adamsen <[EMAIL PROTECTED]> wrote:
> > >
> > > > Hi,
> > > >
> > > > You can also put an @Inject annotation on the constructor you want
> > > > Tapestry to use when auto-instantiating your class. This way you can
> > > > have
> > > > multiple constructors.
> > > >
> > > > -Filip
> > > >
> > > > János Jarecsni skrev:
> > > >
> > > >  Hi Michael,
> > > > >
> > > > > I googled for this problem and found a response to a similar
> > > > > problem
> > > > > from
> > > > > you. I followed the instructions there, and succeeded. (I had to
> > > > > remove
> > > > > the
> > > > > constructor which takes arguments! from the Celebrity class -
> > > > > until
> > > > > there
> > > > > was this ctr besides the no-arg, it still tried to use it, no
> > > > > matter
> > > > > what
> > > > > the model wanted to do).
> > > > >
> > > > > Now the beaneditor call is like this:
> > > > >
> > > > >   
> > > > >   
> > > > >   
> > > > >
> > > > > Thx!
> > > > > Janos
> > > > > PS: I used this info:
> > > > > http://www.nabble.com/T5.0.11-beanEditForm-td16536531.html
> > > > >
> > > > >
> > > > >
> > > > > On 22/04/2008, János Jarecsni <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > >  Hi Michael,
> > > > > >
> > > > > > I had a look... but it does not make too much sense for me :)
> > > > > > Where do
> > > > > > I
> > > > > > use model.remove() now? Or do you mean I should change the
> > > > > > remove
> > > > > > attribute
> > > > > > in
> > > > > >
> > > > > >   > > > > >  remove="id"
> > > > > >
> > > > > > to exclude="id"? (I tried even this, but nothing changed).
> > > > > >
> > > > > > As far as I see this, there is some complain about no service
> > > > > > implementing
> > > > > > java.util.Date (whatever that should mean). It is obviously
> > > > > > trying to
> > > > > > instantiate a model class to use for bean editing. This worked
> > > > > > so far,
> > > > > > now
> > > > > > it can't instantiate.
> > > > > >
> > > > > > thx!
> > > > > > janos
> > > > > >
> > > > > > On 22/04/2008, Michael Gerzabek <[EMAIL PROTECTED]>
> > > > > > wrote:
> > > > > >
> > > > > >  Hi Janos,
> > > > > > >
> > > > > > > take a look at the upgrade notes. Close to the bottom the
> > > > > > > change of
> > > > > > > the
> > > > > > > BeanModel signature is documented. Now you need
> > > > > > > mode.exlude(..)
> > > > > > > instead of
> > > > > > > model.remove(..).
> > > > > > >
> > > > > > > Regards,
> > > > > > > Michael
> > > > > > >
> > > > > > > [1]
> > > > > > > http://tapestry.apache.org/tapestry5/tapestry-core/upgrade.html
> > > > > > >
> > > > > > > János Jarecsni schrieb:
> > > > > > >
> > > > > > >  Hi,
> > > > > > >
> > > > > > > > I have upgraded from 5.0.10 to 5.0.11 and a .TML which
> > > > > > > > worked
> > > > > > > > before
> > > > > > > > now
> > > > > > > > throws this:
> > > > > > > >
> > > > > > > > An unexpected application exception has occurred.
> > > > > > > >
> > > > > > > > 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:18) (for service 'BeanModelSource'): No
> > > > > > > > service
> > > > > > > > implements the interface java.util.Date.
> > > > > > > >
> > > > > > > > The .TML code:
> > > > > > > >
> > > > > > > > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
> > > > > > > >  
> > > > > > > >  Celebrity Collector: Adding New
> > > > > > > > Celebrity
> > > > > > > >   > > > > > > > type="text/css"/>
> > > > > > > >  
> > > > > > > >  
> > > > > > > >  Adding New Celebrity
> > > > > > > >
> > > > > > > >   > > > > > > >  remove="id"
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > reorder="firstName,lastName,dateOfBirth,birthDateVerified,occupation,biography">
> > > > > > > >  
> > > > > > > >  
> > > > > > >

Re: problem with example .TML

2008-04-22 Thread János Jarecsni
Hi Filip,

the compiler (Netbeans 6) complains about @Inject that "annotation type not
available for this kind of declaration".

cheers,
janos

On 22/04/2008, Filip S. Adamsen <[EMAIL PROTECTED]> wrote:
>
> Hi János,
>
> Sure can:
>
> public class MyClass {
>  ...
>
>  @Inject
>  public MyClass() {
>  }
>
>  public MyClass(Date date) {
>...
>  }
>
>  ...
> }
>
> Something like that.
>
> -Filip
>
> János Jarecsni skrev:
>
> > hi Filip,
> > and how to do that? could you include (inject :P) an example for that?
> > thx!
> > Janos
> >
> > On 22/04/2008, Filip S. Adamsen <[EMAIL PROTECTED]> wrote:
> >
> > > Hi,
> > >
> > > You can also put an @Inject annotation on the constructor you want
> > > Tapestry to use when auto-instantiating your class. This way you can
> > > have
> > > multiple constructors.
> > >
> > > -Filip
> > >
> > > János Jarecsni skrev:
> > >
> > >  Hi Michael,
> > > >
> > > > I googled for this problem and found a response to a similar problem
> > > > from
> > > > you. I followed the instructions there, and succeeded. (I had to
> > > > remove
> > > > the
> > > > constructor which takes arguments! from the Celebrity class - until
> > > > there
> > > > was this ctr besides the no-arg, it still tried to use it, no matter
> > > > what
> > > > the model wanted to do).
> > > >
> > > > Now the beaneditor call is like this:
> > > >
> > > >   
> > > >   
> > > >   
> > > >
> > > > Thx!
> > > > Janos
> > > > PS: I used this info:
> > > > http://www.nabble.com/T5.0.11-beanEditForm-td16536531.html
> > > >
> > > >
> > > >
> > > > On 22/04/2008, János Jarecsni <[EMAIL PROTECTED]> wrote:
> > > >
> > > >  Hi Michael,
> > > > >
> > > > > I had a look... but it does not make too much sense for me :)
> > > > > Where do
> > > > > I
> > > > > use model.remove() now? Or do you mean I should change the remove
> > > > > attribute
> > > > > in
> > > > >
> > > > >   > > > >  remove="id"
> > > > >
> > > > > to exclude="id"? (I tried even this, but nothing changed).
> > > > >
> > > > > As far as I see this, there is some complain about no service
> > > > > implementing
> > > > > java.util.Date (whatever that should mean). It is obviously trying
> > > > > to
> > > > > instantiate a model class to use for bean editing. This worked so
> > > > > far,
> > > > > now
> > > > > it can't instantiate.
> > > > >
> > > > > thx!
> > > > > janos
> > > > >
> > > > > On 22/04/2008, Michael Gerzabek <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > >  Hi Janos,
> > > > > >
> > > > > > take a look at the upgrade notes. Close to the bottom the change
> > > > > > of
> > > > > > the
> > > > > > BeanModel signature is documented. Now you need mode.exlude(..)
> > > > > > instead of
> > > > > > model.remove(..).
> > > > > >
> > > > > > Regards,
> > > > > > Michael
> > > > > >
> > > > > > [1]
> > > > > > http://tapestry.apache.org/tapestry5/tapestry-core/upgrade.html
> > > > > >
> > > > > > János Jarecsni schrieb:
> > > > > >
> > > > > >  Hi,
> > > > > >
> > > > > > > I have upgraded from 5.0.10 to 5.0.11 and a .TML which worked
> > > > > > > before
> > > > > > > now
> > > > > > > throws this:
> > > > > > >
> > > > > > > An unexpected application exception has occurred.
> > > > > > >
> > > > > > > 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:18) (for service 'BeanModelSource'): No
> > > > > > > service
> > > > > > > implements the interface java.util.Date.
> > > > > > >
> > > > > > > The .TML code:
> > > > > > >
> > > > > > > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
> > > > > > >  
> > > > > > >  Celebrity Collector: Adding New Celebrity
> > > > > > >  
> > > > > > >  
> > > > > > >  
> > > > > > >  Adding New Celebrity
> > > > > > >
> > > > > > >   > > > > > >  remove="id"
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > reorder="firstName,lastName,dateOfBirth,birthDateVerified,occupation,biography">
> > > > > > >  
> > > > > > >  
> > > > > > >   > > > > > > t:value="celebrity.biography"
> > > > > > >  t:toolbarSet="Medium" t:width="350"
> > > > > > > t:height="200"/>
> > > > > > >  
> > > > > > >
> > > > > > >  
> > > > > > >  
> > > > > > > 
> > > > > > > and the model class (Celebrity):
> > > > > > >
> > > > > > > package com.packtpub.celebrities.model;
> > > > > > >
> > > > > > > import java.util.Date;
> > > > > > >
> > > > > > > public class Celebrity {
> > > > > > >  private Date dateOfBirth;
> > > > > > >  // some fields omitted
> > > > > > >
> > > > > > >  public Celebrity() 

Re: problem with example .TML

2008-04-22 Thread János Jarecsni
thanks, I wasn't aware of such a usage of @Inject. I thought it is for IoC
to inject some objects into the class. I will try this. And thanks!
cheers
janos

On 22/04/2008, Filip S. Adamsen <[EMAIL PROTECTED]> wrote:
>
> Hi János,
>
> Sure can:
>
> public class MyClass {
>  ...
>
>  @Inject
>  public MyClass() {
>  }
>
>  public MyClass(Date date) {
>...
>  }
>
>  ...
> }
>
> Something like that.
>
> -Filip
>
> János Jarecsni skrev:
>
> > hi Filip,
> > and how to do that? could you include (inject :P) an example for that?
> > thx!
> > Janos
> >
> > On 22/04/2008, Filip S. Adamsen <[EMAIL PROTECTED]> wrote:
> >
> > > Hi,
> > >
> > > You can also put an @Inject annotation on the constructor you want
> > > Tapestry to use when auto-instantiating your class. This way you can
> > > have
> > > multiple constructors.
> > >
> > > -Filip
> > >
> > > János Jarecsni skrev:
> > >
> > >  Hi Michael,
> > > >
> > > > I googled for this problem and found a response to a similar problem
> > > > from
> > > > you. I followed the instructions there, and succeeded. (I had to
> > > > remove
> > > > the
> > > > constructor which takes arguments! from the Celebrity class - until
> > > > there
> > > > was this ctr besides the no-arg, it still tried to use it, no matter
> > > > what
> > > > the model wanted to do).
> > > >
> > > > Now the beaneditor call is like this:
> > > >
> > > >   
> > > >   
> > > >   
> > > >
> > > > Thx!
> > > > Janos
> > > > PS: I used this info:
> > > > http://www.nabble.com/T5.0.11-beanEditForm-td16536531.html
> > > >
> > > >
> > > >
> > > > On 22/04/2008, János Jarecsni <[EMAIL PROTECTED]> wrote:
> > > >
> > > >  Hi Michael,
> > > > >
> > > > > I had a look... but it does not make too much sense for me :)
> > > > > Where do
> > > > > I
> > > > > use model.remove() now? Or do you mean I should change the remove
> > > > > attribute
> > > > > in
> > > > >
> > > > >   > > > >  remove="id"
> > > > >
> > > > > to exclude="id"? (I tried even this, but nothing changed).
> > > > >
> > > > > As far as I see this, there is some complain about no service
> > > > > implementing
> > > > > java.util.Date (whatever that should mean). It is obviously trying
> > > > > to
> > > > > instantiate a model class to use for bean editing. This worked so
> > > > > far,
> > > > > now
> > > > > it can't instantiate.
> > > > >
> > > > > thx!
> > > > > janos
> > > > >
> > > > > On 22/04/2008, Michael Gerzabek <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > >  Hi Janos,
> > > > > >
> > > > > > take a look at the upgrade notes. Close to the bottom the change
> > > > > > of
> > > > > > the
> > > > > > BeanModel signature is documented. Now you need mode.exlude(..)
> > > > > > instead of
> > > > > > model.remove(..).
> > > > > >
> > > > > > Regards,
> > > > > > Michael
> > > > > >
> > > > > > [1]
> > > > > > http://tapestry.apache.org/tapestry5/tapestry-core/upgrade.html
> > > > > >
> > > > > > János Jarecsni schrieb:
> > > > > >
> > > > > >  Hi,
> > > > > >
> > > > > > > I have upgraded from 5.0.10 to 5.0.11 and a .TML which worked
> > > > > > > before
> > > > > > > now
> > > > > > > throws this:
> > > > > > >
> > > > > > > An unexpected application exception has occurred.
> > > > > > >
> > > > > > > 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:18) (for service 'BeanModelSource'): No
> > > > > > > service
> > > > > > > implements the interface java.util.Date.
> > > > > > >
> > > > > > > The .TML code:
> > > > > > >
> > > > > > > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
> > > > > > >  
> > > > > > >  Celebrity Collector: Adding New Celebrity
> > > > > > >  
> > > > > > >  
> > > > > > >  
> > > > > > >  Adding New Celebrity
> > > > > > >
> > > > > > >   > > > > > >  remove="id"
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > reorder="firstName,lastName,dateOfBirth,birthDateVerified,occupation,biography">
> > > > > > >  
> > > > > > >  
> > > > > > >   > > > > > > t:value="celebrity.biography"
> > > > > > >  t:toolbarSet="Medium" t:width="350"
> > > > > > > t:height="200"/>
> > > > > > >  
> > > > > > >
> > > > > > >  
> > > > > > >  
> > > > > > > 
> > > > > > > and the model class (Celebrity):
> > > > > > >
> > > > > > > package com.packtpub.celebrities.model;
> > > > > > >
> > > > > > > import java.util.Date;
> > > > > > >
> > > > > > > public class Celebrity {
> > > > > > >  private Date dateOfBirth;
> > > > > > >  // some fields omitted
> > > > > > >
> > > > > > >  public

Re: problem with example .TML

2008-04-22 Thread Filip S. Adamsen

Hi János,

Sure can:

public class MyClass {
  ...

  @Inject
  public MyClass() {
  }

  public MyClass(Date date) {
...
  }

  ...
}

Something like that.

-Filip

János Jarecsni skrev:

hi Filip,
and how to do that? could you include (inject :P) an example for that?
thx!
Janos

On 22/04/2008, Filip S. Adamsen <[EMAIL PROTECTED]> wrote:

Hi,

You can also put an @Inject annotation on the constructor you want
Tapestry to use when auto-instantiating your class. This way you can have
multiple constructors.

-Filip

János Jarecsni skrev:


Hi Michael,

I googled for this problem and found a response to a similar problem
from
you. I followed the instructions there, and succeeded. (I had to remove
the
constructor which takes arguments! from the Celebrity class - until
there
was this ctr besides the no-arg, it still tried to use it, no matter
what
the model wanted to do).

Now the beaneditor call is like this:

   
   
   

Thx!
Janos
PS: I used this info:
http://www.nabble.com/T5.0.11-beanEditForm-td16536531.html



On 22/04/2008, János Jarecsni <[EMAIL PROTECTED]> wrote:


Hi Michael,

I had a look... but it does not make too much sense for me :) Where do
I
use model.remove() now? Or do you mean I should change the remove
attribute
in

  wrote:


Hi Janos,

take a look at the upgrade notes. Close to the bottom the change of
the
BeanModel signature is documented. Now you need mode.exlude(..)
instead of
model.remove(..).

Regards,
Michael

[1] http://tapestry.apache.org/tapestry5/tapestry-core/upgrade.html

János Jarecsni schrieb:

 Hi,

I have upgraded from 5.0.10 to 5.0.11 and a .TML which worked
before
now
throws this:

An unexpected application exception has occurred.

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:18) (for service 'BeanModelSource'): No service
implements the interface java.util.Date.

The .TML code:

http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
  
  Celebrity Collector: Adding New Celebrity
  
  
  
  Adding New Celebrity

  
  
  
  
  

  
  

and the model class (Celebrity):

package com.packtpub.celebrities.model;

import java.util.Date;

public class Celebrity {
  private Date dateOfBirth;
  // some fields omitted

  public Celebrity() {
  }

  public Celebrity(String firstName, String lastName,
  Date dateOfBirth, Occupation occupation) {
  this.firstName = firstName;
  this.lastName = lastName;
  this.dateOfBirth = dateOfBirth;
  this.occupation = occupation;
  }

  public Date getDateOfBirth() {
  return dateOfBirth;
  }

  public void setDateOfBirth(Date dateOfBirth) {
  this.dateOfBirth = dateOfBirth;
  }
  // more methods follow
}


Can you tell me what am I doing wrong?
thx
janos





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




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



Re: problem with example .TML

2008-04-22 Thread János Jarecsni
hi Filip,
and how to do that? could you include (inject :P) an example for that?
thx!
Janos

On 22/04/2008, Filip S. Adamsen <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> You can also put an @Inject annotation on the constructor you want
> Tapestry to use when auto-instantiating your class. This way you can have
> multiple constructors.
>
> -Filip
>
> János Jarecsni skrev:
>
> > Hi Michael,
> >
> > I googled for this problem and found a response to a similar problem
> > from
> > you. I followed the instructions there, and succeeded. (I had to remove
> > the
> > constructor which takes arguments! from the Celebrity class - until
> > there
> > was this ctr besides the no-arg, it still tried to use it, no matter
> > what
> > the model wanted to do).
> >
> > Now the beaneditor call is like this:
> >
> >
> >
> >
> >
> > Thx!
> > Janos
> > PS: I used this info:
> > http://www.nabble.com/T5.0.11-beanEditForm-td16536531.html
> >
> >
> >
> > On 22/04/2008, János Jarecsni <[EMAIL PROTECTED]> wrote:
> >
> > > Hi Michael,
> > >
> > > I had a look... but it does not make too much sense for me :) Where do
> > > I
> > > use model.remove() now? Or do you mean I should change the remove
> > > attribute
> > > in
> > >
> > >   > >   remove="id"
> > >
> > > to exclude="id"? (I tried even this, but nothing changed).
> > >
> > > As far as I see this, there is some complain about no service
> > > implementing
> > > java.util.Date (whatever that should mean). It is obviously trying to
> > > instantiate a model class to use for bean editing. This worked so far,
> > > now
> > > it can't instantiate.
> > >
> > > thx!
> > > janos
> > >
> > > On 22/04/2008, Michael Gerzabek <[EMAIL PROTECTED]> wrote:
> > >
> > > > Hi Janos,
> > > >
> > > > take a look at the upgrade notes. Close to the bottom the change of
> > > > the
> > > > BeanModel signature is documented. Now you need mode.exlude(..)
> > > > instead of
> > > > model.remove(..).
> > > >
> > > > Regards,
> > > > Michael
> > > >
> > > > [1] http://tapestry.apache.org/tapestry5/tapestry-core/upgrade.html
> > > >
> > > > János Jarecsni schrieb:
> > > >
> > > >  Hi,
> > > > >
> > > > > I have upgraded from 5.0.10 to 5.0.11 and a .TML which worked
> > > > > before
> > > > > now
> > > > > throws this:
> > > > >
> > > > > An unexpected application exception has occurred.
> > > > >
> > > > > 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:18) (for service 'BeanModelSource'): No service
> > > > > implements the interface java.util.Date.
> > > > >
> > > > > The .TML code:
> > > > >
> > > > > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
> > > > >   
> > > > >   Celebrity Collector: Adding New Celebrity
> > > > >   
> > > > >   
> > > > >   
> > > > >   Adding New Celebrity
> > > > >
> > > > >> > > >   remove="id"
> > > > >
> > > > >
> > > > >
> > > > > reorder="firstName,lastName,dateOfBirth,birthDateVerified,occupation,biography">
> > > > >   
> > > > >   
> > > > >> > > > t:value="celebrity.biography"
> > > > >   t:toolbarSet="Medium" t:width="350"
> > > > > t:height="200"/>
> > > > >   
> > > > > 
> > > > >   
> > > > >   
> > > > > 
> > > > > and the model class (Celebrity):
> > > > >
> > > > > package com.packtpub.celebrities.model;
> > > > >
> > > > > import java.util.Date;
> > > > >
> > > > > public class Celebrity {
> > > > >   private Date dateOfBirth;
> > > > >   // some fields omitted
> > > > >
> > > > >   public Celebrity() {
> > > > >   }
> > > > >
> > > > >   public Celebrity(String firstName, String lastName,
> > > > >   Date dateOfBirth, Occupation occupation) {
> > > > >   this.firstName = firstName;
> > > > >   this.lastName = lastName;
> > > > >   this.dateOfBirth = dateOfBirth;
> > > > >   this.occupation = occupation;
> > > > >   }
> > > > >
> > > > >   public Date getDateOfBirth() {
> > > > >   return dateOfBirth;
> > > > >   }
> > > > >
> > > > >   public void setDateOfBirth(Date dateOfBirth) {
> > > > >   this.dateOfBirth = dateOfBirth;
> > > > >   }
> > > > >   // more methods follow
> > > > > }
> > > > >
> > > > >
> > > > > Can you tell me what am I doing wrong?
> > > > > thx
> > > > > janos
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > > -
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > > >
> -
> To unsubscribe, e-mail

Re: problem with example .TML

2008-04-22 Thread Filip S. Adamsen

Hi,

You can also put an @Inject annotation on the constructor you want 
Tapestry to use when auto-instantiating your class. This way you can 
have multiple constructors.


-Filip

János Jarecsni skrev:

Hi Michael,

I googled for this problem and found a response to a similar problem from
you. I followed the instructions there, and succeeded. (I had to remove the
constructor which takes arguments! from the Celebrity class - until there
was this ctr besides the no-arg, it still tried to use it, no matter what
the model wanted to do).

Now the beaneditor call is like this:





Thx!
Janos
PS: I used this info:
http://www.nabble.com/T5.0.11-beanEditForm-td16536531.html



On 22/04/2008, János Jarecsni <[EMAIL PROTECTED]> wrote:

Hi Michael,

I had a look... but it does not make too much sense for me :) Where do I
use model.remove() now? Or do you mean I should change the remove attribute
in

  wrote:

Hi Janos,

take a look at the upgrade notes. Close to the bottom the change of the
BeanModel signature is documented. Now you need mode.exlude(..) instead of
model.remove(..).

Regards,
Michael

[1] http://tapestry.apache.org/tapestry5/tapestry-core/upgrade.html

János Jarecsni schrieb:


Hi,

I have upgraded from 5.0.10 to 5.0.11 and a .TML which worked before
now
throws this:

An unexpected application exception has occurred.

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:18) (for service 'BeanModelSource'): No service
implements the interface java.util.Date.

The .TML code:

http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
   
   Celebrity Collector: Adding New Celebrity
   
   
   
   Adding New Celebrity

   
   
   
   
   
 
   
   

and the model class (Celebrity):

package com.packtpub.celebrities.model;

import java.util.Date;

public class Celebrity {
   private Date dateOfBirth;
   // some fields omitted

   public Celebrity() {
   }

   public Celebrity(String firstName, String lastName,
   Date dateOfBirth, Occupation occupation) {
   this.firstName = firstName;
   this.lastName = lastName;
   this.dateOfBirth = dateOfBirth;
   this.occupation = occupation;
   }

   public Date getDateOfBirth() {
   return dateOfBirth;
   }

   public void setDateOfBirth(Date dateOfBirth) {
   this.dateOfBirth = dateOfBirth;
   }
   // more methods follow
}


Can you tell me what am I doing wrong?
thx
janos





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



Re: problem with example .TML

2008-04-22 Thread János Jarecsni
Hi Michael,

I googled for this problem and found a response to a similar problem from
you. I followed the instructions there, and succeeded. (I had to remove the
constructor which takes arguments! from the Celebrity class - until there
was this ctr besides the no-arg, it still tried to use it, no matter what
the model wanted to do).

Now the beaneditor call is like this:





Thx!
Janos
PS: I used this info:
http://www.nabble.com/T5.0.11-beanEditForm-td16536531.html



On 22/04/2008, János Jarecsni <[EMAIL PROTECTED]> wrote:
>
> Hi Michael,
>
> I had a look... but it does not make too much sense for me :) Where do I
> use model.remove() now? Or do you mean I should change the remove attribute
> in
>
>  remove="id"
>
> to exclude="id"? (I tried even this, but nothing changed).
>
> As far as I see this, there is some complain about no service implementing
> java.util.Date (whatever that should mean). It is obviously trying to
> instantiate a model class to use for bean editing. This worked so far, now
> it can't instantiate.
>
> thx!
> janos
>
> On 22/04/2008, Michael Gerzabek <[EMAIL PROTECTED]> wrote:
> >
> > Hi Janos,
> >
> > take a look at the upgrade notes. Close to the bottom the change of the
> > BeanModel signature is documented. Now you need mode.exlude(..) instead of
> > model.remove(..).
> >
> > Regards,
> > Michael
> >
> > [1] http://tapestry.apache.org/tapestry5/tapestry-core/upgrade.html
> >
> > János Jarecsni schrieb:
> >
> > > Hi,
> > >
> > > I have upgraded from 5.0.10 to 5.0.11 and a .TML which worked before
> > > now
> > > throws this:
> > >
> > > An unexpected application exception has occurred.
> > >
> > > 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:18) (for service 'BeanModelSource'): No service
> > > implements the interface java.util.Date.
> > >
> > > The .TML code:
> > >
> > > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
> > >
> > >Celebrity Collector: Adding New Celebrity
> > >
> > >
> > >
> > >Adding New Celebrity
> > >
> > > > >remove="id"
> > >
> > >
> > > reorder="firstName,lastName,dateOfBirth,birthDateVerified,occupation,biography">
> > >
> > >
> > > > > t:value="celebrity.biography"
> > >t:toolbarSet="Medium" t:width="350"
> > > t:height="200"/>
> > >
> > >  
> > >
> > >
> > > 
> > > and the model class (Celebrity):
> > >
> > > package com.packtpub.celebrities.model;
> > >
> > > import java.util.Date;
> > >
> > > public class Celebrity {
> > >private Date dateOfBirth;
> > >// some fields omitted
> > >
> > >public Celebrity() {
> > >}
> > >
> > >public Celebrity(String firstName, String lastName,
> > >Date dateOfBirth, Occupation occupation) {
> > >this.firstName = firstName;
> > >this.lastName = lastName;
> > >this.dateOfBirth = dateOfBirth;
> > >this.occupation = occupation;
> > >}
> > >
> > >public Date getDateOfBirth() {
> > >return dateOfBirth;
> > >}
> > >
> > >public void setDateOfBirth(Date dateOfBirth) {
> > >this.dateOfBirth = dateOfBirth;
> > >}
> > >// more methods follow
> > > }
> > >
> > >
> > > Can you tell me what am I doing wrong?
> > > thx
> > > janos
> > >
> > >
> > >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>


Re: problem with example .TML

2008-04-21 Thread János Jarecsni
Hi Michael,

I had a look... but it does not make too much sense for me :) Where do I use
model.remove() now? Or do you mean I should change the remove attribute in

  wrote:
>
> Hi Janos,
>
> take a look at the upgrade notes. Close to the bottom the change of the
> BeanModel signature is documented. Now you need mode.exlude(..) instead of
> model.remove(..).
>
> Regards,
> Michael
>
> [1] http://tapestry.apache.org/tapestry5/tapestry-core/upgrade.html
>
> János Jarecsni schrieb:
>
> > Hi,
> >
> > I have upgraded from 5.0.10 to 5.0.11 and a .TML which worked before now
> > throws this:
> >
> > An unexpected application exception has occurred.
> >
> > 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:18) (for service 'BeanModelSource'): No service
> > implements the interface java.util.Date.
> >
> > The .TML code:
> >
> > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
> >
> >Celebrity Collector: Adding New Celebrity
> >
> >
> >
> >Adding New Celebrity
> >
> > >remove="id"
> >
> >
> > reorder="firstName,lastName,dateOfBirth,birthDateVerified,occupation,biography">
> >
> >
> > > t:value="celebrity.biography"
> >t:toolbarSet="Medium" t:width="350"
> > t:height="200"/>
> >
> >  
> >
> >
> > 
> > and the model class (Celebrity):
> >
> > package com.packtpub.celebrities.model;
> >
> > import java.util.Date;
> >
> > public class Celebrity {
> >private Date dateOfBirth;
> >// some fields omitted
> >
> >public Celebrity() {
> >}
> >
> >public Celebrity(String firstName, String lastName,
> >Date dateOfBirth, Occupation occupation) {
> >this.firstName = firstName;
> >this.lastName = lastName;
> >this.dateOfBirth = dateOfBirth;
> >this.occupation = occupation;
> >}
> >
> >public Date getDateOfBirth() {
> >return dateOfBirth;
> >}
> >
> >public void setDateOfBirth(Date dateOfBirth) {
> >this.dateOfBirth = dateOfBirth;
> >}
> >// more methods follow
> > }
> >
> >
> > Can you tell me what am I doing wrong?
> > thx
> > janos
> >
> >
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: problem with example .TML

2008-04-21 Thread Michael Gerzabek

Hi Janos,

take a look at the upgrade notes. Close to the bottom the change of the 
BeanModel signature is documented. Now you need mode.exlude(..) instead 
of model.remove(..).


Regards,
Michael

[1] http://tapestry.apache.org/tapestry5/tapestry-core/upgrade.html

János Jarecsni schrieb:

Hi,

I have upgraded from 5.0.10 to 5.0.11 and a .TML which worked before now
throws this:

An unexpected application exception has occurred.

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:18) (for service 'BeanModelSource'): No service
implements the interface java.util.Date.

The .TML code:

http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>

Celebrity Collector: Adding New Celebrity



Adding New Celebrity






  



and the model class (Celebrity):

package com.packtpub.celebrities.model;

import java.util.Date;

public class Celebrity {
private Date dateOfBirth;
// some fields omitted

public Celebrity() {
}

public Celebrity(String firstName, String lastName,
Date dateOfBirth, Occupation occupation) {
this.firstName = firstName;
this.lastName = lastName;
this.dateOfBirth = dateOfBirth;
this.occupation = occupation;
}

public Date getDateOfBirth() {
return dateOfBirth;
}

public void setDateOfBirth(Date dateOfBirth) {
this.dateOfBirth = dateOfBirth;
}
// more methods follow
}


Can you tell me what am I doing wrong?
thx
janos

  



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



problem with example .TML

2008-04-21 Thread János Jarecsni
Hi,

I have upgraded from 5.0.10 to 5.0.11 and a .TML which worked before now
throws this:

An unexpected application exception has occurred.

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:18) (for service 'BeanModelSource'): No service
implements the interface java.util.Date.

The .TML code:

http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>

Celebrity Collector: Adding New Celebrity



Adding New Celebrity






  



and the model class (Celebrity):

package com.packtpub.celebrities.model;

import java.util.Date;

public class Celebrity {
private Date dateOfBirth;
// some fields omitted

public Celebrity() {
}

public Celebrity(String firstName, String lastName,
Date dateOfBirth, Occupation occupation) {
this.firstName = firstName;
this.lastName = lastName;
this.dateOfBirth = dateOfBirth;
this.occupation = occupation;
}

public Date getDateOfBirth() {
return dateOfBirth;
}

public void setDateOfBirth(Date dateOfBirth) {
this.dateOfBirth = dateOfBirth;
}
// more methods follow
}


Can you tell me what am I doing wrong?
thx
janos