Hi, thank you Thiago.. the code is this:

public class CreateMunicipio
{

        @Property
        private Municipio municipio;

        @Inject
        private Session session;
        

        @CommitAfter
        Object onSuccess()
        {
                session.persist(municipio);
                return "";
        }


}

This is the CreateMunicipio.tml

<html t:type="login" title="ICMSPrev Index"
      t:sidebarTitle="Framework Version"
      xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd";>
     
     <t:beaneditform object="municipio"/>
     
</html>


This is my entity:


@Entity
public class Municipio {
        //private static final long serialVersionUID = 1L;

        @Id
        @GeneratedValue(strategy = GenerationType.IDENTITY)
        private int idMunicipio;

        private String bairro;

        private String cep;

        private String cnpj;

        private String complemento;

        private String email;

    @Temporal( TemporalType.DATE)
        private Date mandatoAte;

        private String nomePref;

        private String numero;

        private String rua;

        private String senha;


        public int getIdMunicipio() {
                return this.idMunicipio;
        }

        public void setIdMunicipio(int idMunicipio) {
                this.idMunicipio = idMunicipio;
        }

        public String getBairro() {
                return this.bairro;
        }

        public void setBairro(String bairro) {
                this.bairro = bairro;
        }

        public String getCep() {
                return this.cep;
        }

        public void setCep(String cep) {
                this.cep = cep;
        }

        public String getCnpj() {
                return this.cnpj;
        }

        public void setCnpj(String cnpj) {
                this.cnpj = cnpj;
        }

        public String getComplemento() {
                return this.complemento;
        }

        public void setComplemento(String complemento) {
                this.complemento = complemento;
        }

        public String getEmail() {
                return this.email;
        }

        public void setEmail(String email) {
                this.email = email;
        }

        public Date getMandatoAte() {
                return this.mandatoAte;
        }

        public void setMandatoAte(Date mandatoAte) {
                this.mandatoAte = mandatoAte;
        }

        public String getNomePref() {
                return this.nomePref;
        }

        public void setNomePref(String nomePref) {
                this.nomePref = nomePref;
        }

        public String getNumero() {
                return this.numero;
        }

        public void setNumero(String numero) {
                this.numero = numero;
        }

        public String getRua() {
                return this.rua;
        }

        public void setRua(String rua) {
                this.rua = rua;
        }

        public String getSenha() {
                return this.senha;
        }

        public void setSenha(String senha) {
                this.senha = senha;
        }

}

When I try to run it.. my object municipio is null in CreateMunicipio.class
why ? I'm filling it in my beaneditor page.

Best regards



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Beaneditor-sending-null-object-tp5115312p5117326.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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

Reply via email to