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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:36:33+00:00 2026-05-27T14:36:33+00:00

I want to disable the anchor link event when it clicked one time. I

  • 0

I want to disable the anchor link event when it clicked one time. I used anchor.setenabled(false) but nothing happend. When I click the same button again the event e is true. I want false at that time.

public void onCellClick(GridPanel grid, int rowIndex, int colindex,EventObject e) 
    {
                    if(rowIndex==0 && colindex==2){
                        tomcatHandler = "Start";
                        anchorStart.setEnabled(false);
                    }else if(rowIndex==0 && colindex==3){
                        tomcatHandler = "Stop";
                        ****anchorStop.setEnabled(false);
                        anchorStart.setEnabled(false);
                        anchorRestart.setEnabled(true);****

                }else if(rowIndex==0 &&colindex==4){
                    tomcatHandler = "Restart";
                    anchorRestart.setEnabled(false);
                }

                    AdminService.Util.getInstance().tomcat(tomcatHandler,new AsyncCallback<String>() {
                        @Override
                        public void onSuccess(String result) {
                            imageChangeEvent(result);
                        }
                        @Override
                        public void onFailure(Throwable caught) {
                        }
                    });}
  • 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-05-27T14:36:33+00:00Added an answer on May 27, 2026 at 2:36 pm

    Anchors in GWT have always had a problem with setEnabled() because HTML doesn’t support such a property. A quick workaround is to create a new widget that subclasses GWT’s Anchor, adding the following override:

    @Override
    public void onBrowserEvent(Event event) {
        switch (DOM.eventGetType(event)) {
            case Event.ONDBLCLICK:
            case Event.ONFOCUS:
            case Event.ONCLICK:
                if (!isEnabled()) {
                    return;
                }
                break;
        }
        super.onBrowserEvent(event);
    }
    

    This disables the passing of the browser event to GWT’s Anchor class (summarily disabling all related handlers) when the link is double clicked, focused or clicked and is in a disabled state.

    Source

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

Sidebar

Related Questions

I have an anchor link that I want to disable once the user clicks
in one page function i want disable js script. How make that? I try
I want to disable some specific feature that one my plugins does to the
I want to disable an element's hover event, is it possible? I want to
I want to disable the hover event on a particular list when another event
I want to disable viewstate for my entire site, but on some pages I
I used [HOST=subdomain.mydomain.com] for some settings, but now I want to apply settings to
I want to disable undo registration for an operation on an NSManagedObject but it
I want to disable column resizing in Flexigrid. Is there any option like colresize:false/true
I want to disable all Foreign key constraints and re-enable them after, is there

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.