make the thing that presents the result a panel
then just
class MyTab extends AbstractTab {
private final char start,end;
public MyTab(char start, char end) {
this.start=start;this.end=end;
super(new Model(start+"-"+end));
}
public Panel getPanel(String id) {
return new ResultsPanel(id, start, end);
}
}
List tabs=new ArrayList();
tabs.add(new MyTab('a','k'));
tabs.add(new MyTab('l','z'));
add(new TabbedPanel("tabs", tabs));
and yer done
-igor
On 4/16/07, pwillemann <[EMAIL PROTECTED]> wrote:
Hello everyone:
I have a MySQL database with names of people. I have created a facade
class
which will retrieve all the people whose last name starts with a
particular
letter or group of letters . I have all this working just fine. I can
get
all of this to come to a web page and display in a table with no problem
What I want to do is create a tabbed panel with several tabs. Each tab
would represent a group of letters (A-K, L-R for example) for the people's
last name in my database. My confusion comes when I have to create the
classes and html files for the tabs. I want to create one Java class (the
one I already have) and hook it to one html page template. Then simply
pass in the range of letters for each tab and display the tabs.
I don't want to have x number of html files for x number of tabs. I also
don't want to have to create a separate class for each tab. The examples
I
see seem to do this and I believe this is a maintenance nightmare.
Does any one I have any guidance? I am currently looking at fragments.
This seems like it might make it easier to do one html class, but I don't
think it addresses my desire for one Java class
Thanks
Phil Willemann
--
View this message in context:
http://www.nabble.com/Wicket-%281.2.4%29-TabbedPanel-Guidance-Question-tf3587043.html#a10024104
Sent from the Wicket - User mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user