
com.asayama.gwt.angular.site.examples.client.OnClickEventExampleController Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of OnClickEvent Show documentation
Show all versions of OnClickEvent Show documentation
An example GWT Angular module demonstrating the use of onclick event.
The newest version!
package com.asayama.gwt.angular.site.examples.client;
import java.util.Date;
import com.asayama.gwt.angular.client.AbstractController;
import com.google.gwt.user.client.Event;
public class OnClickEventExampleController extends AbstractController {
// Public final fields are directly bound to AngularJS's $scope, and
// they are available for use in the HTML.
public static final String TITLE = "Click Me";
// Other fields are used to represent the state of this controller.
private String caption = "You have not clicked me";
// Public methods are automatically wired to AngularJS's $scope, and
// they are availabe for use in the HTML.
public void onClickTitle(Event event) {
setCaption("Clicked at " + new Date());
}
public void onClickCaption(Event event) {
setCaption("Hey!");
}
public String getCaption() {
return caption;
}
public void setCaption(String caption) {
this.caption = caption;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy