The big question: Can any custom control have bound children in
markup, without writing a new parser specific for this new type?


Here is an example of a failed scenario from inheriting
TabLayoutPanel:


The class File:

package com.client.ui.Controls;

import com.google.gwt.dom.client.Style.Unit;
import com.google.gwt.user.client.ui.TabLayoutPanel;

public class CustomTabLayoutPanel extends TabLayoutPanel {

        public CustomTabLayoutPanel(double barHeight, Unit barUnit) {
                super(barHeight, barUnit);
        }

}

The mark-up:
...
xmlns:controls="urn:import:com.client.ui.Controls"
...
        <controls:CustomTabLayoutPanel barHeight="32" barUnit="PX"
                                                ui:field="tabPanel">
<controls:tab>
<controls:header>
</controls:header>
<g:html></g:html>
</controls:tab>





This does not work, saying tab can only have a single child.
I can tell that there is a parser somewhere that is defining how to
read the tag.

I am not sure why this approach is being used, since the markup could
just be an object creational pattern and the children are the types
bound to child collections (XAML takes this approach).

Otherwise, it sounds like UiBinder custom controls cannot accept
children in markup.

What am I missing?

--

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