svn changeset:6639/svn branch:trunktags/6.7.0.beta1
<module> | <module> | ||||
<!-- Inherit the NoEntry version to avoid multiple entrypoints --> | |||||
<inherits name="com.itmill.toolkit.terminal.gwt.DefaultWidgetSetNoEntry" /> | |||||
<!-- Inherit DefaultWidgetSet --> | |||||
<inherits name="com.itmill.toolkit.terminal.gwt.DefaultWidgetSet" /> | |||||
<!-- WidgetSet default theme --> | <!-- WidgetSet default theme --> | ||||
<stylesheet src="colorpicker/styles.css"/> | <stylesheet src="colorpicker/styles.css"/> |
<module> | <module> | ||||
<!-- Inherit the NoEntry version to avoid multiple entrypoints --> | |||||
<inherits name="com.itmill.toolkit.terminal.gwt.DefaultWidgetSetNoEntry" /> | |||||
<!-- Inherit DefaultWidgetSet --> | |||||
<inherits name="com.itmill.toolkit.terminal.gwt.DefaultWidgetSet" /> | |||||
<!-- The googlemaps_gwt module --> | <!-- The googlemaps_gwt module --> | ||||
<inherits name="com.google.gwt.maps.GoogleMaps" /> | <inherits name="com.google.gwt.maps.GoogleMaps" /> |
<module> | <module> | ||||
<!-- Inherit the NoEntry version to avoid multiple entrypoints --> | |||||
<inherits name="com.itmill.toolkit.terminal.gwt.DefaultWidgetSetNoEntry" /> | |||||
<!-- Inherit the DefaultWidgetSet --> | |||||
<inherits name="com.itmill.toolkit.terminal.gwt.DefaultWidgetSet" /> | |||||
<!-- WidgetSet default theme --> | <!-- WidgetSet default theme --> | ||||
<stylesheet src="sampler/styles.css"/> | <stylesheet src="sampler/styles.css"/> |
<module> | <module> | ||||
<source path="client"/> | |||||
<!-- This module just defines a entrypoint for the DefaultWidgetSet --> | |||||
<inherits name="com.itmill.toolkit.terminal.gwt.DefaultWidgetSetNoEntry"/> | |||||
<entry-point class="com.itmill.toolkit.terminal.gwt.client.DefaultWidgetSet"/> | |||||
<!-- | |||||
This GWT module defines the IT Mill Toolkit DefaultWidgetSet. This is | |||||
the module you want to extend when creating an extended widget set, or | |||||
when creating a specialized widget set with a subset of the | |||||
components. | |||||
--> | |||||
<!-- | |||||
NOTE that your WidgetSet entry-point (.java) should have the same | |||||
"logical" name (a.k.a SimpleName) as the specification (.gwt.xml). | |||||
--> | |||||
<!-- | |||||
E.g: com/example/gwt/MyWidgetSet.gwt.xml should point to the | |||||
entry-point | |||||
com.example.gwt.client[.some.package].MyWidgetSet.java | |||||
--> | |||||
<inherits name="com.google.gwt.user.User" /> | |||||
<inherits name="com.google.gwt.http.HTTP" /> | |||||
<inherits name="com.google.gwt.xml.XML" /> | |||||
<inherits name="com.google.gwt.json.JSON" /> | |||||
<source path="client" /> | |||||
<entry-point class="com.itmill.toolkit.terminal.gwt.client.DefaultWidgetSet" /> | |||||
</module> | </module> |
<module> | <module> | ||||
<!-- | |||||
This is the NoEntry version of DefaultWidgetSet. | |||||
This is the module you want to extend when creating an extended | |||||
widget set. | |||||
--> | |||||
<inherits name="com.google.gwt.user.User"/> | |||||
<inherits name="com.google.gwt.http.HTTP"/> | |||||
<inherits name="com.google.gwt.xml.XML"/> | |||||
<inherits name="com.google.gwt.json.JSON"/> | |||||
<source path="client"/> | |||||
<source path="gwtwidgets"/> | |||||
<!-- | |||||
Default theme for this widget set. | |||||
Please name the sub directory differently when creating a extended widget set | |||||
(e.g. src="mywidgets/styles.css") to avoid naming conflicts. | |||||
<stylesheet src="default/common/common.css"/> | |||||
<stylesheet src="default/button/button.css"/> | |||||
<stylesheet src="default/textfield/textfield.css"/> | |||||
<stylesheet src="default/select/select.css"/> | |||||
<stylesheet src="default/panel/panel.css"/> | |||||
<stylesheet src="default/tabsheet/tabsheet.css"/> | |||||
<stylesheet src="default/datefield/datefield.css"/> | |||||
<stylesheet src="default/table/table.css"/> | |||||
<stylesheet src="default/slider/slider.css"/> | |||||
<stylesheet src="default/window/window.css"/> | |||||
<stylesheet src="default/window/notification.css"/> | |||||
<stylesheet src="default/caption/caption.css"/> | |||||
<stylesheet src="default/tree/tree.css"/> | |||||
<stylesheet src="default/splitpanel/splitpanel.css"/> | |||||
<stylesheet src="default/select/filterselect.css"/> | |||||
<stylesheet src="default/progressindicator/progressindicator.css"/> | |||||
<stylesheet src="default/expandlayout/expandlayout.css"/> | |||||
<stylesheet src="default/orderedlayout/orderedlayout.css"/> | |||||
<stylesheet src="default/accordion/accordion.css"/> | |||||
--> | |||||
</module> | |||||
<!-- | |||||
"NoEntry" -concept deprecated, inherit DefaultWidgetSet instead. | |||||
--> | |||||
<inherits name="com.itmill.toolkit.terminal.gwt.DefaultWidgetSet" /> | |||||
</module> |
import java.util.Iterator; | import java.util.Iterator; | ||||
import java.util.List; | import java.util.List; | ||||
import com.google.gwt.core.client.GWT; | |||||
import com.google.gwt.core.client.JavaScriptObject; | import com.google.gwt.core.client.JavaScriptObject; | ||||
public class ApplicationConfiguration { | public class ApplicationConfiguration { | ||||
// can only be inited once, to avoid multiple-entrypoint-problem | |||||
private static WidgetSet initedWidgetSet; | |||||
private String id; | private String id; | ||||
private String themeUri; | private String themeUri; | ||||
private String pathInfo; | private String pathInfo; | ||||
* the widgetset that is running the apps | * the widgetset that is running the apps | ||||
*/ | */ | ||||
public static void initConfigurations(WidgetSet widgetset) { | public static void initConfigurations(WidgetSet widgetset) { | ||||
String wsname = widgetset.getClass().getName(); | |||||
String module = GWT.getModuleName(); | |||||
int lastdot = module.lastIndexOf("."); | |||||
String base = module.substring(0, lastdot); | |||||
String simpleName = module.substring(lastdot + 1); | |||||
if (!wsname.startsWith(base) || !wsname.endsWith(simpleName)) { | |||||
// WidgetSet module name does not match implementation name; | |||||
// probably inherited WidgetSet with entry-point. Skip. | |||||
GWT.log("Ignored init for " + wsname + " when starting " + module, | |||||
null); | |||||
return; | |||||
} | |||||
if (initedWidgetSet != null) { | |||||
// Something went wrong: multiple widgetsets inited | |||||
String msg = "Tried to init " + widgetset.getClass().getName() | |||||
+ ", but " + initedWidgetSet.getClass().getName() | |||||
+ " is already inited."; | |||||
System.err.println(msg); | |||||
throw new IllegalStateException(msg); | |||||
} | |||||
initedWidgetSet = widgetset; | |||||
ArrayList appIds = new ArrayList(); | ArrayList appIds = new ArrayList(); | ||||
loadAppIdListFromDOM(appIds); | loadAppIdListFromDOM(appIds); | ||||