Hello,
Using the NetBeans's GWT plugin, I created two web applications and, in each one a GWT module that inherits SmartGwt (1.3).
Separately, each web application works well : its GWT module added to a page displays a dynamic form containing a SelectItem with some values.
The first web application has the web context named "Module1", and the GWT module org.yournamehere.Main1.
The second web application has the web context named "Module2", and the GWT module org.yournamehere.Main2.
Here the code that is pratically identical for the two modules and that comes from the class that implements the EntryPoint interface:
The only difference between the two modules is the value of the id in which the interface is injected.
For the org.yournamehere.Main1 GWT module, the interface is injected in a div element that has an id with the value "1".
For the org.yournamehere.Main2 GWT module, the interface is injected in a div element that has an id with the value "2".
So, I deployed the two web applications ; for the second web application, I used this HTML page in order to use the two GWT module in the same page:
The problem I get is that, when the page is displayed, combo boxes appear, but when you try to pull down elements on a combo box there is no element!
What can be wrong? Is it really possible to use SmartGWT with multiple modules?
Thank you a lot for any help!
Using the NetBeans's GWT plugin, I created two web applications and, in each one a GWT module that inherits SmartGwt (1.3).
Separately, each web application works well : its GWT module added to a page displays a dynamic form containing a SelectItem with some values.
The first web application has the web context named "Module1", and the GWT module org.yournamehere.Main1.
The second web application has the web context named "Module2", and the GWT module org.yournamehere.Main2.
Here the code that is pratically identical for the two modules and that comes from the class that implements the EntryPoint interface:
Code:
public class Main1EntryPoint implements EntryPoint { /** * Creates a new instance of Main1EntryPoint */ public Main1EntryPoint() { } /** * The entry point method, called automatically by loading a module * that declares an implementing class as an entry-point */ public void onModuleLoad() { RootPanel.get("1").add(buildView()); } public Widget buildView() { VLayout layout = new VLayout(15); layout.setAutoHeight(); final DynamicForm form = createForm(); layout.addMember(form); return layout; } private DynamicForm createForm() { DynamicForm form = new DynamicForm(); form.setWidth(300); SelectItem storeItem = new SelectItem("storeId", "Magasin"); LinkedHashMap<String, String> valueMap = new LinkedHashMap<String, String>(); valueMap.put("US", "<b>United States</b>"); valueMap.put("CH", "China"); valueMap.put("JA", "<b>Japan</b>"); valueMap.put("IN", "India"); valueMap.put("GM", "Germany"); valueMap.put("FR", "France"); valueMap.put("IT", "Italy"); valueMap.put("RS", "Russia"); valueMap.put("BR", "<b>Brazil</b>"); valueMap.put("CA", "Canada"); valueMap.put("MX", "Mexico"); valueMap.put("SP", "Spain"); storeItem.setValueMap(valueMap); form.setFields(storeItem); return form; } }
For the org.yournamehere.Main1 GWT module, the interface is injected in a div element that has an id with the value "1".
For the org.yournamehere.Main2 GWT module, the interface is injected in a div element that has an id with the value "2".
So, I deployed the two web applications ; for the second web application, I used this HTML page in order to use the two GWT module in the same page:
Code:
<html> <head> <title>Main2</title> </head> <body> <p>Module 1</p> <div id="1"></div> <p>Module 2</p> <div id="2"></div> <script language="javascript"> var isomorphicDir = "/Module1/org.yournamehere.Main1/sc/"; </script> <script language="javascript" src="/Module1/org.yournamehere.Main1/org.yournamehere.Main1.nocache.js"></script> <script language="javascript" src="/Module2/org.yournamehere.Main2/org.yournamehere.Main2.nocache.js"></script> </body> </html>
What can be wrong? Is it really possible to use SmartGWT with multiple modules?
Thank you a lot for any help!
Comment