W3C home > Mailing lists > Public > www-jigsaw@w3.org > November to December 1996

FormCardHandler.notifyButtonClick()

From: Dave Makower <davemak@pencom.com>
Date: Mon, 4 Nov 1996 14:56:02 -0500
Message-Id: <v01540b01aea3f811a85d@[199.171.199.246]>
To: www-jigsaw@w3.org
I'm observing some strange behavior with the FormCardHandler class.  (Using
Jigsaw 1.0a3)

I have an editor class which extends GenericResourceEditor.  In the
defineCards() method, I call a method that has the following code:

   MyHandler handler = new MyHandler(target);
   FormCardResource card = defineCard(handler, "MyCardName", "MyCardTitle");
   card.addButton("Generate");
   card.addButton("Delete");

Then, in the notifyButtonClick() method for the class MyHandler, I have the
following code:

   System.out.println("Got button click: \"" + label + "\".");

The strange thing is that no matter which button I click, the label seems
to be "Generate" -- never "Delete".  That is, the println statement always
causes the following console output:

   Got button click: "Generate".

Why is this?



+---------------------+-------------------------+---------------------+
|    Dave Makower     |    davemak@pencom.com   |   WWW Specialist    |
+---------------------+-------------------------+---------------------+
|     Co-author of "Java Programming Basics" (Henry Holt/MIS:Press)   |
|                 http://www.pencom.com/javabasics/                   |
+----------------------------------+----------------------------------+
|   Pencom Web Works               |   (212) 513-7777   voice         |
|   Pencom Systems Inc.            |   (212) 513-1975   fax           |
|   40 Fulton St.                  |                                  |
|   New York, NY  10038            |   http://www.pencom.com/         |
+----------------------------------+----------------------------------+
Received on Monday, 4 November 1996 14:55:05 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:25 GMT