Announcement Announcement Module
No announcement yet.
createBoundFormattedTextField Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • createBoundFormattedTextField

    I'm Newbe, Want to ask about createBoundFormattedTextField on SwingFormModel. I've make my validation for JFormattedTextField but I can't set the minLength(). if any body knows how to handle this ???? I have try using regex(), addMinLength(), and any(), but don't work. :?

  • #2
    JFormattedTextField change value internal and it isn't good for validation.I try set property editor for date (JDateChooser, nacho ..) and it work bad because use JFormattedTextField

    You can validation for length, regex etc in standard rcp framework and it work better than JFormattedTextField




    • #3

      is there some way to create any component Like JTextField have same action like JFormattedTextField cause I really need action that can control how many input on conmponent, I meant create the maxLength() on JTextField and make an Inputer not more than maxlength(), if it does the inputer will stop and never more than maxlength().

      thanks ,but i hope you will reply this post.


      • #4
        I do this and post code in rcp devel list (try search for RevertAsYouTypeTextValueSetter)

        In my code I have two kinds validation : revert (like max length, regex, and like) and not revert
        (example, type 01 for date is invalid, but it isn't revert beacuse can be valid).
        It is possible for JTextField with extends PlainDocument

        I suggest that Constraint interface in RCP have method canBeValid or like and it resolve this problem complete - it work much better than JFormattedTextField - JFormattedTextFiled validation work after focus gain only, it change value internal and have much problems



        • #5

          sorry for reply so long,
          but I say Thank you, SNPE, i gonna search about RevertAsYouTypeTextValueSetter.