In-place editing 'dbr.editable' not working properly

(4 posts) (2 voices)

Tags:

No tags yet.

  1. shhedrick, Member

    I installed 3.5.1 build 1504 and now the in-place editable fields are not working properly.

    Before, after clicking on the field there were 'OK' and 'Cancel' buttons.
    Now, no buttons.

    Now, if you click on the field, it appears in a text box, if you hit enter, it updates ok. However, if you click outside the box or hit refresh, the field is updated to the database inproperly. For instance, a 4 digit number becomes a 1 digit number with only the first digit surviving (i.e. 4,200 becomes 4). It appears that if the number is defined in the update procedure as a varchar (see below) it is getting truncated at the comma. This did not happen before.

    This is MySQL 5.0.7.

    This happens in Win 7 with IE 9 and Mac OS X 10.7.4 with Chrome 19.0.1084.53.

    Here is a sample of one update routine

    DROP PROCEDURE IF EXISTS sp_DBR_TDEstimatedWater_Update
    $$
    CREATE PROCEDURE sp_DBR_TDEstimatedWater_Update(tdID bigint, newData varchar(50))
    BEGIN
    declare actDay date;

    update xhrBlossburg.hrTransactionDetail
    set ESTIMATEDWATER = newData
    , name = 'Office'
    where id = tdID;

    select date(ACTIVITYDAY) from xhrBlossburg.hrTransactionDetail where id = tdID into actDay;

    call xhrBlossburg.pTDSiteVolumeUpdate (actDay, actDay);

    end
    $$

  2. myDBR Team, Key Master

    Yes,
    the 3.5.1 defaults now to autosave the editable field making editable bit faster.

    As for your problem, it sounds that your editable field is a number, but your editing procedure value parameter uses varchar(50) to update the data. Editable field and value parameter should use the same datatype.

    To correct the editing, change the 'newData' parameter to the same datatype what the ESTIMATEDWATER column's datatype is.

    If you want to use the OK and Cancel buttons in editing, add "options={'onblur':''}" as parameter to dbr.editable.

    --
    myDBR Team

  3. shhedrick, Member

    Ok, I had already changed the datatypes to what it should have been in the first place.

    Autosave is OK but what is the correct way to cancel the change?

    Thanks.

  4. myDBR Team, Key Master

    When autosave is enabled, one can cancel the editing with browser undo. You can decide on case by case whether or not the OK and Cancel buttons will be used.

    --
    myDBR Team


Reply

You must log in to post.