function DisplayPreview(WebPage $oPage)
 {
     $aDetails = array();
     $sClass = get_class($this);
     $aList = MetaModel::GetZListItems($sClass, 'preview');
     foreach ($aList as $sAttCode) {
         $aDetails[] = array('label' => MetaModel::GetLabel($sClass, $sAttCode), 'value' => $this->GetAsHTML($sAttCode));
     }
     $oPage->details($aDetails);
 }
 public function DisplayDetails(WebPage $oPage, $bEditMode = false)
 {
     $oPage->add('<h1>' . MetaModel::GetName(get_class($this)) . ': ' . $this->GetName() . '</h1>');
     $aValues = array();
     $aList = MetaModel::FlattenZList(MetaModel::GetZListItems(get_class($this), 'details'));
     if (empty($aList)) {
         $aList = array_keys(MetaModel::ListAttributeDefs(get_class($this)));
     }
     foreach ($aList as $sAttCode) {
         $aValues[$sAttCode] = array('label' => MetaModel::GetLabel(get_class($this), $sAttCode), 'value' => $this->GetAsHTML($sAttCode));
     }
     $oPage->details($aValues);
 }