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

  • SEARCH
  • Home
  • 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 8088447
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T19:05:32+00:00 2026-06-05T19:05:32+00:00

is it possible to have a specific element on top of the list? backgoround:

  • 0

is it possible to have a specific element on top of the list?

backgoround:
I have an event app, where new events are constantly added. The events are orderd by date. If an event passes, it is still on top of the page. Now that some time passed, the first elements are all over, so the first paged doesn’t display any necassery data anymore. To get to events which will happen, the user has to click on the pager button.
I want this events to be displayed on top, and if the user want’s to see previous events, he has to click the back button of the pager.

What have I tried:

cellTable.setVisibleRange(overElements, (overElements + totalEementCount));

this mixes up the whole pager logic, and the user can’t switch from pager to page anymore.

SingleSelectionModel<JSEvents> selectionModel = new SingleSelectionModel<JSEvents>();
...
selectionModel.setSelected(nextEvent, true);

this selects the right element, and moves the pager to it, but the other elements are still visible, so if I have a few “over” events and in the worst case, only have a single “comming” event in the table. Also it is the usability is bad, since the user has to look which event is next and doesn’t have it on top of the page…

  • 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-05T19:05:34+00:00Added an answer on June 5, 2026 at 7:05 pm

    found a solution:
    the celltable has a method setVisibleRange. This method is used in the examples when a pager involved:

                int start = display.getVisibleRange().getStart();
                int end = start + display.getVisibleRange().getLength();
                end = end >= data.size() ? data.size() : end;
                List<JSEvents> sub = data.subList(start, end);
                updateRowData(start, sub);
    

    the updateRowData tells the celltable, which data is displayed and on which position this data starts.

    Now if we want to have a speciffic element on top of the page we can use the same function. This is how I end up using it:

            int end = start + PAGESIZE;
            end = (end >= data.size()) ? data.size() : end;
            List<JSEvents> sub = data.subList(start, end);
    
            dataProvider.updateRowData(start, sub);
            cellTable.setVisibleRange(start, sub.size());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to remove than add back click event to specific element? i.e
Is it possible to have individual indentation of items in a QTreeWidget? In specific,
Possible Duplicate: Count specific character occurances in string I have a delimeter in string
I have a simple question Is it possible to download a specific resource file
Is it possible when using TFS server to automatically have it ensure a specific
Is it possible to have a free iPhone app that has say an initial
Is it possible to select element with specific content? for example in #footer i
This is so redundant, but I have a specific element that does not need
We have specific XML that has specific structure: <root> <element type=a> <value>someValueA</value> </element> <element
Is it possible to listen for a specific DOM element to be loaded? I

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.