Adrian,
first of all, thanks for your work. However, is there a particular reason for not using the Writer.append method instead of the Writer.write method? I think we should really use the former because it is the one declared in the Appendable interface... and in fact migrating from Writer to Appendable would be as easy as changing the method's signatures. Jacopo On Jun 1, 2008, at 3:50 AM, [hidden email] wrote: > Author: adrianc > Date: Sat May 31 18:50:41 2008 > New Revision: 662123 > > URL: http://svn.apache.org/viewvc?rev=662123&view=rev > Log: > Screen Widget refactor - changed StringBuffer arguments to Writer > arguments to help make the screen widget API more consistent. Also > added some parameterized data types to cut down on the unchecked > warnings. > > There are no functional changes to the screen widgets. > > Modified: > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/ModelWidget.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/fo/ > FoFormRenderer.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/fo/ > FoScreenRenderer.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ > FormStringRenderer.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ > ModelForm.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ > ModelFormAction.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ > ModelFormField.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/ > HtmlFormRenderer.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/ > HtmlFormWrapper.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/ > HtmlMenuRenderer.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/ > HtmlMenuRendererImage.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/ > HtmlMenuWrapper.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/ > HtmlScreenRenderer.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/ > HtmlTreeRenderer.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/ > HtmlWidgetRenderer.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ > MenuStringRenderer.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ > ModelMenu.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ > ModelMenuAction.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ > ModelMenuCondition.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ > ModelMenuItem.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ > HtmlWidget.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ > IterateSectionWidget.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ > ModelScreen.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ > ModelScreenAction.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ > ModelScreenCondition.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ > ModelScreenWidget.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ > ScreenStringRenderer.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/text/ > TextFormRenderer.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/text/ > TextScreenRenderer.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ > ModelTree.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ > ModelTreeAction.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ > ModelTreeCondition.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ > TreeStringRenderer.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/xml/ > XmlFormRenderer.java > |
Please have a look at:
https://issues.apache.org/jira/browse/OFBIZ-1816 Jacopo On Jun 1, 2008, at 9:40 AM, Jacopo Cappellato wrote: > Adrian, > > first of all, thanks for your work. > However, is there a particular reason for not using the > Writer.append method instead of the Writer.write method? > I think we should really use the former because it is the one > declared in the Appendable interface... and in fact migrating from > Writer to Appendable would be as easy as changing the method's > signatures. > > Jacopo > > On Jun 1, 2008, at 3:50 AM, [hidden email] wrote: > >> Author: adrianc >> Date: Sat May 31 18:50:41 2008 >> New Revision: 662123 >> >> URL: http://svn.apache.org/viewvc?rev=662123&view=rev >> Log: >> Screen Widget refactor - changed StringBuffer arguments to Writer >> arguments to help make the screen widget API more consistent. Also >> added some parameterized data types to cut down on the unchecked >> warnings. >> >> There are no functional changes to the screen widgets. >> >> Modified: >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/ModelWidget.java >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/fo/ >> FoFormRenderer.java >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/fo/ >> FoScreenRenderer.java >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ >> FormStringRenderer.java >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ >> ModelForm.java >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ >> ModelFormAction.java >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ >> ModelFormField.java >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/ >> HtmlFormRenderer.java >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/ >> HtmlFormWrapper.java >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/ >> HtmlMenuRenderer.java >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/ >> HtmlMenuRendererImage.java >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/ >> HtmlMenuWrapper.java >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/ >> HtmlScreenRenderer.java >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/ >> HtmlTreeRenderer.java >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/ >> HtmlWidgetRenderer.java >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ >> MenuStringRenderer.java >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ >> ModelMenu.java >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ >> ModelMenuAction.java >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ >> ModelMenuCondition.java >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ >> ModelMenuItem.java >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ >> HtmlWidget.java >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ >> IterateSectionWidget.java >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ >> ModelScreen.java >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ >> ModelScreenAction.java >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ >> ModelScreenCondition.java >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ >> ModelScreenWidget.java >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ >> ScreenStringRenderer.java >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/text/ >> TextFormRenderer.java >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/text/ >> TextScreenRenderer.java >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ >> ModelTree.java >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ >> ModelTreeAction.java >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ >> ModelTreeCondition.java >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ >> TreeStringRenderer.java >> ofbiz/trunk/framework/widget/src/org/ofbiz/widget/xml/ >> XmlFormRenderer.java >> smime.p7s (3K) Download Attachment |
In reply to this post by Jacopo Cappellato-3
Jacopo,
I used writer.write only because that's what the other widget code does. I hadn't thought about writer.append. You're right, writer.append would be better. -Adrian Jacopo Cappellato <[hidden email]> wrote: Adrian, first of all, thanks for your work. However, is there a particular reason for not using the Writer.append method instead of the Writer.write method? I think we should really use the former because it is the one declared in the Appendable interface... and in fact migrating from Writer to Appendable would be as easy as changing the method's signatures. Jacopo On Jun 1, 2008, at 3:50 AM, [hidden email] wrote: > Author: adrianc > Date: Sat May 31 18:50:41 2008 > New Revision: 662123 > > URL: http://svn.apache.org/viewvc?rev=662123&view=rev > Log: > Screen Widget refactor - changed StringBuffer arguments to Writer > arguments to help make the screen widget API more consistent. Also > added some parameterized data types to cut down on the unchecked > warnings. > > There are no functional changes to the screen widgets. > > Modified: > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/ModelWidget.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/fo/ > FoFormRenderer.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/fo/ > FoScreenRenderer.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ > FormStringRenderer.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ > ModelForm.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ > ModelFormAction.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ > ModelFormField.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/ > HtmlFormRenderer.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/ > HtmlFormWrapper.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/ > HtmlMenuRenderer.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/ > HtmlMenuRendererImage.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/ > HtmlMenuWrapper.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/ > HtmlScreenRenderer.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/ > HtmlTreeRenderer.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/ > HtmlWidgetRenderer.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ > MenuStringRenderer.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ > ModelMenu.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ > ModelMenuAction.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ > ModelMenuCondition.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ > ModelMenuItem.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ > HtmlWidget.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ > IterateSectionWidget.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ > ModelScreen.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ > ModelScreenAction.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ > ModelScreenCondition.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ > ModelScreenWidget.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ > ScreenStringRenderer.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/text/ > TextFormRenderer.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/text/ > TextScreenRenderer.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ > ModelTree.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ > ModelTreeAction.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ > ModelTreeCondition.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ > TreeStringRenderer.java > ofbiz/trunk/framework/widget/src/org/ofbiz/widget/xml/ > XmlFormRenderer.java > |
Free forum by Nabble | Edit this page |