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 <[EMAIL PROTECTED]>
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to