Simple Form EditButton & SaveButton

Help
2009-04-30
2012-12-13
  • Attila Szomor

    Attila Szomor - 2009-04-30

    Hi,

    This form has only FormattedTextControls and some buttons, after I started it
    -1st, I pressed ReloadButton and saw all data in the Controls
    -2nd, I pressed EditButton went to EditMode
    -3rd, I pressed SaveButon and got "Error while saving: incorrect data." with all linkLabel.text
    -4th, I clicked over all FormattedTextControls
    -5th, I pressed SaveButon all data that was String types went to null, but that was not String eg Integer was good.

    I put BrakePoint into FormController.validateControl all "oldValue" was good but all "newValue" was null where the VO property was String.

    I debuged "org.openswing.swing.form.client"
    -3rd, Form.getInputControlsNotValid and (FormattedTextControl)comp).isEditValid() all textBox.isEditValid() was false
    -5th, Form.getInputControlsNotValid and (FormattedTextControl)comp).isEditValid() all textBox.isEditValid() was true but all textBox.getValue() was null

    thus in Form.push() the model.setValue(comp.getAttributeName(), comp.getValue()) seted all String type attribute to null

    How can I hadle this problem ?

    Thanx your answers,
    Attila.

     
    • Attila Szomor

      Attila Szomor - 2009-05-05

      Hi,

      I changed all FormattedTextControls to TextControls and NumericControls and everything was okay.

      Why, how does FormattedTextControls work ?

      Thanx your answers,

      Attila.

       
    • mcarniel

      mcarniel - 2009-05-09

      FormattedTextControl is based on std java component JFormattedTextField, so you have to define the Formatter to use, through method:
      public final void setFormatter(JFormattedTextField.AbstractFormatter format)

      See JFormattedTextField component

       
    • Attila Szomor

      Attila Szomor - 2009-05-09

      Hi,
      Thanx, I will tried it shortly.
      Attila.

       

Log in to post a comment.