TreeTable is not showing data with proper hierarchy if data is more (I have 5000) .
I am attaching two images shwing same data in Treetable and Tree.
Tree is showing same data properly but not tree table.
How can i solve this.
regards
Umesh
TreeTable is not showing data with proper hierarchy if data is more (I have 5000) .
I am attaching two images shwing same data in Treetable and Tree.
Tree is showing same data properly but not tree table.
How can i solve this.
regards
Umesh
I can’t send sample project as this problem started only after adding more than 5000 data. before that everything was alright.
The snapshot was taken from hosted solution and both component point to same database/view and tables. I can send the code for both screens.
Please advise.
Regards
Umesh
I was doing experiment to find solution and found that if you remove filter component, everything become alright. Now data is shown properly.
Without filter
With Filter
Why?
Any Solution?
regards
Umesh
PS:
If filter is there on screen no tree component work properly - treegrid, tree, treetable
Could you clarify what version of CUBA do you use?
7.0.9
Unfortunately I cannot reproduce the problem.
Is it possible to share data model and screen layout?
This is browse screen.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<window xmlns="http://schemas.haulmont.com/cuba/screen/window.xsd"
caption="msg://browseCaption"
focusComponent="legalTextsTable"
messagesPack="com.company.sheelcompliance.web.legaltext">
<data readOnly="true">
<collection id="legalTextsDc"
class="com.company.sheelcompliance.entity.LegalText"
view="legalText-view">
<loader id="legalTextsDl">
<query>
<![CDATA[select e from sheelcompliance_LegalText e]]>
</query>
</loader>
</collection>
</data>
<dialogMode height="600"
width="800"/>
<layout expand="legalTextsTable"
spacing="true">
<filter id="filter"
applyTo="legalTextsTable"
dataLoader="legalTextsDl">
<properties include=".*"/>
</filter>
<treeTable id="legalTextsTable"
width="100%"
dataContainer="legalTextsDc"
hierarchyProperty="parent">
<actions>
<action id="create" type="create"/>
<action id="edit" type="edit"/>
<action id="remove" type="remove"/>
</actions>
<columns>
<column id="title"/>
<column id="type"/>
<column id="html"/>
<column id="parent"/>
<column id="position"/>
<column id="identity"/>
<column id="regulation"/>
</columns>
<rowsCount/>
<buttonsPanel id="buttonsPanel"
alwaysVisible="true">
<button id="createBtn" action="legalTextsTable.create"/>
<button id="editBtn" action="legalTextsTable.edit"/>
<button id="removeBtn" action="legalTextsTable.remove"/>
</buttonsPanel>
</treeTable>
<hbox id="lookupActions" spacing="true" visible="false">
<button action="lookupSelectAction"/>
<button action="lookupCancelAction"/>
</hbox>
</layout>
</window>
This is entity.
> @NamePattern("%s|title")
@Table(name = "SHEELCOMPLIANCE_LEGAL_TEXT") @Entity(name = "sheelcompliance_LegalText") public class LegalText extends StandardEntity { @NotNull @Column(name = "TITLE", nullable = false) protected String title; @NotNull @Column(name = "TYPE_", nullable = false) protected String type; @Lob @Column(name = "HTML") protected String html; @Lookup(type = LookupType.DROPDOWN, actions = {"lookup", "clear"}) @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "PARENT_ID") protected LegalText parent; @Column(name = "POSITION_") protected Integer position; @Column(name = "IDENTITY_") protected String identity; @Lookup(type = LookupType.DROPDOWN, actions = {"lookup", "clear"}) @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "REGULATION_ID") protected Regulation regulation; public void setType(EnumLegalTextType type) { this.type = type == null ? null : type.getId(); } public EnumLegalTextType getType() { return type == null ? null : EnumLegalTextType.fromId(type); } public Regulation getRegulation() { return regulation; } public void setRegulation(Regulation regulation) { this.regulation = regulation; } public String getIdentity() { return identity; } public void setIdentity(String identity) { this.identity = identity; } public Integer getPosition() { return position; } public void setPosition(Integer position) { this.position = position; } public LegalText getParent() { return parent; } public void setParent(LegalText parent) { this.parent = parent; } public String getHtml() { return html; } public void setHtml(String html) { this.html = html; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } }
This is screen display
regards
umesh
It seems that the problem is related to this issue: Browsers based on new 7.0 UI always load 5000 rows on screen opening
I’ll test the case again and probably the solution will be backported to 7.0
Regards,
Daniil
Just for information, Now I have more than 10000 records (going to have more than 30000 records) and without filter component, it is working fine. (add filter component and issue comes back)
In my opinion, this issue is related to filter component in someway.
regards
Umesh