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
there is no good reason to force users to have the tab content implemented
as an Panel. If some one else think this way, I can open on request for.
I know that the component name is TabbedPANEL, which implies that it work
with panels... So it can to be an reason to create another component?
TabbedContents?

Ex:
public WrapperPanel extends Panel{
  public static String WICKET_ID_FOR_WRAPPED_COM ="component";
  public WrapperPanel (wrappedComponent){
     add(wrappedComponent);
  }
}

On Mon, Jun 14, 2010 at 2:14 AM, Alec Swan <alecs...@gmail.com> wrote:

> 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 fragments when tabs are selected.
>
> I am not sure if it's legal to create multiple Fragment objects that
> use the same fragment markup. Any thoughts?
>
> Thanks
>
> On Sun, Jun 13, 2010 at 11:02 PM, Alec Swan <alecs...@gmail.com> wrote:
> > 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 PM, Jeremy Thomerson
> > <jer...@wickettraining.com> wrote:
> >> 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 tab. The content for the remaining tabs is loaded from the
> >>> database at runtime.
> >>>
> >>> I know how to implement tabbing using tab swapping or TabbedPanel.
> >>> However, both of these approaches require a separate panel object and
> >>> markup for the tabs. Instead, I would like to be able to use the HTML
> >>> page I received from the designer unmodified.
> >>>
> >>> Is there a way to create a WebMarkupContainerWithAssociatedMarkup
> >>> object which is mapped to a specific element on the page markup? If
> >>> so, can I implement tabbing by swapping such objects when tabs are
> >>> clicked?
> >>>
> >>> Any ideas would be appreciated.
> >>>
> >>> Thanks
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >>> For additional commands, e-mail: users-h...@wicket.apache.org
> >>>
> >>>
> >> Just make the content area a panel, add links to each of the tabs, and
> in
> >> the onClick, call replace(...) with the panel that contains the content
> for
> >> that tab.  This will make each content area (for each tab) into a panel,
> but
> >> you will not have to modify the markup of the tabs themselves.
> >>
> >> --
> >> Jeremy Thomerson
> >> http://www.wickettraining.com
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Pedro Henrique Oliveira dos Santos

Reply via email to