print all data in paginated table/grid

direct Tabular data display Recently our project has a page need to show tabular data from 30-6000 rows with 3-4 columns. At first, I thought this is pretty reasonable data to show in one page so I just throw the data into a ng-repeat table with my own implementation of filtering/sorting which is pretty straightforward in…

Oracle partition table

We have an oracle table which used to use store proc to populate from other oracle table. Now since our upstream data source migrated to Hive, we need to do it thru jdbc and persist with JPA. And we hit a problem with: ‘inserted partition key does not map to any partition’. Turns out that…

create table / sequence if not exist.

it’s quite uncommon to check first and then create the table. If you want to have a running code according to your method, this will be: But I’d rather go catch on the Exception, saves you some unnecessary lines of code:

gwt table td tr getOffsetHeight() inconsistency if border is set

In Gxt3 grid’s column header, if you set any border to the header row, your column header will grow. Also if you have filter in the header, even just hovering on the filter will cause the growth. After digging into the code, the following code in ColumnHeader causes this: (my current version is 3.0.6) This…

primeface update current table

I have a data table. Each row of the table has a commandButton called ‘Remove’, which is supposed to remove that row from the model and the view and perform an update in-place. when I click a button on one of the rows, to remove it, it partially works. The corresponding element is removed from the model but…

JPA,在@OneToMany里加入mappedBy属性

JPA,在@OneToMany里加入mappedBy属性避免生成中间表 使用JPA的时候,如果A B两个实体间是一对多,多对一的关系,如果不在@OneToMany里加入mappedBy属性(相当于inverse=”true”)会导致自动生成一个多余的中间表。比如:   @Entity public class A { @OneToMany(mappedBy=”a”) public Set<B> bs = new HashSet<B>(0); } @Entity public class B { @ManyToOne public A a; } 这样写会只成生成表A和表B,B中会有一个到表A的外键。但是如果不加mappedBy=”a”, 那么就会再生成一张A_B表。 又如: In Customer class @OneToMany(cascade=ALL, mappedBy=”customer”) public Set getOrders() { return orders; } In Order class @ManyToOne @JoinColumn(name=”CUST_ID”, nullable=false) public Customer getCustomer() { return customer; }…

其他controller中让table reload

今天做seekPatent,要在一个controller里更新数据,然后在另外的viewController中更新table。发现在objective-c中用observer模式还是很容易的: 1. Using notifications: 存储完数据并且方法返回之前,发布notification. Something like this: //[[NSNotificationCenter defaultCenter] postNotificationName:@”DataSaved” object:nil]; 在处理table的controller中, implement – (void) dataSaved:(NSNotification *)notification{    [self.tableView reloadData];} 在它的 viewDidLoad 方法中注册notification: [[NSNotificationCenter defaultCenter] addObserver:self                                selector:@selector(dataSaved:)                         …