This content has been marked as final.
Show 5 replies
-
1. Re: SuggestionBox Issue
sergeysmirnov Jan 14, 2008 8:54 PM (in response to robertocarlos1)could you say more?
-
2. Re: SuggestionBox Issue
robertocarlos1 Jan 14, 2008 9:48 PM (in response to robertocarlos1)this is part of the code in the page
.... <rich:tabPanel id='myTabPanel' switchType='ajax'> <rich:tab id='tab_1' switchType='ajax' opened='true' limitToList='true' reRender='myTabPanel'> <!-- some controls like dropdowns and datatables --> </rich:tab> <rich:tab id='tab_2' switchType='ajax' opened='true' limitToList='true' reRender='myTabPanel'> <!-- some controls like dropdowns and datatables --> </rich:tab> <rich:tab id='tab_3' switchType='ajax' opened='true' limitToList='true' reRender='myTabPanel'> <!-- some controls like dropdowns and datatables and suggestionBox --> </rich:tab> </rich:tabPanel> ....
in the bean i have properties that contains the control's datamodels. In the get Methods of these properties i'm loading the information from the database and putting in the datamodel. Something like that:...... public class MyBean(){ private List myTable1List = new ArrayList(); ..... ..... public List getMyTable1List(){ if (myTable1List.isEmpty()){ //Get information from database and put in myTable1List } return this.myTable1List; } }
when i clic in the tab2 only the get methods for the datamodels of the controls that are rendering in that tab are executed and the same happen if i clic in some button for save or refresh the information. This behavior is OK for me, because i want only load the information of the rendered controls.
The behavior is diferent with the suggestionBox, when put some chars, the request is sending to the server for get the suggestion list, when that happens all the methods get of the properties containing the datamodels even those that aren't rendered are executed, causing the loading of information for all controls, spending more time for show the suggestion list.
Thanks for your reply. -
3. Re: SuggestionBox Issue
robertocarlos1 Jan 14, 2008 10:47 PM (in response to robertocarlos1)i was wrong, only when all the contained controls in the tab cause the undesired behavior (For me). only when i clic in the tabs is loaded only the information of the controls that will be rendered.
but still i need a way to change that behavior. -
4. Re: SuggestionBox Issue
sergeysmirnov Jan 14, 2008 11:21 PM (in response to robertocarlos1)why you rerender the whole tab panel when you click on the tab?
-
5. Re: SuggestionBox Issue
robertocarlos1 Jan 14, 2008 11:42 PM (in response to robertocarlos1)if i dont rerender the whole tab panel, the selected tab never change to the clicked tab, i tried to put rerender for the id of the same tab where is the rerender property, but the tab selected never change.
Thanks for your reply