1 18 package org.apache.beehive.netui.tags.databinding.datagrid; 19 20 import javax.servlet.jsp.JspContext ; 21 22 import org.apache.beehive.netui.tags.AbstractSimpleTag; 23 import org.apache.beehive.netui.databinding.datagrid.api.DataGridConfig; 24 import org.apache.beehive.netui.databinding.datagrid.api.DataGridStateFactory; 25 import org.apache.beehive.netui.databinding.datagrid.api.DataGridState; 26 27 65 public class GetDataGridState 66 extends AbstractSimpleTag { 67 68 private String _var = null; 69 private String _name = null; 70 private DataGridConfig _config = null; 71 72 76 public final String getTagName() { 77 return "GetDataGridState"; 78 } 79 80 90 public void setGridName(String name) { 91 _name = name; 92 } 93 94 102 public void setVar(String var) { 103 _var = var; 104 } 105 106 117 public void setDataGridConfig(DataGridConfig config) { 118 _config = config; 119 } 120 121 125 public void doTag() { 126 JspContext jspContext = getJspContext(); 127 DataGridStateFactory factory = DataGridStateFactory.getInstance(jspContext); 128 assert factory != null; 129 130 DataGridState state = null; 131 if(_config != null) 132 state = factory.getDataGridState(_name, _config); 133 else 134 state = factory.getDataGridState(_name); 135 136 jspContext.setAttribute(_var, state); 137 } 138 } 139 | Popular Tags |