My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Project Information
Members

The gwt-bean-reflect API provide a very simple tool for using java bean properties by reflection.

Usage :

1st Step : Configure your GWT module

 <inherits name="org.valkyrie.gwt.bean.ValkyrieBean"/> 

2nd Step : Prepare your JavaBean

Your bean must implements ReflectedBean.

 public class MyReflectedBean implements ReflectedBean {
 

private String myProperty;

public String getMyProperty() { return myProperty; }

public void setMyProperty(String myProperty) { this.myProperty = myProperty; } }

3rd Step : Create a BeanManager

 
 BeanManager<MyReflectedBean> manager = GWT.create(MyReflectedBean.class);
 

Last Step : You can use you bean without getters and setters

 
 //Put a bean into the manager
 MyReflectedBean myBean = new MyReflectedBean();
 manager.setBean(myBean);
 

//Set and get the value of a property by the manager manager.set("myProperty", "The value of my property"); manager.get("myProperty")

//The property is changed Window.alert( manager.get("myProperty")); Window.alert(myBean.getMyProperty());

Powered by Google Project Hosting