Thanks, nice work, it's work fine.
Antonio
--- Maurice Marrink <[EMAIL PROTECTED]>
wrote:
> Antonio,
>
> Here's one very simple example.
> BTW I assume you fixed the little import problem the
> latest wicket
> version introduced.
>
> ===============java code==================
> import java.util.ArrayList;
> import java.util.List;
>
> import nl.topicus.prodconf.ui.web.HeaderContributor;
> import
>
nl.topicus.prodconf.ui.web.tree.DefinitionsTreePanel;
> import
> nl.wehkamp.prodconf.ui.web.components.TabPanel;
> import wicket.Component;
> import wicket.PageParameters;
> import wicket.markup.ComponentTagAttributeModifier;
> import wicket.markup.html.HtmlPage;
> import wicket.markup.html.list.ListItem;
> import wicket.markup.html.list.ListView;
> import wicket.markup.html.panel.FeedbackPanel;
> import wicket.markup.html.panel.Panel;
> import wicket.model.IModel;
> import wicket.model.Model;
>
> /**
> */
> public class MainPage extends HtmlPage
> {
> /** panel with tabs. */
> private TabPanel panel;
>
> /**
> * Construct.
> * @param parameters
> */
> public MainPage(PageParameters parameters)
> {
> this();
> }
>
> /**
> * Construct.
> */
> public MainPage()
> {
> panel = new TabPanel("mainPanel"); //make
> container
> for tabs
> Panel temp = new
>
nl.wehkamp.prodconf.ui.web.main.customer.CustomerPanel("tab");
> //verry
> important every component you add must be named
> "tab" (without
> quotes)!!!
> panel.addTab("Klant", temp); //add component as
> tab
> panel.addTab("Onderhoud", new
> DefinitionsTreePanel("tab"));
> //and yet another tab, notice the component is
> also
> named "tab"
> // both tab components are just wicket Panels.
> add(panel);
> }
> }
> =============html code================
> <html>
> <head>
> </head>
> <body>
> <div id="wicket-mainPanel" />
> </body>
> </html>
> ================end of example code===============
> 95% of the time this is all you need.
>
> But if you take a look in the TabPanel you see
> addTab allows you to add
> Components rather then just Panels. So you can add
> Pages or Labels or
> textFields. There's just one catch if you look into
> Tabpanel.html you
> will see :" <div id="wicket-tab"/>" This is because
> for Panels you need
> to use a div (it's a wicket thing). For Pages you
> need to use another
> html element, maybe an Iframe will do the trick
> (haven't tried that) for
> Labels you need to use <span> etc. So every tab you
> add must fit inside
> the html element.
>
> I hope this will help you out.
> I use the following css btw:
> ==============css======================
> #navigation
> {
> float:left;
> width:100%;
> background:#DAE0D2 url("images/bg_blue.gif")
> repeat-x bottom;
> font-size:100%;
> line-height:normal;
> }
>
> #navigation ul
> {
> margin:0;
> padding:10px 10px 0;
> list-style:none;
> }
>
> #navigation li
> {
> margin:0;
> padding:0;
> display: inline;
> }
>
> #navigation a
> {
> float:left;
> background:url("images/left_both_blue.gif")
> no-repeat left top;
> margin:0;
> padding:0 0 0 9px;
> border-bottom:1px solid #765;
> text-decoration:none;
> }
>
> #navigation a span
> {
> float:left;
> display:block;
> background:url("images/right_both_blue.gif")
> no-repeat right
> top;
> padding:5px 15px 4px 6px;
> color:#444444;
> }
>
> #navigation a span
> {
> float:none;
> }
>
> #navigation a:hover span
> {
> color:#333;
> }
> #navigation .selected
> {
> background-position:0 -150px;
> border-width:0;
> }
>
> #navigation .selected span
> {
> background-position:100% -150px;
> padding-bottom:5px;
> color:#333;
> }
> #navigation a:hover
> {
> background-position:0% -150px;
> }
>
> #navigation a:hover span
> {
> background-position:100% -150px;
> }
> =============end of css==========
>
> I attached the latest code.
> Let me know if you run into any problems.
>
>
> -----Oorspronkelijk bericht-----
> Van: Antonio Casula [mailto:[EMAIL PROTECTED]
> Verzonden: maandag 31 januari 2005 11:48
> Aan: [email protected]
> Onderwerp: RE: [Wicket-user] TabbedPanel ?
>
> Hi Maurice,
>
> seem interesting ... but , should you give us some
> example how to use it , please? I have tryied but
> TabPanel.html result missed.
>
> Thanks a lot
>
> Antonio
>
> --- Maurice Marrink <[EMAIL PROTECTED]>
> wrote:
>
> > Here's one that I use.
> >
>
=== message truncated ===
> ATTACHMENT part 2 application/octet-stream
name=TabPanel.java
> ATTACHMENT part 3 application/octet-stream
name=TabPanelModel.java
---------------------------------
__________________________________
Do you Yahoo!?
The all-new My Yahoo! - Get yours free!
http://my.yahoo.com
-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user