[Cartoweb-users] Doubles tables results

claudio cicali claudio.cicali at gmail.com
Wed Dec 12 09:42:41 EST 2007


I'm trying to reducing the problem to its minimum :)

I've disabled my plugin... I selected ONE layer only (that is selecteble, of
course).

I click on it -> double results (identical... duplicates.. the same table)

Now I enabled another "selectable" layer... 4 tables...

May that having something to do with hilight layers?

Here is one of my selectable layer with the corresponding highlight one:

  LAYER
    NAME "particelle"
    TYPE POLYGON
    TEMPLATE "ttt"
    CONNECTIONTYPE postgis
    CONNECTION "user=@DB_USER@ password=@DB_PASSWD@ host=@DB_HOST@
dbname=@DB_NAME@"
    DATA "the_geom from catasto_sp_particelle"
    METADATA
      "exported_values" "recenter_name_string,id_attribute_string"
      "recenter_name_string" "partkey"
      "id_attribute_string" "gid|string"
      "query_returned_attributes" "partkey" # Selezioniamo il partkey perché
l'applicazione se lo aspetta come primo dato ritornato
    END
    CLASS
      NAME "normal"
      STYLE
        COLOR 255 255 255
        OUTLINECOLOR 0 0 0
        SIZE 3
      END
    END
    # Permette di vedere l'icona del colore selezionata nel blocco (match
con _hilight)
    CLASS
      NAME "hilight"
      STYLE
        COLOR 187 165 255
        OUTLINECOLOR 0 0 0
      END
    END
  END

  LAYER
    NAME "particelle_hilight"
    TYPE POLYGON
    TEMPLATE "ttt"
    CONNECTIONTYPE postgis
    CONNECTION "user=@DB_USER@ password=@DB_PASSWD@ host=@DB_HOST@
dbname=@DB_NAME@"
    DATA "the_geom from catasto_sp_particelle"
    LABELITEM "label"
    CLASS
      STYLE
        COLOR 187 165 255
        OUTLINECOLOR 0 0 0
      END
      LABEL
        TYPE TRUETYPE
        FONT "Vera"
        SIZE 8
        COLOR 0 0 0
        POSITION cc
      END
    END
  END

On Dec 12, 2007 11:23 AM, Oliver Christen <oliver.christen at camptocamp.com>
wrote:

>  there are as much tables returned as there was of active layers.
> even for layers which are not queryable, in that casem, an empty table
> object is returned which is usualy filtered before being outputed to the
> template.
> maybe you are applying your customManage function even on the empty tables
> ?
>
> just an idea
>
> ----- Original Message -----
> *From:* claudio cicali <claudio.cicali at gmail.com>
> *To:* Oliver Christen <oliver.christen at camptocamp.com>
> *Sent:* Wednesday, December 12, 2007 11:17 AM
> *Subject:* Re: [Cartoweb-users] Doubles tables results
>
> Hi Oliver...
>
> no, it turns out it's my tables plugin extension fault (some way)
>
> I have extended the table plugin to add some behaviour to the result
> tables.
> Now I have the table plugin and my my_table plugin... perhaps cartoweb
> is now producing always TWO tables...
>
> I'me maybe missing something about extending plugins... this is the
> interesting
> part of "my_tables":
>
> class ClientMordanoTables extends ClientTables {
>
>    public function replacePlugin() {
>      return 'tables';
>    }
>
>    protected function renderFormPrepare() {
>
>      $smarty = new Smarty_Plugin($this->getCartoclient(), $this);
>
>      foreach ($this->tableGroups as &$group) {
>        foreach ($group->tables as &$table) {
>          if ($table->numRows > 0) {
>            $table->tbody = $this->customManage($table);
>          }
>        }
>      }
>
>      $smarty->assign('tables', $this->tableGroups);
>      $this->assignExportCsv($smarty);
>      return $smarty->fetch('tables.tpl');
>    }
>
> then the custom_manage function...
>
>
>
> On Dec 12, 2007 11:00 AM, Oliver Christen < oliver.christen at camptocamp.com>
> wrote:
>
> >  you have two layers based on the same dataset but with different
> > filter?
> >
> >   ----- Original Message -----
> > *From:* claudio cicali <claudio.cicali at gmail.com>
> > *To:* cartoweb-users at lists.maptools.org
> > *Sent:* Wednesday, December 12, 2007 10:55 AM
> > *Subject:* [Cartoweb-users] Doubles tables results
> >
> > Hello,
> >
> > in a (failry complex) setup I'm stuck with this apparently simple
> > problem:
> >
> > What could be the reason why I get TWO identical query results (under
> > the mainmap,
> > you know, the "Query")... This is used by the plugin Edit...
> >
> > Any idea will be appreciated
> >
> > --
> > Claudio Cicali
> > claudio.cicali at gmail.com
> > http://claudio.cicali.name
> >
> > ------------------------------
> >
> > _______________________________________________
> > Cartoweb-users mailing list
> > Cartoweb-users at lists.maptools.org
> > http://lists.maptools.org/mailman/listinfo/cartoweb-users
> >
> >
>
>
> --
> Claudio Cicali
> claudio.cicali at gmail.com
> http://claudio.cicali.name
>
>


-- 
Claudio Cicali
claudio.cicali at gmail.com
http://claudio.cicali.name
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/cartoweb-users/attachments/20071212/9171c6ae/attachment-0001.html


More information about the Cartoweb-users mailing list