If the Catalog ID specified is not in the HashMap a new entry is
added to the HashMap. The modified
element in
CatalogForm.html is listed below.
Copy the modified table element to the table element in
CatalogForm.html in JDeveloper. We also need to modify the
CatalogForm.java class to validate a Catalog ID value. To the
onModuleLoad() method add declarations for Label widgets for
CatalogID, Journal, Publisher, Edition, Title, Author. Example of a Label
component is as follows.
78 4 Ajax with Java-GWT
final Label label1 = new Label(???Catalog ID???);
A TextBox widgets to input values for a catalog entry. Example of a
TextBox is as follows.
final TextBox textBox1 = new TextBox();
Add a Button widget to create a catalog entry.
final Button button = new Button(???Submit???);
Add the Label, TextBox, and Button widgets to the RootPanel.
Example of adding a Label, a TextBox and button are as follows.
Pages:
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85