I'm facing a similar problem. Is there any UIBinder team members on
this forum? This is definitely a legitimate use case.

On Jan 13, 5:06 pm, driftplaces <[email protected]> wrote:
> I have a simpleUiBinderwidget containing a TextArea:
>
> <!DOCTYPE ui:UiBinderSYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent";>
> <ui:UiBinderxmlns:ui="urn:ui:com.google.gwt.uibinder"
>     xmlns:g="urn:import:com.google.gwt.user.client.ui">
>
>     <g:TextArea visibleLines="3" />
> </ui:UiBinder>
>
> I want to control the background color of this textarea for writeable
> and read only states. GWT uses the "-readonly"stylenamedecorator to
> achieve this. So I try this:
>
> <!DOCTYPE ui:UiBinderSYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent";>
> <ui:UiBinderxmlns:ui="urn:ui:com.google.gwt.uibinder"
>     xmlns:g="urn:import:com.google.gwt.user.client.ui">
>
>     <ui:style>
>         .textBoxStyle {
>             background-color:yellow;
>         }
>         .textBoxStyle-readonly {
>             background-color:lightgray;
>         }
>     </ui:style>
>
>     <g:TextArea styleName="{style.textBoxStyle}" visibleLines="3" />
> </ui:UiBinder>
>
> Obviously this won't work becausestylenames are obfuscated for
> CssResources resulting in something like this:
>
> .G1x26wpeN {
>     background-color:yellow
>  }
> .G1x26wpeO {
>     background-color: lightgray;
>
> }
>
> The result HTML for writeable textarea looks like this:
>
> <textarea tabindex="0" class="G1x26wpeN" rows="3"/>
>
> The read only textarea looks like this:
>
> <textarea tabindex="0" class="G1x26wpeN G1x26wpeN-readonly"
> readonly="" rows="3"/>
>
> How do I declare thestyleso GWT will obfuscate the primary part but
> not the "-readonly" decdorator?
>
> I know that I can disable the obfuscation for the entirestylename.
> But I'd like to keep the obfuscation while making use of the
> decorators.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
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