1

I'm not able to retreive my Model in my JSP to update the object.

public class ViewDashboardAction extends ActionSupport implements ModelDriven {
private Clinique clinique = null;

@Override
    public Clinique getModel() {
        return clinique;
    }

    public String execute() throws Exception {

        clinique = service.read(1);

        // at this point my object is populated

        return SUCCESS;
    }

in my JSP I want to have something that simple

<s:textfield name="nom" key="clinique.nom" value="nom"></s:textfield>

but my textfield is always blank.

What I'm missing ?

Matt
  • 74,352
  • 26
  • 153
  • 180
Sebastien Dionne
  • 757
  • 2
  • 19
  • 34

1 Answers1

1

try this

private Clinique clinique = new Clinique();

@Override
    public Object getModel() {
        return clinique;
    }


public void setClinique(Clinique clinique ){
   this.clinique =clinique ;
}

public Clinique getClinique(){
   return clinique ;
}
Umesh Awasthi
  • 23,407
  • 37
  • 132
  • 204