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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:39:34+00:00 2026-06-17T07:39:34+00:00

I want to render some wicket fragments on a page with lazy loading. The

  • 0

I want to render some wicket fragments on a page with lazy loading. The Java sample is below:

staticPanel.add(new AjaxLazyLoadPanel("fragment4Span") {

        @Override
        public Component getLazyLoadComponent(String id) {
            fragment4 = new Fragment4(id, "fragment4", this);
            fragment4.add(propertyLoop4);
            return fragment4;
        }
    });

And the html component:

<span wicket:id="fragment4Span"></span>
<wicket:fragment wicket:id="fragment4">
</wicket:fragment>

But i get the exception below:

org.apache.wicket.markup.MarkupException: Markup of component class `org.apache.wicket.extensions.ajax.markup.html.AjaxLazyLoadPanel` does not contain a fragment with wicket:id `fragment4`. Context: [MarkupContainer [Component id = content]]
at org.apache.wicket.markup.html.panel.Fragment.renderFragment(Fragment.java:262)
at org.apache.wicket.markup.html.panel.Fragment.onComponentTagBody(Fragment.java:212)
at org.apache.wicket.Component.renderComponent(Component.java:2680)
at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)

What can be the reason of it? I could not find an answer by googling by the way.

  • 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-17T07:39:36+00:00Added an answer on June 17, 2026 at 7:39 am

    You pass this – which references the AjaxLazyLoadPanel instance – as the fragment container. But as the error message states it doesn’t contain the fragment. Whis is true, because your page/panel does.

    So you actually need to pass a reference to your page/panel to the Fragment constructor:

    fragment4 = new Fragment4(id, "fragment4", CurrentPageOrPanelName.this);
    

    The other possibility (not totally sure that this works) is to change your markup so that the fragment is inside the ALLP:

    <span wicket:id="fragment4Span">
      <wicket:fragment wicket:id="fragment4">
      </wicket:fragment>
    </span>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to during the page render remove some html from the page (don't
I have question to Java or C# programmers. I want to render some pages
I'm trying to render some JSON data using jsRender. Below is my sample JSON
I want to be able to render a Grid while the number of some
I want to render same template on one page which should display the value
I want to extend DataGrid to add some controls on the very top of
I want to dynamically pick a facelet to render some item in my data
I want to render a <label> tag. But want to set some of it's
I want to render some text on one of my screens that has a
In MVC Application, I want to render some parts of form dynamically (which are

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.