you never reference the labels you add to the listviewitem in the markup.
-igor
On 4/16/07, pwillemann <[EMAIL PROTECTED]> wrote:
Here is the code from the relevant java and html files.
************************************
TabbedPanelPage.java as follows:
public class TabbedPanelPage extends BasePage {
public TabbedPanelPage() {
setModel(new Model("tabpanel"));
// A-G, H-N, O-S, T-Z
// create a list of ITab objects used to feed the tabbed panel
List tabs = new ArrayList();
tabs.add(new PlayersTab("A","G"));
tabs.add(new PlayersTab("H","N"));
tabs.add(new PlayersTab("O","S"));
tabs.add(new PlayersTab("T","Z"));
// add the tabbed panel to the webpage
add(new TabbedPanel("tabs",tabs));
}
**************************************
PlayersTab.java as follows
public class PlayersTab extends AbstractTab {
private final String start;
private final String end;
public PlayersTab(String start, String end) {
super(new Model(start+"-"+end));
this.start = start;
this.end = end;
}
public Panel getPanel(String id) {
return new PlayersPanel(id,start,end);
}
**************************************
PlayersPanel.java as follows:
public class PlayersPanel extends Panel {
private static Log log = LogFactory.getLog(PlayersPanel.class);
List players = null;
private HibernatePlayerFacade facade = new HibernatePlayerFacade();
public PlayersPanel(String id, String start, String end) {
super(id);
try {
players = facade.listPlayers(start, end);
add(new ListView("rows",players) {
protected void populateItem(ListItem item) {
final Player player = (Player)item.getModelObject();
item.add(new Label("ID",player.getID().toString()));
item.add(new Label("FirstName",player.getFirstName
()));
item.add(new Label("LastName",player.getLastName()));
item.add(new Label("Suffix",player.getSuffix()));
}
});
} catch (DatabaseException ex) {
ex.printStackTrace();
}
}
**************************************
TabbedPanelPage.html as follows:
**************************************
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
typical style sheets.....
</head>
<body>
<wicket:extend>
<p>
<div wicket:id="tabs" class="tabpanel">[tabbed panel will
be
here]</div>
</p>
</wicket:extend>
</body>
</html>
**************************************
PlayersPanel.html
**************************************
<wicket:panel>
<table frame="box" >
<thead>
<tr>
<th>ID</th>
<th>First Name </th>
<th>Last Name</th>
<th>Suffix</th>
</tr>
</thead>
<tbody>
<tr wicket:id="rows" id="rows" >
<td>ID</td>
<td>First Name</td>
<td>Last Name</td>
<td>Suffix</td>
</tr>
</tbody>
</table>
</wicket:panel>
--
View this message in context:
http://www.nabble.com/Wicket-%281.2.4%29-TabbedPanel-Guidance-Question-tf3587043.html#a10028634
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