-
1. Re: Validation message disappear
bleathem Jun 11, 2013 2:21 AM (in response to wish79)Try setting the execute attribute of your a4j:ajax tags to execute the whole form.
-
2. Re: Validation message disappear
wish79 Jun 11, 2013 3:27 AM (in response to bleathem)Thanks,
but as we know the default execute for <a4j:ajax is @this not @form .
-
3. Re: Validation message disappear
bleathem Jun 11, 2013 11:03 AM (in response to wish79)Yes, that's the default, and that's why I'm suggesting you try changing it...
-
4. Re: Validation message disappear
wish79 Jun 11, 2013 5:09 PM (in response to bleathem)Thank, it is working now but in the demo showcase they are not use the a4j:ajax and the validation is working and fireing without any problem
-
5. Re: Validation message disappear
bleathem Jun 11, 2013 5:59 PM (in response to wish79)Not all Bean Validation rules are implemented on the client-side. Those rules which are not implemented in javascript (custom bean validation rules for instance) will always need an ajax call to evaluate. The showcase example uses BV rules that have a javascript implementation. See:
-
6. Re: Validation message disappear
wish79 Jun 12, 2013 2:05 AM (in response to bleathem)But all my validation is client side not customized read this : https://community.jboss.org/message/822491#822491
-
7. Re: Validation message disappear
bleathem Jun 12, 2013 2:10 AM (in response to wish79)Can you post the code for the Bean in question, so we can see what the BV annotations look like?
-
8. Re: Validation message disappear
wish79 Jun 12, 2013 2:21 AM (in response to bleathem)@Entity(name="DW_OUT_SOURCED")
@Table(name="DW_OUT_SOURCED")
@TableGenerator(name = "outsourcedGenerator", table = "DW_SEQUENCE", schema = "DIWAN", pkColumnName = "SEQ_NAME", valueColumnName = "SEQ_VALUE", pkColumnValue = "OUT_SOURCED_SEQUENCE", allocationSize = 1, initialValue = 0)
public class OutsourcedBean extends BaseBean{
@Id
@GeneratedValue(strategy = GenerationType.TABLE, generator="outsourcedGenerator")
@Column(name="ID")
private int Id;
@NotEmpty(message="{GEN_REQUIRED}" , groups={AddValidationGroup.class , EditValidationGroup.class,ManageValidationGroup.class})
@JoinColumn(name="TYPE_ID",referencedColumnName="ID",nullable=false)
@ManyToOne
private ChildLKPBean type;
@NotEmpty(message="{GEN_REQUIRED}" , groups={AddValidationGroup.class , EditValidationGroup.class})
@Column(name="NAME_AR",length=100, nullable = false,unique = true)
private String nameAr;
@NotEmpty(message="{GEN_REQUIRED}" , groups={AddValidationGroup.class , EditValidationGroup.class})
@Column(name="NAME_EN",length=100, nullable = false,unique = true)
private String nameEn;
@Column(name="PERSON_NAME",length=200)
private String personName;
@Column(name="PHONE_NUMBER",length=20)
private String phoneNumber;
@Column(name="FAX_NUMBER",length=20)
private String faxNumber;
@Column(name="MOBILE_NUMBER",length=20)
private String mobileNumber;
@Column(name="POBOX",length=200)
private String pobox;
@Column(name="EMAIL_ADDRESS",length=200)
@Email(message="{GEN_EMAIL_FORMAT_IS_NOT_CORRECT}",groups={AddValidationGroup.class , EditValidationGroup.class})
private String emailAddress;
@Column(name="NOTE",length=200)
private String note;
@Column(name="ORDER_ID",length=10)
private int order;
-
9. Re: Validation message disappear
bleathem Jun 12, 2013 2:29 AM (in response to wish79)You aren't using the Bean Validation annotations. Try uinsg @Size, @NotNull, etc.
-
10. Re: Validation message disappear
wish79 Jun 12, 2013 4:53 AM (in response to bleathem)Dear Brian
it solved the disappear problem when i change the a4j:ajax execute to @form but this soluation cuase another problem which is when there is another filed validation fail the current field value dose not change becuase the form validation falid
Regards
Wish