ExtJS 4.2.1
및 Spring MVC/Data-Rest
을 사용하고 있습니다. 어쨌든, 데이터 나머지는 성공적인 GET
요청에 다음과 같은 구조를 반환합니다PUT 요청에서 ExtJS 4.2.1이 totalProperty를 처리하지 못하도록하려면 어떻게해야합니까?
{
content: [ ... objects .... ],
links: [ ... list of rel links ... ],
page: {
size: 25,
totalElements: 4,
totalPages: 1,
number: 1
}
}
그래서, 내 프록시에, 나는 page.totalElements
에 totalProperty
을 설정했습니다. 훌륭하게 작동합니다.
그러나 우리가 PUT
요청을 보내면 자연스러운 응답 (정확한 답변)은 204 NO CONTENT
입니다. 이제 totalProperty
을 total
(예 : page.xxx
)으로 설정하면 문제가 없습니다. 그러나 ExtJS는 을 구문 분석하고 page
이 null이기 때문에 예외를 반환하려고합니다.
그렇다면 ExtJS가 PUT 요청의 totalProperty를 무시하도록 어떻게 할 수 있습니까?
수정 : http://www.sencha.com/forum/showthread.php?274536-JsonReader-crashes-when-load-has-no-data - and - root-is-undefined – Ricardo