Hi Dalla, In line 15.
Cheers, Alberto On Dec 7, 9:21 am, Dalla <[email protected]> wrote: > One what line do you get this error? > > On 6 Dec, 14:34, lemaiol <[email protected]> wrote: > > > Hi guys, > > > I have started trying the new features in GWT 2.0 (awesome ones, > > congrats! :) but I found some behavior that I cannot completely > > understand. I want to extend the DockLayoutPanel API in a class of my > > own but configure this new class using UiBinder. When I do that, I get > > an exception claiming "Type mismatch: cannot convert from > > DockLayoutPanel to ParserPanel" (see code at the end). I guess this > > has to do with the parser but my expectation is that the parsing > > mechanism would be able to deal with subclasses or reject them at all > > being required to extend also the parser to match the specific new > > subclass. > > > Should it be required to implement an specific parser for such a class > > and how should I do it? > > > Many thanks, > > Alberto > > > <Problem.java> > > package com.samples.gwt.client; > > > // ...imports stripped out.. > > > public class Problem extends Composite implements EntryPoint { > > interface Binder extends UiBinder<Panel, Problem> {} > > private static Binder binder = GWT.create(Binder.class); > > > public Problem() { > > initWidget(binder.createAndBindUi(this)); > > } > > > public void onModuleLoad() { > > RootPanel.get().add(new Problem()); > > } > > > } > > > <Problem.ui.xml> > > <ui:UiBinder > > xmlns:ui='urn:ui:com.google.gwt.uibinder' > > xmlns:g='urn:import:com.google.gwt.user.client.ui' > > xmlns:s='urn:import:com.samples.gwt.client'> > > > <s:ParserPanel unit='PX'> > > <s:north size="125"> > > <g:Label text="Title"/> > > </s:north> > > <s:center> > > <g:Label text="Content"/> > > </s:center> > > </s:ParserPanel> > > </ui:UiBinder> > > > <ParserPanel.java> > > package com.samples.gwt.client; > > > import com.google.gwt.dom.client.Style; > > import com.google.gwt.user.client.ui.DockLayoutPanel; > > > public class ParserPanel extends DockLayoutPanel { > > public ParserPanel(Style.Unit unit) { > > super(unit); > > } > > > } -- 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.
