This is the expected behavior (assertions are disabled by default in prod 
mode); you're not supposed to use .wrap() that way.

In your case, you can either:

   - use an HTMLPanel: grab the text inside the element to construct the 
   Label, then use addAndReplace to replace the <div> with the newly 
   constructed label
   - add the ClickHandler on the HTML and check the actual target of the 
   ClickEvent to be the <div>
   - much simpler and easier to maintain (so, much better for the long 
   term): refactor your code to use UiBinder and put a <g:HTMLPanel>For admin 
   comments please <g:Label ui:field="login2">sign in</g:Label> or 
   register</g:HTMLPanel> with a @UiHandler("login2") to listen to the clicks 
   on the label.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/q9Z19NTntEQJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to