csq39 发表于 2017-8-1 15:49:18

自定义下拉框

<table width="1119"><tbody style="word-wrap: break-word;"><tr style="word-wrap: break-word;" class="firstRow"><td class="t_f" style="word-wrap: break-word; font-size: 14px;"><p style="word-wrap: break-word;">适用版本:1.0.0_20170726</p></td></tr></tbody></table><p>具体参见类:io.raycom.system.framework.tag.form。DemoExtendSelector</p><p><br/></p><p>说明:</p><p>1:创建下拉框扩展类:</p><p>&nbsp; 1)创建类实现SelectTagExtender接口</p><p>&nbsp; 2)添加类注解:@Component &nbsp; 用于自动生成对应的bean</p><p>&nbsp; 3)添加接口类声明的4个方法的实现。其中</p><p>&nbsp; &nbsp; &nbsp;getItemValue():返回存储下拉框中value的字段名</p><p>&nbsp; &nbsp; &nbsp;getItemLabel():返回存储下拉框中text的字段名</p><p>&nbsp; &nbsp; &nbsp;getComCode():区分扩展类的标识,用于select以及select2标签中comocode属性</p><p>&nbsp; &nbsp; &nbsp;getItems():下拉框中的实际数据,其key值需要与声明的getItemValue,getItemLabel一致。</p><p>&nbsp; &nbsp; &nbsp;</p><p>2:使用:</p><p>&nbsp; 与常规的通用代码调用方法一致,区别是comcode需要赋的值是扩展类中定义的值,例如</p><p>&nbsp; &lt;rt:select2 id=&quot;status&quot; &nbsp;name=&quot;status&quot; dataQuery=&quot;yes&quot; headerKey=&quot;-1&quot; headerValue=&quot;全部&quot; &nbsp;comCode=&quot;demo-code&quot;&gt;&lt;/rt:select2&gt;</p><p><br/></p>
页: [1]
查看完整版本: 自定义下拉框