Monday, April 28, 2014

UiBinder and writing custom parsers

I need to write a custom widget that is to be used in UiBinder to easily layout a form of properly aligned fields (in multiple columns).

I tried to avoid using a custom widget by defining some resusable stylenames, but it would be much nicer if I could just abstract away whether you need a DIV/TABLE/TR/TD/SPAN/LABEL or any other HTML tag.
I gets complicated very quickly and if you have many screens there should be a lot more reuse possible.

I basically just want that the developer can do something like:

<x:FormWidget>
  <h1>Title<h1>
  <x:row><x:label>Label</x:label><x:field><w:TextBox ui:field='text'/></x:field></x:row>
  <x:row><x:label>Label 2</x:label><x:field><w:TextBox ui:field='text'></x:field></x:row>
</x:FormWidget>

So I need to be able to mix some plain HTML tags with some custom defined ones.

The only subject I found on how to do this is here: http://stackoverflow.com/questions/11782171/gwt-uibinder-how-to-make-a-custom-absolutepanel-which-uses-the-at-element/11785903#11785903

Is this the officially supported way of doing this ? There is no developer documentation available on this topic. 

David

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment