1. #1
    Ext User
    Join Date
    Jul 2007
    Posts
    15
    Vote Rating
    0
    adnoh is on a distinguished road

      0  

    Exclamation a big problem with form.field

    a big problem with form.field


    Hy everyone.

    I've a big problem with some form fields.
    I'm developing a webbased mailclient and I have a dialog with some inputboxes for entering
    the recipients and under them a htmleditor for the message body.
    Now my Problems.
    • I'm implementing currently the "reply" function where the dialog described above is filled with the original mails values (field.setValue(....))
      then when running my application if I delete the entered text and submit this form I notice
      that field.getValue() and field.getRawValue() is different !! (getValue returns the original set value - that with setValue) only getRawValue() hold the right value of the field.
    • the next problem is that I have a "onBlur" listener on the fields to do a
      PHP Code:
      if (field.getRawValue() != field.getValue()){
                      
      field.setValue(field.getRawValue());

      for the problem described above. But this function is NOT called if I click from a Inputfield into the htmleditor ! So the field doesn't loose its focus!? If I click from one field into a other or using the TAB key it works well ...
    Hopefully somebody can explain me why or what I'm doing wrong. I'm really being confused... the resulting email is not what my form looked like....

  2. #2
    Sencha - Training Team RWaters's Avatar
    Join Date
    Mar 2007
    Location
    Los Angeles, CA
    Posts
    714
    Vote Rating
    0
    RWaters is on a distinguished road

      0  

    Default


    What happens if you try setRawValue instead of setValue?

  3. #3
    Ext User
    Join Date
    Jul 2007
    Posts
    15
    Vote Rating
    0
    adnoh is on a distinguished road

      0  

    Default


    ... then it seems to work .... damn ... somethimes I don't see the wood for trees ...
    But why? When should I use set/getValue() and when set/getRawValue() !?
    I thought the difference between them is that setRawValue() only skips validation !?

    ... and my onBlur event? Why doesn't that get fired when klicking from a input field to a html-editor?

  4. #4
    Ext User
    Join Date
    Jul 2007
    Posts
    15
    Vote Rating
    0
    adnoh is on a distinguished road

      0  

    Default


    nop .... it didn't work ... I've done it this way now, which works for me:

    PHP Code:
            myForm.on('beforeaction', function(formaction){
                
    Ext.each(form.items.items, function(item){
                    if (
    item.getRawValue() != item.getValue()){
                        
    item.setValue(item.getRawValue());
                    }
                });
            }); 
    but whats with on('blur') ??? not being fired ....

  5. #5
    Sencha - Training Team RWaters's Avatar
    Join Date
    Mar 2007
    Location
    Los Angeles, CA
    Posts
    714
    Vote Rating
    0
    RWaters is on a distinguished road

      0  

    Default


    blur is only fired when the input leaves the text field. If you click into another field it will certainly fire. Clicking a button may not directly move focus out of the field, so the blur event will not fire.

  6. #6
    Ext User
    Join Date
    Jul 2007
    Posts
    15
    Vote Rating
    0
    adnoh is on a distinguished road

      0  

    Default


    thanks. but what's with the html-editor - does this widget not get a focus and the input field leaves it in that moment?

    And what is the difference between setValue() & setRawValue() from form.fields?

    Thanks for your Patience

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar