2016-12-02 3 views

Répondre

0

Je viens de résoudre ce problème en remplaçant la méthode configure() dans le descripteur. Le code ressemble à ...

@Extension 
public static final class DescriptorImpl extends BuildStepDescriptor<Builder>{ 
private String text; 
public DescriptorImpl(){ 
     load(); 
} 
    @Override 
    public boolean configure(StaplerRequest req, JSONObject json) throws hudson.model.Descriptor.FormException { 
     // TODO Auto-generated method stub 
     text = json.getString("text"); 
     req.bindJSON(this, json); 
     save(); 
     return super.configure(req, json); 
     //return true; 
    } 

    public String getText() { 
     return text; 
    } 

    public void setText(String text) { 
     this.text = text; 
    } 
}