与Primefaces数据表组件集成时如何忽略HDIV中的验证 [英] How to ignore validation in HDIV when integrating with primefaces datatable component

查看:99
本文介绍了与Primefaces数据表组件集成时如何忽略HDIV中的验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Primefaces Datatable组件.该数据表组件在浏览器上动态创建一个隐藏字段.

I am using Primefaces Datatable component. This data table component creates a hidden field dynamically on the browser.

<input type="hidden" id="formId:activitydescription_selection" name="formId:activitydescription_selection" autocomplete="off" value="" />

Primefaces数据表代码如下

The Primefaces datatable code is as follows

<p:dataTable  id="activitydescription" var="type"
            value="#{activityBean.activityList}" rows="#{activityBean.rowNo}" rowKey="#{type.activitySchemeId}"
            selection="#{activityBean.activityDTO}"
            emptyMessage="No value found with given criteria"
            paginatorPosition="bottom" sortMode="single" paginator="#{empty activityBean.activityList ? 'false':'true' }"
            dynamic="true"
            paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink}"
            rowIndexVar="rowIndex">

现在,提交页面时,HIDV认为在浏览器上动态创建的隐藏字段属于黑客入侵,因此使用控制台日志重定向为错误页面,

Now when the page is submitted HIDV thinks the hidden field which is created dynamically on the browser is a case of hacking thereby redirecting to error page with the console log as

org.hdiv.logs.Logger log INVALID_PARAMETER_NAME;/hseadmin/pages/secured/admin/Layout.xhtml;**formId:activitydescription_selection**;;0:0:0:0:0:0:0:1;0:0:0:0:0:0:0:1;anonymous

在我的hdiv-config.xml文件中,我已经修改了该文件,以便HDIV忽略此字段出现的地方的验证

In my hdiv-config.xml file i have modified the file so that HDIV ignore thi validation where this field occurs

<hdiv:paramsWithoutValidation>
         <hdiv:mapping url=".*"  parameters="formId:activitydescription_selection"/>
        </hdiv:paramsWithoutValidation>

但是,仍然没有遇到相同的控制台错误,HDIV重定向到错误页面. 有人可以帮我避免在HDIV上进行这些验证吗?

But no luck still the same console error and HDIV is redirecting to error page. Can someone help me out on how to avoid these validations on HDIV?

推荐答案

HDIV不支持Primefaces组件,仅支持标准的JSF组件,例如<h:dataTable>.

HDIV doesn't support the Primefaces components, only standard JSF components like <h:dataTable>.

http://www.hdiv.org/hdiv-documentation-single/doc.html

这篇关于与Primefaces数据表组件集成时如何忽略HDIV中的验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆