Accidental bug fixes are always welcome!
Issue 3994<http://code.google.com/p/google-web-toolkit/issues/detail?id=3994>
*
*
<http://code.google.com/p/google-web-toolkit/issues/detail?id=3994>*- Amir
*
On Fri, Aug 28, 2009 at 7:07 AM, Ray Ryan <rj...@google.com> wrote:

> I think you've found a bug with addStyleNames, which gets special handling.
> Do you mind filing an issue?
>
> The new syntax hasn't been committed yet, it's in review. Although now that
> I think about it, it just might accidentally fix this problem. Which is
> nice.
>
> On Fri, Aug 28, 2009 at 9:34 AM, Amir Kashani <amirkash...@gmail.com>wrote:
>
>> Ray,
>>
>> I take it back, it doesn't work. Not for me anyway:
>>
>>> <gwt:UiBinder ...
>>
>>    xmlns:res='urn:with:my.package.Bundle'>
>>
>> ...
>>
>> <gwt:Button res:addStyleNames="formCss.error" />
>>
>>
>> Results in
>>
>> [ERROR] In <gwt:Button res:addStyleNames='formCss.error'>, class Button
>>> has no appropriate setAddStyleNames() method
>>
>>
>> If I remove the res prefix, it works as expected. FWIW, I use res all over
>> the template without any issues.
>>
>> I haven't tried the new syntax to see if it works any differently.
>>
>> - Amir
>>
>> On Wed, Aug 26, 2009 at 12:22 PM, Ray Ryan <rj...@google.com> wrote:
>>
>>> It works. What does your xmlns line look like?
>>> BTW, this is about to change. I'm implementing the expression language
>>> stuff mentioned in the wiki entry (
>>> http://code.google.com/p/google-web-toolkit-incubator/wiki/UiBinder). So
>>> that line will become something like:
>>>
>>> <gwt:Button addStyleNames="res.css.myCssClass" />
>>>
>>> rjrjr
>>>
>>>
>>> On Wed, Aug 26, 2009 at 3:18 PM, Amir Kashani <amirkash...@gmail.com>wrote:
>>>
>>>> While we're on the topic, it doesn't seem that the BundleAttributeParser
>>>> catches these special attributes. Specifically,
>>>>
>>>>   <gwt:Button res:addStyleNames="css.myCssClass" />
>>>>
>>>> doesn't seem to work.
>>>>
>>>> - Amir
>>>>
>>>>
>>>> On Wed, Aug 26, 2009 at 8:56 AM, Ray Ryan <rj...@google.com> wrote:
>>>>
>>>>> And you can set the debug id via ui.xml:
>>>>> <gwt:Label debugId='joe'>Hiya, pal.</gwt:Label>
>>>>>
>>>>> If you're not going to use CssResource, there is nothing you can do
>>>>> with an id selector that you can't do with a class selector. I really
>>>>> discourage the use of id selectors, they're brittle.
>>>>>
>>>>> rjrjr
>>>>>
>>>>> On Wed, Aug 26, 2009 at 11:53 AM, Joel Webber <j...@google.com> wrote:
>>>>>
>>>>>> The biggest problem here is that ids have to be unique within a
>>>>>> document, and UiBinder has no way of enforcing this.
>>>>>> If you want to use it for styling, you're probably better off with
>>>>>> CssResource (we're working on updating the samples to reflect what we
>>>>>> believe to be the best pattern for doing this).
>>>>>>
>>>>>> As for testing, I assume you mean using something like Selenium. This
>>>>>> is actually why we created the UIObject.ensureDebugId() stuff -- 
>>>>>> especially
>>>>>> so that you can turn it off in deployment. But if you're using 
>>>>>> GWTTestCase,
>>>>>> you can just bind the elements to fields and grab those directly.
>>>>>>
>>>>>> Cheers,
>>>>>> joel.
>>>>>>
>>>>>>
>>>>>> On Tue, Aug 25, 2009 at 10:38 PM, Richard Vowles <
>>>>>> richard.vow...@gmail.com> wrote:
>>>>>>
>>>>>>>
>>>>>>> One of the things I have noticed with the UIBinder is that you can't
>>>>>>> set the id on the fields - which is pretty important for css styling
>>>>>>> and testing. I seem to have to set them in code.
>>>>>>>
>>>>>>> <g:TextBox ui:field="tbWhatever" id="some-name"/>
>>>>>>>
>>>>>>> causes it to fail to compile. I know id is an attribute of getElement
>>>>>>> () but since this is a very common thing to do, I'd have expected
>>>>>>> ui:id or some such (or just id being acceptable). Am I missing
>>>>>>> something?
>>>>>>>
>>>>>>> Ta
>>>>>>> Richard
>>>>>>>
>>>>>>> On Aug 26, 12:49 pm, Bruce Johnson <br...@google.com> wrote:
>>>>>>> > No plans to do drag-n-drop or anything wysiwyg. We'll probably
>>>>>>> > continue to focus on the basics.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to