-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I can't seem to get this to work. When I load my listbox there is a little over 1000 records and I want to preload that listbox so that when scrolling it does not have to load the next records into memory, I want it nice and smooth. Below is the code as it is now.
I am also runnig a WebLogic server on my laptop which of course slows down my laptop. Is the issue with the listbox? Or is the issue with the fact that I am on a local weblogic server? It takes a long time and a bunch of hoops to get server space here at work so I installed a weblogic server as a temp fix so I can work while waiting.
<listbox id="terminalMasterList" preloadSize="2000" rows="14"
model="@{terminalMasterModel.entities}"
selectedItem="@{terminalMasterModel.selected}">
<listhead sizable="true">
<listheader label="Number" sort="auto(terminalNumber)" />
<listheader label="Abbreviation" sort="auto(terminalAbbreviation)" />
<listheader label="Active?" sort="auto(terminalStatus)" />
<listheader label="Hub?" sort="auto(hubStatus)" />
<listheader label="Name" sort="auto(terminalName)" />
<listheader label="City" sort="auto(cityName)" />
<listheader label="State" sort="auto(stateCode)" />
<listheader label="Zip Code" sort="auto(postalCode)" />
<listheader label="Time Zone" sort="auto(terminalCityCode)" />
<listheader label="Type" sort="auto(hubType)" />
<listheader label="Hub" sort="auto(hubParent)" />
</listhead>
<listitem self="@{each=terminalMaster}">
<listcell label="@{terminalMaster.terminalNumber}" />
<listcell label="@{terminalMaster.terminalAbbreviation}" />
<listcell label="@{terminalMaster.terminalStatus}" />
<listcell label="@{terminalMaster.hubStatus}" />
<listcell label="@{terminalMaster.terminalName}" />
<listcell label="@{terminalMaster.cityName}" />
<listcell label="@{terminalMaster.stateCode}" />
<listcell label="@{terminalMaster.postalCode}" />
<listcell label="@{terminalMaster.terminalCityCode}" />
<listcell label="@{terminalMaster.hubType}" />
<listcell label="@{terminalMaster.hubParent}" />
</listitem>
</listbox>
@Fooch
Hi Fooch, you can try to use paging listbox instead preloadsize, all you need is add this code:
<listbox id="terminalMasterList" ...... mold="paging">
About the issue slows down your laptop, you can use another app server(like tomcat) to check if it is a problem cause by listbox.
You can also test a case who total has less than 1000 records, and find out if it cost less memories.
/Joy
Asked: 2009-12-15 09:17:01 +0800
Seen: 332 times
Last updated: Dec 15 '09