5 Replies Latest reply on Sep 19, 2011 2:25 PM by Eldin Okanovic

    Validation error / Annotations / rich:popupPanel

    djnose Newbie

      Hi @ all,


      i have a little problem creating a standard "edit - dialog" as shown in the Richface Showcase.

      I finally found out, that the following construct will fail:


      Class (Hibernate generated)


      @Basic(optional = false)


      @Size(min = 1, max = 2147483647)

      @Column(name = "name")

      private String name;


      So, my Table has a edit button like:

      <rich:column style="width: 20px;">
      <f:facet name="header">
      <h:outputText value="Actions" />
      <a4j:commandLink styleClass="no-decor" render="editGrid"
      execute="@this" oncomplete="#{rich:component('
      <h:graphicImage value="/resources/images/edit.gif" alt="edit" style="border-width: 0px;"/>
      <f:setPropertyActionListener target="#{myBean.myEditObject}" value="#{varObject}" />


      (just changed some names)


      That all works as long as i do not use the column "Name".


      <h:outputText style="font-size: smaller;" value="Name" />
      <h:inputText value="#{myBean.myEditObject.name}"/>


      Else i got a error rendering the page:

      (muss zwischen 1 und 2147483647 liegenmuss zwischen 1 und 2147483647 liegen) that means, it has to be between 1 and 2147483647. Like the

      columndefinition says.


      But why does that happend when rendering the table? i did not even click the  <a4j:commandLink>

      In my Bean i initialize that object in the Constructor.


          /** Creates a new instance of MyBean */
      public MyBean() {
      myEditObject = new MyEditObject();


      That really drives me crazy. Is there anything i can do (no, i will not remove the @Size(min = 1, max = 2147483647)tag )

      There is actually no need to check the object at this time.

      Maybe i am missunderstanding anything. Any help would be appreciate!


      Thank You!