Re: How to implement tabs without using panels?

2010-06-14 Thread Jeremy Thomerson
Then use fragments. I must not be understanding what you actually want to do or why you're so afraid to break up separate things into separate markup. On Mon, Jun 14, 2010 at 12:02 AM, Alec Swan alecs...@gmail.com wrote: Hello, If I understood your suggestion correctly it involves to markup

Re: How to implement tabs without using panels?

2010-06-14 Thread Jeremy Thomerson
Then use fragments. I must not be understanding what you actually want to do or why you're so afraid to break up separate things into separate markup. On Mon, Jun 14, 2010 at 12:02 AM, Alec Swan alecs...@gmail.com wrote: Hello, If I understood your suggestion correctly it involves to markup

Re: How to implement tabs without using panels?

2010-06-14 Thread Pedro Santos
Hi Alec, you can create an wrapper panel, that receive as parameter an component, in your case an fragment, to use in your tabbed panel. Actually I think that will to be more natural if the ITab interface had an getTab method, that return an Component object instead of the getPanel one, since

Re: How to implement tabs without using panels?

2010-06-14 Thread Igor Vaynberg
you can simply use javascript tabs. all js frameworks provide them. -igor On Sun, Jun 13, 2010 at 6:54 PM, Alec Swan alecs...@gmail.com wrote: Hello, I am working with a web designer who delivers a single HTML page which should display a panel with arbitrary number of tabs. In the HTML the

Re: How to implement tabs without using panels?

2010-06-14 Thread Alec Swan
Pedro, I agree that ITab.getPanel() could just return Component type. Jeremy and Igor, the goal of the project is to automatically generate tabs given tab markup template and a database which provides content for all tabs. Note that the number of tabs can vary depending on the database state. It

Re: How to implement tabs without using panels?

2010-06-14 Thread Pedro Santos
I am working with a web designer who delivers a single HTML page which should display a panel with tabs. Simply use javascript With arbitrary number of, loaded from the database at runtime Is preferable to implement an component at server side with the tabs assemble and presentation rules. On

Re: How to implement tabs without using panels?

2010-06-14 Thread Alec Swan
Pedro, could you clarify your last message? I also came across wicket:container. I don't think it is possible to swap container components at runtime because they don't have HTML ids and hence cannot be reference via AJAX. Is that right? Thanks On Mon, Jun 14, 2010 at 10:11 AM, Pedro Santos

Re: How to implement tabs without using panels?

2010-06-14 Thread Pedro Santos
wicket:container are meant to don't output invalid markup when using repeaters. You can use AjaxTabbedPanel to implement your tabbed panel, and ITab for the complexity of swap your tabs contents... In my last mail I said that is preferably to have you logic that use database info to assemble your

Re: How to implement tabs without using panels?

2010-06-14 Thread Alec Swan
Hello Pedro, I am not sure what you mean by wrapped panels, but I am planning to have a lul/ list and single fragment with wicket:id=tabTemplate on my page. When the user accesses the page the first time, the Page code will populate the list and display the first tab with the content pulled from

Re: How to implement tabs without using panels?

2010-06-14 Thread Pedro Santos
1. Is it OK to create multiple Fragment objects for the same markup fragment? yes, the relation is: 1 markup fragment, 1 fragment type, n fragment objects 2. Is it possible to nest Fragments so that I can support multiple levels of tabs? yes, the Fragment extends from Component, and as an

Re: How to implement tabs without using panels?

2010-06-14 Thread Igor Vaynberg
yep, javascript tabs do that... -igor On Mon, Jun 14, 2010 at 8:29 AM, Alec Swan alecs...@gmail.com wrote: Pedro, I agree that ITab.getPanel() could just return Component type. Jeremy and Igor, the goal of the project is to automatically generate tabs given tab markup template and a database

Re: How to implement tabs without using panels?

2010-06-13 Thread Jeremy Thomerson
On Sun, Jun 13, 2010 at 8:54 PM, Alec Swan alecs...@gmail.com wrote: Hello, I am working with a web designer who delivers a single HTML page which should display a panel with arbitrary number of tabs. In the HTML the tabbed panel consists of a ul list of links and the content of the first

Re: How to implement tabs without using panels?

2010-06-13 Thread Alec Swan
Hello, If I understood your suggestion correctly it involves to markup files: one - for the content area and another one - for the tab content. However, I would like to use a single markup file for the entire page. Did I understand your solution correctly? Thanks On Sun, Jun 13, 2010 at 8:04

Re: How to implement tabs without using panels?

2010-06-13 Thread Alec Swan
I wonder if I can use Wicket fragments for this. My page markup will contain a single fragment for the tab content. At runtime I will create multiple Fragment objects - one for each tab, each of which will be mapped to the same fragment section in the markup file. After this I can just swap tab