How to validate checkbox with submit button
[Logo]
ICEsoft.org Forums: ICEfaces, ICEmobile, ICEpdf
[Search] Search   [Recent Topics] Recent Topics   [Groups] Home Page | www.icefaces.org  [Register] Register  [Login] Login 
How to validate checkbox with submit button  XML
Forum Index -> General Help
Author Message
hossain

Joined: 19/08/2010 01:45:49
Messages: 5
Offline


I am in new icefaces . I want to check validation of my checkbox without click submit button.Is it po[b]ssible. Especially I want to onblur event.
Any body can help me.
Unvirtual

Joined: 02/01/2009 00:00:00
Messages: 42
Offline


Just enable partialSubmit for the Checkbox and integrate a ValueChangeListener like

Code:
 public void checkboxChanged(ValueChangeEvent event) {
 
 Boolean val = (Boolean)event.getNewValue();
 if(!val) {
  facesMessages.add("Value not Valid.");
 }
 
 }
 



May this helps you.

Greetz
Florian Hell
hossain

Joined: 19/08/2010 01:45:49
Messages: 5
Offline


Hi, You are right but valueChangeListener is called on any filed partial submit true . i want to call the validator OR listener when onblur only this field. Please help






Unvirtual wrote:
Just enable partialSubmit for the Checkbox and integrate a ValueChangeListener like

Code:
 public void checkboxChanged(ValueChangeEvent event) {
 
 Boolean val = (Boolean)event.getNewValue();
 if(!val) {
  facesMessages.add("Value not Valid.");
 }
 
 }
 



May this helps you.

Greetz
Florian Hell 
hossain

Joined: 19/08/2010 01:45:49
Messages: 5
Offline


Hi, You are right but valueChangeListener is called on any filed partial submit true . i want to call the validator OR listener when onblur only this field. Please help
 
Forum Index -> General Help
Go to:   
Powered by JForum 2.1.7ice © JForum Team