Hi,
I am reposting this question here as the user list got no reply and I
guess it is more a dev question:
I am experimenting with compiling GWT code with a standard JDK so I
can use the same code to generate HTML on both the client and the
server. So far it seem to be working OK but will only be practical if
I can also get UIBinder and i18n working.
My goal is to create HTML pages that can be crawled and indexed and
also allow GWT code to add, load and modify the page. Others have
recommended building two parallel sites - an html one and a GT one
which seems a bit redundant.
My experiement has put a real w3c Node inside every GWT Node and
replace native methods with ones that manipulate the w3c node. Then
finally I take the full w3c node from any element and convert it into
html.
I found that the object hierarchy needed to be changed to be valid
Java. An example of the issue is with the Anchor widget:
public Anchor() {
setElement(Document.get().createAnchorElement());
setStyleName("gwt-Anchor");
}
com.google.gwt.dom.client.AnchorElement extends
com.google.gwt.dom.client.AnchorElement but setElement expects a
com.google.gwt.user.client.Element so AnchorElement must extend both
classes which is impossible.
I have modified AnchorElement and friends to extends
com.google.gwt.user.client.Element instead which seems to have
worked.
My question is: Is this impossible inheritance hierarchy intentional
to stop this kind of messing about?
Cheers,
John
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors