question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Column: Automatic sort if groupRow is set

See original GitHub issue

Describe the defect When having a column that has the property “groupRow” set to “true” and the “sortBy” property is set then this column is automatically sorted.

Environment:

  • PF Version: 11.0.1
  • JSF + version: JSF 2.3
  • Affected browsers: Firefox and Chrome

Expected behavior A column where “sortOrder” is not set should not be sorted by default. At the example below the column is sorted automatically.

Example XHTML

<h:form>
    <p:dataTable value="#{groupRow.data}" var="data">
        <p:column sortBy="#{data}" filterBy="#{data}" groupRow="true">
            <h:outputText value="#{data}" />
        </p:column>
    </p:dataTable>
</h:form>

Example Bean

@Named
@ViewScoped
public class GroupRow implements Serializable {
    private static final long serialVersionUID = 4485167715842515932L;

    private List<Integer> data = null;

    public List<Integer> getData() {
        if (data == null) {
            data = new ArrayList<>();
            for (int i = 10; i >= 1; i--)
                data.add(i);
        }
        return data;
    }
}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
jepsarcommented, May 18, 2022

@halisyilboga please open a new issue which includes a reproducer and references this issue.

0reactions
halisyilbogacommented, May 18, 2022

Aslinda grup satir yapmak ile sort yapmak arasinda fark var. Grup satirlamanin siralama olmadanda calisabilmesi gerekmektedir. We add newly added rows at the top of the table and this feature broke that. Also we make inplace edit and automatik sorting is also broke that feature. Last but not least default sorted column seems ugly and irritating. We can get the order from db or backend why I soppose to sort in filter. When I investigate SordOrder Enum I saw that it has a propertyv UNSORTED. But this feature is also does not work correct with grouprowing. This is definetly a bug.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Automatically sort rows when entering data in specific column
If you want to sort a custom list in excel, you might try below steps: 1. Select the columns to sort. 2. In...
Read more >
How to group rows in Excel to collapse and expand them
I have a sorted column and want to create a group whenever the value value in the column changes. I get a 'Cannot...
Read more >
Grouping by Row: Core Feature of our Datagrid - AG Grid
Row Grouping. This page shows how to group your rows. It starts off with Auto Column Groups, the simplest way to configure row...
Read more >
Excel Grouping (Rows and Columns) | How to Group in Excel
Have you ever wanted to know how to make sense of complicated Excel data? In this video, I'm going to show you the...
Read more >
Tutorial: Sort Group Rows by Summary Values
By default, group rows are automatically sorted in alphabetical order where ... To remove group row sorting, right-click the Category column ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found