Thursday, 15 April 2010

jquery - Javascript work-around for Oracle not having a boolean type? -



jquery - Javascript work-around for Oracle not having a boolean type? -

i have web application uses ext.grideditorgridpanel display , modify info oracle database.

this works great displaying string values in textboxes - both displaying , modifying data. however, found out after banging head time - doesn't work displaying boolean values in checkboxes - because oracle has no boolean type.

so, i'm going downwards road of have database represent boolean values 'y' or 'n' instead of true or false - , attempting map checkboxes create hand in grid.

so far, i've been able render checkboxes within grid , have them displayed correctly checked or not checked rendering them hand so...

{ dataindex: 'isactive', editable: true, sortable: true, renderer: function(value) { homecoming "<input type='checkbox'" + ((value == 'y') ? "checked='checked'" : "") + ">"; }, }

however, i've come short trying save values database when user clicks save.

really, if figure out how traverse grid , value of each cell has checkbox in it, pass function updates info on server.

so far, i've been able cell - no luck in attempting determine whether checkbox within cell checked or not...

var grid = getmyeditorgridpanel(); grid.getview().getcell(0,1).firstchild

any suggestions?

thanks in advance, tim

i'd seek implement boolean back upwards layer close info source possible. that:

i'd configure model field boolean i'd configure truere evaluate 'y' true i'd implement serialize function convert true , false 'y' , 'n' before sending server.

this way can operate in ext if oracle back upwards boolean.

javascript jquery oracle extjs checkbox

No comments:

Post a Comment