ltalina复复数的指数形式?

3321人阅读
学习笔记(68)
jquery(22)
java代码(下拉列表编辑)
@RequestMapping(&queryLanguageForEdit.do&)
&& &@ResponseBody
&& &public String queryLanguageForEdit(ModelMap model) {
&& &&& &Collection&LookUpValue& language = service.queryLanguage();
&& &&& &StringBuffer json=new StringBuffer();
&& &&& &json.append(&&select&&);
&& &&& &for (Iterator iterator = language.iterator(); iterator.hasNext();) {
&& &&& &&& &LookUpValue lv = (LookUpValue) iterator.next();
&& &&& &&& &json.append(&&option value=&).append(lv.getCode()).append(&&&).append(lv.getText()).append(&&/option&&);
&& &&& &json.append(&&/select&&);
&& &&& &return json.toString();
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function showGrid() {
&& &var lastsel2 =
&& &$(&#ltGrid&).jqGrid({
&& &&& &url : 'lookup/queryAllLookupV.do?h_lookuptype='
&& &&& &&& &&& &+ $(&#h_lookuptype&).val(),
&& &&& &datatype : &json&,
&& &&& &height : 260,
&& &&& &width : 600,
&& &&& &rowNum : 10,
&& &&& &rowList : [10, 20, 30],
&& &&& &jsonReader : {
&& &&& &&& &root : &list&,
&& &&& &&& &page : &curPage&, // json中代表当前页码的数据
&& &&& &&& &total : &totalPages&, // json中代表页码总数的数据
&& &&& &&& &records : &totalRecords&, // json中代表数据行总数的数据
&& &&& &&& &repeatitems : false
&& &&& &},
&& &&& &ondblClickRow : function(id) {
&& &&& &&& &var row = $(&#ltGrid&).jqGrid(&getRowData&, id);
&& &&& &&& &fillfromData(row);
&& &&& &},
&& &&& &colNames : ['代码类型', '代码', '语言', '源语言', '含义', '启用', '有效日期从', '有效日期至',
&& &&& &&& &&& &'描述'],
&& &&& &colModel : [{
&& &&& &&& &&& &&& &name : 'lookuptype',
&& &&& &&& &&& &&& &index : 'lookuptype',
&& &&& &&& &&& &&& &sorttype : &String&,
&& &&& &&& &&& &&& &editrules : {
&& &&& &&& &&& &&& &&& &required : true
&& &&& &&& &&& &&& &},
&& &&& &&& &&& &&& &editable : true
&& &&& &&& &&& &}, {
&& &&& &&& &&& &&& &name : 'lookupcode',
&& &&& &&& &&& &&& &index : 'lookupcode',
&& &&& &&& &&& &&& &sorttype : &String&,
&& &&& &&& &&& &&& &editrules : {
&& &&& &&& &&& &&& &&& &required : true
&& &&& &&& &&& &&& &},
&& &&& &&& &&& &&& &editable : true
&& &&& &&& &&& &}, {
&& &&& &&& &&& &&& &name : 'language',
&& &&& &&& &&& &&& &index : 'language',
&& &&& &&& &&& &&& &sorttype : &String&,
&& &&& &&& &&& &&& &edittype : &select&,
&& &&& &&& &&& &&& &editoptions : {
&& &&& &&& &&& &&& &&& &dataUrl
: &index/queryLanguageForEdit.do&
&& &&& &&& &&& &&& &},// {value:&FE:FedEx;IN:InTTN:TNT;AR:ARAMEX&},
&& &&& &&& &&& &&& &editable : true
&& &&& &&& &&& &}, {
&& &&& &&& &&& &&& &name : 'sourcelang',
&& &&& &&& &&& &&& &index : 'sourcelang',
&& &&& &&& &&& &&& &sorttype : &String&,
&& &&& &&& &&& &&& &edittype : &select&,
&& &&& &&& &&& &&& &editoptions : {
&& &&& &&& &&& &&& &&& &dataUrl : &index/queryLanguageForEdit.do&
&& &&& &&& &&& &&& &},
&& &&& &&& &&& &&& &editable : true
&& &&& &&& &&& &}, {
&& &&& &&& &&& &&& &name : 'meaning',
&& &&& &&& &&& &&& &index : 'meaning',
&& &&& &&& &&& &&& &sorttype : &String&,
&& &&& &&& &&& &&& &editable : true
&& &&& &&& &&& &}, {
&& &&& &&& &&& &&& &name : 'enabledflag',
&& &&& &&& &&& &&& &index : 'enabledflag',
&& &&& &&& &&& &&& &edittype : &checkbox&,
&& &&& &&& &&& &&& &editoptions : {
&& &&& &&& &&& &&& &&& &value : &Y:N&
&& &&& &&& &&& &&& &},
&& &&& &&& &&& &&& &editable : true
&& &&& &&& &&& &}, {
&& &&& &&& &&& &&& &name : 'datefrom',
&& &&& &&& &&& &&& &index : 'datefrom',
&& &&& &&& &&& &&& &edittype : 'text',
&& &&& &&& &&& &&& &editrules : {
&& &&& &&& &&& &&& &&& &required : true
&& &&& &&& &&& &&& &},
&& &&& &&& &&& &&& &editoptions : {
&& &&& &&& &&& &&& &&& &size : 10,
&& &&& &&& &&& &&& &&& &maxlengh : 10,
&& &&& &&& &&& &&& &&& &dataInit : function(element) {
&& &&& &&& &&& &&& &&& &&& &$(element).datepicker({
&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &dateFormat : 'yy-mm-dd'
&& &&& &&& &&& &&& &&& &&& &&& &&& &})
&& &&& &&& &&& &&& &&& &}
&& &&& &&& &&& &&& &},
&& &&& &&& &&& &&& &editable : true
&& &&& &&& &&& &}, {
&& &&& &&& &&& &&& &name : 'dateto',
&& &&& &&& &&& &&& &index : 'dateto',
&& &&& &&& &&& &&& &edittype : 'text',
&& &&& &&& &&& &&& &editoptions : {
&& &&& &&& &&& &&& &&& &size : 10,
&& &&& &&& &&& &&& &&& &maxlengh : 10,
&& &&& &&& &&& &&& &&& &dataInit : function(element) {
&& &&& &&& &&& &&& &&& &&& &$(element).datepicker({
&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &dateFormat : 'yy-mm-dd'
&& &&& &&& &&& &&& &&& &&& &&& &&& &})
&& &&& &&& &&& &&& &&& &}
&& &&& &&& &&& &&& &},
&& &&& &&& &&& &&& &editable : true
&& &&& &&& &&& &}, {
&& &&& &&& &&& &&& &name : 'description',
&& &&& &&& &&& &&& &index : 'description',
&& &&& &&& &&& &&& &edittype : &textarea&,
&& &&& &&& &&& &&& &editoptions : {
&& &&& &&& &&& &&& &&& &rows : &2&,
&& &&& &&& &&& &&& &&& &cols : &10&
&& &&& &&& &&& &&& &},
&& &&& &&& &&& &&& &editable : true
&& &&& &&& &&& &}],
&& &&& &sortname : 'lookuptype',
&& &&& &sortorder : &desc&,
&& &&& &pager : &#ltGridPager&,
&& &&& &viewrecords : true,
&& &&& &autowidth : true,
&& &&& &editurl : &lookup/saveLookupValue.do&,
&& &&& &onSelectRow : function(id) {
&& &&& &&& &var rows = $(&#ltGrid&).jqGrid('getGridParam', 'records');
&& &&& &&& &if (id && id !== lastsel2) {
&& &&& &&& &&& &if (lastsel2 == rows) {
&& &&& &&& &&& &&& &var ur = &lookup/saveLookupValue.do?oper=add&;
&& &&& &&& &&& &&& &jQuery('#ltGrid').jqGrid('saveRow', lastsel2, true, ur);
&& &&& &&& &&& &&& &jQuery('#ltGrid').jqGrid('editRow', id, true);
&& &&& &&& &&& &&& &lastsel2 =
&& &&& &&& &&& &} else {
&& &&& &&& &&& &&& &jQuery('#ltGrid').jqGrid('saveRow', lastsel2, true);
&& &&& &&& &&& &&& &jQuery('#ltGrid').jqGrid('editRow', id, true);
&& &&& &&& &&& &&& &lastsel2 =
&& &&& &&& &&& &}
&& &&& &&& &}
&& &$(&#ltGrid&).jqGrid('navGrid', '#ltGridPager', {
&& &&& &&& &&& &edit : false,
&& &&& &&& &&& &add : false,
&& &&& &&& &&& &del : false
&& &&& &&& &}, {}, {}, {}, {
&& &&& &&& &&& &sopt : ['eq', 'ne', 'cn', 'bw', 'bn'],
&& &&& &&& &&& &multipleSearch : true
&& &&& &&& &});
&& &$(&#ltGrid&).navButtonAdd('#ltGridPager', {
&& &&& &&& &&& &caption : &&,
&& &&& &&& &&& &buttonicon : &ui-icon-plus&,
&& &&& &&& &&& &onClickButton : addempty,
&& &&& &&& &&& &position : &3&,
&& &&& &&& &&& &title : &&,
&& &&& &&& &&& &cursor : &pointer&
&& &&& &&& &});
&& &$(&#ltGrid&).navButtonAdd('#ltGridPager', {
&& &&& &&& &&& &caption : &&,
&& &&& &&& &&& &buttonicon : &ui-icon-disk&,
&& &&& &&& &&& &onClickButton : saveARow,
&& &&& &&& &&& &position : &4&,
&& &&& &&& &&& &title : &&,
&& &&& &&& &&& &cursor : &pointer&
&& &&& &&& &});
&& &$(&#ltGrid&).navButtonAdd('#ltGridPager', {
&& &&& &&& &&& &caption : &&,
&& &&& &&& &&& &buttonicon : &ui-icon-trash&,
&& &&& &&& &&& &onClickButton : deleteRow,
&& &&& &&& &&& &position : &last&,
&& &&& &&& &&& &title : &&,
&& &&& &&& &&& &cursor : &pointer&
&& &&& &&& &});
function saveARow() {
&& &var rows = $(&#ltGrid&).jqGrid('getGridParam', 'records');
&& &var selectedId = $(&#ltGrid&).jqGrid(&getGridParam&, &selrow&);
&& &// alert(&selectedId==& + (rows == selectedId));
&& &if (rows == selectedId)
&& &&& &ur = &lookup/saveLookupValue.do?oper=add&;
&& &&& &ur = &lookup/saveLookupValue.do&;
&& &jQuery('#ltGrid').jqGrid('saveRow', selectedId, true, ur);
&& &// $(&#ed1&).attr(&disabled&,false);
function addempty() {
&& &if ($(&#h_lookuptype&).val() == null || &&==($(&#h_lookuptype&).val())) {
&& &&& &alert(&请先存储代码类型!&);
&& &} else {
&& &&& &var selectedId = $(&#ltGrid&).jqGrid(&getGridParam&, &selrow&);
&& &&& &var rows = $(&#ltGrid&).jqGrid('getGridParam', 'records');
&& &&& &var dataRow = {
&& &&& &&& &lookuptype : $(&#lookuptype&).val()
&& &&& &};
&& &&& &if (selectedId) {
&& &&& &&& &$(&#ltGrid&).jqGrid(&addRowData&, (rows + 1), dataRow, &before&,
&& &&& &&& &&& &&& &selectedId);
&& &&& &} else {
&& &&& &&& &$(&#ltGrid&).jqGrid(&addRowData&, (rows + 1), dataRow, &first&);
function deleteRow() {
&& &var row = $(&#ltGrid&).jqGrid('getGridParam', 'selrow');// 选中的行号
&& &// var len = row.
&& &var rowD = $(&#ltGrid&).jqGrid(&getRowData&, row);// 选中行数据
&& &var sel_rows = rowD[&lookuptype&] + &,& + rowD[&lookupcode&];
&& &// alert(&row==& + rowD[&lookuptype&]);
&& &if (row != null) {
&& &&& &jQuery(&#ltGrid&).jqGrid('delGridRow', row, {
&& &&& &&& &&& &&& &url : 'lookup/deleteLookupValues.do?sel_rows=' + sel_rows,
&& &&& &&& &&& &&& &recreateForm : true,
&& &&& &&& &&& &&& &reloadAfterSubmit : true,
&& &&& &&& &&& &&& &closeAfterDelete : true
&& &&& &&& &&& &});
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:190134次
积分:2308
积分:2308
排名:第14462名
原创:36篇
转载:81篇
评论:38条
(3)(3)(11)(1)(2)(2)(2)(7)(10)(40)(6)(5)(9)(1)(1)(2)(2)(3)(3)(1)(3)

我要回帖

更多关于 tooth的复数形式 的文章

 

随机推荐