0

BeanOne

  @NotEmpty(groups = { Group1.class })
  private String name;

BeanTwo

  private EditableValueHolder myBinding;
  priavet BeanOne beanOne;

xhtml

 <h:inputText value="#{beanTwo.beanOne.name}" binding="#{beanTwo.myBinding}"/>      
 <button class="btn btn-primary"        
         jsf:action="#{beanTwo.save}">
        Save
    <f:ajax execute="@form" render="@form"/>
 </button>

When I save the validation is not happening. When I remove binding on the input element, the bean validation is working.

Is there anything wrong in my code.

Patan
  • 17,073
  • 36
  • 124
  • 198
  • 1
    Are you aware of http://stackoverflow.com/questions/14911158/how-does-the-binding-attribute-work-in-jsf-when-and-how-should-it-be-used? – BalusC Sep 02 '15 at 10:20
  • @BalusC. Thank you. I have gone through it. I think it is a bad practice to have this on bean property. It would be great if you can help with me any work around. – Patan Sep 02 '15 at 14:29
  • That can only be answered if you tell about the problem for which you thought that this would be the solution. – BalusC Sep 02 '15 at 18:24

0 Answers0