# |
Aug 9th 2008, 21:43 |
skua |
jquery |
# |
Aug 9th 2008, 21:42 |
tomas- |
the ones that come with cake...AjaxHelper? |
# |
Aug 9th 2008, 21:42 |
JD__ |
what javascript library are you using to do the ajax calls? |
# |
Aug 9th 2008, 21:41 |
tomas- |
i think im just going to include hidden fields to set flags of various operations |
# |
Aug 9th 2008, 21:39 |
tomas- |
onSubmit='return false' |
# |
Aug 9th 2008, 21:38 |
tomas- |
oh, wait i think it doesnt include it because its not actually submitting the form.... |
# |
Aug 9th 2008, 21:38 |
skua |
tomas multiple update, delete for each rows of entire form ? |
# |
Aug 9th 2008, 21:38 |
skua |
) |
# |
Aug 9th 2008, 21:37 |
adj |
hopefully i can release LdapAuthable and LdapSyncable when i'm done =) |
# |
Aug 9th 2008, 21:37 |
adj |
tahnks |
# |
Aug 9th 2008, 21:37 |
skua |
$model->useDbConfig |
# |
Aug 9th 2008, 21:37 |
adj |
cool |
# |
Aug 9th 2008, 21:36 |
skua |
will be only change in current object of your model |
# |
Aug 9th 2008, 21:36 |
adj |
(sorry, my brain is stalling a bit tonight it seems) |
# |
Aug 9th 2008, 21:36 |
adj |
or will my changes to $useDbConfig be unnoticed by the parent |
# |
Aug 9th 2008, 21:35 |
adj |
_sync() { copy $useDbConfig; copy $this->data; set new $userDbConfig; remap fields; save; set $useDbConfig to old value;} |
# |
Aug 9th 2008, 21:35 |
tomas- |
i am trying to use the ajax forms to manage a photo album...i have a "Delete" button in the form and apparently when i debug what '$this->data' contains, it doesnt include a 'submit' button, despite it being there... any idea why, and how i can have multiple submit buttons (one Update, one Delete, etc...)? |
# |
Aug 9th 2008, 21:35 |
skua |
i just got to use useDbConfig in behavior last night to manage multiple db with one domains :) |
# |
Aug 9th 2008, 21:34 |
adj |
makes sense* |
# |
Aug 9th 2008, 21:34 |
skua |
and afterSave() -> change and save |
# |
Aug 9th 2008, 21:34 |
adj |
skua: ok. got that. make since |
# |
Aug 9th 2008, 21:34 |
skua |
so first let cake making is stuff |
# |
Aug 9th 2008, 21:34 |
skua |
the first update/save will be in your new db |
# |
Aug 9th 2008, 21:34 |
adj |
it would also have to return the db to what it previously was at the end of _sync() though, or does it? |
# |
Aug 9th 2008, 21:33 |
skua |
if you switch db in setup |
# |
Aug 9th 2008, 21:33 |
skua |
and you call you _sync() in afterSave |
# |
Aug 9th 2008, 21:33 |
adj |
skua: ok. so the db switch needs to take place during the after|before hook, not the setup/cleanup |
# |
Aug 9th 2008, 21:33 |
skua |
then a little $model->save( $thevarsofolddata ) |
# |
Aug 9th 2008, 21:32 |
skua |
where you copy $model->data in a vars, then use $useDbConfig = 'newdb'; |
# |
Aug 9th 2008, 21:32 |
adj |
exactly |
# |
Aug 9th 2008, 21:32 |
skua |
ok so in your behavior create a function _sync() {} |
# |
Aug 9th 2008, 21:32 |
adj |
so when certain user fields are updated, i need them to push to ldap |
# |
Aug 9th 2008, 21:31 |
adj |
the other db is ldap |
# |
Aug 9th 2008, 21:31 |
adj |
both |
# |
Aug 9th 2008, 21:31 |
adj |
right |
# |
Aug 9th 2008, 21:31 |
skua |
or in both |
# |
Aug 9th 2008, 21:31 |
skua |
you sync when field are update or created ? |
# |
Aug 9th 2008, 21:31 |
skua |
hum |
# |
Aug 9th 2008, 21:30 |
skua |
with a behavior wich switch useDbConfig |
# |
Aug 9th 2008, 21:30 |
adj |
well, i'm creating a behavior to sync fields in the model to fields in another db.table, any ideas on how to change the db and table for function in the (after|before)* methods? |
# |
Aug 9th 2008, 21:30 |
skua |
and making a "copy" new Model() give me configured dbconfig |