What's New in WebRunner Bean Tools?

If you've been using earlier versions of WebRunner Bean Tools , you'll notice some changes in Version 1.2.

  Changes in Version 1.2
     Changes to the Bean Wizard
     Fixes in the Network Beans
  Changes in Version 1.1
     Changes to the Bean Works class framework
     Changes to Bean Wizard
     Changes to DPM Sample
Changes in Version 1.0
Known Problems

 

Note: WebRunner Bean Tools requires a JDK 1.1.1-compliant Java virtual machine.



 

Revision History

Changes in Version 1.2

The Version 1.2 Bean Tools package does not include the JDK1.1.1..This JDK can be obtained from the JavaSoft web site.

Changes to the Bean Wizard

  1. The Bean Wizard now allows you to remove any classes, methods, properties and events, that you added to a project's classes, within the same session, and even after the code has been generated for the project.
  2. You can now specify the project directory, where you would like the wizard to save the files it generates for your project. This directory can be specified on the last page of the Bean Wizard by clicking on the "..." button next to the text field containing the name of the default directory. A File Dialog is presented for you to select the directory for the generated files.
  3. The performance of the code generation step, has been remarkably improved.
  4. On the Windows NT and Windows 95 platforms, a Makefile is also generated along with build.bat for building the project. Makefiles for other platforms will be added in future releases of the WebRunner Toolkit.
  5. A workaround has been added, for the exception seen when the Bean Wizard is run from the Workbench  of VisualAge for Java. Once the problem is fixed in the next release of VisualAge for Java, this workaround will be removed.
  6. The problem with text labels being clipped in the Bean Wizard's dialogs, has been fixed.

Changes to the Network Beans

  1. In the POP3Session bean, the problem with the messageSize() API for a message that's already retrieved from the POP3 server, has been corrected. The bean will now report that you cannot get the size of a message that's already been retrieved.
  2. In the SMTPSession Bean, the first "HELO" command for the SMTP protocol now always sends the domain address as an argument. The omission of this argument was causing problems with some mail servers.

Changes in Version 1.1

Changes to Bean Works Class Framework

The Bean Works class framework now allows you to localize the user-interface of your application, applet or bean. You can provide versions of  the application's resources for specific locales, and change the locale of the application by invoking the new setLocale() method defined by the GUIHandler class.
In order to have the locale specific resources to be set for your application, you would need to override the setLocale() method in the subclassed GUIHandler class for your application. In this overridden method, you would need to do the following:

Before you  use  this feature of the Bean Works class framework, you will have to ensure that you have the locale specific resources for your application available, and in your CLASSPATH, so that the java.util.ResourceBundle class can locate and load them, when you call setResourceBundle()..
 

Changes to  Bean Wizard

The problem with the absence of "Compile All Files" and "Build" buttons on the last dialog of the Wizard's user-interface, in the Evaluation version of Bean Tools Version 1.0, is fixed.
 
Changes to DPM Sample

The problem with the CLASSPATH in the Makefile and the build.bat files provided with the DPM Sample, documented as a known problem in Version 1.0, has been fixed.


Version 1.0

Changes listed here are those made since the WebRunner Preview release.

The framework is now called "Bean Works."

The mechanism for constructing a program has changed:

ComponentController.setup methods have been removed. Instead, you should create any model, GUI handler, resource bundle, model selection,or view in the constructor of the component controller through the setModel, setGUIHandler, setResourceBundle, and setModelSelection methods. The typical call sequence within the constructor of your program's controller is:
public class Foo extends ComponentController
{
    public Foo()    {   
        setModel(new FooModel());
        setGUIHandler(new FooGUIHandler(this));
        try {
                setResourceBundle(ResourceBundle.getBundle("foo.FooResources"));
        }
        catch (MissingResourceException e) {
                new ExceptionDialog(null, "Can't find resource file", e);
        }
        setModelSelection(new FooSelection(this, (FooModel)getModel()));
        // The setView method must be called last
        setView(new FooView());
        } 
}
Note: You MUST call the setView method last.
The following classes and methods have been added, removed, or changed:
The model is now persisted by serializing the whole model instead of externalizing the model data. IModel no longer implements the java.io.Externalizable interface. You should remove any implementation of readExternal and writeExternal in your model classes. By default, all the data members in the model are serialized except for those data fields marked with the transient keyword. If you need to override the default object serialization mechanism, implement these methods:
private void writeObject(ObjectOutputStream) throws IOException
private void readObject(ObjectInputStream) throws IOException, ClassNotFoundException
The file extension string is no longer read from the resource file. You must implement the getFileExtension method in your model to return the file extension.
This method lets you create programs that bring up a special dialog if the current date is later than the program's expiration date.
This method lets you create programs that display a custom splash screen when they launch.
ComponentController.setModel lets you change the application's model. The old model will notify its listeners of the new model.
If your view or model selection maintains a local reference to the model, you must override IView.setModel and ModelSelection.setModel to change the model accordingly.
It is no longer necessary to propagate mouse events up the hierarchy.You should remove the call to enableEvents in your view's initialize method, and remove the processMouseEvent method.
The setView method allows you to change the application view by removing the current view in the frame and adding a new one.When invoked during program initialization, this method creates the application frame, adds the view to the frame, and shows the frame. This method should be called after any model, GUI handler, resource bundle, or model selection has been created. In the second form of setView, the application frame is shown only if the boolean parameter is true. You can show the frame later by calling getComponentFrame().show().
These methods provide access to the component's resource bundle, which includes resource strings such as the application name, version, and copyright.
You should always call setApplicationMain(true) in your main() method before creating the component controller.
This method is no longer invoked by the framework and has been removed from ComponentController. You can simply invoke this method at the end of the component controller's constructor.
The framework does not define any activation policy.
These methods enable you to override the actual streaming of the model object.
This method opens an existing document.
All GUI-related code in ComponentController has been moved to the new class GUIHandler. This includes creation of menu bar, tool bar, and status bar, and all event listeners. If you need to create your own menus or override any of the event listeners, you should subclass GUIHandler. In particular, please note the following new methods and name changes:
Old Name New Name
handleAboutBox handleAbout
handleAttachMenu handleCreateMenus
handleAddToolButtons handleCreateToolButtons
  handleCreateFileMenu
  handleCreateEditMenu
  handleCreateViewMenu
 The handleCreateFileMenu, handleCreateEditMenu, and handleCreateViewMenu
methods allow customization of the default menus.

The following GUIHandle methods allow the File->New menu item to create a new model instance instead of a new application instance in a separate frame:

The default implementation of handleNew invokes handleNewInstance, which provides the existing behavior. If you want to create a new model instead, override handleNew and call handleConfirmNewModel, which displays a confirmation dialog to give the user a chance to save changes if the model is changed, and then creates a new model.

These GUIHandler methods are provided for convenience:

 
Old Name New Name
ToolButton TToolButton
ToolBar TToolBar
StatusBar TStatusBar
MenuBar TMenuBar
 
TToolButton now has only two constructors, with the second form for constructing toggle buttons:
public ToolButton(Class refClass, String filename, String tip, String text)
public ToolButton(Class refClass, String filename, String tip, String text, boolean toggle)
TMenuBar adds accessor methods to the File, Edit and View menus (examples are getFileMenu and setFileMenu) to provide easy access to the default menus.
The abstract class CommandProcessor is now the interface class ICommandProcessor, and SimpleCommandProcessor has been renamed to CommandProcessor.
For more information please see the Bean Works class documentation.
 

Changes to the Bean Tester

The Bean Tester now provides two mechanisms for assembling composite beans:
In this mode, you can assemble beans and establish the layout, as well as create property or event bindings using the Connect menu items.
In this mode, you see a non-visual representation each bean along with wire that show any property or event bindings. You can create new connections using a wiring metaphor, and move beans within the assembly area without affecting their actual physical layout within the composite bean.
The Bean Tester now supports custom palette creation. You can build your own palettes or extend existing palettes.

For more information, please read the Bean Tester documentation.
 

Changes to the Bean Wizard

The Bean Wizard generates code based on the latest Bean Works framework.

The wizard now lets you generate basic code for clipboard and custom menu support.

You can also specify a graphic (gif) file to be associated with any bean you create. This graphic will be used to represent the bean in any visual bean development tool such as the WebRunner Bean Tester.

The wizard generates the following new java files:

xxxBeanInfo.java:
Lets you customize the bean information to be displayed for your bean.
xxxModelSelection.java:
Supports the data exchange mechanism and includes methods supporting clipboard operations.
xxxGUIHandler.java:
Manages all the user interface resources and events.
The WebRunner Bean Wizard no longer works with JDK 1.0.2. It has been upgraded to JDK 1.1.1.

You can now compile code and run a component directory from the wizard.

For more information, please see the Bean Wizard documentation.
 


Known Problems

The following problems have been identified:
    1. The Wizard currently does not generate a JAR file. As a workaround, the Wizard creates a file called makejar.bat. Generate your code with the Wizard in the usual way. Then go to the directory containing the generated code and run the makejar.bat file. This will create the necessary JAR file. You are now ready to load your bean into the WebRunner Bean Tester.
    2. If your application code has a System.out.println call in it, running your application using the Wizard's Run button might cause it to hang. (This happens because the instance of the Java virtual machine is launched using the exec command. This instance has no standard output stream associated with it, which causes it to hang. ) To avoid this problem, simply run your application from a command shell.
    3. The Wizard allows you to enter free-form parameter types. It does not check that these types are valid. For instance, it will allow you to create a class with a method that takes a parameter of type 'foo'. It will not warn you if 'foo' is not in your CLASSPATH or even that it is not a valid Java type.
    4. Currently, the Wizard does not provide backward compatibility for Project files (files with the .WIZ extension) that it creates. So, you would not be able to open a .WIZ file created by an earlier version of the Wizard, in a later version of the Wizard.
     

    Running the Samples as Applets

    1. The provided applets are JDK 1.1.1-based. For this reason, the applets do not run in any web browser that does not support JDK1.1.1. (all except HotJava 1.0 browser, as of this release of WebRunner Toolkit).
    2. When you run any of the sample applets in the appletviewer, you might see an AppletSecurityException. If this happens, remove the ARCHIVE tag from the HTML files for the sample applets, and include the paths specified by the ARCHIVE tag in your CLASSPATH environment variable.

    Beans

    When using the Network Beans, users have occasionally reported a problem of these beans "freezing up". We have been unable to pinpoint the cause. If you experience this problem, simply terminate the process the bean is  running in.
   
    1. In the Visual Composition Editor for VisualAge for Java, the Bean Customizer dialogs for any of the Network Beans --- the FTPSession Bean, the NNTPSession Bean, the NNTPSession Bean and the SMTPSession Bean ---  are displayed much smaller than the actual size of the customizer, and need to be resized. Once resized, and all the fields are visible, the beans  function normally.

    2.  
      Some of the dialogs of the WebRunner Bean Wizard contain text labels that appear to be  truncated. This does not affect the functioning of the Bean Wizard. To see the correct labels, check the online documentation for the Wizard. Screen captures of the Bean Wizard interface can be found in the Bean Wizard section of the Contents panel. To get to the Contents panel, choose Overview from the documentation cover or click the Contents link on any inside page.

Copyright © Taligent, Inc. 1996 - 1997.
Copyright © IBM Corporation 1996 - 1997.
All Rights Reserved.