Wednesday, January 25, 2012

Re: CssResource + Custom Deferred Binding?

Ed, thanks for your suggestion. Might be more than I can handle at
this point. We don't really need themes, though I don't think that's
your point. Regardless, I'll refer back to this later as I get
further in this process.

On Jan 25, 10:01 am, Ed <post2edb...@gmail.com> wrote:
> You can, but I advice you to use an static/instance class couple in this
> case
> .
> Let me explain by a Theme example I use:
> In my Css:
>
> @eval headerEntryFontColor
>
> > com.test.AmountListPreferencesBridge.headerEntryFontColor();
> > .HeaderEntry {
> > color: headerEntryFontColor;
> > }
>
> AmountListPreferencesBridge is the static class that contains an instance
> of the target class that contains the CSS styles:
>
> private static final AmountListPreferences BRIDGE =
>
> > GWT.<AmountListPreferences> create(AmountListPreferences.class);
>
> public static AmountListPreferences getBridge() {> return BRIDGE;
> > }
>
> public static String headerEntryFontColor() {
>
> > return getBridge().headerEntryFontColor();
> > }
>
> And in the gwt file theme.standard.Standaard.gwt.xml (that is included in
> my main gwt file and can be replaced by another theme gwt xml to change
> theme's):
>
> <replace-with class="com.test.theme.standard.StandardAmountListPreferences">
>
>
>
>
>
>
>
> > <when-type-is
> > class="com.test.widgets.amountlist.resources.AmountListPreferences" />
> > </replace-with>

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment