In agiletoolkit, i have a set of views displayed and in the View, have set the outer div to have id=
1 <div id='<?$_name?>' class='taskrow'>
2 <div class=fleft nomargin>
3 <?$Story?>
4 </div>
5 <div class='container'>
6 <div id='<?$workspace?>' class='workspace'>
..
34 </div>
In the page, i have a foreach loop that retrieves data from mysql and adds it to the page. At the same time, it stores the return of $p->add into an array using the id as the key.
foreach ($st as $row) {
if (is_array($row)) {
$storyid=$row[0];
$scrumrow[$storyid]=$p->add('View_StoryRow')
->setWorkspace('ws-'.$storyid);
When an action is performed (dragging an element on the screen), i refresh the page and a get block applies some updates to the database. I then have the following code to update the view (which is the row where the action was performed)
if($_GET['task'] && $_GET['status'])
{
.. do database updates here ..
$js[]=$scrumrow[$ajaxstory]->js()->reload();
// $js[]=$p->js()->reload(array('member'=>$member, 'sprint'=>$sprint));
$this->js(null,$js)->execute();
}
If I comment out the $scrumrow[$ajaxstory] row and use the commented line to refresh the whole page, it works but is very slow (some 12 seconds) as there is a lot on data the screen but when trying to refresh just the view, i get an error as in the headline, 'Unable to cut object with name ... It wasn't initialised.
The updates are done in the database so if i refresh the page manually, it works and the error does appear in place of the row i want to refresh and does give the correct name of the row (as seen in the ID using firebug) but what have I missed ? How do i initialise the objects which are already in the page ?