Adding columns filtering fields in form widget
---------------------------------------------- Key: OFBIZ-4021 URL: https://issues.apache.org/jira/browse/OFBIZ-4021 Project: OFBiz Issue Type: New Feature Components: framework Reporter: Bruno Busco Priority: Minor This patch includes an initial implementation of a list-form column filtering feature. The aim is to add the possibility to configure a list form to show, in its header, some fields that could be used to filter the rows displayed in the form. This is a feature quite standard in many systems and could be seen into OFBiz as a "quick search"; the standard way of searching using a complete single-type form could be seen as an "advanced search". Please find attached to this JIRA two screenshots that show you how the filtering option appears on the screen. *How the user uses this feature* The part of the screen that is normally used for the pagination controls (only the upper one) has been extended so that two icons are shown on the left. The first one (a funnel) is used to show or hide the filtering fields. The second one (a magnifing glass) is used to run the search with the filter content. *How the developer uses this feature* The filtering feature can be enabled on any list-type form specifying the "filter-form-name" attribute. This must be the name of a form that contains the details about how the filtering fields should be rendered. When a list form with the filter-form-name option set is rendered, any column field is searched for in the filter-form. If a field with the same name is found, its field rendering options are used to render the filter field. A new field attribute "filter-field" has also been added. This defaults to true but if it is set to false the filter field is not rendered for this column, even if a field with the same name is present in the filter-form. This feature allows to use as filter-form an already existent form such as a regular FindXXX form. In the patch the ListExample form has been changed to use this feature. You can check it there. Unfortunately the patch does not work yet 100% but I hope that if someone finds it interesting could help me. *What is there still to do* 1) There is a FIXME in MacroFormRenderer.java file. I cannot make it work. If I enable the code that is commented there I get an error when a search is run. 2) I cannot make the filtering fields show the actual content after a search is run. They are always rendered as empty. 3) The filter row hide/show status should be saved so that it is maintained after a pagination. I submit this patch as it is becouse I cannot easily improve it further but I hope someone could help. The img_for_tamahawk.zip file includes imgs that should be added in the tomahawk images folder to make the patch work. Thank you for any help! -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
[ https://issues.apache.org/jira/browse/OFBIZ-4021?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bruno Busco updated OFBIZ-4021: ------------------------------- Attachment: column_filter_enabled.JPG column_filter_disabled.JPG FilterForm.patch > Adding columns filtering fields in form widget > ---------------------------------------------- > > Key: OFBIZ-4021 > URL: https://issues.apache.org/jira/browse/OFBIZ-4021 > Project: OFBiz > Issue Type: New Feature > Components: framework > Reporter: Bruno Busco > Priority: Minor > Attachments: column_filter_disabled.JPG, column_filter_enabled.JPG, FilterForm.patch > > > This patch includes an initial implementation of a list-form column filtering feature. > The aim is to add the possibility to configure a list form to show, in its header, some fields that could be used to filter the rows displayed in the form. > This is a feature quite standard in many systems and could be seen into OFBiz as a "quick search"; the standard way of searching using a complete single-type form could be seen as an "advanced search". > Please find attached to this JIRA two screenshots that show you how the filtering option appears on the screen. > *How the user uses this feature* > The part of the screen that is normally used for the pagination controls (only the upper one) has been extended so that two icons are shown on the left. > The first one (a funnel) is used to show or hide the filtering fields. The second one (a magnifing glass) is used to run the search with the filter content. > *How the developer uses this feature* > The filtering feature can be enabled on any list-type form specifying the "filter-form-name" attribute. > This must be the name of a form that contains the details about how the filtering fields should be rendered. > When a list form with the filter-form-name option set is rendered, any column field is searched for in the filter-form. > If a field with the same name is found, its field rendering options are used to render the filter field. > A new field attribute "filter-field" has also been added. > This defaults to true but if it is set to false the filter field is not rendered for this column, even if a field with the same name is present in the filter-form. > This feature allows to use as filter-form an already existent form such as a regular FindXXX form. > In the patch the ListExample form has been changed to use this feature. You can check it there. > Unfortunately the patch does not work yet 100% but I hope that if someone finds it interesting could help me. > *What is there still to do* > 1) There is a FIXME in MacroFormRenderer.java file. I cannot make it work. If I enable the code that is commented there I get an error when a search is run. > 2) I cannot make the filtering fields show the actual content after a search is run. They are always rendered as empty. > 3) The filter row hide/show status should be saved so that it is maintained after a pagination. > I submit this patch as it is becouse I cannot easily improve it further but I hope someone could help. > The img_for_tamahawk.zip file includes imgs that should be added in the tomahawk images folder to make the patch work. > Thank you for any help! -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4021?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bruno Busco updated OFBIZ-4021: ------------------------------- Attachment: img_for_tomahawk.zip > Adding columns filtering fields in form widget > ---------------------------------------------- > > Key: OFBIZ-4021 > URL: https://issues.apache.org/jira/browse/OFBIZ-4021 > Project: OFBiz > Issue Type: New Feature > Components: framework > Reporter: Bruno Busco > Priority: Minor > Attachments: column_filter_disabled.JPG, column_filter_enabled.JPG, FilterForm.patch, img_for_tomahawk.zip > > > This patch includes an initial implementation of a list-form column filtering feature. > The aim is to add the possibility to configure a list form to show, in its header, some fields that could be used to filter the rows displayed in the form. > This is a feature quite standard in many systems and could be seen into OFBiz as a "quick search"; the standard way of searching using a complete single-type form could be seen as an "advanced search". > Please find attached to this JIRA two screenshots that show you how the filtering option appears on the screen. > *How the user uses this feature* > The part of the screen that is normally used for the pagination controls (only the upper one) has been extended so that two icons are shown on the left. > The first one (a funnel) is used to show or hide the filtering fields. The second one (a magnifing glass) is used to run the search with the filter content. > *How the developer uses this feature* > The filtering feature can be enabled on any list-type form specifying the "filter-form-name" attribute. > This must be the name of a form that contains the details about how the filtering fields should be rendered. > When a list form with the filter-form-name option set is rendered, any column field is searched for in the filter-form. > If a field with the same name is found, its field rendering options are used to render the filter field. > A new field attribute "filter-field" has also been added. > This defaults to true but if it is set to false the filter field is not rendered for this column, even if a field with the same name is present in the filter-form. > This feature allows to use as filter-form an already existent form such as a regular FindXXX form. > In the patch the ListExample form has been changed to use this feature. You can check it there. > Unfortunately the patch does not work yet 100% but I hope that if someone finds it interesting could help me. > *What is there still to do* > 1) There is a FIXME in MacroFormRenderer.java file. I cannot make it work. If I enable the code that is commented there I get an error when a search is run. > 2) I cannot make the filtering fields show the actual content after a search is run. They are always rendered as empty. > 3) The filter row hide/show status should be saved so that it is maintained after a pagination. > I submit this patch as it is becouse I cannot easily improve it further but I hope someone could help. > The img_for_tamahawk.zip file includes imgs that should be added in the tomahawk images folder to make the patch work. > Thank you for any help! -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12933087#action_12933087 ] Bruno Busco commented on OFBIZ-4021: ------------------------------------ When I include the FIXME code MacroFormRenderer.java like this: public void renderFormFilterRowOpen(Appendable writer, Map<String, Object> context, ModelForm modelForm) throws IOException { String formName = modelForm.getCurrentFormName(context); String targetType = modelForm.getFilterForm().getTargetType(); String targ = modelForm.getFilterForm().getTarget(context, targetType); StringBuilder linkUrl = new StringBuilder(); if (UtilValidate.isNotEmpty(targ)) { WidgetWorker.buildHyperlinkUrl(linkUrl, targ, targetType, null, null, false, false, true, request, response, context); } StringWriter sr = new StringWriter(); sr.append("<@renderFormFilterRowOpen "); sr.append(" formName=\""); sr.append(formName); sr.append("\" linkUrl=\""); sr.append(linkUrl); sr.append("\" />"); executeMacro(writer, sr.toString()); } I get this error in the log. ---- exception report ---------------------------------------------------------- Error in request handler: Exception: org.ofbiz.widget.screen.ScreenRenderException Message: Error rendering screen [component://common/widget/CommonScreens.xml#FindScreenDecorator]: java.lang.IllegalArgumentException: Error evaluating BeanShell style conditions on form ListExamples (Error evaluating BeanShell style conditions on form ListExamples) ---- cause --------------------------------------------------------------------- Exception: java.lang.IllegalArgumentException Message: Error evaluating BeanShell style conditions on form ListExamples ---- stack trace --------------------------------------------------------------- java.lang.IllegalArgumentException: Error evaluating BeanShell style conditions on form ListExamples org.ofbiz.widget.form.ModelForm.getStyleAltRowStyle(ModelForm.java:2775) org.ofbiz.widget.form.MacroFormRenderer.renderFormatItemRowOpen(MacroFormRenderer.java:1616) org.ofbiz.widget.form.ModelForm.renderItemRow(ModelForm.java:1696) org.ofbiz.widget.form.ModelForm.renderItemRows(ModelForm.java:1660) org.ofbiz.widget.form.ModelForm.renderListFormString(ModelForm.java:1139) org.ofbiz.widget.form.ModelForm.renderFormString(ModelForm.java:873) org.ofbiz.widget.screen.ModelScreenWidget$Form.renderWidgetString(ModelScreenWidget.java:753) org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:104) org.ofbiz.widget.screen.ModelScreenWidget$DecoratorSection.renderWidgetString(ModelScreenWidget.java:613) org.ofbiz.widget.screen.ModelScreenWidget$SectionsRenderer.render(ModelScreenWidget.java:129) org.ofbiz.widget.screen.ModelScreenWidget$DecoratorSectionInclude.renderWidgetString(ModelScreenWidget.java:646) org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:104) org.ofbiz.widget.screen.ModelScreenWidget$Container.renderWidgetString(ModelScreenWidget.java:260) org.ofbiz.widget.screen.MacroScreenRenderer.renderScreenletSubWidget(MacroScreenRenderer.java:652) org.ofbiz.widget.screen.ModelScreenWidget$Screenlet.renderWidgetString(ModelScreenWidget.java:373) > Adding columns filtering fields in form widget > ---------------------------------------------- > > Key: OFBIZ-4021 > URL: https://issues.apache.org/jira/browse/OFBIZ-4021 > Project: OFBiz > Issue Type: New Feature > Components: framework > Reporter: Bruno Busco > Priority: Minor > Attachments: column_filter_disabled.JPG, column_filter_enabled.JPG, FilterForm.patch, img_for_tomahawk.zip > > > This patch includes an initial implementation of a list-form column filtering feature. > The aim is to add the possibility to configure a list form to show, in its header, some fields that could be used to filter the rows displayed in the form. > This is a feature quite standard in many systems and could be seen into OFBiz as a "quick search"; the standard way of searching using a complete single-type form could be seen as an "advanced search". > Please find attached to this JIRA two screenshots that show you how the filtering option appears on the screen. > *How the user uses this feature* > The part of the screen that is normally used for the pagination controls (only the upper one) has been extended so that two icons are shown on the left. > The first one (a funnel) is used to show or hide the filtering fields. The second one (a magnifing glass) is used to run the search with the filter content. > *How the developer uses this feature* > The filtering feature can be enabled on any list-type form specifying the "filter-form-name" attribute. > This must be the name of a form that contains the details about how the filtering fields should be rendered. > When a list form with the filter-form-name option set is rendered, any column field is searched for in the filter-form. > If a field with the same name is found, its field rendering options are used to render the filter field. > A new field attribute "filter-field" has also been added. > This defaults to true but if it is set to false the filter field is not rendered for this column, even if a field with the same name is present in the filter-form. > This feature allows to use as filter-form an already existent form such as a regular FindXXX form. > In the patch the ListExample form has been changed to use this feature. You can check it there. > Unfortunately the patch does not work yet 100% but I hope that if someone finds it interesting could help me. > *What is there still to do* > 1) There is a FIXME in MacroFormRenderer.java file. I cannot make it work. If I enable the code that is commented there I get an error when a search is run. > 2) I cannot make the filtering fields show the actual content after a search is run. They are always rendered as empty. > 3) The filter row hide/show status should be saved so that it is maintained after a pagination. > I submit this patch as it is becouse I cannot easily improve it further but I hope someone could help. > The img_for_tamahawk.zip file includes imgs that should be added in the tomahawk images folder to make the patch work. > Thank you for any help! -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4021?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bruno Busco updated OFBIZ-4021: ------------------------------- Attachment: content_list.JPG FilterForm.patch Hi, I updated the patch to compile with the latest trunk. In addition I introduced the filter feature in the ListContent form as you can see in the new screenshot (will nedd some CSS hack to better display). In the ListContent I showed the use of the new filter-field attribute of the filter tag. Could you please review the patch? I am still encontering the runtime error described above. The bug only shows up in the Example form and not in the ListContent form. Thank you for your help. > Adding columns filtering fields in form widget > ---------------------------------------------- > > Key: OFBIZ-4021 > URL: https://issues.apache.org/jira/browse/OFBIZ-4021 > Project: OFBiz > Issue Type: New Feature > Components: framework > Reporter: Bruno Busco > Priority: Minor > Attachments: column_filter_disabled.JPG, column_filter_enabled.JPG, content_list.JPG, FilterForm.patch, FilterForm.patch, img_for_tomahawk.zip > > > This patch includes an initial implementation of a list-form column filtering feature. > The aim is to add the possibility to configure a list form to show, in its header, some fields that could be used to filter the rows displayed in the form. > This is a feature quite standard in many systems and could be seen into OFBiz as a "quick search"; the standard way of searching using a complete single-type form could be seen as an "advanced search". > Please find attached to this JIRA two screenshots that show you how the filtering option appears on the screen. > *How the user uses this feature* > The part of the screen that is normally used for the pagination controls (only the upper one) has been extended so that two icons are shown on the left. > The first one (a funnel) is used to show or hide the filtering fields. The second one (a magnifing glass) is used to run the search with the filter content. > *How the developer uses this feature* > The filtering feature can be enabled on any list-type form specifying the "filter-form-name" attribute. > This must be the name of a form that contains the details about how the filtering fields should be rendered. > When a list form with the filter-form-name option set is rendered, any column field is searched for in the filter-form. > If a field with the same name is found, its field rendering options are used to render the filter field. > A new field attribute "filter-field" has also been added. > This defaults to true but if it is set to false the filter field is not rendered for this column, even if a field with the same name is present in the filter-form. > This feature allows to use as filter-form an already existent form such as a regular FindXXX form. > In the patch the ListExample form has been changed to use this feature. You can check it there. > Unfortunately the patch does not work yet 100% but I hope that if someone finds it interesting could help me. > *What is there still to do* > 1) There is a FIXME in MacroFormRenderer.java file. I cannot make it work. If I enable the code that is commented there I get an error when a search is run. > 2) I cannot make the filtering fields show the actual content after a search is run. They are always rendered as empty. > 3) The filter row hide/show status should be saved so that it is maintained after a pagination. > I submit this patch as it is becouse I cannot easily improve it further but I hope someone could help. > The img_for_tamahawk.zip file includes imgs that should be added in the tomahawk images folder to make the patch work. > Thank you for any help! -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12966723#action_12966723 ] Bruno Busco commented on OFBIZ-4021: ------------------------------------ Hi, is anybody interested in this feature? Thank you, Bruno > Adding columns filtering fields in form widget > ---------------------------------------------- > > Key: OFBIZ-4021 > URL: https://issues.apache.org/jira/browse/OFBIZ-4021 > Project: OFBiz > Issue Type: New Feature > Components: framework > Reporter: Bruno Busco > Priority: Minor > Attachments: column_filter_disabled.JPG, column_filter_enabled.JPG, content_list.JPG, FilterForm.patch, FilterForm.patch, img_for_tomahawk.zip > > > This patch includes an initial implementation of a list-form column filtering feature. > The aim is to add the possibility to configure a list form to show, in its header, some fields that could be used to filter the rows displayed in the form. > This is a feature quite standard in many systems and could be seen into OFBiz as a "quick search"; the standard way of searching using a complete single-type form could be seen as an "advanced search". > Please find attached to this JIRA two screenshots that show you how the filtering option appears on the screen. > *How the user uses this feature* > The part of the screen that is normally used for the pagination controls (only the upper one) has been extended so that two icons are shown on the left. > The first one (a funnel) is used to show or hide the filtering fields. The second one (a magnifing glass) is used to run the search with the filter content. > *How the developer uses this feature* > The filtering feature can be enabled on any list-type form specifying the "filter-form-name" attribute. > This must be the name of a form that contains the details about how the filtering fields should be rendered. > When a list form with the filter-form-name option set is rendered, any column field is searched for in the filter-form. > If a field with the same name is found, its field rendering options are used to render the filter field. > A new field attribute "filter-field" has also been added. > This defaults to true but if it is set to false the filter field is not rendered for this column, even if a field with the same name is present in the filter-form. > This feature allows to use as filter-form an already existent form such as a regular FindXXX form. > In the patch the ListExample form has been changed to use this feature. You can check it there. > Unfortunately the patch does not work yet 100% but I hope that if someone finds it interesting could help me. > *What is there still to do* > 1) There is a FIXME in MacroFormRenderer.java file. I cannot make it work. If I enable the code that is commented there I get an error when a search is run. > 2) I cannot make the filtering fields show the actual content after a search is run. They are always rendered as empty. > 3) The filter row hide/show status should be saved so that it is maintained after a pagination. > I submit this patch as it is becouse I cannot easily improve it further but I hope someone could help. > The img_for_tamahawk.zip file includes imgs that should be added in the tomahawk images folder to make the patch work. > Thank you for any help! -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12967037#action_12967037 ] Jacques Le Roux commented on OFBIZ-4021: ---------------------------------------- Hi Bruno, Yes, but I did not get a chance to have a look yet... > Adding columns filtering fields in form widget > ---------------------------------------------- > > Key: OFBIZ-4021 > URL: https://issues.apache.org/jira/browse/OFBIZ-4021 > Project: OFBiz > Issue Type: New Feature > Components: framework > Reporter: Bruno Busco > Priority: Minor > Attachments: column_filter_disabled.JPG, column_filter_enabled.JPG, content_list.JPG, FilterForm.patch, FilterForm.patch, img_for_tomahawk.zip > > > This patch includes an initial implementation of a list-form column filtering feature. > The aim is to add the possibility to configure a list form to show, in its header, some fields that could be used to filter the rows displayed in the form. > This is a feature quite standard in many systems and could be seen into OFBiz as a "quick search"; the standard way of searching using a complete single-type form could be seen as an "advanced search". > Please find attached to this JIRA two screenshots that show you how the filtering option appears on the screen. > *How the user uses this feature* > The part of the screen that is normally used for the pagination controls (only the upper one) has been extended so that two icons are shown on the left. > The first one (a funnel) is used to show or hide the filtering fields. The second one (a magnifing glass) is used to run the search with the filter content. > *How the developer uses this feature* > The filtering feature can be enabled on any list-type form specifying the "filter-form-name" attribute. > This must be the name of a form that contains the details about how the filtering fields should be rendered. > When a list form with the filter-form-name option set is rendered, any column field is searched for in the filter-form. > If a field with the same name is found, its field rendering options are used to render the filter field. > A new field attribute "filter-field" has also been added. > This defaults to true but if it is set to false the filter field is not rendered for this column, even if a field with the same name is present in the filter-form. > This feature allows to use as filter-form an already existent form such as a regular FindXXX form. > In the patch the ListExample form has been changed to use this feature. You can check it there. > Unfortunately the patch does not work yet 100% but I hope that if someone finds it interesting could help me. > *What is there still to do* > 1) There is a FIXME in MacroFormRenderer.java file. I cannot make it work. If I enable the code that is commented there I get an error when a search is run. > 2) I cannot make the filtering fields show the actual content after a search is run. They are always rendered as empty. > 3) The filter row hide/show status should be saved so that it is maintained after a pagination. > I submit this patch as it is becouse I cannot easily improve it further but I hope someone could help. > The img_for_tamahawk.zip file includes imgs that should be added in the tomahawk images folder to make the patch work. > Thank you for any help! -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4021?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bruno Busco updated OFBIZ-4021: ------------------------------- Issue Type: Sub-task (was: New Feature) Parent: OFBIZ-4081 > Adding columns filtering fields in form widget > ---------------------------------------------- > > Key: OFBIZ-4021 > URL: https://issues.apache.org/jira/browse/OFBIZ-4021 > Project: OFBiz > Issue Type: Sub-task > Components: framework > Reporter: Bruno Busco > Priority: Minor > Attachments: column_filter_disabled.JPG, column_filter_enabled.JPG, content_list.JPG, FilterForm.patch, FilterForm.patch, img_for_tomahawk.zip > > > This patch includes an initial implementation of a list-form column filtering feature. > The aim is to add the possibility to configure a list form to show, in its header, some fields that could be used to filter the rows displayed in the form. > This is a feature quite standard in many systems and could be seen into OFBiz as a "quick search"; the standard way of searching using a complete single-type form could be seen as an "advanced search". > Please find attached to this JIRA two screenshots that show you how the filtering option appears on the screen. > *How the user uses this feature* > The part of the screen that is normally used for the pagination controls (only the upper one) has been extended so that two icons are shown on the left. > The first one (a funnel) is used to show or hide the filtering fields. The second one (a magnifing glass) is used to run the search with the filter content. > *How the developer uses this feature* > The filtering feature can be enabled on any list-type form specifying the "filter-form-name" attribute. > This must be the name of a form that contains the details about how the filtering fields should be rendered. > When a list form with the filter-form-name option set is rendered, any column field is searched for in the filter-form. > If a field with the same name is found, its field rendering options are used to render the filter field. > A new field attribute "filter-field" has also been added. > This defaults to true but if it is set to false the filter field is not rendered for this column, even if a field with the same name is present in the filter-form. > This feature allows to use as filter-form an already existent form such as a regular FindXXX form. > In the patch the ListExample form has been changed to use this feature. You can check it there. > Unfortunately the patch does not work yet 100% but I hope that if someone finds it interesting could help me. > *What is there still to do* > 1) There is a FIXME in MacroFormRenderer.java file. I cannot make it work. If I enable the code that is commented there I get an error when a search is run. > 2) I cannot make the filtering fields show the actual content after a search is run. They are always rendered as empty. > 3) The filter row hide/show status should be saved so that it is maintained after a pagination. > I submit this patch as it is becouse I cannot easily improve it further but I hope someone could help. > The img_for_tamahawk.zip file includes imgs that should be added in the tomahawk images folder to make the patch work. > Thank you for any help! -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13139443#comment-13139443 ] Jacques Le Roux commented on OFBIZ-4021: ---------------------------------------- Hi Bruno, Still interested in this? > Adding columns filtering fields in form widget > ---------------------------------------------- > > Key: OFBIZ-4021 > URL: https://issues.apache.org/jira/browse/OFBIZ-4021 > Project: OFBiz > Issue Type: Sub-task > Components: framework > Reporter: Bruno Busco > Priority: Minor > Attachments: FilterForm.patch, FilterForm.patch, column_filter_disabled.JPG, column_filter_enabled.JPG, content_list.JPG, img_for_tomahawk.zip > > > This patch includes an initial implementation of a list-form column filtering feature. > The aim is to add the possibility to configure a list form to show, in its header, some fields that could be used to filter the rows displayed in the form. > This is a feature quite standard in many systems and could be seen into OFBiz as a "quick search"; the standard way of searching using a complete single-type form could be seen as an "advanced search". > Please find attached to this JIRA two screenshots that show you how the filtering option appears on the screen. > *How the user uses this feature* > The part of the screen that is normally used for the pagination controls (only the upper one) has been extended so that two icons are shown on the left. > The first one (a funnel) is used to show or hide the filtering fields. The second one (a magnifing glass) is used to run the search with the filter content. > *How the developer uses this feature* > The filtering feature can be enabled on any list-type form specifying the "filter-form-name" attribute. > This must be the name of a form that contains the details about how the filtering fields should be rendered. > When a list form with the filter-form-name option set is rendered, any column field is searched for in the filter-form. > If a field with the same name is found, its field rendering options are used to render the filter field. > A new field attribute "filter-field" has also been added. > This defaults to true but if it is set to false the filter field is not rendered for this column, even if a field with the same name is present in the filter-form. > This feature allows to use as filter-form an already existent form such as a regular FindXXX form. > In the patch the ListExample form has been changed to use this feature. You can check it there. > Unfortunately the patch does not work yet 100% but I hope that if someone finds it interesting could help me. > *What is there still to do* > 1) There is a FIXME in MacroFormRenderer.java file. I cannot make it work. If I enable the code that is commented there I get an error when a search is run. > 2) I cannot make the filtering fields show the actual content after a search is run. They are always rendered as empty. > 3) The filter row hide/show status should be saved so that it is maintained after a pagination. > I submit this patch as it is becouse I cannot easily improve it further but I hope someone could help. > The img_for_tamahawk.zip file includes imgs that should be added in the tomahawk images folder to make the patch work. > Thank you for any help! -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13139555#comment-13139555 ] Bruno Busco commented on OFBIZ-4021: ------------------------------------ Hi Jacques, yes, at that time I asked for a review of the POC. The idea was to improve the list form with a feature that is quite standard on other platforms. I was not sure that the way I implemented it was OK. I did not go further on this. But yes I am still interested in receiving comments. > Adding columns filtering fields in form widget > ---------------------------------------------- > > Key: OFBIZ-4021 > URL: https://issues.apache.org/jira/browse/OFBIZ-4021 > Project: OFBiz > Issue Type: Sub-task > Components: framework > Reporter: Bruno Busco > Priority: Minor > Attachments: FilterForm.patch, FilterForm.patch, column_filter_disabled.JPG, column_filter_enabled.JPG, content_list.JPG, img_for_tomahawk.zip > > > This patch includes an initial implementation of a list-form column filtering feature. > The aim is to add the possibility to configure a list form to show, in its header, some fields that could be used to filter the rows displayed in the form. > This is a feature quite standard in many systems and could be seen into OFBiz as a "quick search"; the standard way of searching using a complete single-type form could be seen as an "advanced search". > Please find attached to this JIRA two screenshots that show you how the filtering option appears on the screen. > *How the user uses this feature* > The part of the screen that is normally used for the pagination controls (only the upper one) has been extended so that two icons are shown on the left. > The first one (a funnel) is used to show or hide the filtering fields. The second one (a magnifing glass) is used to run the search with the filter content. > *How the developer uses this feature* > The filtering feature can be enabled on any list-type form specifying the "filter-form-name" attribute. > This must be the name of a form that contains the details about how the filtering fields should be rendered. > When a list form with the filter-form-name option set is rendered, any column field is searched for in the filter-form. > If a field with the same name is found, its field rendering options are used to render the filter field. > A new field attribute "filter-field" has also been added. > This defaults to true but if it is set to false the filter field is not rendered for this column, even if a field with the same name is present in the filter-form. > This feature allows to use as filter-form an already existent form such as a regular FindXXX form. > In the patch the ListExample form has been changed to use this feature. You can check it there. > Unfortunately the patch does not work yet 100% but I hope that if someone finds it interesting could help me. > *What is there still to do* > 1) There is a FIXME in MacroFormRenderer.java file. I cannot make it work. If I enable the code that is commented there I get an error when a search is run. > 2) I cannot make the filtering fields show the actual content after a search is run. They are always rendered as empty. > 3) The filter row hide/show status should be saved so that it is maintained after a pagination. > I submit this patch as it is becouse I cannot easily improve it further but I hope someone could help. > The img_for_tamahawk.zip file includes imgs that should be added in the tomahawk images folder to make the patch work. > Thank you for any help! -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13141019#comment-13141019 ] Nicolas Malin commented on OFBIZ-4021: -------------------------------------- Hi Bruno, good idea. I try to review your work but thelast patch fail on revision 1195864. {quote} patching file framework/widget/templates/htmlFormMacroLibrary.ftl Hunk #1 succeeded at 368 (offset 107 lines). Hunk #2 succeeded at 705 with fuzz 1 (offset 220 lines). Hunk #3 FAILED at 504. {quote} > Adding columns filtering fields in form widget > ---------------------------------------------- > > Key: OFBIZ-4021 > URL: https://issues.apache.org/jira/browse/OFBIZ-4021 > Project: OFBiz > Issue Type: Sub-task > Components: framework > Reporter: Bruno Busco > Priority: Minor > Attachments: FilterForm.patch, FilterForm.patch, column_filter_disabled.JPG, column_filter_enabled.JPG, content_list.JPG, img_for_tomahawk.zip > > > This patch includes an initial implementation of a list-form column filtering feature. > The aim is to add the possibility to configure a list form to show, in its header, some fields that could be used to filter the rows displayed in the form. > This is a feature quite standard in many systems and could be seen into OFBiz as a "quick search"; the standard way of searching using a complete single-type form could be seen as an "advanced search". > Please find attached to this JIRA two screenshots that show you how the filtering option appears on the screen. > *How the user uses this feature* > The part of the screen that is normally used for the pagination controls (only the upper one) has been extended so that two icons are shown on the left. > The first one (a funnel) is used to show or hide the filtering fields. The second one (a magnifing glass) is used to run the search with the filter content. > *How the developer uses this feature* > The filtering feature can be enabled on any list-type form specifying the "filter-form-name" attribute. > This must be the name of a form that contains the details about how the filtering fields should be rendered. > When a list form with the filter-form-name option set is rendered, any column field is searched for in the filter-form. > If a field with the same name is found, its field rendering options are used to render the filter field. > A new field attribute "filter-field" has also been added. > This defaults to true but if it is set to false the filter field is not rendered for this column, even if a field with the same name is present in the filter-form. > This feature allows to use as filter-form an already existent form such as a regular FindXXX form. > In the patch the ListExample form has been changed to use this feature. You can check it there. > Unfortunately the patch does not work yet 100% but I hope that if someone finds it interesting could help me. > *What is there still to do* > 1) There is a FIXME in MacroFormRenderer.java file. I cannot make it work. If I enable the code that is commented there I get an error when a search is run. > 2) I cannot make the filtering fields show the actual content after a search is run. They are always rendered as empty. > 3) The filter row hide/show status should be saved so that it is maintained after a pagination. > I submit this patch as it is becouse I cannot easily improve it further but I hope someone could help. > The img_for_tamahawk.zip file includes imgs that should be added in the tomahawk images folder to make the patch work. > Thank you for any help! -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
Free forum by Nabble | Edit this page |