I only started recently with xajax and I like it very much.
Thank you very much, but my problem is actually a bit more complicated. I have to following class :
<?php
class DcTreeViewLine extends clsTable {
private $_xajax;
public function __construct($xajax, $m_item, $is_last)
{
$this->_xajax = $xajax;
parent::clsTable();
$this->setAttribute('id', 'treTable');
$this->setAttribute('width', '100%');
$this->setAttribute('border', '0');
$this->setAttribute('cellspacing', '0');
$this->setAttribute('cellpadding', '0');
$this->setAttribute('id', 'TREE_VIEW_LINE_' . $m_item->getItemId());
$tbody = new clsTbody();
$tr =& new clsTr();
$tr->setAttribute('valign', 'middle');
$this->labelText($m_item, $tr);
$tbody->addChild($tr);
$this->addChild($tbody);
}
private function labelText($m_item, $tr) {
$label = new clsLiteral($m_item->getLabel());
$button = new clsButton();
$button->setAttribute('class', 'item-not-selected');
$button->setAttribute('id', 'TREE_VIEW_LINE_LABEL_' . $m_item->getItemId());
$button->addChild($label);
$button->setEvent('onclick', $event_DeTreeViewLine_itemSelected,
array(
array(0, XAJAX_QUOTED_VALUE, $m_item->getItemId()),
array(1, XAJAX_QUOTED_VALUE, 'event_DeTreeViewLine_itemSelected')
)
);
$td =& new clsTd();
$td->setAttribute('align', 'left');
$td->setAttribute('valign', 'middle');
$td->addChild($button);
$tr->addChild($td);
}
}
Now I would like that a function which will be defined inside this class will be called when the user chicks on the button which is created inside the "function labelText".
How do I have to approach that problem?
Thank you very much for your help.