On Mar 11, 4:35 pm, Thomas Broyer <
t.bro...@gmail.com> 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?