Object relations and selectboxes

Author Message

Vivienne van Velzen

Wednesday 14 May 2003 12:56:12 am

I've created a couple of 'codetable folders' in which I keep the descriptions that appear in (single or multiple) selectboxes in my employee-form (codetable examples are function and location). When selecting an option from these selectboxes, an object relation is created between the employee and the entry in the codetable folder. So far so good.
Except that removing a established relation object doesn't work (on changing selection or deselecting).

I've tried it in a couple of different ways.
1. Place a DeleteRelationIDArray[] multipleselect in an invisible div (options are the same as in the SelectedObjectIDArray[]) and select those options that have been deselected in the SelectedObjectIDArray[]. Then when the form is submitted, this array (and the DeleteRelationButton field) is submitted along with it.
2. Place the above fields in a form in an iframe. On submit of the parent window loop through the items in the SelectedObjectIDArray[] and when not selected, pass them to the form in the iframe and submit this form.

Both methods won't work. Things I can think of that I'm doing wrong are:
1. I'm missing a formfield needed for object relation removal.
2. You can't do removal and adding in the same form (hence the solution with an iframe).
3. In the iframe solution, I'm submitting the iframe form with the wrong action (because this is sort of an included file, I don't have a node-id or something like that. I'm linking straight to the file itself).

Can anybody help me with this one?
TIA,

Vivienne

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 11:00:10
Script start
Timing: Jan 18 2025 11:00:10
Module start 'layout'
Timing: Jan 18 2025 11:00:10
Module start 'content'
Timing: Jan 18 2025 11:00:10
Module end 'content'
Timing: Jan 18 2025 11:00:10
Script end

Main resources:

Total runtime0.0225 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0081 587.9375152.6250
Module start 'layout' 0.00810.0049 740.562539.4453
Module start 'content' 0.01300.0071 780.007889.2266
Module end 'content' 0.02010.0024 869.234430.3047
Script end 0.0224  899.5391 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002912.8021140.0002
Check MTime0.00135.6743140.0001
Mysql Total
Database connection0.00104.427610.0010
Mysqli_queries0.004519.933230.0015
Looping result0.00000.111410.0000
Template Total0.00188.010.0018
Template load0.00104.663110.0010
Template processing0.00073.257310.0007
Override
Cache load0.00073.115110.0007
General
dbfile0.00208.963480.0003
String conversion0.00000.149640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0003 secs