Sun ONE Application Framework (JATO)

Version 1.2.1 Changes

Table of Contents

Previous Version Changes

Change Log

Bugs

Developer Assistance

Deployment Changes

Tag Library Changes

Servlet & Infrastructure Changes

ViewBean Changes

Event Changes

View Changes

Model Changes

Miscellaneous Changes

Previous Version Changes

Change Log

The following changes were made from JATO 1.2 to JATO 1.2.1:

Fixed Bugs
Changes Requires 1.2 App Changes
DefaultRequestHandlingCommand was improperly casting ViewInvocation on line 414 to TiledViewInvocation. This appears to be a leftover from a factoring effort.  
It was not possible to iterate over a TreeModel starting from the root node after initially traversing it. Calling root() caused traversal to start at the first child of the root.

The root cause appeared to be an incompleteness in the TreeModel interface. I added a beforeRoot() method which allows the tree to be reset to the position needed for full iteration. I've changed the base implementation to use the beforeRoot() method instead of root().

 
HREFs inside of pagelet were failing because of an improper propagation of context to the pagelet.  

Throwing a CompleteRequestException inside a display event caused the tag to return an invalid return code (SKIP_PAGE). Instead, according to the spec, and although it works in Tomcat and Resin, the doStartTag() method should only return SKIP_BODY. The incorrect return code does not work in iAS.

After the fix, instead of returning SKIP_PAGE from the doStartTag() method, these tags instead save the thrown exception and return SKIP_BODY. The doEndTag() checks for a saved exception and rethrows it if found, before doing any other work. The problem seems to have arisen by copying the appropriate exception tunneling fix code from the doEndTag() method in most tags to the doStartTag() methods of a select few tags, without understanding the consequences of the return type in the new context.

The following classes were affected:

jato.taglib.html.HrefTag
jato.taglib.ContentTag
jato.taglib.UseContainerViewTag
jato.taglib.UseTiledViewTag
jato.taglib.UseViewBeanTag

 
The HREF tag handler setTitle() method was misspelled setTitlet().  
The value of the defaultCommandChild attribute of the <jato:form> tag caused two double-quotes to be rendered in the resulting page, which caused the value not to work. The issue was that the defaultCommandChild attribute specification was doubled in the TLD, causing Tomcat 4.0 (only) to quote the value given to the FormTag.setDefaultCommandChild() method.  

Page session could not be deserialized in JDK 1.4 (beta). The root cause was the fact that JDK 1.4 changed the signature of the decodeAtom() method in the sun.misc.CharacterDecoder class to take a PushbackInputStream instead of just an InputStream. We added a method of the appropriate signature, and the page session decoding now works in both JDK 1.3 and 1.4 beta.

 
The JavaDoc for jato.view.ContainerViewBase was out of sync with new event model in JATO 1.2  

Developer Assistance
Changes Requires 1.2 App Changes
None  

Deployment Changes
Changes Requires 1.2 App Changes
None  

Tag Library Changes
Changes Requires 1.2 App Changes
Added defaultValue attribute for the <jato:button> tag, allowing developers to provide a label for a button directly in the JSP (assuming the value of the button display field is null). Previously, the label for a button could only be specified as the display field's value.  

Added reset attribute for <jato:tiledView> and <jato:treeView> tags. This attribute allows the developer to reset the view and its primary model to the "before start" position immediately after invoking the beginDisplay() event. This will ensure that the view's primary model is properly reset for display.

If not specified, a value of true is assumed. Note, this is a change from previous versions of JATO. Previous versions never performed a reset, leaving this behavior up to the developer. It is expected that this change will provide more ease of use, while providing backward compatibility for the rare application that relied upon the previous default behavior.

Maybe
Added several attributes to the <jato:treeNodeHandle> tag, to allow addition of JavaScript and other HTML attributes to the rendered HREF.  

Servlet & Infrastructure Changes
Changes Requires 1.2 App Changes
Added method RequestContext.getRequestPhase() to allow developers to check which phase of the request handling (submit or display) is currently being performed.  
Changed the servlet error reporting mechanism to allow sending of different HTTP error codes. Now, the "request handler not found" error results in a 404 error along with the standard JATO error message. Other errors result in a 500 error along with the standard JATO error message.  

The previous algorithm for determining the session timeout was error prone in that it relied on the presence of the pageSession attribute in the request. This caused problems when developers tried integrating JATO with non-JATO applications, because they would have to pass a pageSession attribute in the request in order to ensure consistent JATO session event behavior.

Instead, now we check to see if the request includes specification of a session ID in conjunction with the new creation of a session. This means that the timeout event should only be triggered if someone tries to access the application with an invalid session ID. Of course, this all rests on whether the container accurately reports the "new" status of the session. I practice, both Tomcat and Caucho Resin do.

One difference developers might notice because of this change is that the session timeout behavior is far more strict. This is a positive change in that previously it was possible for an ignorant developer to ignore the session timeout without properly accounting for the impact to the application. Now, developers will be forced to handle session timeout in an application-specific way, with the strictest policy in force by default (which is to disallow a timed out user from accessing the application again until closing the browser.)

 

ViewBean Changes
Changes Requires 1.2 App Changes
The ViewBeanBase.getDisplayURL() implementation method was promoted to the ViewBean interface. See the documentation for that method to understand its role in the ViewBean contract.
 

Event Changes
Changes Requires 1.2 App Changes
None  

View Changes
Changes Requires 1.2 App Changes
Added constructors for ComboBox and other selectable group display fields that take an OptionList argument.  
Added new constructors to display fields that allow bound name to be specified but don't require descriptor parameters (which are usually null)  

The ContainerViewBase.childHasValue(String) method has changed to childExists(String), and the access modifier has been changed from public to private. This should help us identify whether this method is being used in the wild (not expected), and help protect us from extensive use of it if we decide to remove or modify it in the future. (Note, this method did not behave as expected from the name in most cases, hence this change.)

Maybe
Added the ability for developers to specify the lookup name for a tree's TreeViewStateData instance. This allows them to have more than a single tree per application.  

Model Changes
Changes Requires 1.2 App Changes
Added ResourceBundleModel to the jato.model package. This model can be used to bind display fields to keys in a resource bundle.  
The SQLConnectionManager.addDataSourceMapping() method now has public access  
Added a method in DefaultModel that dumps data values to a PrintWriter. This complements the existing method that dumps values to a PrintStream.  
Enchanced BeanAdapterModel to coerce the type of values being set on the model to the type of the current bean's mutator method. Type coercion works for both scalar and array values. If an array of values is set on the model, the array's component type is coerced to the mutator method array component type.  

Miscellaneous Changes
Changes Requires 1.2 App Changes

Application messages are now added to a rendered page where the closing </jato:useViewBean> tag occurred. Previously, the servlet was responsible for attaching these messages to the end of a rendered document, but most containers would not allow this and application messages never appeared in the output. Unfortuantely, this solution may result in HTML occurring after the closing </body> or </html> tag, but browsers seem to handle this situation and render the content in a predictable way regardless.

 
Clarified signatures of begin<fieldName>Display() and end<fieldName>Display() events where listed in the taglib documentation.