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 8853171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:35:09+00:00 2026-06-14T13:35:09+00:00

I have a ListView within a panel that has vertical scrolling enabled and absolute

  • 0

I have a ListView within a panel that has vertical scrolling enabled and absolute positioning using css. When I select an IndicatingAjaxFallbackLink that was added to the listView it updates other panels on the page to provide futher information/options for the listItem. It also refreshes the listView to add a css class to highlight the selected listItem. I am trying to add an anchor to the listView so that it will render scrolled to display the selected listItem.

Problem: When I select an item down the list the listView will reload scrolled to the top of the panel, instead of to selected item. Is this possible without a url redirect & full page reload?

markup:

<div wicket:id="psbContainer" style="position: absolute; top: 325px; height: 300px; overflow-y: auto; left: 4px; right: 305px;">
    <table width="100%">
        <tr wicket:id="psbList" valign="top">
            <td><a wicket:id="viewRelated"><span wicket:id="psbNum"/></a></td>
            <td wicket:id="summary"/>
            <td wicket:id="psbMilestone"/>
            <td wicket:id="dueDate"/>
            <td wicket:id="devCount"/>
            <td wicket:id="activeCount"/>
            <td wicket:id="ccCount"/>
            <td wicket:id="team"/>
        </tr>
    </table>
</div>

java:

    psbListView = new ListView("psbList", psbList) {
        protected void populateItem(ListItem listItem) {
            final Space psb = (Space) listItem.getModelObject();
            if(psb.equals(psbSelected)) {
                listItem.add(selected);
            }
            // viewRelated ========================================================
            IndicatingAjaxFallbackLink viewRelated = new IndicatingAjaxFallbackLink("viewRelated") {
                public void onClick(AjaxRequestTarget target) {
                    psbSelected = psb;
                    target.addComponent(pslpContainer);
                }
            };
            this.setOutputMarkupId(true);
            this.setMarkupId(psb.getPsbNum());
            viewRelated.setAnchor(this);
            viewRelated.add(new Label("psbNum", new Model(psb.getPsbNum())));
            listItem.add(viewRelated);
            ...
  • 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-14T13:35:10+00:00Added an answer on June 14, 2026 at 1:35 pm

    Why not just update the client side css styling using pure javascript in the AjaxRequestTarget? Probably not more than

    ListItem<?> previousSelected = ...;
    ListItem<?> currentSelected = ...;
    
    target.appendJavaScript("document.getElementById('" + previousSelected.getMarkupId() + "').className=\"\";");
    target.appendJavaScript("document.getElementById('" + currentSelected.getMarkupId() + "').className=\"selected\";");
    

    This way you don’t have to update the whole listview to just change some classes.

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

Sidebar

Related Questions

I have a WPF ListView that I am trying to filter within a BackgroundWorker.
I have ListView that has the following EditItemTemplate: <EditItemTemplate> <tr style=> <td> <asp:LinkButton ID=UpdateButton
Duplicate: Background ListView becomes black when scrolling I have a listview within which each
I have a ListView that has two columns, one for a zone name and
Currently I have a ListView with a TextView within each child. That TextView is
I have a listview in a fragment container. Each view within the list has
I have ListView in my project which has ListItems as in the form of
I have ListView that uses a GridView to display several columns of data. Two
I have implemented a WebApp using SplitView - http://asyraf9.github.com/jquery-mobile/ - (and that seems to
Doing some R&D for my company. We are trying to have a listView that

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.