============================================================================= R E L E A S E N O T E S MapperXML Version 1.9.8-GA (final release) Changes since 1.9.7 ============================================================================= ============================================================================= E N H A N C E M E N T S ============================================================================= --------------------------------------------------------------- ENHANCEMENT: --------------------------------------------------------------- o Form now has built in DocumentBuilder. Simply set the documentURI property and when Form.initForm() is invoked, Document will be parsed. There are currently 3 builders for Documents: TidyDocumentAdapterBuilder XercesDocumentAdapterBuilder JAXPDocumentAdapterBuilder DocumentAdapterBuilderFactory will try to determine appropriate builder in the following order: System property: com.taursys.dom.DocumentAdapterBuilderFactory set to desired DocumentAdapterBuilderFactory. If class org.w3c.tidy.Tidy can be found, uses TidyDocumentAdapterBuilderFactory If class org.apache.xerces.parsers.DOMParser can be found, uses XercesDocumentAdapterBuilderFactory If class javax.xml.parsers.DocumentBuilder can be found, uses JAXPDocumentAdapterBuilderFactory else throws DocumentAdapterBuilderException If you do not want to use built in behavior, do not set the documentURI property, or override Form.initForm() method. --------------------------------------------------------------- ENHANCEMENT: --------------------------------------------------------------- o Created new Attribute component which is now integral to all Element type components. Created new Element interface which is implemented by all DOM type peer components (formerly DocumentComponents). Attributes can be easily created and added to Elements. They can also be bound to the Element's ValueHolder. --------------------------------------------------------------- ENHANCEMENT: --------------------------------------------------------------- o CodeGen tool now accepts project file name as argument at startup --------------------------------------------------------------- ENHANCEMENT: --------------------------------------------------------------- o Modified error handling during input. Old behavior would stop on first ModelParseException. This meant that user input for subsequent fields was lost. Now input processing attempts to process all input fields and keeps track of ALL exceptions. At the end of input processing, it throws a special exception called a MultiModelParseException. The MultiModelParseException contains a List of all the exceptions that occured. The methods getMessage, getLocalizedMessage, and getUserFriendlyMessage return a concatenated String of all the error messages. --------------------------------------------------------------- ENHANCEMENT: --------------------------------------------------------------- o Changed attribute renderer to remove attribute when value is blank. --------------------------------------------------------------- ENHANCEMENT: --------------------------------------------------------------- o ElementDelegate.setAttributeText/Value(name,"xxx"), will create the attribute if it does not exist. o ElementDelegate.setTextNodeText/Value will create TextNode if it does not exist. --------------------------------------------------------------- ENHANCEMENT: --------------------------------------------------------------- o HTMLComponentFactory.createComponents now creates and binds a TextNode with the syntax: valueHolder__propertyName or __propertyName o HTMLComponentFactory.createComponents now supports new syntax. Examples: valueHolder__propertyName valueHolder__propertyName__1 valueHolder__propertyName__DATE:MM/dd/yyyy valueHolder__propertyName__DATE:MM/dd/yyyy__1 __propertyName __propertyName__1 __propertyName__DATE:MM/dd/yyyy __propertyName__DATE:MM/dd/yyyy__1 valueHolder__ valueHolder__1 valueHolder__TEMPLATE_NODE valueHolder__TEMPLATE_NODE__1 o HTMLComponentFactory.createComponents now has new method which will set any properties not already set by code of existing components. --------------------------------------------------------------- ENHANCEMENT: --------------------------------------------------------------- o Modified method ServletForm.testFullCycle to write file to disk as well as display System.out. This provides a means of visually inspecting a form while testing and developing. You can run the testFullCycle method and open/refresh the file with your browser to review the results. ============================================================================= B U G F I X E S ============================================================================= --------------------------------------------------------------- BUGFIX/CHANGE: --------------------------------------------------------------- o Fixed Multipart Request. Was not handling files without an extension properly. Most browsers send files with extensions as binary. o Also modified behavior to allow fetching a parameter value as either a String or byte[]. o Also deprecated use of _ByteArray suffix, but added code to provide backwards compatibility. --------------------------------------------------------------- BUGFIX/CHANGE: --------------------------------------------------------------- o Bug in ElementDelegate.setValueHolder method. Does not bind to bound TextNode. --------------------------------------------------------------- BUGFIX/CHANGE: --------------------------------------------------------------- o Fixed HTMLComponentFactory.createComponents. It was not picking up format/format pattern from span tag text node. Worked OK with attribute in input field. --------------------------------------------------------------- BUGFIX/CHANGE: --------------------------------------------------------------- o Issue with custom components when used in multi-row input. Dispatchers in children of custom component were using their own index instead of the grand-parent template's dispatcher which was iterating the index. This resulted in the children always retrieving the first value of multi-row input. SOLUTION: Refactored Dispatchers and DispatchingContiners to add notion of parentDispatcher. --------------------------------------------------------------- BUGFIX/CHANGE: --------------------------------------------------------------- o Fixed problem in component factory. When initForm is called more than once for a SubForm, it wipes out functionality. Normally, initForm should only be called once, but multiple calls should not cause problems. SOLUTION: Fixed bug in ComponentFactory when moving existing components, tried to remove existing component from rootContainer instead of actual parent container. --------------------------------------------------------------- BUGFIX/CHANGE: --------------------------------------------------------------- o Problem in HTMLComponentFactory - problem when nesting multiple level templates (ie parent-child-grandchild). Structure became corrupt. SOLUTION: Fixed bug in ComponentFactory when moving existing components, tried to remove existing component from rootContainer instead of actual parent container. --------------------------------------------------------------- BUGFIX/CHANGE: --------------------------------------------------------------- o Problem in HTMLComponentFactory. It was creating and binding components with well formed id's (but without a value holder with a matching alias) to the last value holder in the given array. --------------------------------------------------------------- BUGFIX/CHANGE: --------------------------------------------------------------- o HTMLComponentFactory is sometimes creating components as Template if they are nested in a Template. This was caused by ComponentFactory.getSuggestedComponents altering the original suggestion list for a tag, rather than altering a working copy of the suggestion list. For example, once a span tag had an id containing TEMPLATE_NODE, subsequent span tags all had Template.class as their top suggestion. --------------------------------------------------------------- BUGFIX Build/Website only: --------------------------------------------------------------- o Replaced xslt style sheet used to format JUnit output. ============================================================================= O T H E R C H A N G E S ============================================================================= Public API Interface Changes/Deprecations: ================================================================ o Form.setDocument method now throws DocumentAdapterBuilderException o Added removeAttribute method to DocumentAdapter interface Internal API Interface Changes/Deprecations: ================================================================ o Removed deprecated dispatchers and related calls o Form(ServletForm) should detect which DOM version is in class loader and use appropriate DocumentAdaptor. Other Changes: ================================================================ o Added toString methods of components to provide diagnostic information for: ValueHolders, Models, XML Components, HTML Components. o Cleanup imports o Added more HTML tags the HTMLComponent factory. Default components defined for all HTML 4.01 tags. See javadoc for com.taursys.html.HTMLComponentFactory for a full list of defined tags. Any tags not in the list will default to a com.taursys.xml.DocumentElement. o Refactored DOM_2_20001113_DocumentAdapter to extend DOM_1_20000929_DocumentAdapter. ============================================================================= K N O W N L I M I T A T I O N S / P R O B L E M S ============================================================================= none