0
RPC를 사용하여 데이터베이스에서 검색 한 날짜를 기반으로 차트를 그려야합니다.gwt-RPC 문제! gwt-RPC를 사용하는 가장 좋은 방법은 무엇입니까?
하지만 결과를 얻지 못할 때마다. 내 rpc 기능이 작동 중입니다.
나는이 과정의 순서라고 생각한다. GWT의 RPC가 비동기
public class TrafficPattern_1 extends GChart {
TrafficPattern_1() {
final DBServiceAsync dbService = GWT
.create(DBService.class);
dbService.SendData(null, null,
new AsyncCallback<Container_TrafficPattern>() {
@Override
public void onFailure(Throwable caught) {
}
@Override
public void onSuccess(Container_TrafficPattern result) {
// TODO Auto-generated method stub
pContainer.SetaDate(result.aDate.get(1));
}
});
pContainer.aDate.get(0);
setChartSize(350, 200);
setChartTitle("<h2>Temperature vs Time<h2>");
setPadding("8px");
//setPixelSize(380, 200);
getXAxis().setAxisLabel("<small><b><i>Time</i></b></small>");
getXAxis().setHasGridlines(true);
getXAxis().setTickCount(6);
// Except for "=(Date)", a standard GWT DateTimeFormat string
getXAxis().setTickLabelFormat("=(Date)h:mm a");
getYAxis().setAxisLabel("<small><b><i>°C</i></b></small>");
getYAxis().setHasGridlines(true);
getYAxis().setTickCount(11);
getYAxis().setAxisMin(11);
getYAxis().setAxisMax(16);
addCurve();
getCurve().setLegendLabel("<i> </i>");
getCurve().getSymbol().setBorderColor("blue");
getCurve().getSymbol().setBackgroundColor("blue");
// getCurve().getSymbol().setFillSpacing(10);
// getCurve().getSymbol().setFillThickness(3);
getCurve().getSymbol().setSymbolType(SymbolType.LINE);
getCurve().getSymbol().setFillThickness(2);
getCurve().getSymbol().setFillSpacing(1);
for (int i = 0; i < dateSequence.length; i++)
// Note that getTime() returns milliseconds since
// 1/1/70--required whenever "date cast" tick label
// formats (those beginning with "=(Date)") are used.
getCurve().addPoint(dateSequence[i].date.getTime(),
dateSequence[i].value);
}
자세한 내용을 추가하십시오. 귀하의 질문 중 하나는 실제 문제를 이해할 수 없습니다. 정확히 작동하지 않는 것은 무엇입니까? 예외가 발생합니까? ... – Juri
pContainer.aDate.get (0)을 호출하면 오류가 발생합니다. pContainer.aDate.get (0)에 2 개의 중단 점 1을 넣고 RPC 함수 내에 또 다른 중단 점 1을 넣습니다. 나는 그것이 pContainer.aDate.get (0) 1 위를 달리는 것을 알았다. 그래서 데이터를 가져올 수 없습니다. – guaz