7913 Posts in 1355 Topics by 930 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » Table Field
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 596 Views |
-
Table Field

1 April 2011 at 4:51am
hi guys i've a table field inside my dataobject... but the table works badly.... when delete one record ... my dataobject show white... and when i add a record a ive a checkbox... this checkbox show enable but.. disable others chebox in table why?
<?php
// /mysite/code/Divisao.php
class Divisao extends DataObject {
static $db = array (
'Nome' => 'Varchar(255)'
);static $has_one = array (
'ObraPage' => 'ObraPage'
);static $has_many = array (
'Detalhes' => 'Detalhe'
);public function getCMSFields_forPopup()
{
if( $this->ID == NULL ){
return new FieldSet(
new TextField('Nome','Assoalhada')
);
} else{
return new FieldSet(
new TextField('Nome','Assoalhada'),
new TableField(
//'Detalhes',
'Detalhes',
'Detalhe',
array('Nome' => 'Nome', 'Estado' => 'Estado'),
array('Nome' => 'TextField', "Estado" => "OptionsetField('Estado','Estado',singleton('Detalhe')->dbObject('Estado')->enumValues())" ),
"DivisaoID",$this->ID
//"DropdownField('Estado','Estado',singleton('Detalhe')->dbObject('Estado')->enumValues())"
....<?php
class Detalhe extends DataObject {
static $db = array (
'Nome' => 'Varchar(255)',
"Estado" => "Enum('Caracteristica,Acabamento','Caracteristica')"
);static $has_many = array (
);static $has_one = array (
'Divisao' => 'Divisao'
);}
-
Re: Table Field

7 April 2011 at 7:29am
Yeah, I don't think that's ever going to work. Way too many dependency conflicts.
| 596 Views | ||
|
Page:
1
|
Go to Top |

