[ https://issues.apache.org/jira/browse/OFBIZ-11335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17040986#comment-17040986 ]
ASF subversion and git services commented on OFBIZ-11335: --------------------------------------------------------- Commit 38f972a0d0c0865b1d6fc5cf7bc71c50b4873355 in ofbiz-framework's branch refs/heads/trunk from Nicolas Malin [ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=38f972a ] Improved: Add CommonForms as template pattern configured by theme (OFBIZ-11335) Currently on OFBiz we implemented a process to define some different screen and menu that can be implemented by the theming. But for the form we have nothing. All style are hard coded on each <grid name="ListEntities" ... odd-row-style="alternate-row" default-table-style="basic-table hover-bar"> I extend the theming implementation principle to forms element with adding : * a new xsd element common-forms (like common-screens) * some default form templates to extend : * grid CommonSimpleGrid * grid CommonBasicGrid * form CommonSimpleList * form CommonBasicList * form CommonInLineEditList * form CommonBasicSingle We can use its like : <form name="LayoutDemoList" extends="CommonBasicList" extends-resource="component://common/widget/CommonForms.xml" The main difficulty raise to this task was propage the visualTheme during the ModelForm intanciation, because we need to load wiget style (and some other information wanted on the template) on model load in memory. This is cover by commit 1941a05a349865b8505ec373de3fce3b3a96c2a0. Forms present on the screen https://localhost:8443/webtools/control/WebtoolsLayoutDemo are now extend through with theme. Finally with this we can extend style form (pagination, header, line and so on ...) directly by your theme without change the framework. > Add CommonForms as template pattern configured by theme > ------------------------------------------------------- > > Key: OFBIZ-11335 > URL: https://issues.apache.org/jira/browse/OFBIZ-11335 > Project: OFBiz > Issue Type: New Feature > Components: framework, themes > Affects Versions: Trunk > Reporter: Nicolas Malin > Assignee: Nicolas Malin > Priority: Major > Attachments: OFBIZ-11335.patch > > > Currently on OFBiz we implemented a process to define some different screen > and menu that can be implemented by the theming > But for the form we have nothing. All style are hard coded on each > {code:java} > <grid name="ListEntities" ... > odd-row-style="alternate-row" default-table-style="basic-table > hover-bar">{code} > > I propose to extend the theming implementation principle to forms element. > To start low, I define seven form tempates : > * grid CommonSimpleGrid > * grid CommonBasicGrid > * form CommonSimpleList > * form CommonBasicList > * form CommonInLineEditList > * form CommonSimpleSingle > * form CommonBasicSingle > > We can use its like : > {code:java} > <form name="LayoutDemoList" extends="CommonBasicList" > extends-resource="component://common/widget/CommonForms.xml"{code} > The main difficulty raise to this task was propage the visualTheme during the > ModelForm intanciation, because we need to load wiget style (and some other > information wanted on the template) on model load in memory. > With the linked patch I improved form present on screen > [https://localhost:8443/webtools/control/WebtoolsLayoutDemo] > > Finally with this we can extend style form (pagination, header, line and so > on ...) direclty by your theme without change the framework -- This message was sent by Atlassian Jira (v8.3.4#803005)