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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T03:26:01+00:00 2026-06-01T03:26:01+00:00

Ok here goes. This is my first ever wicket application and I’m trying to

  • 0

Ok here goes. This is my first ever wicket application and I’m trying to integrate icepush using the pushpanel example.

What I’m trying to do is push an update to the panel by calling an ‘updatePanel(String content)’ method from another class.

Here is the code.

In my extended PushPanel I have:

public AsyncCommsPanel(String id) {
    super(id);
    this.setOutputMarkupId(true);

    ajaxForm = new Form("ajaxForm");
    ajaxForm.setOutputMarkupId(true);

    ajaxForm.add(textStore = new Label("textStore",""));

    ajaxForm.add(new AjaxButton("updateButton") {
        @Override
        protected void onSubmit(AjaxRequestTarget target, Form form) {
            System.out.println("Update button pressed!");
            /* CODE TO PULL NEW DATA FROM ELSEWHERE */
            /* UPDATE TAKES TIME SO HAS ITS OWN CALLBACK */
        }

        @Override
        protected void onError(AjaxRequestTarget target, Form<?> form) {
            System.out.println("Update button error.");
        }
    });
    add(ajaxForm);
}

@Override
protected void pushCallback(AjaxRequestTarget target) {
    target.add(ajaxForm);
}

public void updatePanel(String updateString) {
    /* THIS METHOD SHOULD ALLOW THE PANEL TO BE UPDATED FROM ELSEWHERE */
    if (textStore != null) ajaxForm.remove(textStore);
    ajaxForm.add(textStore = new Label("textStore", updateString));
    push();
}

When I try to call the ‘updatePanel’ method from the data gatherer’s callback method, I get this exception:

ERROR (SelectorManager.run):  org.apache.wicket.WicketRuntimeException: No RequestCycle is currently set!
at org.apache.wicket.Component.getRequest(Component.java:1831)
at org.apache.wicket.markup.html.WebPage.dirty(WebPage.java:315)
at org.apache.wicket.Page.dirty(Page.java:288)
at org.apache.wicket.Page.componentRemoved(Page.java:948)
at org.apache.wicket.MarkupContainer.removedComponent(MarkupContainer.java:1422)
at org.apache.wicket.MarkupContainer.remove(MarkupContainer.java:612)
at uk.ac.warwick.collabtex.AsyncCommsPanel.updatePanel(AsyncCommsPanel.java:107)
at uk.ac.warwick.collabtex.Editor$1.updateSuccess(Editor.java:98)
  • 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-01T03:26:02+00:00Added an answer on June 1, 2026 at 3:26 am

    Welcome to the asynchronous world 🙂 The ThreadLocals (Application, Session and ThreadLocal) are available only during the processing of a http request thread (aka worker thread).
    So there are two problems: 1) by starting your own thread you lose the ThreadLocal’s, 2) even if you export them then there is a chance that the Response will be already closed when your job finish. I’m not sure how IcePush works but here is what I think is the best option – submit the task, keep a reference to it in the Application (e.g. a Map) and then start an ajax timer behavior which asks futureTask.isDone() periodically and when it returns true do the hierarchy changes you need (I see a call to MarkupContainer#remove() in the stacktrace).

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

Sidebar

Related Questions

This is the first time I am using matplotlib and numpy. Here goes the
this is my first question to stackoverflow so here it goes... I use cruise
I assume this is pretty easy so here goes; I'm trying to execute these
This is probably a trivial question for most but here goes... I am using
This is my first question on here so here goes.... I've got an issue
My first question on this site, here goes: I am working on a tutorial
I'm not sure if this is even possible but here goes: Currently I have
Ok so this maybe a simple/silly question but I don't know so here goes:
I'm not sure how to ask this question so here goes... Software sometimes says
This is very basic stuff , but here goes. I find that I am

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.