dynamic-columns

Dynamic columns with List<List> in <p:dataTable><p:columns>

╄→гoц情女王★ 提交于 2019-12-01 08:20:16
I'm attempting to generate a dataTable with columns dinamycally, so I've a List<List> when a List inside of a List is the content of my column, but when I try to show it I can't display not much. So, this is the code of my Bean: @ManagedBean @javax.faces.bean.ViewScoped public class Controlador { private List<List> estadistico; @PostConstruct public void inicializar(){ this.estadistico = new ArrayList<List>(); this.estadistico.add( Arrays.asList( new Integer[]{0,1,24})); this.estadistico.add( Arrays.asList( new Integer[]{5,1,34})); this.estadistico.add( Arrays.asList( new Integer[]{12,1,4}));

How to generate dynamic columns in JSF Datatable?

三世轮回 提交于 2019-12-01 04:04:07
Would like to have following data table structure: +--------------------------------------------------------------+ | dynamic | dynamic | dynamic | |--------------------------------------------------------------| | col1 | col2 | col3 | col1 | col2 | col3 | col1 | col2 | col3 | |--------------------------------------------------------------| | data | data | data | data | data | data | data | data | data | The reason for that is, that i don't know how much columns have to be displayed until i request a database. The columns in col1, col2, col3 are always the same. I tried with the following

How to define dynamic column families in cassandra

只谈情不闲聊 提交于 2019-11-29 14:38:35
问题 Here it is said, that no special effort is need to get a dynamic column family. But I always get an exception, when I try to set a value for an undefined column. I created a column family like this: CREATE TABLE places ( latitude double, longitude double, name text, tags text, PRIMARY KEY (latitude, longitude, name) ) BTW: I had to define the tags column. Can somebody explain me why? Maybe because all other columns are part of the Index? Now when inserting data like this: INSERT INTO places (

php loop counter bootstrap row

泄露秘密 提交于 2019-11-27 15:25:47
Ive seen alot of solutions here on Stack but none seem to work for me, so im trying to write it based upon what im seeing others do. Im able to count the columns and start the new row, but the problem is, since im doing this in a foreach (getting data from DB) it will now place each entry from DB 4 times->close the row; start a new row->and show the second entry from DB 4 times->close the row; start a new row->and shows the third entry from DB 4 times, and so on... (my code is on the bottom of this post) So, right now this code displaying items like: col-md3(item1) | col-md3(item1) | col-md3

Primefaces static and dynamic columns in datatable

痴心易碎 提交于 2019-11-26 19:06:33
I am using Primefaces 5.0 to create a dynamic datatable. My DataObject has some required fields and a List of optional "tupel" (key-value pair). The optional list may vary in size. Therefore I need a dynamic mechanism to show a List of DataObject in Primefaces.DataTable. My approach looks like: public class DataObject { private String staticval1; private String staticval2; private List<Tupel> optionalValues; // .. getter, setter, hashCode, toString..... } public class Tupel{ private String id; private String value; } @ManagedBean @ViewScoped public class TableOverviewBean { private List

php loop counter bootstrap row

大城市里の小女人 提交于 2019-11-26 18:30:19
问题 Ive seen alot of solutions here on Stack but none seem to work for me, so im trying to write it based upon what im seeing others do. Im able to count the columns and start the new row, but the problem is, since im doing this in a foreach (getting data from DB) it will now place each entry from DB 4 times->close the row; start a new row->and show the second entry from DB 4 times->close the row; start a new row->and shows the third entry from DB 4 times, and so on... (my code is on the bottom