Results 1 to 4 of 4

Thread: Form submission by ExtDirect ignores overridden getValue

    Wait! Looks like we don't have enough information to add this to bug database. Please follow this template bug format.
  1. #1
    Ext JS Premium Member
    Join Date
    Nov 2010
    Posts
    130

    Default Form submission by ExtDirect ignores overridden getValue

    Touch version tested:
    • Touch 2.4.1
    Browser versions or Packager version tested against:
    • Chrome 43
    • Firefox 38
    Device and OS tested against:
    • Desktop Ubuntu 14.04 (64 bit)
    What theme are you using for your application:
    • Default
    Description:
    • The FormPanel "doBeforeSubmit" function builds a form with the proper values (filled with the values of the fields' getValue), but then the ExtDirect's submit function is called with the actual "this.element" of the formpanel, instead of the built form
    • Calling the submit with "this.element" serializes the actual form, instead of using the proper built form
    • This causes the submit process to ignore any overridden getValue functions on fields
    Steps to reproduce the problem:
    • Create a class "Pig", extending textfield, with getValue overridden to always return "oink".
    • Create a form that submits via ExtDirect
    • Add a field of type "Pig" to the form
    • Type "abc" into the Pig field and submit the form
    • If ExtDirect is used, "abc" is sent.
    • If the normal non-ExtDirect submit is used, "oink" is sent.
    The result that was expected:
    • "oink" is sent when ExtDirect is used. Mirroring the behavior of the normal non-ExtDirect submit.
    The result that occurs instead:
    • The contents of the actual field is sent, ignoring the getValue override.
    Solutions:
    • I've changed "this.element" to the built form "form" in the "doBeforeSubmit" and it seems to be working fine. "return submit(form, function(data, response, success) {"
    Example:
    • Last I checked, there was no way to create a fiddle that used ExtDirect. I'm assuming this is still true?

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985

    Default

    Thanks for the report. Can you please post a test case which reproduces this issue?
    https://fiddle.sencha.com/#home

  3. #3
    Ext JS Premium Member
    Join Date
    Nov 2010
    Posts
    130

    Default

    I don't believe it's possible to post a test case that includes ExtDirect calls. Am I wrong?

  4. #4
    Ext JS Premium Member
    Join Date
    Nov 2010
    Posts
    130

    Default

    Does fiddle support ExtDirect? The bug only occurs when the form is posted by ExtDirect.

Similar Threads

  1. [OPEN] ext-4.2.1.744 ExtDirect form submit issue with form data
    By hschaefer123 in forum Ext:Bugs
    Replies: 2
    Last Post: 31 May 2013, 8:37 AM
  2. [CLOSED] Form API with ExtDirect
    By steffenk in forum Ext 3.x: Bugs
    Replies: 5
    Last Post: 25 Mar 2010, 9:43 AM
  3. [CLOSED] [3.0rc3] Datefield#getValue() ignores specified format
    By johnleroux in forum Ext 3.x: Help & Discussion
    Replies: 8
    Last Post: 2 Aug 2009, 8:08 PM
  4. Replies: 7
    Last Post: 20 Jan 2009, 8:59 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •