Re: Dynamic AJAX Tabs
Opppsss!!! hahaha.. gotta get into that habit, at the moment, the tabs display a unique id just to see if i can get it working. also... I am currently using a list, cause I cant add a AbstractTab to the 'item' in populate item :( final List tabs = new ArrayList(); chatSessionTabs = new RefreshingView(chatSessionTabs, new PropertyModel(HotListTargetPanel.this.getJumbuckSession().getMySessionData(), chatSessions)) { protected Iterator getItemModels() { return new ModelIteratorAdapter(HotListTargetPanel.this.getJumbuckSession().getMySessionData().getChatSessions().iterator()) { protected IModel model(Object object) { return new Model((Serializable) object); } }; } protected void populateItem(Item item) { Label chatSessionTabData = new Label(chatSessionTab, ((Long)item.getModelObject()).toString()); final long tempChatSessionId = (Long)item.getModelObject(); item.add(chatSessionTabData); tabs.add(new AbstractTab(item.getModel()) { public Panel getPanel(String panelId) { return new FlirtTabPanel(panelId, tempChatSessionId); } }); } }; add(chatSessionTabs); if (tabs.size() 0) add(new AjaxTabbedPanel(tabs, tabs)); else add(new Label(tabs, You have no chat sessions)); igor.vaynberg wrote: why dont you paste your code, abstracttab should work just fine, its just a factory for panels. -igor On 8/13/07, Ballist1c [EMAIL PROTECTED] wrote: Hey guys, Right now i have been playing around with the current, ajax tabbs in wicket extensions. What I am trying on now is creating a dynamic number of tabs with multiple components and models within each tab which can change during runtime so it will have Ajax polling for information. I have been using a RefreshingView to manage X number of tabs and it will have AJAX updates performed on the fly for information contain within the tab. I have been trying to use AbstractTab but it doesn't work with RefreshingView because refreshing view populates the tabs at run-time rather then creating the tabs at construction/render. This is my current predicament, and I am looking for a clean solution using current framework classes if possible. THanks hEaps guys LEO! -- View this message in context: http://www.nabble.com/Dynamic-AJAX-Tabs-tf4264551.html#a12136668 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Dynamic-AJAX-Tabs-tf4264551.html#a12137077 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dynamic AJAX Tabs
hmm, its still pretty difficult to tell what is going on. how about a quickstart that reproduces the problem. you want to have an ajax tabbed panel where the number of tabs is variable, so when you recalculate the number of tabs why not simply replace the tabbedpanel with a new instance and add the new instance to the ajax target. -igor On 8/13/07, Ballist1c [EMAIL PROTECTED] wrote: Opppsss!!! hahaha.. gotta get into that habit, at the moment, the tabs display a unique id just to see if i can get it working. also... I am currently using a list, cause I cant add a AbstractTab to the 'item' in populate item :( final List tabs = new ArrayList(); chatSessionTabs = new RefreshingView(chatSessionTabs, new PropertyModel(HotListTargetPanel.this.getJumbuckSession ().getMySessionData(), chatSessions)) { protected Iterator getItemModels() { return new ModelIteratorAdapter(HotListTargetPanel.this.getJumbuckSession ().getMySessionData().getChatSessions().iterator()) { protected IModel model(Object object) { return new Model((Serializable) object); } }; } protected void populateItem(Item item) { Label chatSessionTabData = new Label(chatSessionTab, ((Long)item.getModelObject()).toString()); final long tempChatSessionId = (Long)item.getModelObject(); item.add(chatSessionTabData); tabs.add(new AbstractTab(item.getModel()) { public Panel getPanel(String panelId) { return new FlirtTabPanel(panelId, tempChatSessionId); } }); } }; add(chatSessionTabs); if (tabs.size() 0) add(new AjaxTabbedPanel(tabs, tabs)); else add(new Label(tabs, You have no chat sessions)); igor.vaynberg wrote: why dont you paste your code, abstracttab should work just fine, its just a factory for panels. -igor On 8/13/07, Ballist1c [EMAIL PROTECTED] wrote: Hey guys, Right now i have been playing around with the current, ajax tabbs in wicket extensions. What I am trying on now is creating a dynamic number of tabs with multiple components and models within each tab which can change during runtime so it will have Ajax polling for information. I have been using a RefreshingView to manage X number of tabs and it will have AJAX updates performed on the fly for information contain within the tab. I have been trying to use AbstractTab but it doesn't work with RefreshingView because refreshing view populates the tabs at run-time rather then creating the tabs at construction/render. This is my current predicament, and I am looking for a clean solution using current framework classes if possible. THanks hEaps guys LEO! -- View this message in context: http://www.nabble.com/Dynamic-AJAX-Tabs-tf4264551.html#a12136668 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Dynamic-AJAX-Tabs-tf4264551.html#a12137077 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dynamic AJAX Tabs
hrmm... i might have to resort to that... I was hoping not to have to access any POJO data directly by the rendering components my aim was to keep all the UI components to only access models only... and keep all the scripting to custom models keeping it transparent from the UI classes. But that venture is starting to really create a bucket load of classes... :S... igor.vaynberg wrote: hmm, its still pretty difficult to tell what is going on. how about a quickstart that reproduces the problem. you want to have an ajax tabbed panel where the number of tabs is variable, so when you recalculate the number of tabs why not simply replace the tabbedpanel with a new instance and add the new instance to the ajax target. -igor On 8/13/07, Ballist1c [EMAIL PROTECTED] wrote: Opppsss!!! hahaha.. gotta get into that habit, at the moment, the tabs display a unique id just to see if i can get it working. also... I am currently using a list, cause I cant add a AbstractTab to the 'item' in populate item :( final List tabs = new ArrayList(); chatSessionTabs = new RefreshingView(chatSessionTabs, new PropertyModel(HotListTargetPanel.this.getJumbuckSession ().getMySessionData(), chatSessions)) { protected Iterator getItemModels() { return new ModelIteratorAdapter(HotListTargetPanel.this.getJumbuckSession ().getMySessionData().getChatSessions().iterator()) { protected IModel model(Object object) { return new Model((Serializable) object); } }; } protected void populateItem(Item item) { Label chatSessionTabData = new Label(chatSessionTab, ((Long)item.getModelObject()).toString()); final long tempChatSessionId = (Long)item.getModelObject(); item.add(chatSessionTabData); tabs.add(new AbstractTab(item.getModel()) { public Panel getPanel(String panelId) { return new FlirtTabPanel(panelId, tempChatSessionId); } }); } }; add(chatSessionTabs); if (tabs.size() 0) add(new AjaxTabbedPanel(tabs, tabs)); else add(new Label(tabs, You have no chat sessions)); igor.vaynberg wrote: why dont you paste your code, abstracttab should work just fine, its just a factory for panels. -igor On 8/13/07, Ballist1c [EMAIL PROTECTED] wrote: Hey guys, Right now i have been playing around with the current, ajax tabbs in wicket extensions. What I am trying on now is creating a dynamic number of tabs with multiple components and models within each tab which can change during runtime so it will have Ajax polling for information. I have been using a RefreshingView to manage X number of tabs and it will have AJAX updates performed on the fly for information contain within the tab. I have been trying to use AbstractTab but it doesn't work with RefreshingView because refreshing view populates the tabs at run-time rather then creating the tabs at construction/render. This is my current predicament, and I am looking for a clean solution using current framework classes if possible. THanks hEaps guys LEO! -- View this message in context: http://www.nabble.com/Dynamic-AJAX-Tabs-tf4264551.html#a12136668 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Dynamic-AJAX-Tabs-tf4264551.html#a12137077 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Dynamic-AJAX-Tabs-tf4264551.html#a12138522 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]