Optimalizace načítání gridů při otevření přes URL. Entita TripBill se cachuje přes Hibernate Cache.

master
Josef Rokos 6 years ago
parent 48bd9983fc
commit e55d7ad07f

@ -29,6 +29,7 @@ import java.util.List;
@Entity @Entity
@Table(name = "TRIP_BILL") @Table(name = "TRIP_BILL")
@Indexed @Indexed
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class TripBill extends BaseData implements EntityWithAttachment, SeasonsAware { public class TripBill extends BaseData implements EntityWithAttachment, SeasonsAware {
@OneToOne(fetch = FetchType.EAGER) @OneToOne(fetch = FetchType.EAGER)

@ -69,11 +69,7 @@ public class ListViewModel<T extends DataModel> extends DocumentViewModel
{ {
super.initDocumentViewModel(); super.initDocumentViewModel();
seasons = seasonService.getAllSeasons(); seasons = seasonService.getAllSeasons();
Map<String, String[]> map = Executions.getCurrent().getParameterMap();
if (map.get("select") == null) {
selSeason = seasonService.getActive(); selSeason = seasonService.getActive();
}
setHqlFilter(); setHqlFilter();
} }
@ -328,9 +324,6 @@ public class ListViewModel<T extends DataModel> extends DocumentViewModel
} }
if (id > 0) { if (id > 0) {
selSeason = null;
setHqlFilter();
dataList = getListFromService();
for (int i = 0; i < dataList.size(); i++) { for (int i = 0; i < dataList.size(); i++) {
if (dataList.get(i).getId() == id) { if (dataList.get(i).getId() == id) {
selIndex = i; selIndex = i;

@ -51,6 +51,6 @@
<div id="mainData"> <div id="mainData">
<u:include src="${gridZul}" /> <u:include src="${gridZul}" />
</div> </div>
<div id="footer"> Verze 4.2 </div> <div id="footer"> Verze 4.22 </div>
</div> </div>
</html> </html>
Loading…
Cancel
Save