Plane list

Introduction





Initialize the grid with a parameterized grid. Parameters are based on customfield values.





Screenshots





Grid configuration - the mysql version



gd.columns=plane_name, plane_origin gd.table=DependsOnCustom gd.query=select * from airplane where plane_origin like "%{0}%" and plane_name like "%{1}%" gd.query.parameters=customfield:10010,customfield:10009 gd.query.ds=gridds col.plane_name=Name col.plane_origin=Origin datasource.names=gridds ds.gridds.connection.type=mysql ds.gridds.connection.url=jdbc:mysql://charlie:3306/igrid_test?useUnicode=true&characterEncoding=UTF8&jdbcCompliantTruncation=false ds.gridds.connection.username=igrid_tester ds.gridds.connection.password=igrid_tester



Grid configuration - the postgresql version



The difference between the mysql and the postgresql version, is the gd.query property.



gd.columns=plane_name, plane_origin gd.table=DependsOnCustom gd.query=select * from airplane where plane_origin like '%{0}%' and plane_name like '%{1}%' gd.query.parameters=customfield:10010,customfield:10009 gd.query.ds=gridds datasource.names=gridds ds.gridds.connection.type=postgres ds.gridds.connection.driver_class = org.postgresql.Driver ds.gridds.connection.url = jdbc:postgresql://localhost:5432/igrid_test ds.gridds.connection.username = igrid_tester ds.gridds.connection.password = igrid_tester col.plane_name=Name col.plane_name.type=string col.plane_origin=Origin col.plane_origin.type=string



Custom field setup



  • customfield:10010
    This custom field is a select list, listing all the plane origins

  • customfield:10009
    Another select list, listing all the plane names.



SQL Setup



-- -- Table structure for table `airplane` -- DROP TABLE IF EXISTS `airplane`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `airplane` ( `plane_name` varchar(255) NOT NULL, `plane_origin` varchar(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `airplane` -- LOCK TABLES `airplane` WRITE; /*!40000 ALTER TABLE `airplane` DISABLE KEYS */; INSERT INTO `airplane` VALUES ('BOEING-737','USA'),('BOEING-343','USA'),('AN-2','USSR'),('AN-12','USSR'),('AIRBUS-A3','EUROPE'),('AIRBUS-A5','EUROPE'); /*!40000 ALTER TABLE `airplane` ENABLE KEYS */; UNLOCK TABLES;



See also