Rank: Advanced Member Groups: Member
Joined: 6/5/2007 Posts: 35
|
I have a form that contains a list of items generated dynamically. The form normally contains includes two listboxes that provide selections of items with which to filter the list. (More specifically, the list of items are jobs that include the employer and whethe the jobs have been viewed or not by the visitor. One list is a list of all employes having their jobs displayed, the other allows filtering of the list based on whether the jobs have been viewed or not. Selecting an employer, for example, will trigger a callback to filter the list to show just jobs from that employer.)
The form works fine under these circumstances. However, when the website visitor is not a registered job seeker, the backend code doesn't know if the visitor has viewed jobs or not, so the listbox to filter the list by viewed status is made 'not visible' The first time the page is viewed selecting an employer from the listbox of employes no longer triggers a callback, but if the page is displayed a second time ( for example, after viewing a job then returning to the list of available jobs) selecting an employe will trigger a callback.
Suggestions?
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi Phil,
Thanks for presenting such a complicate scenario to us. :) I am not sure what exactly happened but as one of general principle, for a server event to be triggered, the original control tree has to be "like" the post back control tree. For example, considering the following steps:
1. User requests Page1.aspx; 2. User triggers a Callback; 3. Page1.aspx posts back;
Here the control tree at step 1 and step 3 must be "similar", otherwise when the page postbacks, it either can not load view state throws out an exception, or can not find a matching control to trigger server event upon.
Another posibility is that everything is fine, but the CallbackPanel fails to hook up the trigger. You can verify whether it's the trigger not working or the Callback itself not working by manually call eo_Callback to trigger the callback.
However I know that you already know all those. :) So if you that doesn't ring a bell or so, feel free to send us a reproducing sample and we will dig into it.
Thanks
|