My intention was to create and wrap a SmartGWT dialog into a .jar file, so that the same may be used inside another SmartGWT application as a custom widget. For example, I want to build a custom scheduler widget (shows some UI to capture task details and then schedule it in cron). And then use this as custom widget in other SmartGWT projects.
For this, I created a SmartGWT project which has these two class files:
1. SchedulerWidgetEntryPoint.java
2. SchedulerWidget.java
I created a jar file SchedulerWidget.jar by manually running the "jar cvf ..." (without forgetting to include .java files, for client side code")
My host application that uses the above jar looks like this:
1, GWTSample.java
This works correctly, but when I click the ok button in this alert, it won't go away immediately. Sometimes it takes multiple clicks and waits for about 10 to 15 seconds before it closes. Sometimes it takes even more time and some mouse clicks or mouse movement to get this alert dismissed.
Want to know,
#1. Is there a fix to this problem.
#2. Am I doing things correctly. I mean, is this the correct way to create a custom widget.
thank you for any inputs...
rv
For this, I created a SmartGWT project which has these two class files:
1. SchedulerWidgetEntryPoint.java
2. SchedulerWidget.java
Code:
public Class SchedulerWidgetEntryPoint() implements EntryPoint { ... } public class SchedulerWidget extends Composite { // ... // initialization code... public void sayHello() { SC,say("Welcome to SchedulerWidget!"); } ... }
My host application that uses the above jar looks like this:
1, GWTSample.java
Code:
import com.xxx,scheduler.client.*; ... public void onModuleLoad() { SchedulerWidget sw = SchedulerWidget.getInstance("ravi", "password"); sw.sayHello(); }
This works correctly, but when I click the ok button in this alert, it won't go away immediately. Sometimes it takes multiple clicks and waits for about 10 to 15 seconds before it closes. Sometimes it takes even more time and some mouse clicks or mouse movement to get this alert dismissed.
Want to know,
#1. Is there a fix to this problem.
#2. Am I doing things correctly. I mean, is this the correct way to create a custom widget.
thank you for any inputs...
rv