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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:01:41+00:00 2026-06-10T10:01:41+00:00

I have overriden the rowitem from my DefaultDataTable to add some onClick behavior. @Override

  • 0

I have overriden the rowitem from my DefaultDataTable to add some onClick behavior.

        @Override
        protected Item newRowItem(String id, int index, IModel model) {
             //return super.newRowItem(id, index, model);
            final Item<SearchResult> rowItem = super.newRowItem(id, index,model);
            rowItem.add(new AjaxEventBehavior ("onclick") {
               @Override
               protected void onEvent(AjaxRequestTarget target){
                  WebMarkupContainer wmc = new WebMarkupContainer("myTest");
                  target.add(wmc); //this doesn't work
                  add(wmc); //works but only when I refresh the page
               }
            });
            return rowItem;
        }

        <object wicket:id="myTest" data="" border="1" width="100%" height="600px"></object>

When a click happens I would like to update the data of the object and reload the object. The object is a Pdf file. The Pdf doesn’t seem to reload if I use the target. I have set

         wmc.setOutputMarkupId(true);

But that doesn’t seem to help.

How could I make it so the user doesn’t have to refresh the page???

I just started using Wicket and Ajax so I’m a beginner.

  • 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-10T10:01:42+00:00Added an answer on June 10, 2026 at 10:01 am

    You should add the original container to the AjaxRequestTarget instead of creating a new one. Make sure the container uses a dynamic model so that the value is actually updated when the component is redrawn via AJAX.

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

Sidebar

Related Questions

I have a problem with calling an overriden method from java class. I have
I have inherited from TGroupBox of the Delphi native control and overriden its Paint
Assume I have a class A with a overriden hash method that returns some
I have overriden lead object standard detail page with my vf page using tag
Several of my overriden Equals methods have started throwing Invalid Cast Exceptions - Unable
In many examples I have seen online, AsyncTask is extended, the constructor is overriden,
i have override validate method and added errors using addFieldError(test, test print); and in
I have a class that extends Overlay and implemments Overlay.Snappable. I have overriden its
From MSDN documentation, it seems as both GetHashCode() and Equals() haven't been overriden in
I have a overriden function in my class, that adds an event handler like

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.