SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 74 | Next

Deepak Vohra

"Ajax in Oracle JDeveloper"


RootPanel.get(???label1???).add(label1);
RootPanel.get(???textBox1???).add(textBox1);
RootPanel.get(???button???).add(button);
Create a HashMap for catalog entries and add an initial set of catalog
entries using an ArrayList for each catalog entry. An example
ArrayList for a catalog entry is added as follows.
HashMap catalogHashMap=new HashMap();
ArrayList arrayList= new ArrayList();
arrayList.add(0, ???catalog1???);
arrayList.add(1, ???Oracle Magazine???);
arrayList.add(2, ???Oracle Publishing???);
arrayList.add(3, ???May-June 2006???);
arrayList.add(4, ???Tuning Your View Objects???);
arrayList.add(5, ???Steve Muench???);
Add a KeyboardListener to the TextBox for Catalog ID using a
KeyboardListenerAdapter; if a KeyboardListenerAdapter
is used not all the methods of the KeyboardListener interface have to
be implemented. Implement only the onKeyUp() method.
textBox1.addKeyboardListener(new
KeyboardListenerAdapter() {
public void onKeyUp(Widget sender, char keyCode,
int modifiers) {
}
Add a ClickListener to the button and implement the onClick()
method.
button.addClickListener(new ClickListener() {
public void onClick(Widget sender) {
}
}
4.5 Creating a Form Validation Ajax Application 79
When a character is added to the TextBox for Catalog ID, the
onKeyUp() method of the KeyboardListener gets invoked.
Retrieve the text for the TextBox and check if a catalog entry for the
specified Catalog ID already define in the HashMap.


Pages:
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86