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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T03:15:26+00:00 2026-05-16T03:15:26+00:00

I have a class that extends Composite and contains a DisclosurePanel at the top-level

  • 0

I have a class that extends Composite and contains a DisclosurePanel at the top-level of the associated UiBinder file.

In DisclosurePanel, the HTML looks like this:

<table class="gwt-DisclosurePanel gwt-DisclosurePanel-closed>
  <tr>
    <td>
      <a href="javascript:void(0);" style="display: block;" class="header">
        <div class=""> <!-- an HTMLPanel I've shoved in to a <gwt:customHeader> block -->
           ...
        </div>
      </a>
...

In my UiBinder file I can use addStyleNames=”{style.???}” and style some things, like I can style the DisclosurePanel itself and I can style my HTMLPanel inside the , but I can’t style the

<a>

except by doing this:

disclosurePanel.getHeader().getParent().getElement().getStyle().setTextDecoration(TextDecoration.NONE);
disclosurePanel.getHeader().getParent().getElement().getStyle().setColor("black");

in the code, but that’s ugly and the style is now in two places, the code and the UiBinder file.

The reason I’m doing that is to get rid of the underlining and blue color that the has by default. Another alternative is to do something like this:

.gwt-DisclosurePanel a {
    text-decoration: none;
    text: black;
}

but then I would need to reference that CSS file from my home page (Client.html) or reference from the gwt.xml file, but both of those ways of doing things are deprecated.

How do I do this in a better way, or is it not possible?

  • 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-16T03:15:26+00:00Added an answer on May 16, 2026 at 3:15 am

    Hmmm…will ensureInjected() do what I
    want? Can I just define a CssResource
    and a ClientBundle that references
    that CssResource and then call
    ensureInjected on the CssResource and
    it will inject all the CSS, even if I
    haven’t referenced all the methods on
    my CssResource sub-interface?

    Yes and no – you’d have to disable CSS obfuscation (<set-configuration-property name="CssResource.style" value="pretty" /> – warning, that’s global, so probably not what you want) in order for it to work. But if you reference those class names only from your UiBinder templates as such you should be fine:

    <!-- Insert usual UiBinder stuff here -->
    <ui:with field='res' type='com.example.client.resource.SomeCoolBundle'/>
    <!-- SomeCoolBundle has a CssResource defined and available via style() -->
    
    <div class='{res.style.lbox}'></div>
    

    Just remember to mark the GWT classes as @external in your CSS file or else you won’t be able to override them (since they’ll get obfuscated):

    @external .gwt-TextBox, .gwt-PasswordTextBox, .gwt-Button, .gwt-CheckBox;
    

    If this doesn’t suit your needs (or is to cumbersome), by all means do use one of those “deprecated” (not really) methods.

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

Sidebar

Related Questions

I have a class that looks like this public class SomeClass { public SomeChildClass[]
I have a method that looks like this public static <T extends MyClass, X
If I have a base class such that public abstract class XMLSubscription <T extends
I have a few classes such that: public class XMLStatusMessage extends XMLMessage {} public
i have a class that extends the PDO class. it's called Database. but in
I am having a class that extends View. I have another class that extends
I have a custom class that I've written that extends ImageView (for Android Java).
I have class method that returns a list of employees that I can iterate
I have a class that I want to use to store properties for another
I have a class that map objects to objects, but unlike dictionary it maps

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.