English 中文(简体)
JSF - 预防验证 在提出WARN Validator Exception时失败
原标题:JSF - Prevent validationFailed when raising a WARN ValidatorException

我的表格是在其领域使用有效器。 这些有效人员可以寄回地。 SEVERITY_ERROR or Severity. SEVERITY_WARN 信,如:

if (!isInMainFamily) {
    FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_WARN, "You should make sure to tag your competency in at least one main category", null);
    throw new ValidatorException(message);
}

然而,SEVERITY_WARN的电文对我来说并不阻碍。 它们只是告诉用户他们应当纠正其投入的一种方式,但获得的只是阻止他们提交表格和保存数据。

然而,似乎扔下任何类型的瓦莱德韦托西语都把“失败”的面孔说成是“失败”,从而防止提交表格。

是否有办法解决这一问题? 我是否误解?

Thanks a lot for your help,
Sébastien

最佳回答

页: 1 它是计算投入无效的例外情况,从而阻碍了提交表格。

context.addMessage(component.getClientId(), message);
问题回答

暂无回答




相关问题
JSF a4j:support with h:selectManyCheckbox

I m having trouble with a JSF selectManyCheckbox and A4J support. The purpose is to run some action when a checkbox is selected. This works perfectly in Firefox. Yet, when testing in any IE (ie6 / ie7 ...

Mojarra for JSF Encoding

Can anyone teach me how to use mojarra to encode my JSF files. I downloaded mojarra and expected some kind of jar but what i had downloaded was a folder of files i don t know what to do with

如何拦截要求终止?

在共同基金中,如果用户要求终止,就需要采取一些行动。 我需要某种拦截器,但我不知道如何这样做。 我需要帮助。 增 编

ICEFaces inputFile getting the file content without upload

Is there any way of just getting the content of the browsed file without any upload/file transfer operations? I currently use ICEFaces inputFile component but I do not need the default uploading ...

Weird behaviour of h:commandLink action (MethodExpression)

I have two JSPs where I am displaying some info from database in a h:dataTable. One of them is showing all the info, and one of them user specifically. I have showXML.jsp that shows the "XML" column ...

How to correctly use ResultSet with h:dataTable

The problem is, that after displaying the ResultSet with <h:dataTable>, the connection is left open. If I close it, it closes the ResultSet too. I m thinking about copying the ResultSet data ...

热门标签