ZK的会话劫持预防(Session hijacking prevention in ZK)
我对网络开发领域非常陌生,但我想知道:有人知道ZK框架使用什么机制来防止会话劫持?
I am extremely new to the web-development scene, but I was wondering: Does anybody know what mechanisms does the ZK framework use in order to prevent session hijacking?
原文:https://stackoverflow.com/questions/4510639
最满意答案
你应该做的是以下几点
- 您应该使用
>
符号启动xmlmap
以指定XML项目根目录的路径。- 您应该使用与属性名称对应的
colModel
的name
属性值。 例如name: 'brand'
或name: "brand_description"
而不是name:'brand>description'
。- 您最好不要为列描述指定任何
index
属性。 在jqGrid将内部将name
属性的值复制到index
。该演示显示了结果。 它用
colNames: ["brandId", "brand description", "description", "recordId"], colModel: [ { name: "brand_brandId", xmlmap: ">brand>brandId", key: true, width: 100}, { name: "brand_description", xmlmap: ">brand>description", width: 200}, { name: "description", xmlmap: ">description", editable: true, width: 500}, { name: "recordId", width: 100} ]
我另外添加了
key: true
对于">brand>brandId"
的定义是key: true
,因为我认为每个项目的值都是唯一的,它可以用作rowid。 您可以选择其他原因的行id
。What you should do is the following
- you should start
xmlmap
with>
symbol to specify the path from the root of XML item.- you should use values of
name
properties ofcolModel
which corresponds to properties names. For examplename: 'brand'
orname: "brand_description"
instead ofname:'brand>description'
.- you should better don't specify any
index
property for column description. In the case jqGrid will copy internally the value ofname
property toindex
.The demo shows the results. It uses
colNames: ["brandId", "brand description", "description", "recordId"], colModel: [ { name: "brand_brandId", xmlmap: ">brand>brandId", key: true, width: 100}, { name: "brand_description", xmlmap: ">brand>description", width: 200}, { name: "description", xmlmap: ">description", editable: true, width: 500}, { name: "recordId", width: 100} ]
I added additionally
key: true
to the definition of">brand>brandId"
because I supposed that the value is unique for every item and it can be used as rowid. You can chooseid
of the rows in another way of cause.
相关问答
更多-
如果您使用数字(如12 )作为参数调用setCell或使用包含该数字的字符串(如"12" ),则会有很大差异 。 number参数将被解释为colModel数组中的索引 ,但字符串值将被解释为列名 。 因此,如果Costs_ProjectOrProgram的类型是数字,并且您想将其解释为字符串,那么您应该将变量转换为字符串。 所以你应该使用 $("#GoingCostLogGrid").jqGrid('setCell', rowId, String(Costs_ProjectOrProgram), ...
-
jqGrid getGridParam('colModel')缺少信息(jqGrid getGridParam('colModel') missing information)[2023-01-16]
JSON不支持函数的序列化。 因此,在使用searchoptions.dataInit , searchoptions.dataInit , searchoptions.buildSelect和您在colModel使用的所有其他函数将被丢弃。 了解您使用的jqGrid / free jqGrid或Guriddo jqGrid JS的版本非常重要。 从jqGrid 4.7开始,可以在colModel使用string值定义template (请参阅pull请求 )。 在这种方式中,您将获得colModel的主要 ... -
在使用jqgrid加载数据后是否可以修改colModel?(Is it possible to modify the colModel after data has loaded with jqgrid?)[2022-10-28]
我找到了一种似乎工作正常的方法。 我的解决方案的想法如下。 您使用具有许多隐藏列的colModel ,其虚拟名称如'cm0','cm1','cm2',...所有列都具有您在案例中所需的相同数据。 为了更容易填充数据,我使用自jqGrid 3.8.2以来的列模板: var mygrid=jQuery("#list"), cmIntTemplate = { width:50, sorttype:"int", formatter:"integer", ... -
我在jqGrid中动态构建的colModel有什么问题?(What's wrong with my dynamically built colModel in jqGrid?)[2022-05-30]
我觉得自己是一个真正的白痴.....我正在从另一行代码复制文本而没有意识到我已经包含了最后一个属性...隐藏:是的当然,它当然没有出现在我身上告诉它不要显示。 猜猜这就是我复制和粘贴代码所得到的。 I feel like a real idiot..... I was copying text from another line of code and didn't realize that I had included the last attribute... hidden:true So, of co ... -
简而言之, colNames定义页面上jqGrid列的名称, colModel指定每列的选项(数据集中的名称,宽度等 )。 该文档包含更多信息: colModel数组,用于描述列的参数。这是网格中最重要的部分。 有关所有有效值的完整说明,请参阅colModel API。 colNames我们放置列名称的数组。 这是出现在网格头部(标题图层)的文本。 名称用逗号分隔。 请注意,此数组中的元素数应等于colModel数组中的元素数。 In a nutshell, colNames defines the nam ...
-
看看这个答案。 它应该解决你的问题。 Look at this answers. It should solve your problem.
-
在网格定义ColModel:colmodel,更改为colModel:colmodel, 。 它是一个拼写错误。 Change ColModel:colmodel, tocolModel:colmodel, in grid definition. Its a spell mistake.
-
你应该做的是以下几点 您应该使用>符号启动xmlmap以指定XML项目根目录的路径。 您应该使用与属性名称对应的colModel的name属性值。 例如name: 'brand'或name: "brand_description"而不是name:'brand>description' 。 您最好不要为列描述指定任何index属性。 在jqGrid将内部将name属性的值复制到index 。 该演示显示了结果。 它用 colNames: ["brandId", "brand description", "de ...
-
获取错误:colNames的长度<> colModel或0!(Getting Error:length of colNames<>colModel or 0! in jqgrid)[2022-07-14]
您必须添加如下所示的colNames 。 colNames: ['Emp ID', 'Fisrt Name', 'Last Name', 'Email', 'Mobile No', 'City'] 哪个将显示为列标题。 更新:删除ajax调用, jqGrid可以从url本身加载数据。 $(document).ready(function() { $('#btndist').click(function() { jQuery("#Distable").jqGrid({ ... -
如果使用datatype: "json"或datatype: "xml" 而无需额外使用loadonce: true参数,则必须在服务器端实现数据的排序和过滤。 例如,如果您将列定义为 { name: "colName1", index: "colIndex1", ...} 然后,如果用户点击列标题,jqGrid将使用参数sidx=colIndex1向服务器发送Ajax请求。 因此,可以使用index选项来保存数据库中字段的名称,以简化相应SELECT语句的ORDER BY部分的构建。 在大多数情况下,需 ...