[Cartoweb-dev] Table invisible?

Oliver Christen oliver.christen at camptocamp.com
Tue Oct 30 06:29:50 EDT 2007


depends if you are working with Ajax mode on or off.

if off, simply be sure you have the correct variables set in your plugin 
renderForm function

if on, same as above but you also need to have the corresponding code in 
your plugin .ajax.js file to tell the script where to write the new content.

regards
Oliver


> Hi all,
>
> I try to write  a plugin which shoulds its result as table very similar
> to the query coreplugin. I had a deeper look at the query
> handlePreDrawing method. I now tried to reproduce its functionality:
>
> public function handlePreDrawing($tabularInformationRequest){
>
>        $this->log->debug("tabularInformationRequest->layr
> (handlePreDrawing): ".$tabularInformationRequest->layr);
>        $tabularInformationResult = new TabularInformationResult();
>        $tables = array();
>
>        $table = new Table;
>        $table->tableId = $tabularInformationRequest->layr;
>        $table->tableTitle = $tabularInformationRequest->layr;
>        $this->log->debug("table->tableId (handlePreDrawing):
> ".$table->tableId);
>
>        $table->columnTitles = array("C1","C2","C3");
>
>        $tableRow = new TableRow();
>        $tableRow->cells = array("a","b","c");
>        $table->rows[] = $tableRow;
>
>        $table->totalRows = 1;
>
>        $tables[0]=$table;
>
>        $tabularInformationResult->tableGroup = new TableGroup();
>        $tabularInformationResult->tableGroup->groupId = 'tabinfo';
>        $tabularInformationResult->tableGroup->groupTitle =
> I18nNoop::gt('TabularInformation');
>        $tabularInformationResult->tableGroup->tables = $tables;
>
>        // Applies the registred table rules
>        $tablesPlugin =
> $this->getServerContext()->getPluginManager()->tables;
>        $groups =
> $tablesPlugin->applyRules($tabularInformationResult->tableGroup);
>        $tabularInformationResult->tableGroup = $groups[0];
>
>        return $tabularInformationResult;
>
>    }
>
> On the client side, I just add this tableGroup to the tables plugin. If
> I execute the plugin, I see the name of the tableGroup in cartoweb, but
> there is not table below. It seems, that the table is invisible, because
> I can read out the table data on the client side (I tried to write them
> into the log file and that works). How do I show that table?
>
> Any hints appreciated
>
> Regards
> Carolin
>
> -- 
> Carolin Latze
> Research Assistant
>
> Department of Computer Science
> Boulevard de Pérolles 90
> CH-1700 Fribourg
>
> phone: +41 26 300 83 30
>
>
> _______________________________________________
> Cartoweb-dev mailing list
> Cartoweb-dev at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/cartoweb-dev
> 



More information about the Cartoweb-dev mailing list