Remove Dyntable's use of canned RPC responses in favor of using the real RPC servlet.
Patch by: bobv
Review by: jgw
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@1320 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/samples/dynatable/src/com/google/gwt/sample/dynatable/client/SchoolCalendarWidget.java b/samples/dynatable/src/com/google/gwt/sample/dynatable/client/SchoolCalendarWidget.java
index 51a2e8f..c2734de 100644
--- a/samples/dynatable/src/com/google/gwt/sample/dynatable/client/SchoolCalendarWidget.java
+++ b/samples/dynatable/src/com/google/gwt/sample/dynatable/client/SchoolCalendarWidget.java
@@ -73,22 +73,7 @@
}
}
- // Decide where to get the data.
- // This is very unusual. Normally, you'd set the service entry point
- // only once. But since this demo runs without servlet support, we
- // play a game with URLs to fetch canned RPC responses from static files.
- // So, as you might guess, this is really fragile: changing the number
- // of visible rows in the table will cause different batch sizes, and
- // the URL naming trick below will *definitely* break.
- //
- if (USE_STATIC_RPC_ANSWERS) {
- ServiceDefTarget target = (ServiceDefTarget) calService;
- String staticResponseURL = GWT.getModuleBaseURL();
- staticResponseURL += "calendar" + startRow + ".txt";
- target.setServiceEntryPoint(staticResponseURL);
- }
-
- // Actually fetch the data remotely.
+ // Fetch the data remotely.
//
calService.getPeople(startRow, maxRows, new AsyncCallback() {
public void onFailure(Throwable caught) {
@@ -120,8 +105,6 @@
}
}
- private static final boolean USE_STATIC_RPC_ANSWERS = true;
-
private final CalendarProvider calProvider = new CalendarProvider();
private final boolean[] daysFilter = new boolean[] {
diff --git a/samples/dynatable/src/com/google/gwt/sample/dynatable/public/calendar0.txt b/samples/dynatable/src/com/google/gwt/sample/dynatable/public/calendar0.txt
deleted file mode 100644
index c7ecfd5..0000000
--- a/samples/dynatable/src/com/google/gwt/sample/dynatable/public/calendar0.txt
+++ /dev/null
@@ -1 +0,0 @@
-//OK[31,9,2,990,1040,5,1,4,3,2,30,29,5,750,800,5,3,615,665,5,2,735,785,5,1,855,905,5,4,4,3,2,28,22,5,585,635,5,3,885,935,5,2,480,530,5,1,705,755,5,1,600,650,5,5,4,3,2,27,26,3,855,905,5,1,4,3,19,25,24,5,915,965,5,3,555,605,5,1,750,800,5,1,690,740,5,4,4,3,2,23,22,5,915,965,5,5,705,755,5,4,1005,1055,5,3,675,725,5,2,780,830,5,5,4,3,2,21,20,5,795,845,5,4,720,770,5,3,870,920,5,2,975,1025,5,2,945,995,5,5,4,3,19,18,17,2,540,590,5,2,480,530,5,2,4,3,2,16,11,5,540,590,5,3,660,710,5,2,915,965,5,2,735,785,5,2,600,650,5,5,4,3,2,15,9,5,930,980,5,5,705,755,5,2,4,3,2,14,13,4,570,620,5,2,930,980,5,2,855,905,5,2,780,830,5,1,795,845,5,5,4,3,2,12,11,4,555,605,5,3,870,920,5,2,735,785,5,1,840,890,5,1,495,545,5,5,4,3,2,10,9,5,555,605,5,4,675,725,5,1,990,1040,5,3,4,3,2,8,6,5,570,620,5,4,795,845,5,4,570,620,5,3,4,3,2,7,6,5,585,635,5,5,525,575,5,2,855,905,5,1,585,635,5,4,4,3,2,15,1,["[Lcom.google.gwt.sample.dynatable.client.Person;/3476209936","com.google.gwt.sample.dynatable.client.Student/1403480330","com.google.gwt.sample.dynatable.client.Schedule/1023786527","java.util.ArrayList/3821976829","com.google.gwt.sample.dynatable.client.TimeSlot/1821972171","Majoring in Phrenology","Inman Mendez","Barney Crutcher","Majoring in Geometry","Omar Smith","Majoring in Basketball","Eddie Edelstein","Majoring in Chemistry","Cathy Mendez","Eddie Epps","Teddy Gibbs","Majoring in Underwater Basket Weaving","Barney Wilson","com.google.gwt.sample.dynatable.client.Professor/1464158370","Professor of English Literature","Dr. Carlos Epps","Majoring in Geology","Carlos Edelstein","Majoring in English Literature","Teddy Chase","Professor of Basketball","Dr. Eddie Wilson","Carlos Needler","Majoring in Computer Science","Inman Gibbs","Cathy Needler"],0,2]
diff --git a/samples/dynatable/src/com/google/gwt/sample/dynatable/public/calendar15.txt b/samples/dynatable/src/com/google/gwt/sample/dynatable/public/calendar15.txt
deleted file mode 100644
index 756cea8..0000000
--- a/samples/dynatable/src/com/google/gwt/sample/dynatable/public/calendar15.txt
+++ /dev/null
@@ -1 +0,0 @@
-//OK[27,8,1,1005,1055,5,1,4,3,2,27,10,3,915,965,5,1,630,680,5,2,4,3,2,26,16,3,750,800,5,1,750,800,5,2,4,3,2,25,24,5,600,650,5,3,960,1010,5,2,4,3,2,23,22,4,900,950,5,3,750,800,5,2,4,3,2,11,16,2,735,785,5,1,4,3,2,21,8,4,1005,1055,5,1,4,3,2,20,8,5,780,830,5,1,4,3,2,19,18,5,915,965,5,5,705,755,5,4,870,920,5,2,855,905,5,1,1005,1055,5,5,4,3,2,17,16,4,990,1040,5,1,4,3,2,15,10,4,1005,1055,5,4,765,815,5,3,540,590,5,2,735,785,5,1,945,995,5,5,4,3,2,14,13,5,735,785,5,5,630,680,5,4,585,635,5,4,510,560,5,1,1005,1055,5,5,4,3,12,11,10,4,990,1040,5,1,540,590,5,2,4,3,2,9,8,1,840,890,5,1,690,740,5,2,4,3,2,7,6,3,570,620,5,1,4,3,2,15,1,["[Lcom.google.gwt.sample.dynatable.client.Person;/3476209936","com.google.gwt.sample.dynatable.client.Student/1403480330","com.google.gwt.sample.dynatable.client.Schedule/1023786527","java.util.ArrayList/3821976829","com.google.gwt.sample.dynatable.client.TimeSlot/1821972171","Majoring in Phrenology","Fred Mendez","Majoring in Computer Science","Barney Webber","Majoring in English Literature","Barney Blum","com.google.gwt.sample.dynatable.client.Professor/1464158370","Professor of Materials Engineering","Dr. Fred Wilson","Barney Jones","Majoring in Underwater Basket Weaving","Sally Webber","Majoring in Geology","Omar Crutcher","Fred Needler","Omar Jones","Majoring in Basketball","Sally Edelstein","Majoring in Statistics","Jimmy Gibbs","Inman Crutcher","Barney Gibbs"],0,2]
diff --git a/samples/dynatable/src/com/google/gwt/sample/dynatable/public/calendar30.txt b/samples/dynatable/src/com/google/gwt/sample/dynatable/public/calendar30.txt
deleted file mode 100644
index a153324..0000000
--- a/samples/dynatable/src/com/google/gwt/sample/dynatable/public/calendar30.txt
+++ /dev/null
@@ -1 +0,0 @@
-//OK[30,20,3,990,1040,5,3,930,980,5,3,525,575,5,1,930,980,5,4,4,3,2,29,24,5,585,635,5,4,510,560,5,1,630,680,5,3,4,3,12,28,27,5,885,935,5,5,735,785,5,2,4,3,2,26,22,4,585,635,5,4,555,605,5,3,690,740,5,2,615,665,5,2,510,560,5,5,4,3,2,25,24,2,840,890,5,1,4,3,12,23,22,4,735,785,5,4,480,530,5,3,615,665,5,2,795,845,5,4,4,3,2,21,20,4,585,635,5,2,990,1040,5,2,780,830,5,3,4,3,2,19,18,5,780,830,5,4,855,905,5,2,585,635,5,2,585,635,5,4,4,3,2,17,16,5,525,575,5,4,795,845,5,3,510,560,5,2,540,590,5,4,4,3,2,15,8,5,570,620,5,1,4,3,2,14,13,1,840,890,5,1,4,3,12,11,8,5,810,860,5,5,645,695,5,2,4,3,2,10,6,3,615,665,5,1,4,3,2,9,8,5,555,605,5,4,735,785,5,2,4,3,2,7,6,5,885,935,5,4,720,770,5,2,780,830,5,3,4,3,2,15,1,["[Lcom.google.gwt.sample.dynatable.client.Person;/3476209936","com.google.gwt.sample.dynatable.client.Student/1403480330","com.google.gwt.sample.dynatable.client.Schedule/1023786527","java.util.ArrayList/3821976829","com.google.gwt.sample.dynatable.client.TimeSlot/1821972171","Majoring in Geology","Inman Gibbs","Majoring in Chemistry","Carlos Mendez","Inman Edelstein","Eddie Gibbs","com.google.gwt.sample.dynatable.client.Professor/1464158370","Professor of Materials Engineering","Dr. Jimmy Crutcher","Teddy Chase","Majoring in Statistics","Carlos Edelstein","Majoring in Underwater Basket Weaving","Cathy Chase","Majoring in Phrenology","Inman Crutcher","Majoring in Materials Engineering","Carlos Chase","Professor of Geology","Dr. Jimmy Gibbs","Omar Epps","Majoring in Computer Science","Cathy Smith","Dr. Barney Gibbs","Teddy Smith"],0,2]
diff --git a/samples/dynatable/src/com/google/gwt/sample/dynatable/public/calendar45.txt b/samples/dynatable/src/com/google/gwt/sample/dynatable/public/calendar45.txt
deleted file mode 100644
index bf06cb8..0000000
--- a/samples/dynatable/src/com/google/gwt/sample/dynatable/public/calendar45.txt
+++ /dev/null
@@ -1 +0,0 @@
-//OK[31,30,1,900,950,5,1,4,3,2,29,20,5,960,1010,5,1,4,3,2,28,22,1,750,800,5,1,4,3,2,27,26,5,480,530,5,1,4,3,2,25,19,5,765,815,5,4,840,890,5,4,495,545,5,4,495,545,5,1,855,905,5,5,4,3,2,24,9,2,960,1010,5,1,4,3,8,23,22,4,690,740,5,2,825,875,5,1,795,845,5,1,705,755,5,1,510,560,5,5,4,3,2,21,20,4,630,680,5,4,600,650,5,3,645,695,5,2,885,935,5,2,630,680,5,5,4,3,2,7,19,3,720,770,5,3,705,755,5,3,660,710,5,2,975,1025,5,1,600,650,5,5,4,3,2,18,17,4,990,1040,5,4,645,695,5,2,4,3,2,16,15,5,750,800,5,5,525,575,5,4,630,680,5,3,4,3,8,14,13,4,735,785,5,3,765,815,5,2,840,890,5,2,720,770,5,1,990,1040,5,5,4,3,8,12,11,5,525,575,5,5,495,545,5,4,615,665,5,2,630,680,5,2,525,575,5,5,4,3,8,10,9,4,555,605,5,3,825,875,5,3,735,785,5,3,525,575,5,2,600,650,5,5,4,3,8,7,6,5,645,695,5,4,750,800,5,1,660,710,5,3,4,3,2,15,1,["[Lcom.google.gwt.sample.dynatable.client.Person;/3476209936","com.google.gwt.sample.dynatable.client.Student/1403480330","com.google.gwt.sample.dynatable.client.Schedule/1023786527","java.util.ArrayList/3821976829","com.google.gwt.sample.dynatable.client.TimeSlot/1821972171","Majoring in English Literature","Cathy Blum","com.google.gwt.sample.dynatable.client.Professor/1464158370","Professor of Computer Science","Dr. Barney Crutcher","Professor of Phrenology","Dr. Teddy Mendez","Professor of Geology","Dr. Teddy Blum","Professor of Materials Engineering","Dr. Teddy Smith","Majoring in Chemistry","Omar Jones","Majoring in Statistics","Majoring in Geometry","Barney Jones","Majoring in Geology","Fred Wilson","Dr. Jimmy Blum","Fred Mendez","Majoring in Phrenology","Eddie Chase","Barney Wilson","Inman Mendez","Majoring in Computer Science","Inman Wilson"],0,2]
diff --git a/samples/dynatable/src/com/google/gwt/sample/dynatable/public/calendar60.txt b/samples/dynatable/src/com/google/gwt/sample/dynatable/public/calendar60.txt
deleted file mode 100644
index ac20db7..0000000
--- a/samples/dynatable/src/com/google/gwt/sample/dynatable/public/calendar60.txt
+++ /dev/null
@@ -1 +0,0 @@
-//OK[30,26,5,600,650,5,4,975,1025,5,4,750,800,5,2,570,620,5,4,4,3,2,29,21,4,495,545,5,2,825,875,5,1,975,1025,5,1,780,830,5,4,4,3,2,28,23,5,555,605,5,4,600,650,5,2,645,695,5,3,4,3,2,27,26,5,840,890,5,1,4,3,2,25,21,4,855,905,5,3,990,1040,5,1,795,845,5,3,4,3,2,24,23,4,990,1040,5,4,930,980,5,4,495,545,5,2,975,1025,5,1,765,815,5,5,4,3,2,22,21,5,780,830,5,5,660,710,5,5,660,710,5,3,4,3,2,20,19,5,795,845,5,5,495,545,5,3,885,935,5,2,675,725,5,4,4,3,2,18,10,5,480,530,5,2,825,875,5,2,645,695,5,2,645,695,5,2,555,605,5,5,4,3,2,17,6,5,870,920,5,5,495,545,5,2,4,3,2,16,15,2,690,740,5,2,630,680,5,2,480,530,5,1,570,620,5,1,510,560,5,5,4,3,14,13,12,3,645,695,5,2,690,740,5,2,495,545,5,1,975,1025,5,4,4,3,2,11,10,4,840,890,5,2,525,575,5,2,4,3,2,9,8,3,765,815,5,1,4,3,2,7,6,3,870,920,5,1,4,3,2,15,1,["[Lcom.google.gwt.sample.dynatable.client.Person;/3476209936","com.google.gwt.sample.dynatable.client.Student/1403480330","com.google.gwt.sample.dynatable.client.Schedule/1023786527","java.util.ArrayList/3821976829","com.google.gwt.sample.dynatable.client.TimeSlot/1821972171","Majoring in Computer Science","Teddy Jones","Majoring in Geometry","Eddie Wilson","Majoring in Phrenology","Fred Webber","Majoring in Geology","Inman Edelstein","com.google.gwt.sample.dynatable.client.Professor/1464158370","Professor of Geology","Dr. Jimmy Chase","Fred Mendez","Carlos Epps","Majoring in Materials Engineering","Eddie Webber","Majoring in Chemistry","Sally Gibbs","Majoring in English Literature","Inman Wilson","Cathy Edelstein","Majoring in Underwater Basket Weaving","Jimmy Webber","Carlos Smith","Jimmy Epps","Omar Chase"],0,2]
diff --git a/samples/dynatable/src/com/google/gwt/sample/dynatable/public/calendar75.txt b/samples/dynatable/src/com/google/gwt/sample/dynatable/public/calendar75.txt
deleted file mode 100644
index 36bc04f..0000000
--- a/samples/dynatable/src/com/google/gwt/sample/dynatable/public/calendar75.txt
+++ /dev/null
@@ -1 +0,0 @@
-//OK[31,30,3,735,785,5,3,645,695,5,2,795,845,5,3,4,3,2,29,28,4,975,1025,5,4,975,1025,5,3,780,830,5,3,570,620,5,3,540,590,5,5,4,3,10,27,25,4,795,845,5,3,600,650,5,2,585,635,5,1,675,725,5,4,4,3,2,26,25,5,555,605,5,3,750,800,5,2,4,3,2,24,6,5,960,1010,5,2,780,830,5,1,495,545,5,3,4,3,2,23,19,4,780,830,5,3,765,815,5,2,4,3,2,22,21,5,900,950,5,3,690,740,5,1,855,905,5,3,4,3,10,20,19,1,720,770,5,1,645,695,5,2,4,3,2,18,11,5,585,635,5,4,885,935,5,3,855,905,5,1,990,1040,5,1,975,1025,5,5,4,3,10,17,13,4,585,635,5,3,720,770,5,2,4,3,2,16,15,2,945,995,5,1,4,3,2,14,13,5,555,605,5,3,735,785,5,3,690,740,5,2,750,800,5,4,4,3,2,12,11,3,720,770,5,1,675,725,5,2,4,3,10,9,8,2,780,830,5,1,4,3,2,7,6,3,585,635,5,2,540,590,5,2,4,3,2,15,1,["[Lcom.google.gwt.sample.dynatable.client.Person;/3476209936","com.google.gwt.sample.dynatable.client.Student/1403480330","com.google.gwt.sample.dynatable.client.Schedule/1023786527","java.util.ArrayList/3821976829","com.google.gwt.sample.dynatable.client.TimeSlot/1821972171","Majoring in Basketball","Cathy Chase","Majoring in Geology","Teddy Chase","com.google.gwt.sample.dynatable.client.Professor/1464158370","Professor of Underwater Basket Weaving","Dr. Barney Smith","Majoring in English Literature","Cathy Mendez","Majoring in Statistics","Sally Needler","Barney Epps","Dr. Jimmy Smith","Majoring in Computer Science","Sally Edelstein","Professor of Computer Science","Dr. Teddy Crutcher","Jimmy Webber","Omar Blum","Majoring in Chemistry","Sally Gibbs","Inman Crutcher","Professor of Geology","Dr. Carlos Blum","Majoring in Geometry","Barney Crutcher"],0,2]
diff --git a/samples/dynatable/src/com/google/gwt/sample/dynatable/public/calendar90.txt b/samples/dynatable/src/com/google/gwt/sample/dynatable/public/calendar90.txt
deleted file mode 100644
index 9ecbf89..0000000
--- a/samples/dynatable/src/com/google/gwt/sample/dynatable/public/calendar90.txt
+++ /dev/null
@@ -1 +0,0 @@
-//OK[24,10,5,720,770,5,2,960,1010,5,2,615,665,5,1,705,755,5,4,4,3,2,23,22,4,600,650,5,3,690,740,5,2,840,890,5,2,705,755,5,2,600,650,5,5,4,3,21,20,19,4,735,785,5,3,945,995,5,2,780,830,5,3,4,3,2,18,17,5,975,1025,5,3,885,935,5,3,525,575,5,1,660,710,5,4,4,3,2,16,15,5,825,875,5,3,825,875,5,2,705,755,5,3,4,3,2,14,13,4,540,590,5,3,765,815,5,3,660,710,5,3,570,620,5,1,735,785,5,5,4,3,2,12,10,5,810,860,5,4,600,650,5,2,4,3,2,11,10,5,810,860,5,5,480,530,5,3,855,905,5,3,570,620,5,1,525,575,5,5,4,3,2,9,8,5,855,905,5,2,870,920,5,1,975,1025,5,1,840,890,5,1,585,635,5,5,4,3,2,7,6,4,660,710,5,3,615,665,5,2,4,3,2,10,1,["[Lcom.google.gwt.sample.dynatable.client.Person;/3476209936","com.google.gwt.sample.dynatable.client.Student/1403480330","com.google.gwt.sample.dynatable.client.Schedule/1023786527","java.util.ArrayList/3821976829","com.google.gwt.sample.dynatable.client.TimeSlot/1821972171","Majoring in Geometry","Eddie Jones","Majoring in Geology","Inman Chase","Majoring in Computer Science","Omar Gibbs","Carlos Epps","Majoring in Chemistry","Cathy Gibbs","Majoring in Basketball","Barney Wilson","Majoring in Statistics","Jimmy Edelstein","Majoring in Phrenology","Eddie Gibbs","com.google.gwt.sample.dynatable.client.Professor/1464158370","Professor of English Literature","Dr. Cathy Blum","Jimmy Smith"],0,2]