package com.wb.controls;

import com.wb.common.KVBuffer;
import com.wb.util.WebUtil;

/**
 * Column控件的解析类。
 */
public class ExtColumn extends com.wb.controls.ExtControl {
	protected void extendConfig() {
		String keyName = gs("keyName");
		if (!keyName.isEmpty()) {
			if (hasItems)
				headerScript.append(',');
			else
				hasItems = true;
			headerScript.append("renderer:Wb.kvRenderer,keyItems:");
			headerScript.append(KVBuffer.getList(keyName, WebUtil.fetch(request, "sys.tenancyId")));
		}

		/**
		 * 添加列隐藏功能

		if(this.configs.get("itemId").equals("nameCol")){
			if (hasItems)
				headerScript.append(',');
			else
				hasItems = true;
			headerScript.append("hidden:");
			headerScript.append("true");
		} */
	}
}