기본 콘텐츠로 건너뛰기
검색
이 블로그 검색
불친절한자수씨
자수씨의 보물창고
페이지
홈
더보기…
공유
공유 링크 만들기
Facebook
X
Pinterest
이메일
기타 앱
태그
Google
3월 27, 2008
[gwt-ext] store 사용시에 json을 이용할 경우 proxy 오류가 나는 경우...
store 사용시에 json을 이용할 경우 proxy 오류가 나는 경우에
Ext.data.Store 클래스의 load 메소드에서 오류가 발생합니다.
해결할 수 있는 방법은 다음과 같습니다.
more..
patch.js 를 만들고 html 에서 ext-all.js 뒤에 추가합니다.
Listing.1 [module].html
...
<script type="text/javascript" src="js/ext/ext-all.js"></script>
<script type="text/javascript" src="js/ext-patch.js"></script>
...
Listing.2 ext-patch.js
Ext.data.Store.prototype.load = function(B){
B = B || {};
if (this.fireEvent("beforeload", this, B) !== false) {
this.storeOptions(B);
var C = Ext.apply(B.params ||
{}, this.baseParams);
if (this.sortInfo && this.remoteSort) {
var A = this.paramNames;
C[A["sort"]] = this.sortInfo.field;
C[A["dir"]] = this.sortInfo.direction
}
if (this.proxy) {
this.proxy.load(C, this.reader, this.loadRecords, this, B);
}
return true
}
else {
return false
}
};
json 으로 store 를 load 할 경우 proxy 는 undefined 이기 때문에 위와 같이 수정하시면
오류 없이 사용할 수 있습니다.
댓글
가장 많이 본 글
1월 17, 2013
[for신규가입자] 카페 가입시 30%할인쿠폰 전원 지급!
댓글
댓글 쓰기