Updated gwt ui binder (markdown)

This commit is contained in:
Axel Uhl committed 2014-05-21 19:34:37 +00:00
1 parent e067c65165
commit c4f56f92b8
1 file changed
+12
@@ -14,6 +14,18 @@ We chose to work with a partner for UI Design: Ubilabs in Hamburg, Germany. They
As Ubilabs does not use GWT, we need to map their build outputs to our GWT architecture. GWT UI Binder fits with this goal. For each Jade partial we develop a corresponding UI Binder widget. The CSS file generated by Ubilabs can be used as is for the UI Binder widget. The HTML file needs to be renamed to `.ui.xml` and its contents need to be adjusted to the UI Binder styles and elements.
We asked Ubilabs whether they can instrument their Jade-based generator in such a way that for each Jade Partial `X` that will become a GWT UI Binder Widget we will automatically receive an `XResources.java` file that contains the CssResource interface declaration for the widget's CSS with a @Source annotation and a `css()` method declaration and an INSTANCE field declaration as more or less static content which fits in with how GWT ideally handles CSS resources. In the generated `X.ui.xml` file we then expect the CSS resource to be declared as in
<pre>
&lt;ui:with field="local_res" type="com.sap.sailing.gwt.home...XResources" /&gt;
</pre>
which can be used as in
<pre>
&lt;header class="{local_res.css.siteheader}"&gt;
</pre>
Ubilabs will deliver two versions of the site: one for use on desktops and tablets, and another for smartphone use. We need to map both versions to GWT UI Binder and decide based on the user agent and viewport size which one to choose.
## Internationalization (i18n)