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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T06:07:09+00:00 2026-06-13T06:07:09+00:00

after hours of searching and trying, I decided to ask here. JqmHeader.java public class

  • 0

after hours of searching and trying, I decided to ask here.

JqmHeader.java

public class JqmHeader extends ComplexPanel {

    public JqmHeader() {
        setElement(DOM.createDiv());
        getElement().setAttribute("data-role", "header");
    }

    public void add(Widget widget) {
        super.add(widget, getElement());
    }
}

JqmPage.java

public class JqmPage extends ComplexPanel {
    ...

    public JqmPage(String id) {
        setElement(Document.get().createDivElement());
        getElement().setAttribute("data-role", "page");
        getElement().setAttribute("data-url", id);

        RootPanel.get().add(page);
        render(page.getId());
    }

    private native void render(String id) /*-{
        $wnd.$("#" + id).page();
    }-*/;

    ...
}

MyPage.java extends JqmPage.java

...

JqmHeader header = new JqmHeader();
Button b = new Button("TestButton");

b.addClickHandler(new ClickHandler() {
    @Override
    public void onClick(ClickEvent event) {
        Window.alert("TestButton clicked");
    }
});

header.add(b);
this.add(header);

...

My Problem

So, my Problem is, that the ClickHandler from the Button in the header bar doesn’t fire. If I add the Button not to the header, but to the “RootPage”, like

this.add(b)

, everything works.

I think it must lie at the jquery-mobile header implementation. Are there any workarounds /ideas?

Thanks from Berlin,
Alex

  • 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-13T06:07:13+00:00Added an answer on June 13, 2026 at 6:07 am

    JQuery Mobile swallows the events on headers so they are not propagated to GWT. What I did in solving this for jqm4gwt (https://github.com/sksamuel/jqm4gwt) was to have a general listener on the page level and then compare event source. If it was a button in the header then I fire that event on the button manually.

    Take a look at bindHeaderEvents in https://github.com/sksamuel/jqm4gwt/blob/master/src/main/java/com/sksamuel/jqm4gwt/JQMPage.java

    Also, the jqm4gwt project might be a good solution for you to save you having to invent all these widgets yourself.

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

Sidebar

Related Questions

After some hours of trying, I want to ask how to loop a video
After nearly 10 hours of searching and trying different things I couldn't figure out,
After hours of trying and searching, I think its time to share my problem
after hours of googeling and searching within SO, I finaly come to the place
After searching in the Net for about 4 hours I still don't understand Async
First attempt to use this cool site - after searching for 2 hours: So
I am asking for help, after hours of trying to figure this out myself.
There are a few posts about this, but after hours of searching I still
After many hours spent on reading documentations and searching for some tips on the
I finally decided myself to post my problem, after a couple of hours spent

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.