2016-12-02 5 views

答えて

0

これを解決するには、Descriptorのconfigure()メソッドをオーバーライドします。 コードは次のようになります...

@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; 
    } 
} 
関連する問題