English 中文(简体)
JSF 2.0 Validation 差错导致投入领域显示出地方价值而不是更新的模型价值。
原标题:JSF 2.0 Validation errors result the input fields to display local values instead of updated model values

The application uses JSF 2.0 framework. User inputs values to a form. When user selects save, some fields have validation errors and some don t. User clicks on cancel button. Then user clicks the update button again. Even though the modal values are updated, the fields which had valid values when save was selected display the local values instead of the updated model values.

I solved this issue by adding a resetValues() method in the action method of cancel. The resetValues() loops through the list of children and reset the local values to null.

是否有更好的办法解决这一问题,以改进申请的执行?

最佳回答

取消的纽特应重新提出这一看法。 如果有必要的话,可以通过将导航结果退回到同一种观点来做到这一点。

问题回答

暂无回答




相关问题
Bind Button.IsEnabled to custom validation with XAML?

I am sorry I didn t know how to title my question any better, you name it if you got a good 1. I have an entity Contact. this person has navigation properties: Address, Phones (A collection of Phone)....

WPF - MVVM - NHibernate Validation

Im facing a bit of an issue when trying to validate a decimal property on domain object which is bound to a textbox on the view through the viewmodel. I am using NHibernate to decorate my property on ...

Wpf Combobox Limit to List

We are using Wpf Combobox to allow the user to do the following things: 1) select items by typing in the first few characters 2) auto complete the entry by filtering the list 3) suggesting the first ...

Rails 101 | validates_currency?

I ve searched high and low, but I could not find a solution, to what I think seems like a very common task. In a form I want to have a text input that accepts currency strings (i.e. $1,000,000 or ...

CodeIgniter form verification and class

I m using the form validation library and have something like this in the view <p> <label for="NAME">Name <span class="required">*</span></label> <?...

热门标签