CleverGWT

From PlcWiki

(Difference between revisions)
Jump to: navigation, search
m (ClvListGrid - Extension of ListGrid)
m (StringUtil.tokenizer(optsValue, ",", new ValueCallback() { int i = 0; @Override public void execute(String valueCB) { opts.add(new MaterialOption(++i, valueCB.trim(), ref)); })
Line 29: Line 29:
Note: If you are implementing executeRemove/Add/Fetch you must call response.response(...). Not in executeUpdate.
Note: If you are implementing executeRemove/Add/Fetch you must call response.response(...). Not in executeUpdate.
 +
 +
== StringUtil ==
 +
 +
<java>
 +
StringUtil.tokenizer("Jirka, Petr, Honza", ",", new ValueCallback() {
 +
 +
@Override
 +
public void execute(String token) {
 +
// Your code
 +
}
 +
});
 +
</java>
== BCrypt ==
== BCrypt ==

Revision as of 07:42, 20 June 2012

ClvListGrid - Extension of ListGrid

Simplification of CRUD usage:

ClvListGrid grid = new ClvListGrid(new ClvListGrid.Delegate() {
 
			@Override
			public void executeUpdate(ClvListGridResponse response) {
				// Map<String, Object> reqMap = response.getRequestMap();
				// response.response(...
			}
 
			@Override
			public void executeRemove(ClvListGridResponse response) {}
 
			@Override
			public void executeFetch(ClvListGridResponse response) {}
 
			@Override
			public void executeAdd(ClvListGridResponse response) {}
 
			@Override
			public DataSourceField[] createFields() {
				return new DataSourceField[] { new DataSourceTextField("Field Name") };
			}
		});

Note: If you are implementing executeRemove/Add/Fetch you must call response.response(...). Not in executeUpdate.

StringUtil

 StringUtil.tokenizer("Jirka, Petr, Honza", ",", new ValueCallback() {
 
	@Override
	public void execute(String token) {
		// Your code
	}
 });

BCrypt

String hashed = BCrypt.hashpw("password", BCrypt.gensalt());
boolean verified = BCrypt.checkpw("password", hashed);
Personal tools