List/Multi form column sorting
------------------------------ Key: OFBIZ-1943 URL: https://issues.apache.org/jira/browse/OFBIZ-1943 Project: OFBiz Issue Type: Improvement Components: ALL COMPONENTS Reporter: Bruno Busco Priority: Minor Hi, I would like to submit, to be reviewed, what I have done to implement sortable columns in multi and list forms. I wonder if there is a simpler and better solution that could, for instance, be implemented in the form widget itself requiring less code in the xml file. To be reviewed I implemented the sortable column in the FindExample Screen. This solution requires a little change in the framework (included in the patch). Basically the header-link-style attribute of the field tag needs to be parsed by FlexibleStringExpander in order to be used with a ${}. Two little arrow-up and arrow-down icons are also attached, those are shown close to the field name indicating which is the sorted column and the sort order. Thank you for reviewing, Bruno -- 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-1943?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bruno Busco updated OFBIZ-1943: ------------------------------- Attachment: sortable_form_column.jpg framework_images_webapp_images.zip sortable_form_columns.patch > List/Multi form column sorting > ------------------------------ > > Key: OFBIZ-1943 > URL: https://issues.apache.org/jira/browse/OFBIZ-1943 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS > Reporter: Bruno Busco > Priority: Minor > Attachments: framework_images_webapp_images.zip, sortable_form_column.jpg, sortable_form_columns.patch > > > Hi, > I would like to submit, to be reviewed, what I have done to implement sortable columns in multi and list forms. > I wonder if there is a simpler and better solution that could, for instance, be implemented in the form widget itself requiring less code in the xml file. > To be reviewed I implemented the sortable column in the FindExample Screen. > This solution requires a little change in the framework (included in the patch). Basically the header-link-style attribute of the field tag needs to be parsed by FlexibleStringExpander in order to be used with a ${}. > Two little arrow-up and arrow-down icons are also attached, those are shown close to the field name indicating which is the sorted column and the sort order. > Thank you for reviewing, > Bruno -- 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-1943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12627572#action_12627572 ] Jacopo Cappellato commented on OFBIZ-1943: ------------------------------------------ Hi Bruno, and thanks. I am sorry I have not even time now to open your patch file for a quick review, but have you had a chance to look at the sortable list defined in the Catalog->Product->Suppliers tab? That is implemented with widgets too and, even if it could be improved greatly, I think it could be interesting for you as you are working on this. Jacopo > List/Multi form column sorting > ------------------------------ > > Key: OFBIZ-1943 > URL: https://issues.apache.org/jira/browse/OFBIZ-1943 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS > Reporter: Bruno Busco > Priority: Minor > Attachments: framework_images_webapp_images.zip, sortable_form_column.jpg, sortable_form_columns.patch > > > Hi, > I would like to submit, to be reviewed, what I have done to implement sortable columns in multi and list forms. > I wonder if there is a simpler and better solution that could, for instance, be implemented in the form widget itself requiring less code in the xml file. > To be reviewed I implemented the sortable column in the FindExample Screen. > This solution requires a little change in the framework (included in the patch). Basically the header-link-style attribute of the field tag needs to be parsed by FlexibleStringExpander in order to be used with a ${}. > Two little arrow-up and arrow-down icons are also attached, those are shown close to the field name indicating which is the sorted column and the sort order. > Thank you for reviewing, > Bruno -- 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-1943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12627583#action_12627583 ] Bruno Busco commented on OFBIZ-1943: ------------------------------------ Thank you Jacopo, no I did not see the screen you have pointed out. I wiil give a look !! > List/Multi form column sorting > ------------------------------ > > Key: OFBIZ-1943 > URL: https://issues.apache.org/jira/browse/OFBIZ-1943 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS > Reporter: Bruno Busco > Priority: Minor > Attachments: framework_images_webapp_images.zip, sortable_form_column.jpg, sortable_form_columns.patch > > > Hi, > I would like to submit, to be reviewed, what I have done to implement sortable columns in multi and list forms. > I wonder if there is a simpler and better solution that could, for instance, be implemented in the form widget itself requiring less code in the xml file. > To be reviewed I implemented the sortable column in the FindExample Screen. > This solution requires a little change in the framework (included in the patch). Basically the header-link-style attribute of the field tag needs to be parsed by FlexibleStringExpander in order to be used with a ${}. > Two little arrow-up and arrow-down icons are also attached, those are shown close to the field name indicating which is the sorted column and the sort order. > Thank you for reviewing, > Bruno -- 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-1943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12627910#action_12627910 ] Bruno Busco commented on OFBIZ-1943: ------------------------------------ Jacopo, I gave a look to the link you pointed out. What I implemented has, in addition to that: - the possibility to have a ascending/descending sort order - the graphic visualizzation of the sorted column (and order) - the search parameters are saved so that the listed items are always the same every time but only differently sorted I tryed to send the sortField has a parameter instead of using a javascript set but, in this way, all the search parameters are not saved and the list revets to a full (not filtered list) any time a sort for a column. - Any suggestion? - Any chance to have the FlexibleStringExpander header-link-style chance committed? > List/Multi form column sorting > ------------------------------ > > Key: OFBIZ-1943 > URL: https://issues.apache.org/jira/browse/OFBIZ-1943 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS > Reporter: Bruno Busco > Priority: Minor > Attachments: framework_images_webapp_images.zip, sortable_form_column.jpg, sortable_form_columns.patch > > > Hi, > I would like to submit, to be reviewed, what I have done to implement sortable columns in multi and list forms. > I wonder if there is a simpler and better solution that could, for instance, be implemented in the form widget itself requiring less code in the xml file. > To be reviewed I implemented the sortable column in the FindExample Screen. > This solution requires a little change in the framework (included in the patch). Basically the header-link-style attribute of the field tag needs to be parsed by FlexibleStringExpander in order to be used with a ${}. > Two little arrow-up and arrow-down icons are also attached, those are shown close to the field name indicating which is the sorted column and the sort order. > Thank you for reviewing, > Bruno -- 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-1943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12628800#action_12628800 ] Bilgin Ibryam commented on OFBIZ-1943: -------------------------------------- Bruno, your solution works, but as you said it requires lots of code in the form definition and also search parameters (like begins with, contains, ignore case) gets the default values and search result is not correct. I have tried to implement the same functionality in the form widget level For this I also used the styles and images from Bruno's patch. Also added one more image. To test the patch(columnSort.diff) you need to add also the images from columnSort.rar to framework/images... And you can see the columns to sort in Example list form. Would be nice also to have comments/review by someone familiar with widgets. Bilgin > List/Multi form column sorting > ------------------------------ > > Key: OFBIZ-1943 > URL: https://issues.apache.org/jira/browse/OFBIZ-1943 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS > Reporter: Bruno Busco > Priority: Minor > Attachments: framework_images_webapp_images.zip, sortable_form_column.jpg, sortable_form_columns.patch > > > Hi, > I would like to submit, to be reviewed, what I have done to implement sortable columns in multi and list forms. > I wonder if there is a simpler and better solution that could, for instance, be implemented in the form widget itself requiring less code in the xml file. > To be reviewed I implemented the sortable column in the FindExample Screen. > This solution requires a little change in the framework (included in the patch). Basically the header-link-style attribute of the field tag needs to be parsed by FlexibleStringExpander in order to be used with a ${}. > Two little arrow-up and arrow-down icons are also attached, those are shown close to the field name indicating which is the sorted column and the sort order. > Thank you for reviewing, > Bruno -- 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-1943?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bilgin Ibryam updated OFBIZ-1943: --------------------------------- Attachment: columnSort.diff > List/Multi form column sorting > ------------------------------ > > Key: OFBIZ-1943 > URL: https://issues.apache.org/jira/browse/OFBIZ-1943 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS > Reporter: Bruno Busco > Priority: Minor > Attachments: columnSort.diff, columnSort.rar, framework_images_webapp_images.zip, sortable_form_column.jpg, sortable_form_columns.patch > > > Hi, > I would like to submit, to be reviewed, what I have done to implement sortable columns in multi and list forms. > I wonder if there is a simpler and better solution that could, for instance, be implemented in the form widget itself requiring less code in the xml file. > To be reviewed I implemented the sortable column in the FindExample Screen. > This solution requires a little change in the framework (included in the patch). Basically the header-link-style attribute of the field tag needs to be parsed by FlexibleStringExpander in order to be used with a ${}. > Two little arrow-up and arrow-down icons are also attached, those are shown close to the field name indicating which is the sorted column and the sort order. > Thank you for reviewing, > Bruno -- 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-1943?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bilgin Ibryam updated OFBIZ-1943: --------------------------------- Attachment: columnSort.rar > List/Multi form column sorting > ------------------------------ > > Key: OFBIZ-1943 > URL: https://issues.apache.org/jira/browse/OFBIZ-1943 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS > Reporter: Bruno Busco > Priority: Minor > Attachments: columnSort.diff, columnSort.rar, framework_images_webapp_images.zip, sortable_form_column.jpg, sortable_form_columns.patch > > > Hi, > I would like to submit, to be reviewed, what I have done to implement sortable columns in multi and list forms. > I wonder if there is a simpler and better solution that could, for instance, be implemented in the form widget itself requiring less code in the xml file. > To be reviewed I implemented the sortable column in the FindExample Screen. > This solution requires a little change in the framework (included in the patch). Basically the header-link-style attribute of the field tag needs to be parsed by FlexibleStringExpander in order to be used with a ${}. > Two little arrow-up and arrow-down icons are also attached, those are shown close to the field name indicating which is the sorted column and the sort order. > Thank you for reviewing, > Bruno -- 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-1943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12628844#action_12628844 ] Bruno Busco commented on OFBIZ-1943: ------------------------------------ WOW !!!!!! Many thanks! Now I like it MUCH MORE! ;-) I have tested and it works really fine (and very little XML code). Hope to see committed soon! Applying it on one of my custom forms I have seen that a case like this is not yet handled properly. <field name="productCategoryId" title="Categoria" entry-name="cat" sort-field="true"> <display-entity entity-name="ProductCategory"/> </field> In this case the sort should be done using entry-name, am I right? > List/Multi form column sorting > ------------------------------ > > Key: OFBIZ-1943 > URL: https://issues.apache.org/jira/browse/OFBIZ-1943 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS > Reporter: Bruno Busco > Priority: Minor > Attachments: columnSort.diff, columnSort.rar, framework_images_webapp_images.zip, sortable_form_column.jpg, sortable_form_columns.patch > > > Hi, > I would like to submit, to be reviewed, what I have done to implement sortable columns in multi and list forms. > I wonder if there is a simpler and better solution that could, for instance, be implemented in the form widget itself requiring less code in the xml file. > To be reviewed I implemented the sortable column in the FindExample Screen. > This solution requires a little change in the framework (included in the patch). Basically the header-link-style attribute of the field tag needs to be parsed by FlexibleStringExpander in order to be used with a ${}. > Two little arrow-up and arrow-down icons are also attached, those are shown close to the field name indicating which is the sorted column and the sort order. > Thank you for reviewing, > Bruno -- 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-1943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12628854#action_12628854 ] Bruno Busco commented on OFBIZ-1943: ------------------------------------ Bilgin, could we perhaps have the name of the field to be passed as sortField as an additional attribute that, in case it is not specified, defaults to the field name? Or could we replace the sort-field with a sort-name attribute that, if specified, enables the sort on the field and sets also the fieldname passed as sortField? What is the preferred way? > List/Multi form column sorting > ------------------------------ > > Key: OFBIZ-1943 > URL: https://issues.apache.org/jira/browse/OFBIZ-1943 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS > Reporter: Bruno Busco > Priority: Minor > Attachments: columnSort.diff, columnSort.rar, framework_images_webapp_images.zip, sortable_form_column.jpg, sortable_form_columns.patch > > > Hi, > I would like to submit, to be reviewed, what I have done to implement sortable columns in multi and list forms. > I wonder if there is a simpler and better solution that could, for instance, be implemented in the form widget itself requiring less code in the xml file. > To be reviewed I implemented the sortable column in the FindExample Screen. > This solution requires a little change in the framework (included in the patch). Basically the header-link-style attribute of the field tag needs to be parsed by FlexibleStringExpander in order to be used with a ${}. > Two little arrow-up and arrow-down icons are also attached, those are shown close to the field name indicating which is the sorted column and the sort order. > Thank you for reviewing, > Bruno -- 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-1943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631339#action_12631339 ] Bruno Busco commented on OFBIZ-1943: ------------------------------------ Could someone please review this patch? IMO it is a really good improvement to the OFBiz UI. On my side I have included the patch in my local copy and I am using it. As explained in a previous comment I need to handle a case in which an entry-name is specified in a field tag. The patch like it is now does not support this and the effect is that always the field name is passed as sortField resulting in an error. I would update the patch as follows but before I would like an OK from some expert: I would change the sort-field from a boolean to a string so that the name of the entity field to sort on should always be specified like in the examples here: // Non sortable column <field name="productCategoryId" title="Categoria"> <display/> </field> // Regular sortable column <field name="productCategoryId" title="Categoria" sort-field="productCategoryId"> <display/> </field> // Sortable column with sortField different from field name <field name="productCategoryId" title="Categoria" entry-name="cat" sort-field="cat"> <display-entity entity-name="ProductCategory"/> </field> Is this attribute syntax ok with you? > List/Multi form column sorting > ------------------------------ > > Key: OFBIZ-1943 > URL: https://issues.apache.org/jira/browse/OFBIZ-1943 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS > Reporter: Bruno Busco > Priority: Minor > Attachments: columnSort.diff, columnSort.rar, framework_images_webapp_images.zip, sortable_form_column.jpg, sortable_form_columns.patch > > > Hi, > I would like to submit, to be reviewed, what I have done to implement sortable columns in multi and list forms. > I wonder if there is a simpler and better solution that could, for instance, be implemented in the form widget itself requiring less code in the xml file. > To be reviewed I implemented the sortable column in the FindExample Screen. > This solution requires a little change in the framework (included in the patch). Basically the header-link-style attribute of the field tag needs to be parsed by FlexibleStringExpander in order to be used with a ${}. > Two little arrow-up and arrow-down icons are also attached, those are shown close to the field name indicating which is the sorted column and the sort order. > Thank you for reviewing, > Bruno -- 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-1943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631351#action_12631351 ] Bilgin Ibryam commented on OFBIZ-1943: -------------------------------------- Bruno, thanks for testing the patch! I think the change you propose (change the sort-field from a boolean to a string ) is fine, but it would be nice to have a review from a widget expert, as there could be also other cases to consider. what about to override the sortField name with entry-name if entry-name exists for a sortable field? > List/Multi form column sorting > ------------------------------ > > Key: OFBIZ-1943 > URL: https://issues.apache.org/jira/browse/OFBIZ-1943 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS > Reporter: Bruno Busco > Priority: Minor > Attachments: columnSort.diff, columnSort.rar, framework_images_webapp_images.zip, sortable_form_column.jpg, sortable_form_columns.patch > > > Hi, > I would like to submit, to be reviewed, what I have done to implement sortable columns in multi and list forms. > I wonder if there is a simpler and better solution that could, for instance, be implemented in the form widget itself requiring less code in the xml file. > To be reviewed I implemented the sortable column in the FindExample Screen. > This solution requires a little change in the framework (included in the patch). Basically the header-link-style attribute of the field tag needs to be parsed by FlexibleStringExpander in order to be used with a ${}. > Two little arrow-up and arrow-down icons are also attached, those are shown close to the field name indicating which is the sorted column and the sort order. > Thank you for reviewing, > Bruno -- 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-1943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631357#action_12631357 ] Bruno Busco commented on OFBIZ-1943: ------------------------------------ Yes, this is even a simpler solution. But, I am wondering if could not be there any case in which the sortField must be specified different from name AND from entry-name. May be it will never happen, and if it does an adhoc if sortField = "mysortField" then replace with "specificsortField" could be done in the XML. I am happy with what you suggest ! If some widget expert gives an OK I could try to update the patch. > List/Multi form column sorting > ------------------------------ > > Key: OFBIZ-1943 > URL: https://issues.apache.org/jira/browse/OFBIZ-1943 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS > Reporter: Bruno Busco > Priority: Minor > Attachments: columnSort.diff, columnSort.rar, framework_images_webapp_images.zip, sortable_form_column.jpg, sortable_form_columns.patch > > > Hi, > I would like to submit, to be reviewed, what I have done to implement sortable columns in multi and list forms. > I wonder if there is a simpler and better solution that could, for instance, be implemented in the form widget itself requiring less code in the xml file. > To be reviewed I implemented the sortable column in the FindExample Screen. > This solution requires a little change in the framework (included in the patch). Basically the header-link-style attribute of the field tag needs to be parsed by FlexibleStringExpander in order to be used with a ${}. > Two little arrow-up and arrow-down icons are also attached, those are shown close to the field name indicating which is the sorted column and the sort order. > Thank you for reviewing, > Bruno -- 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-1943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631392#action_12631392 ] David E. Jones commented on OFBIZ-1943: --------------------------------------- Changing it to a String adds a fair bit of complexity, and makes defaulting to "true" more difficult... though you could default to the field-name it is more difficult to represent and such. I really don't see the point of being able to sort a certain column by a field other than what is in the column. If someone has a specific scenario in mind lets discuss how to accomplish that scenario. Otherwise keep it simple so it is easier to use, more commonly used, and doesn't have features that are not grounded in an actual requirement. It would be great to keep this super-simple and set the default to true so that this capability shows up everywhere. > List/Multi form column sorting > ------------------------------ > > Key: OFBIZ-1943 > URL: https://issues.apache.org/jira/browse/OFBIZ-1943 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS > Reporter: Bruno Busco > Priority: Minor > Attachments: columnSort.diff, columnSort.rar, framework_images_webapp_images.zip, sortable_form_column.jpg, sortable_form_columns.patch > > > Hi, > I would like to submit, to be reviewed, what I have done to implement sortable columns in multi and list forms. > I wonder if there is a simpler and better solution that could, for instance, be implemented in the form widget itself requiring less code in the xml file. > To be reviewed I implemented the sortable column in the FindExample Screen. > This solution requires a little change in the framework (included in the patch). Basically the header-link-style attribute of the field tag needs to be parsed by FlexibleStringExpander in order to be used with a ${}. > Two little arrow-up and arrow-down icons are also attached, those are shown close to the field name indicating which is the sorted column and the sort order. > Thank you for reviewing, > Bruno -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
Bilgin,
so it seems we are OK with: 1) having the attribute boolean like it is now 2) if a entry-name is specified us this instead of name as sortField 3) David suggests also to have the sort-field attribute true by default to have this automatically show up everywhere. I agree with this but in order to have it working we need to have a default for the asc/desc/normal styles as well. Are we ok to have the styles set by default to: sortorder-asc, sortorder-desc, sortorder ? Bilgin, could I try to update your patch or you are already on that way? -Bruno 2008/9/16 David E. Jones (JIRA) <[hidden email]> > > [ > https://issues.apache.org/jira/browse/OFBIZ-1943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631392#action_12631392] > > David E. Jones commented on OFBIZ-1943: > --------------------------------------- > > Changing it to a String adds a fair bit of complexity, and makes defaulting > to "true" more difficult... though you could default to the field-name it is > more difficult to represent and such. > > I really don't see the point of being able to sort a certain column by a > field other than what is in the column. If someone has a specific scenario > in mind lets discuss how to accomplish that scenario. Otherwise keep it > simple so it is easier to use, more commonly used, and doesn't have features > that are not grounded in an actual requirement. > > It would be great to keep this super-simple and set the default to true so > that this capability shows up everywhere. > > > List/Multi form column sorting > > ------------------------------ > > > > Key: OFBIZ-1943 > > URL: https://issues.apache.org/jira/browse/OFBIZ-1943 > > Project: OFBiz > > Issue Type: Improvement > > Components: ALL COMPONENTS > > Reporter: Bruno Busco > > Priority: Minor > > Attachments: columnSort.diff, columnSort.rar, > framework_images_webapp_images.zip, sortable_form_column.jpg, > sortable_form_columns.patch > > > > > > Hi, > > I would like to submit, to be reviewed, what I have done to implement > sortable columns in multi and list forms. > > I wonder if there is a simpler and better solution that could, for > instance, be implemented in the form widget itself requiring less code in > the xml file. > > To be reviewed I implemented the sortable column in the FindExample > Screen. > > This solution requires a little change in the framework (included in the > patch). Basically the header-link-style attribute of the field tag needs to > be parsed by FlexibleStringExpander in order to be used with a ${}. > > Two little arrow-up and arrow-down icons are also attached, those are > shown close to the field name indicating which is the sorted column and the > sort order. > > Thank you for reviewing, > > Bruno > > -- > This message is automatically generated by JIRA. > - > You can reply to this email to add a comment to the issue online. > > |
Specifying a default sort order along with allowing the user to change the sort order is a good idea. By "normal" do you mean no sorting at all? If so that is a good default. In other words there is no sorting on that field unless the user clicks on an arrow in the header to select ascending or descending. -David On Sep 16, 2008, at 9:42 AM, Bruno Busco wrote: > Bilgin, > so it seems we are OK with: > 1) having the attribute boolean like it is now > 2) if a entry-name is specified us this instead of name as sortField > 3) David suggests also to have the sort-field attribute true by > default to > have this automatically show up everywhere. I agree with this but in > order > to have it working we need to have a default for the asc/desc/normal > styles > as well. > Are we ok to have the styles set by default to: sortorder-asc, > sortorder-desc, sortorder ? > > Bilgin, could I try to update your patch or you are already on that > way? > -Bruno > > > 2008/9/16 David E. Jones (JIRA) <[hidden email]> > >> >> [ >> https://issues.apache.org/jira/browse/OFBIZ-1943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631392 >> #action_12631392] >> >> David E. Jones commented on OFBIZ-1943: >> --------------------------------------- >> >> Changing it to a String adds a fair bit of complexity, and makes >> defaulting >> to "true" more difficult... though you could default to the field- >> name it is >> more difficult to represent and such. >> >> I really don't see the point of being able to sort a certain column >> by a >> field other than what is in the column. If someone has a specific >> scenario >> in mind lets discuss how to accomplish that scenario. Otherwise >> keep it >> simple so it is easier to use, more commonly used, and doesn't have >> features >> that are not grounded in an actual requirement. >> >> It would be great to keep this super-simple and set the default to >> true so >> that this capability shows up everywhere. >> >>> List/Multi form column sorting >>> ------------------------------ >>> >>> Key: OFBIZ-1943 >>> URL: https://issues.apache.org/jira/browse/OFBIZ-1943 >>> Project: OFBiz >>> Issue Type: Improvement >>> Components: ALL COMPONENTS >>> Reporter: Bruno Busco >>> Priority: Minor >>> Attachments: columnSort.diff, columnSort.rar, >> framework_images_webapp_images.zip, sortable_form_column.jpg, >> sortable_form_columns.patch >>> >>> >>> Hi, >>> I would like to submit, to be reviewed, what I have done to >>> implement >> sortable columns in multi and list forms. >>> I wonder if there is a simpler and better solution that could, for >> instance, be implemented in the form widget itself requiring less >> code in >> the xml file. >>> To be reviewed I implemented the sortable column in the FindExample >> Screen. >>> This solution requires a little change in the framework (included >>> in the >> patch). Basically the header-link-style attribute of the field tag >> needs to >> be parsed by FlexibleStringExpander in order to be used with a ${}. >>> Two little arrow-up and arrow-down icons are also attached, those >>> are >> shown close to the field name indicating which is the sorted column >> and the >> sort order. >>> Thank you for reviewing, >>> Bruno >> >> -- >> This message is automatically generated by JIRA. >> - >> You can reply to this email to add a comment to the issue online. >> >> |
David,
I was not clear. I try to better explain what I mean. With the actual patch, in order to have a sortable column the form should be something like this: <form name="aName" type="list or multi" ...... default-sort-field-asc-style="sortorder-asc" default-sort-field-desc-style="sortorder-desc" default-sort-field-style="sortorder"> The new attributes default-sort-field-asc-style, default-sort-field-desc-style, default-sort-field-style specify the style that will be used to render the column header when the column is sorted ascending, descending and not sorted. Different styles can be specified at field level to override those. In order to have the functionality spread out magically into every table we should have a default value for these form tag attributes also. The default sort column and order is specified using an instruction like this: <set field="parameters.sortField" from-field="parameters.sortField" default-value="aFiledName or -aFieldName"/> in the form actions. I am asking if we are OK with the defaults styles names sortorder-asc, sortorder-desc and sortorder that must be included into de default maincss.css. -Bruno 2008/9/16 David E Jones <[hidden email]> > > Specifying a default sort order along with allowing the user to change the > sort order is a good idea. > > By "normal" do you mean no sorting at all? If so that is a good default. In > other words there is no sorting on that field unless the user clicks on an > arrow in the header to select ascending or descending. > > -David > > > > On Sep 16, 2008, at 9:42 AM, Bruno Busco wrote: > > Bilgin, >> so it seems we are OK with: >> 1) having the attribute boolean like it is now >> 2) if a entry-name is specified us this instead of name as sortField >> 3) David suggests also to have the sort-field attribute true by default to >> have this automatically show up everywhere. I agree with this but in order >> to have it working we need to have a default for the asc/desc/normal >> styles >> as well. >> Are we ok to have the styles set by default to: sortorder-asc, >> sortorder-desc, sortorder ? >> >> Bilgin, could I try to update your patch or you are already on that way? >> -Bruno >> >> >> 2008/9/16 David E. Jones (JIRA) <[hidden email]> >> >> >>> [ >>> >>> https://issues.apache.org/jira/browse/OFBIZ-1943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631392 >>> #action_12631392] >>> >>> David E. Jones commented on OFBIZ-1943: >>> --------------------------------------- >>> >>> Changing it to a String adds a fair bit of complexity, and makes >>> defaulting >>> to "true" more difficult... though you could default to the field-name it >>> is >>> more difficult to represent and such. >>> >>> I really don't see the point of being able to sort a certain column by a >>> field other than what is in the column. If someone has a specific >>> scenario >>> in mind lets discuss how to accomplish that scenario. Otherwise keep it >>> simple so it is easier to use, more commonly used, and doesn't have >>> features >>> that are not grounded in an actual requirement. >>> >>> It would be great to keep this super-simple and set the default to true >>> so >>> that this capability shows up everywhere. >>> >>> List/Multi form column sorting >>>> ------------------------------ >>>> >>>> Key: OFBIZ-1943 >>>> URL: https://issues.apache.org/jira/browse/OFBIZ-1943 >>>> Project: OFBiz >>>> Issue Type: Improvement >>>> Components: ALL COMPONENTS >>>> Reporter: Bruno Busco >>>> Priority: Minor >>>> Attachments: columnSort.diff, columnSort.rar, >>>> >>> framework_images_webapp_images.zip, sortable_form_column.jpg, >>> sortable_form_columns.patch >>> >>>> >>>> >>>> Hi, >>>> I would like to submit, to be reviewed, what I have done to implement >>>> >>> sortable columns in multi and list forms. >>> >>>> I wonder if there is a simpler and better solution that could, for >>>> >>> instance, be implemented in the form widget itself requiring less code in >>> the xml file. >>> >>>> To be reviewed I implemented the sortable column in the FindExample >>>> >>> Screen. >>> >>>> This solution requires a little change in the framework (included in the >>>> >>> patch). Basically the header-link-style attribute of the field tag needs >>> to >>> be parsed by FlexibleStringExpander in order to be used with a ${}. >>> >>>> Two little arrow-up and arrow-down icons are also attached, those are >>>> >>> shown close to the field name indicating which is the sorted column and >>> the >>> sort order. >>> >>>> Thank you for reviewing, >>>> Bruno >>>> >>> >>> -- >>> 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-1943?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bruno Busco updated OFBIZ-1943: ------------------------------- Attachment: columnSort.diff Bilgin, please find attached an updated patch. In this patch the entry-name is used if present in place of the field name. I thought that the idea of having the sort-field="true" by default it is not easy to implement because, in order to enable the column sort the sortField variable must be also defined and used in a sortBy statement. I propose to start committing this as is and then improve it if necessary. > List/Multi form column sorting > ------------------------------ > > Key: OFBIZ-1943 > URL: https://issues.apache.org/jira/browse/OFBIZ-1943 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS > Reporter: Bruno Busco > Priority: Minor > Attachments: columnSort.diff, columnSort.diff, columnSort.rar, framework_images_webapp_images.zip, sortable_form_column.jpg, sortable_form_columns.patch > > > Hi, > I would like to submit, to be reviewed, what I have done to implement sortable columns in multi and list forms. > I wonder if there is a simpler and better solution that could, for instance, be implemented in the form widget itself requiring less code in the xml file. > To be reviewed I implemented the sortable column in the FindExample Screen. > This solution requires a little change in the framework (included in the patch). Basically the header-link-style attribute of the field tag needs to be parsed by FlexibleStringExpander in order to be used with a ${}. > Two little arrow-up and arrow-down icons are also attached, those are shown close to the field name indicating which is the sorted column and the sort order. > Thank you for reviewing, > Bruno -- 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-1943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12632560#action_12632560 ] Bilgin Ibryam commented on OFBIZ-1943: -------------------------------------- Bruno, thanks for updating the patch! I think now the patch (columnSort.diff, columnSort.rar) is ready for commit/review by someone with framework commit access and widget knowledge! > List/Multi form column sorting > ------------------------------ > > Key: OFBIZ-1943 > URL: https://issues.apache.org/jira/browse/OFBIZ-1943 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS > Reporter: Bruno Busco > Priority: Minor > Attachments: columnSort.diff, columnSort.diff, columnSort.rar, framework_images_webapp_images.zip, sortable_form_column.jpg, sortable_form_columns.patch > > > Hi, > I would like to submit, to be reviewed, what I have done to implement sortable columns in multi and list forms. > I wonder if there is a simpler and better solution that could, for instance, be implemented in the form widget itself requiring less code in the xml file. > To be reviewed I implemented the sortable column in the FindExample Screen. > This solution requires a little change in the framework (included in the patch). Basically the header-link-style attribute of the field tag needs to be parsed by FlexibleStringExpander in order to be used with a ${}. > Two little arrow-up and arrow-down icons are also attached, those are shown close to the field name indicating which is the sorted column and the sort order. > Thank you for reviewing, > Bruno -- 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-1943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12635340#action_12635340 ] Bruno Busco commented on OFBIZ-1943: ------------------------------------ It would be nice to add this in the September main new features list! ;-) > List/Multi form column sorting > ------------------------------ > > Key: OFBIZ-1943 > URL: https://issues.apache.org/jira/browse/OFBIZ-1943 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS > Reporter: Bruno Busco > Priority: Minor > Attachments: columnSort.diff, columnSort.diff, columnSort.rar, framework_images_webapp_images.zip, sortable_form_column.jpg, sortable_form_columns.patch > > > Hi, > I would like to submit, to be reviewed, what I have done to implement sortable columns in multi and list forms. > I wonder if there is a simpler and better solution that could, for instance, be implemented in the form widget itself requiring less code in the xml file. > To be reviewed I implemented the sortable column in the FindExample Screen. > This solution requires a little change in the framework (included in the patch). Basically the header-link-style attribute of the field tag needs to be parsed by FlexibleStringExpander in order to be used with a ${}. > Two little arrow-up and arrow-down icons are also attached, those are shown close to the field name indicating which is the sorted column and the sort order. > Thank you for reviewing, > Bruno -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
Free forum by Nabble | Edit this page |