Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8429699
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:24:31+00:00 2026-06-10T05:24:31+00:00

Here is some psuedo code for my table: List<IColumn<Foo>> columns = new ArrayList<IColumn<Foo>>(); columns.add(new

  • 0

Here is some psuedo code for my table:

List<IColumn<Foo>> columns = new ArrayList<IColumn<Foo>>();
columns.add(new PropertyColumn<Foo>(Model.of("Name"), "name", "name"));
columns.add(new PropertyColumn<Foo>(Model.of("Leader"), "leader.lastName",
   leader.fullName"));

fooTable = new AjaxFallbackDefaultDataTable<Foo>("fooTable", columns,
   provider, 10);

The class Foo contains among other fields:

private String name;
private User leader;

And class User contains Strings userName, password, firstName, lastName, email, along with:

public String getFullName() {
    // Use blank strings in place of "null" literals
    String f = firstName != null ? firstName: "";
    String l = lastName != null ? lastName: "";
    return (l + ", " + f);
}

Every Foo has a name, and every User has has a first and last name. However, not every Foo has a leader, so in the table above, there are several null/ blank values for leader. When the table is sorted by leader by clicking the column header, all Foo’s without a leader are missing. When sorted again by name, they return, with blanks for leader.

Is there anyway to fix this? A preference where nulls always sort last would be best, but I’ll take anything where they don’t just disappear.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T05:24:32+00:00Added an answer on June 10, 2026 at 5:24 am

    The correct sorting is a responsibility of the SortableDataProvider. If it is making items disappear, you should revise it’s logic.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's some code: DirectorySearcher searcher = new DirectorySearcher(); searcher.Filter = (&(objectClass=user)(sAMAccountName= + lstUsers.SelectedItem.Text +
I'm trying to make a trigger that updates a table, and here's some psuedo
Here is some pseudo code as follows. public class MyObject { private List<Object> someStuff;
Why does the titlebar overlap the pixels of JPanel. Here some code: protected void
Here is some sample Python code: import re some_regex = re.compile(r\s+1\s+) result = some_regex.search(
Here is some simple code: DIR* pd = opendir(xxxx); struct dirent *cur; while (cur
Here's some code (full program follows later in the question): template <typename T> T
Here is some code: class Person def initialize(age) @age = age end def age
I'm having an issue with WebGrid paging; but first, here's some controller pseudo code:
Whew! Long title...here's some pseudo-code to explain that verbiage: int main(){ int* ptr =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.