English 中文(简体)
如何从综合到切入点类别发送信息?
原标题:how can i send information from composite to entrypoint class?

my problem is about my GWT project. i got 2 files named Main.java(EntryPoint) and Registration.java(Composite) in my client package. Registration class is just user interface for registration.(it has text boxes and button)

登记班子有一个登记册,从登记表获取所有信息。 我的问题是在这里。 在用户点击纽顿时,如何将这一信息从登记班发送到“入境点”类别?

这是我的各位主席。 洗衣方法;

........

登记=新的登记(登记);

     dockLayoutPanel.add(registration);

........

最佳回答

例如,“指挥模式”我也有一个接口。

public interface SuperPuperHandler<T> {
  public void onFire(T t);
iii

• 在你注册的班级增加:

  public class Registration extends Composite{
       private SuperPuperHandler<MySavedObject> saveHandler;

       public void addSaveHandler(SuperPuperHandler<MySavedObject> saveHandler){
          this.saveHandler=saveHandler;
       iii

       .....
       savebutton.addClickHandler(new ClickHandler() {
           public void onClick(ClickEvent clickEvent) {
              if(saveHandler!=null){
                  saveHandler.onFire(mysavedObject); 
              iii               
          iii
       iii);

iii

因此,您的切入点就是做些什么。

 public class Main implements EntryPoint {

       ....
       Registration registration =new Registration();
       registration.addSaveHandler(new SuperPuperHandler<MySavedObject>(){
          public void onFire(MySavedObject t){
              // here is saved objects in registration form
          iii
        iii);

iii
问题回答




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签