You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Paolo <ir...@gmail.com> on 2012/11/27 06:40:50 UTC

AjaxTabPanel stateless is possible?

I would the url of my site without pageId ?2 or ?3 etc.
I know that to do this I need to make the page stateless, so I did it for all my pages.
But one page have 2 tabs, using AjaxTabbedPanel.
I tried to use simple TabbedPanel, but it is not usefull, because so I have that all the page is reloaded, and it is not good,
because I have a flashplayer video playing in the page, and when the user change tab, the video is restarted.
Does exist a solution?
I am ready to put in the url some information to make the page stateless or to store the selected tab.
Thank you.

Some part of the code:

List tabs = new ArrayList();
    tabs.add(new AbstractTab(new Model("Info Video"))
    {
    public Panel getPanel(String panelId)
    {
    return new TabPanel1(panelId);
    }
    });

    tabs.add(new AbstractTab(new Model("Commenti"))
    {
    public Panel getPanel(String panelId)
    {
    return new TabPanel2(panelId);
    }
    });

    tabs.add(new AbstractTab(new Model("mp3"))
    {
    public Panel getPanel(String panelId)
    {
    return new TabPanel3(panelId);
    }
    });

    add(new AjaxTabbedPanel("tabs", tabs));
    
 // tabsdx  TabPanel di destra:
    
    List tabsdx = new ArrayList();
    tabsdx.add(new AbstractTab(new Model("Video Correlati"))
    {
    public Panel getPanel(String panelId)
    {
    return new TabPaneldx1(panelId);
    }
    });

    tabsdx.add(new AbstractTab(new Model("Video dello stesso autore"))
    {
    public Panel getPanel(String panelId)
    {
    return new TabPaneldx2(panelId);
    }
    });
    add(new AjaxTabbedPanel("tabsdx", tabsdx));

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: AjaxTabPanel stateless is possible?

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

I think it is possible but I haven't tried it.
TabbedPanel can easily become stateless by using BookmarkablePageLink.
AjaxTabbedPanel will need more work. You need to use
https://github.com/jolira/wicket-stateless and maybe even add your own Ajax
behaviors which work like the ones in this project.



On Tue, Nov 27, 2012 at 6:40 AM, Paolo <ir...@gmail.com> wrote:

> I would the url of my site without pageId ?2 or ?3 etc.
> I know that to do this I need to make the page stateless, so I did it for
> all my pages.
> But one page have 2 tabs, using AjaxTabbedPanel.
> I tried to use simple TabbedPanel, but it is not usefull, because so I
> have that all the page is reloaded, and it is not good,
> because I have a flashplayer video playing in the page, and when the user
> change tab, the video is restarted.
> Does exist a solution?
> I am ready to put in the url some information to make the page stateless
> or to store the selected tab.
> Thank you.
>
> Some part of the code:
>
> List tabs = new ArrayList();
>     tabs.add(new AbstractTab(new Model("Info Video"))
>     {
>     public Panel getPanel(String panelId)
>     {
>     return new TabPanel1(panelId);
>     }
>     });
>
>     tabs.add(new AbstractTab(new Model("Commenti"))
>     {
>     public Panel getPanel(String panelId)
>     {
>     return new TabPanel2(panelId);
>     }
>     });
>
>     tabs.add(new AbstractTab(new Model("mp3"))
>     {
>     public Panel getPanel(String panelId)
>     {
>     return new TabPanel3(panelId);
>     }
>     });
>
>     add(new AjaxTabbedPanel("tabs", tabs));
>
>  // tabsdx  TabPanel di destra:
>
>     List tabsdx = new ArrayList();
>     tabsdx.add(new AbstractTab(new Model("Video Correlati"))
>     {
>     public Panel getPanel(String panelId)
>     {
>     return new TabPaneldx1(panelId);
>     }
>     });
>
>     tabsdx.add(new AbstractTab(new Model("Video dello stesso autore"))
>     {
>     public Panel getPanel(String panelId)
>     {
>     return new TabPaneldx2(panelId);
>     }
>     });
>     add(new AjaxTabbedPanel("tabsdx", tabsdx));
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>