Hello,

I'm developing a small application to manage some Server-related data. 
Currently the app is running on cake1.2 ant the migration to cake 2.1 is 
making me some headache.

Here ist the problem:

Tables:
Device (has many) Detail (belongs to) DetailType
sample data:
Server1           0815-1234           serial-number
Server1           1234-5678           inventory-number
Server2           9876-1234           serial-number

in the edit-view i'll show all details belonging to the device including 
the detailTypes. It woll not work under 2.1

here ist the code from edit.ctp
                       ....................
            <?php 
                     $counter = 0;
                     foreach ($this->data['Detail'] as $detail):
                     echo 
$this->Form->hidden('Detail.'.$counter.'.id',array( 'value' => 
$detail['id']));
                        echo 
$this->Form->input('Detail'.$counter.'DetailType'.'name', array(
                        'type' => 'select', 
                        'label' => 'Detail Art ',
                        'selected' => 
$this->Form->data['Detail'][$counter].'detail_type_id',
                        'div'=>'formfield',
                        'error' => array(
                            'wrap' => 'div',
                            'class' => 'formerror'
                            )
                        ));
                        echo 
$this->Form->input('Detail.'.$counter.'.name',  array(
                        'label' => 'Detail',
                        'div'=>'formfield',
                        'error' => array(
                            'wrap' => 'div',
                            'class' => 'formerror'
                            )
                        ));
                          $counter++;
                     endforeach; 
            ?>

The selectBox(Detail Type) is empty, no option available. in the Textbox 
the correct value is displayed.
Die SelectBox in welcher der DetailType auftauchen soll, bleibt leer, im 
Textfeld steht der richtige Wert drin.

content of $detail:

Array
(
    [id] => 152
    [device_id] => 110
    [name] => 2190204-0000
    [created] => 2011-10-07 08:58:11
    [modified] => 2012-01-27 15:19:09
    [status] => 1
    [detail_type_id] => 1
    [Device] => Array
        (
            [id] => 110
            [name] => Server-01
            [description] => Host 1
            [installation] => 2011-10-07 08:55:00
            [height] => 2
            [position] => 22
            [powersupply] => 2
            [ram] => 
            [isvirtual] => 0
            [isparent] => 1
            [hddsize] => 
            [cputype] => 
            [san] => 1
            [condition_id] => 1
            [fowner_id] => 5
            [towner_id] => 6
            [product_id] => 5
            [rack_id] => 7
            [system_id] => 12
            [servicela_id] => 3
            [parent_id] => 
            [comment] => - Host for VMs
            [created] => 2011-10-07 08:58:11
            [modified] => 2012-01-27 15:19:09
            [status] => 1
        )

    [DetailType] => Array
        (
            [id] => 1
            [name] => Inv.-Number
            [description] => inventory-number
            [created] => 2009-09-06 22:47:21
            [modified] => 2009-09-08 16:42:18
            [status] => 1
        )

)


I hope the description is detailled enough, otherwise I can add more 
information.
anyone any ideas?

(allready postet in the german CakePHP-Group)

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to