This document very briefly describes what one needs or must change when upgrading Aranea version from 1.0 to 1.1 in a web application. ---------------------- Version 1.1 2008.02.22 ---------------------- GENERAL -org.araneaframework.jsp.engine package is gone. +Engine (LightweightJspServlet) itself does not exist anymore, just use containers JSP engine (or try out JSPWeaver -- http://www.zeroturnaround.com/jsp-weaver/). Classes from package that were used by other parts of the framework can be found from org.araneaframework.http.support (TldLocationsCache, ParserUtils, ... ). +handleProcess() callback MUST be searched manually and removed, it is not called anymore +same with process(), when super.process() not called from it, no compilation errors are produced Any code in process() must be moved to wherever suitable. That might be render(), event() -- practically anything depending on circumstances of why the code was moved into process() in first place. -explicit process() calls +when called on standard widgets or components, should just be removed. When called on custom components: see previous bullet. -The method clean() is undefined for the type Data +remove the Data.clean() call, it is not necessary anymore - The method *Scope() is undefined for the type InputData/OutputData + InputData and OutputData are not scoped anymore -- instead the components themselves are aware of their place in hierarchy. Calls can be replaced with Component.getScope().toPath(). -widget's render overriden with something like -protected void render(OutputData output) throws Exception { - output.pushScope("widget"); - try { - widget._getWidget().render(output); - } finally { - output.popScope(); - } -} +See previous bullet about removing Scopes from *Data. +Replace with plain: widget._getWidget().render(output); -BeanFormWidget.readBean() undefined: change to (NB! not a typo) +BeanFormWidget.writeToBean() -BeanFormWidget.writeBean() undefined: change to (NB! not a typo) +BeanFormWidget.readFromBean() -StandardContainerWidget.EVENT_PATH_KEY +This is now: ApplicationWidget.EVENT_PATH_KEY -OutputData.pushAttribute +should be rare and conventional usecases should be replacable with Environment entries. Pushing data under some attribute key into the OutputData is much the same as putting it into Environment under some context class key, but cleaner. -ServletUtil.include -- search for all calls +most calls MUST be replaced with either include(String filePath, ApplicationWidget widget, OutputData output) include(String filePath, Environment env, OutputData output, ApplicationWidget widget) When this is left undone, widget object is inaccessible in JSP template and nothing will render -StandardFlowContainerWidgets were a half-immortal in Aranea 1.0, meaning that when flowcontainer became empty (happens when FlowContext.finish() is invoked on only active flow in container), it still lived on. Aranea 1.1 has a concept of /finishable/ StandardFlowContainerWidget -- these return the control to parent flow container when they are emptied, allowing for convenient wrapping of whole usecases. The topmost flow container has no parent and thus never goes away, containers lower in the hierarchy that should remain active when all flows inside have finished (ie MenuWidget) should have their finishable field set to true. +setFinishable(true) in situations where it is desired (exactly like 1.0 StandardFlowContainerWidget) -Compilation error when overriding: ListFilterImpl.init(Environment env) throws Exception +ListFilterImpl.init(Environment env) // ListFilter interface throw clause was removed -Compilation error when overriding: ListFilterImpl.destroy() throws Exception +ListFilterImpl.destroy() // ListFilter interface throw clause was removed -Compilation error when overriding: ListOrderImpl.init(Environment env) throws Exception +ListOrderImpl.init(Environment env) // ListOrder interface throw clause was removed -Compilation error when overriding: ListOrderImpl.destroy() throws Exception +ListOrderImpl.destroy() // ListOrder interface throw clause was removed UILIB Tags -The method getScopedFullFieldId() is undefined for the type extending some tag extending some formelement tag +use getFullFieldId() method, getScopedFullFieldId() does not exist anymore -FormTag.FORM_SCOPED_FULL_ID_KEY +FormTag.FORM_FULL_ID_KEY -requireEntry(somekey) where 'somekey' is nonexistant +on times where it was just used as safety check, it can just be removed +otherwise refactoring is situation dependent -The method getWidgetFromContext(String id, PageContext) is undefined for the type JspWidgetUtil + Use JspWidgetUtil.traverseToSubWidget(getContextWidget(), id) JSP templates -ui:root, ui:viewPort references +These tags do not exist anymore, just remove them from template. -globalWidgetInclude +find a way to replace this with widgetInclude -search for outputData.attributes references +replace as applicable. Sometimes the best way to refactor is to create new tag that outputs things found in OutputData before, acquiring them from Environment or anywhere else. Also see: OutputData.pushAttribute reference in quick migration document. +in rare cases they can be just replaced with setting request attributes directly (this is not encouraged!) - +On migration, all present 'disabled' attributes should be set to "true". because 'disabled' attribute presence in 1.0 always disabled event button, regardless of attribute value. In 1.1, only "true" (case insensitive) value disable event button! -${systemFormId} references +in scripts, can just be replaced with _ap.getSystemForm().id +document.${systemFormId} is replaced with just '_ap.getSystemForm()' -${viewPort....} +Refactor to pass data some other way: through Environment, Widget's viewData, request scoped attributes ...