Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg
GWT Designer has some limited support for gwt-ext. All standard GWT widgets work with GWT Designer as do any widgets that are JavaBean compliant (e.g., they include a public default constructor and expose properties via getter/setter pairs). Widgets that define their own API and don't conform to the JavaBean spec likely will not work as-is (which is the case with most of the gwt-ext widgets). You can wrapper the gwt-ext widgets in a Composite subclass in order to see them in GWT Designer (see the ImageViewer example in this project which shows a TabPanel within a Composite).
We do plan to eventually provide full support for the gwt-ext widgets, but it won't happen right away. GWT itself has only just come out of beta, and the gwt-ext widgets are still very much in beta (currently at v0.9.2). Until those widgets have been finalized and their API stablized, any support we added for them would be premature and likely a waste of our engineering resources.
AbsolutePanel mainPanel = new AbsolutePanel();
// You must set the size of the panel for Firefox
mainPanel.setSize("100%", "75%");
// Render the field to the parent panel
dateField.render(mainPanel.getElement());
// Add the field to the panel at the specified location
mainPanel.add(dateField, 10, 10);
Component.render(element)
/**
* Create a new Panel.
*/
public Panel() {
}
/**
* Construct a new Panel with the given title.
*
* @param title the title
*/
public Panel(String title) {
setTitle(title);
}
public Panel(String title, String html) {
setTitle(title);
setHtml(html);
}
public Panel(String title, int width, int height) {
setTitle(title);
setWidth(width);
setHeight(height);
}
sjivan wrote:I didn't quite follow the change in the patch you see making to get it work. Please let me know if there's any change you'd like to see to help GWT-Designer support of GWT-Ext.
package com.mycompany.project.client;
import com.google.gwt.user.client.DOM;
import com.gwtext.client.widgets.Panel;
public class MyPanel extends Panel {
public MyPanel() {
super(DOM.createDiv());
}
}
package com.mycompany.project.client;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel;
/**
* Entry point classes define <code>onModuleLoad()</code>.
*/
public class TreeTest implements EntryPoint {
public void onModuleLoad() {
final RootPanel rootPanel = RootPanel.get();
MyPanel mainPanel = new MyPanel();
rootPanel.add(mainPanel);
mainPanel.setTitle("My Panel");
}
}
johns wrote:I've just tried adding the DatePicker to a page and I still get
Could not initialize class com.gwtext.client.widgets.DatePicker
....
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.gwtext.client.widgets.DatePicker
gwtext.jar is on my projects classpath, and I don't have anything marked as an error in source view. Could I have configured something wrong?
Users browsing this forum: No registered users and 3 guests