All Downloads are FREE. Search and download functionalities are using the official Maven repository.

me.dhf.dict.chain.JqgridSelectProcessor Maven / Gradle / Ivy

Go to download

Generate global dictionary JSON file and map for calling in the previous section or view

The newest version!
package me.dhf.dict.chain;

import java.util.LinkedHashMap;
import java.util.Map;

/**
 * jqgrid 处理
 * @author 邓华锋 http://dhf.ink
 *
 */
public class JqgridSelectProcessor implements SelectProcessor {
	public static Map jqgridSelectMap = new LinkedHashMap();
	private StringBuffer sb = new StringBuffer();

	@Override
	public void process(String value, String text) {
		sb.append(value);
		sb.append(":");
		sb.append(text);
		sb.append(";");
	}

	@Override
	public void put(String key) {
		String row=sb.toString();
		row=row.substring(0, row.lastIndexOf(";"));
		jqgridSelectMap.put(key, row);
		sb = new StringBuffer();
	}

	@Override
	public void putGlobalDict(Map globalDictVal) {
		globalDictVal.put("jqgridSelect", jqgridSelectMap);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy