Hi Thomas.

Yes your suggestion of using <ui:text> perfectly does the job, this is
exactly what I was looking for, thank you.
Thanks also for the informative remark concerning the Label being a
<div>, it makes sense.

Regards.
Luc

On Mar 11, 4:35 pm, Thomas Broyer <[email protected]> wrote:
> On Friday, March 11, 2011 7:43:36 AM UTC+1, dindeman wrote:
>
> > Hi everyone.
>
> > What's the best way to reuse a global constant within UiBinder ?
>
> > I did the following:
>
> > <ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
> > xmlns:g="urn:import:com.google.gwt.user.client.ui">
>
> > <ui:with field='cons' type='com.example.gwtpuibinder.client.MyCons'/>
>
> > <g:HTMLPanel>
>
> > <p>
> > At <g:Label text="{cons.businessName}"></g:Label> we strive for our
> > customers.
>
> How about:
> At <ui:text from="{cons.businessName}" /> we strive for our customers.
> It won't generate a widget, contrary to g:Label; much less overhead.
>
> > </p>
>
> > </g:HTMLPanel>
> > </ui:UiBinder>
>
> > It works but it's a bit heavy. It would be nice if I could use
> > something like @def statement for CSS constants, is there anything
> > like that that would do the above job?
>
> What is heavy? defining the constants in an external interface? How about
> using <ui:msg/> then?
> Seehttp://code.google.com/webtoolkit/doc/latest/DevGuideUiBinderI18n.html
>
> > Also I don't get why the Label produces a line break before and after
> > itself,
>
> That's because a Label is an HTML <div>
>
> > it's a bit annoying since it can't be styled.
>
> Using an InlineLabel if you want a <span> instead.

-- 
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