Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Problem with SC.say, if I create GWT jar file

    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

    Code:
    public Class SchedulerWidgetEntryPoint() implements EntryPoint {
    ...
    }
    
    public class SchedulerWidget extends Composite {
          // ...
          // initialization code...
    	public void sayHello() {
    		SC,say("Welcome to SchedulerWidget!");
    	}
    ...
    }
    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
    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
    Last edited by rv_nath; 6 Apr 2012, 04:50.
Working...
X