Saturday, April 27, 2013

UiBinder Button created hidden not responsive after being shown

In the ui.xml:

<g:Button ui:field='continu' addStyleNames='{style.continue-button} {style.hidden}'>
   <ui:text from='{strings.continu}' />
</g:Button>

In java when it's time to show the button:

   @UiField Button         continu;

...

   showWidget(continu);

...

    protected void showWidget(Widget w) {
        showElement(w.getElement());
    }

    protected void showElement(Element e) {
        e.removeClassName(style.hidden());
   }

 The button is now visible to the eye, but not to the mouse: clicking on it does not only not invoke its handler, it doesn't exhibit the small visual effect of activation.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment