fix the bug load filter type failed

This commit is contained in:
hmm 2014-09-17 08:57:00 +08:00
parent b1d0f3eb1d
commit 755ac2db3c
4 changed files with 29 additions and 90 deletions

View File

@ -4,6 +4,8 @@ import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
public class ScriptFilterModel {
private boolean success;
private String failCause;
private String[] filterTypeList;
public String[] getFilterTypeList() {
@ -19,5 +21,22 @@ public class ScriptFilterModel {
public ScriptFilterModel(String[] filterTypeList) {
this.filterTypeList = filterTypeList;
this.success = true;
}
public boolean isSuccess() {
return success;
}
public void setSuccess(boolean success) {
this.success = success;
}
public String getFailCause() {
return failCause;
}
public void setFailCause(String failCause) {
this.failCause = failCause;
}
}

View File

@ -420,7 +420,12 @@ public class ScriptController extends BaseController {
ScriptFilterModel responseModel = this.getScriptMessager()
.loadFilterTypeList(accessToken);
Map<String, Object> map = new HashMap<String, Object>();
if(responseModel.isSuccess()){
map.put("filterTypeList", responseModel.getFilterTypeList());
success(map);
}else{
fail(map, responseModel.getFailCause());
}
return map;
}
}

View File

@ -243,7 +243,10 @@ public class ScriptMessager extends MasterMessager {
ScriptFilterModel.class, httpResponse.getContent());
} catch (Exception e) {
this.handleException(httpResponse, e);
return new ScriptFilterModel();
ScriptFilterModel scriptFilterModel = new ScriptFilterModel();
scriptFilterModel.setSuccess(false);
scriptFilterModel.setFailCause(e.getMessage());
return scriptFilterModel;
}
}
}

View File

@ -1,88 +0,0 @@
.table-body {
overflow-y: auto;
max-height: 400px;
padding: 15px;
}
.marginButton{
margin-left:10px;
margin-right:10px;
}
.div-distance{
margin-top:30px;
}
.nextButton{
margin-top:20px;
margin-left:auto;
margin-right:auto;
width:100px;
}
.hide{
display:none;
}
.right{
font-size:13px;
}
.ip-div{
margin-top:10px;
margin-bottom:10px;
margin-left:auto;
margin-right:auto;
width:300px;
}
.ip-lable{
padding-right:5px;
}
.left{
float:left;
}
.right{
float:right;
}
.nameInput{
margin-top : 30px;
margin-left:200px;
}
.message-left{
font-size:20px;
text-align:center;
width:32%;
height:168px;
float:left;
}
.message-right{
padding-left: 8px;
padding-top:8px;
text-align:left;
float: right;
width: 65%;
height:160px;
font-size:13px;
}
.xmlName_background{
font-size:15px;
border:medium double black;
}
.text-left{
text-align:left;
}
.text-right{
text-align:right;
}
.frameBodyNav {height:46px;-moz-box-shadow:rgba(0,0,0,.3) 0 .3em .5em;-webkit-box-shadow:rgba(0,0,0,.3) 0 .3em .5em;
box-shadow:rgba(0,0,0,.3) 0 .3em .5em;-moz-border-top-left-radius: 8px;
-webkit-border-top-left-radius: 8px;-khtml-border-top-left-radius: 8px;-o-border-top-left-radius: 8px;border-top-left-radius: 8px;-moz-border-top-right-radius: 8px;-webkit-border-top-right-radius: 8px;-khtml-border-top-right-radius: 8px;-o-border-top-right-radius: 8px;
border-top-right-radius: 8px;background:#f2f2f2;border-top:.1em solid #fff;}