不可以,如果一个模块中涉及到新老框架,需要用iframe进行分离.
${CurrentUser.xxx},如${CurrentUser.name}
CurrentUser对应用户数据对象com.seeyon.ctp.common.authenticate.domain.User
我们初始化searchCondition的时候配置参数top,right,bottom,left等来定位。一般我们使用的top和right。例如:
var searchobj = $.searchCondition({
top:33,
right:10,
//left:10,
//bottom:10,
在conditions这个参数当中配置:
conditions: [{
id: 'title',//查询条件生成input/select/data的id
name: 'title',//查询条件生成input/select/data的name
type: 'input',//类型: [input:输入框] [select:下拉选择] [datemulti:时间段]
text: '标题',//查询条件名称
value: 'subject'//查询条件value
}]
searchHandler: function(){
var val = searchobj.g.getReturnValue();
console.log($.toJson(val));
},
类型: [input:输入框] [select:下拉选择] [datemulti:时间段]
searchobj.g.setCondition('datetime', '2012-10-25 17:49', '2012-10-25 17:49');
function rend(txt,rowData, rowIndex, colIndex,colObj)自定义渲染器,可以对单元格显示数据和样式进行加工展现.
//txt为表身渲染单元格文本,
//rowData为渲染当前行数据对象,
//rowIndex为当前行,
//colIndex为当前列,
//obj为表头对象的width,name,display,align以及sortType等等
var gridObj = $("#flexme3").ajaxgrid({
...
colModel: [{
display: 'id',
name: 'id',
width: '5%',
hide:true,
sortable: false,
align: 'center',
type: 'checkbox',
isToggleHideShow:true
}
...
列表属性width默认是auto,即根据每列的宽度自动计算。也可以设置宽度px的值或者百分比。
列表属性customize个性化设置,默认的是true,禁用的话设为false即可。默认支持
grid默认按照字符串排序,也可以制定排序类型(number或date)
colModel : [{
display : '日期',
name : 'mydate',
width : '180',
sortType : 'number'
}
onSuccess:function(){
alert("成功");
},
slideToggleUpHandle:function(){}
slideToggleDownHandle:dunction(){}
列表对象.grid.resizeGridUpDown("middle")//up,down
列表对象.grid.getSelectRows():获取选中行数组
新框架grid不支持多列头,可以通过电子表格(普通的table)实现
colModel : [{
display : '日期',
name : 'mydate',
width : '180',
cutsize : 10
}
nGoToHeight:100,//默认的是回到顶部
showHeight:100
marginLeft:500,//默认的是798
sprit:true/false //true是显示,false不显示
通过var layout = $("#layout").layout()函数获取Layout对象。 还可以动态设置layout大小,如:layout.setEast(300);
可以。通过spiretBar来配置。例如:
spiretBar: {
show: true,
handlerB: function () {
layout.setNorth(98);
},
handlerT: function () {
layout.setNorth(0);
}
}
注意:
north 和 south为handlerB和handlerT;west 和 east为handlerL和handlerR
显示时分:ifFormat:'%Y-%m-%d %H:%M'
显示月:ifFormat:'%Y-%m'
clearBlank:true/false
<input id="mycal" type="text" class="comp" comp="type:'calendar',ifFormat:'%Y-%m-%d',onUpdate:aaa"/>
<script type="text/javascript">
function aaa(){
alert("aaaa");
}
</script>
dateString:'2012-12-16 17:59'
可以通过transParams传参数到弹出窗口中
transParams:{
name:"陈宁宁"
}
在子页面中通过
window.parentDialogObj[id]获取窗口对象,然后调用getTransParams()来获取传过来的参数
按钮初始化的时候默认第一个为高亮,其他的为灰色。show的时候传btnType:1/0 //1为高亮,0为灰色
closeParam:{
'show':true, //必须写。否则按钮图标不显示
autoClose:false, //必须,如果不设置false属性,他会在执行你自定义方法之后,执行自带的方法
handler:function(){
//var d = dialog.getClose();
alert(1)
}
},
bottomHTML:"<label for='Checkbox1' class='margin_r_10 hand'>"+
"<input type='checkbox' value='0' id='Checkbox1' name='option' class='radio_com'>选项1"+
"</label>",
dialog.setTitle(title)
targetWindow:window.parent
dialog.disabledBtn('按钮id')//按钮不可用
dialog.enabledBtn('按钮id')//按钮可以
dialog.hideBtn('按钮id') //按钮隐藏
dialog.showBtn('按钮id')//按钮显示
dialog.close();
5种类型: 1,alert窗口 //$.alert("这个是alert窗口!"); 2,提示信息 //$.infor("这个是提示信息!"); 3,confirm // $.confirm({...}); 4,自定义 //$.messageBox({...}) 5,错误对话框 //$.error("这个是错误对话框!");
以confirm为例:
var confirm = $.confirm({
'msg': '点击按钮后执行某个方法!',
ok_fn: function () { alert('确定后执行,自定义方法!'); },//点击确定执行操作
cancel_fn:function(){alert('取消后执行,自定义方法!');}//点击取消执行操作
});
1,按钮,2,select 3,checkbox,(默认的是按钮,需要修改的话可以指定type:select/checkbox)
toolbar: [{
className: "ico16",//样式名称[按钮图标--从通用class中查询]
...
}]
禁用: toolbar.disabled(id)
启用:toolbar.enabled(id)
显示:toolbar.showBtn(id)
不显示:toolbar.hideBtn(id)//设置一个按钮不显示,如果不传参数,则设置所有的按钮不显示
var tt = $("#toolbar").toolbar({
//searchHtml:"search",
toolbar: [{
id: "delete",
name: "删除",
className: "ico16 del_16",
selected:true
}
isPager:true/false;
iconSkin属性
iconSkin:"treeDepartment",//配置class即可换图标
treeObj.getSelectedNodes()
chkDisabled:true/false //true表示禁用,false表示启用
var sNodes = treeObj.getSelectedNodes();
if (sNodes.length > 0) {
var isParent = sNodes[0].isParent;
}
managerMethod,异步树加载Manager的方法名,该Manager方法只允许有一个Map参数,用于接收查询参数,当前展开节点id将以idKey属性名传入,另外还可以通过asyncParam配置其它异步树加载查询参数用于指定异步树加载时的其它定制查询参数
节点的open属性设置为true表示节点展开
open: true,
render用于树节点展现渲染,
function render(name, data),第一个参数为树节点显示名称,第二个参数为数据对象,返回值为渲染后的树节点
$.tooltip({
openPoint: [10, 10],//左,上
定义class="tooltip_close"即可。如:
<a class="tooltip_close font_size12" href="javascript:void(0)">关闭</a>
window.opener:就是指的父窗体。
window.opener.test(); ---调用父窗体中的test()方法
,如果window.opener存在,设置A窗口中stockBox的值。
if (window.opener && !window.opener.closed) {
window.opener.document.parentForm.stockBox.value = symbol;
}
window.close();关闭子窗口。
子窗口关闭后刷新父窗口:
1,window.opener.location.href=window.opener.location.href;
2,window.opener.location.reload(true);
window.opener:就是指的父窗体。
window.opener.test(); ---调用父窗体中的test()方法
,如果window.opener存在,设置A窗口中stockBox的值。
if (window.opener && !window.opener.closed) {
window.opener.document.parentForm.stockBox.value = symbol;
}
window.close();关闭子窗口。
子窗口关闭后刷新父窗口:
1,window.opener.location.href=window.opener.location.href;
2,window.opener.location.reload(true);