[CLOSED] Access to record when field is bound?

  1. #1

    [CLOSED] Access to record when field is bound?

    Hello,

    I have fields in a form wich is bound to a record, in one of the fields (in setValue) I need access to the record wich is bound to the form, how is this achived?

    /Patrik
    Last edited by Daniil; Jul 11, 2011 at 9:27 AM. Reason: [CLOSED]
  2. #2
    Hi,

    There is no property with the loaded in a BasicForm record.

    You can save it yourself:
    FormPanel1.loadedRecord = record;
  3. #3
    Hi,

    Maybe I was a bit unclear.
    I meant that I need access to the record in the actual field's setvalue method.

    Now I only get the value as parameter to that fields method:
    setValue: function(v) {
    debugger;
    }
    where v is the value.
    I need this method to be called with the value, as is, as a second parameter I need the record being bound to the form.
    From what I can see in the call stack the value passed to setValue is extracted from the record just before setValue method is called.

    Now how can the record be reached in this method?
    Can I use another aproach? Use the render/init/...- method instead?

    /Patrik
  4. #4
    You can override .setValues() method.
    http://dev.sencha.com/deploy/ext-3.4...Form-setValues

Similar Threads

  1. [2.0 Beta 2] nCannot access Hidden field
    By Alexx in forum 2.x Help
    Replies: 2
    Last Post: May 03, 2012, 9:31 AM
  2. Replies: 4
    Last Post: Feb 01, 2012, 2:40 PM
  3. [CLOSED] How to access record members of combobox at AfterRender
    By digitek in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Nov 28, 2011, 2:23 PM
  4. Replies: 4
    Last Post: Oct 07, 2011, 10:49 AM
  5. [CLOSED] [1.0] Access to record by rowIndex
    By edigital in forum 1.x Legacy Premium Help
    Replies: 10
    Last Post: Apr 11, 2011, 12:59 PM

Posting Permissions