You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Yazeed Isaacs <Ya...@transactionjunction.co.za> on 2008/11/10 13:12:19 UTC
WebMarkupContainer with AjaxTabbedPanel - duplicating panel data
Hi
I have a WebMarkupContainer with a AjaxTabbedPanel. When I click on the
tab it duplicates the panel data.
What am I doing wrong?
Here is my code:
final WebMarkupContainer terminalsContainer = new WebMarkupContainer(
"terminalsContainer");
terminalsContainer.setOutputMarkupId(true);
terminalsContainer
.add(new ListView("terminalDetails", new
ArrayList()) {
@Override
protected void populateItem(ListItem item)
{
}
});
add(terminalsContainer);
......
AjaxLink link = new AjaxLink("terminalIdLink") {
@Override
public void onClick(AjaxRequestTarget target) {
ArrayList tabs = new ArrayList();
tabs.add(new AbstractTab(new Model("Details")) {
public Panel getPanel(String panelId) {
return new TerminalMonitorDetailsTabPanel(
panelId, terminal.getId());
}
});
terminalsContainer.replace(new AjaxTabbedPanel("terminalDetails",
tabs));
target.addComponent(terminalsContainer);
}
}
When I click on the "Details" tab then the data returned by the panel
TerminalMonitorDetailsTabPanel is duplicated below each time.
Yazeed Isaacs - Java Developer
yazeed@transactionjunction.co.za
RE: WebMarkupContainer with AjaxTabbedPanel - duplicating panel data
Posted by Yazeed Isaacs <Ya...@transactionjunction.co.za>.
Hi Igor
Forgot it. I made a really foolish mistake. I must have been in a hurry
and that I left out the <tr> and <td> markup.
I had the following:
<table>
<div wicket:id="tabs" class="tabpanel">
</div>
</table>
When I should have had:
<table>
<tr>
<td>
<div wicket:id="tabs" class="tabpanel">
</div>
</td>
</tr>
</table>
It works now :D
Could you please help me out with following:
I am still having a problem with the paging & sorting of the
AjaxFallbackDefaultDataTable when it is used within a LazyLoadPanel ie.
LazyLoadPanel.getLazyLoadComponent() returns the
AjaxFallbackDefaultDataTable. Refer to "AjaxFallbackDefaultDataTable
with ajax lazy loading - sorting and paging throws an
IllegalStateException"
Regards,
Yazeed Isaacs - Java Developer
yazeed@transactionjunction.co.za
-----Original Message-----
From: Yazeed Isaacs [mailto:Yazeed@transactionjunction.co.za]
Sent: 11 November 2008 10:05 AM
To: users@wicket.apache.org
Subject: RE: WebMarkupContainer with AjaxTabbedPanel - duplicating panel
data
Hi Igor
Here is my code:
final WebMarkupContainer terminalsContainer = new
WebMarkupContainer("terminalsContainer");
terminalsContainer.setOutputMarkupId(true);
terminalsContainer.add(new ListView("terminalDetails", new ArrayList())
{
@Override
protected void populateItem(ListItem item) {
}
});
add(terminalsContainer);
....
AjaxLink link = new AjaxLink("terminalIdLink") {
@Override
public void onClick(AjaxRequestTarget target) {
ArrayList tabs = new ArrayList();
// details tab
tabs.add(new AbstractTab(new Model("Details")) {
public Panel getPanel(String panelId) {
return new
TerminalMonitorDetailsTabPanel(panelId, terminal.getId());
}
});
terminalsContainer.replace(new
AjaxTabbedPanel("terminalDetails", tabs));
target.addComponent(terminalsContainer);
}
};
add(link);
-----Original Message-----
From: Igor Vaynberg [mailto:igor.vaynberg@gmail.com]
Sent: 10 November 2008 06:11 PM
To: users@wicket.apache.org
Subject: Re: WebMarkupContainer with AjaxTabbedPanel - duplicating panel
data
could you paste your cod einto a pastebin that will show it properly
formatted. i cant read it in your email. also make sure you do not
have any divs inside spans, that is invalid html and causes browsers
to do funny things.
-igor
On Mon, Nov 10, 2008 at 4:12 AM, Yazeed Isaacs
<Ya...@transactionjunction.co.za> wrote:
> Hi
>
>
>
> I have a WebMarkupContainer with a AjaxTabbedPanel. When I click on
the
> tab it duplicates the panel data.
>
>
>
> What am I doing wrong?
>
>
>
> Here is my code:
>
>
>
> final WebMarkupContainer terminalsContainer = new WebMarkupContainer(
>
> "terminalsContainer");
>
>
>
> terminalsContainer.setOutputMarkupId(true);
>
> terminalsContainer
>
> .add(new ListView("terminalDetails", new
> ArrayList()) {
>
> @Override
>
> protected void populateItem(ListItem
item)
> {
>
> }
>
> });
>
>
>
> add(terminalsContainer);
>
>
>
> ......
>
>
>
> AjaxLink link = new AjaxLink("terminalIdLink") {
>
> @Override
>
> public void onClick(AjaxRequestTarget target) {
>
> ArrayList tabs = new ArrayList();
>
>
>
> tabs.add(new AbstractTab(new Model("Details")) {
>
>
>
> public Panel getPanel(String panelId) {
>
> return new TerminalMonitorDetailsTabPanel(
>
> panelId, terminal.getId());
>
> }
>
> });
>
>
>
> terminalsContainer.replace(new AjaxTabbedPanel("terminalDetails",
> tabs));
>
> target.addComponent(terminalsContainer);
>
> }
>
> }
>
>
>
>
>
>
>
> When I click on the "Details" tab then the data returned by the panel
> TerminalMonitorDetailsTabPanel is duplicated below each time.
>
>
>
>
>
>
>
>
>
> Yazeed Isaacs - Java Developer
>
> yazeed@transactionjunction.co.za
>
>
>
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
RE: WebMarkupContainer with AjaxTabbedPanel - duplicating panel data
Posted by Yazeed Isaacs <Ya...@transactionjunction.co.za>.
Hi Igor
Here is my code:
final WebMarkupContainer terminalsContainer = new
WebMarkupContainer("terminalsContainer");
terminalsContainer.setOutputMarkupId(true);
terminalsContainer.add(new ListView("terminalDetails", new ArrayList())
{
@Override
protected void populateItem(ListItem item) {
}
});
add(terminalsContainer);
....
AjaxLink link = new AjaxLink("terminalIdLink") {
@Override
public void onClick(AjaxRequestTarget target) {
ArrayList tabs = new ArrayList();
// details tab
tabs.add(new AbstractTab(new Model("Details")) {
public Panel getPanel(String panelId) {
return new
TerminalMonitorDetailsTabPanel(panelId, terminal.getId());
}
});
terminalsContainer.replace(new
AjaxTabbedPanel("terminalDetails", tabs));
target.addComponent(terminalsContainer);
}
};
add(link);
-----Original Message-----
From: Igor Vaynberg [mailto:igor.vaynberg@gmail.com]
Sent: 10 November 2008 06:11 PM
To: users@wicket.apache.org
Subject: Re: WebMarkupContainer with AjaxTabbedPanel - duplicating panel
data
could you paste your cod einto a pastebin that will show it properly
formatted. i cant read it in your email. also make sure you do not
have any divs inside spans, that is invalid html and causes browsers
to do funny things.
-igor
On Mon, Nov 10, 2008 at 4:12 AM, Yazeed Isaacs
<Ya...@transactionjunction.co.za> wrote:
> Hi
>
>
>
> I have a WebMarkupContainer with a AjaxTabbedPanel. When I click on
the
> tab it duplicates the panel data.
>
>
>
> What am I doing wrong?
>
>
>
> Here is my code:
>
>
>
> final WebMarkupContainer terminalsContainer = new WebMarkupContainer(
>
> "terminalsContainer");
>
>
>
> terminalsContainer.setOutputMarkupId(true);
>
> terminalsContainer
>
> .add(new ListView("terminalDetails", new
> ArrayList()) {
>
> @Override
>
> protected void populateItem(ListItem
item)
> {
>
> }
>
> });
>
>
>
> add(terminalsContainer);
>
>
>
> ......
>
>
>
> AjaxLink link = new AjaxLink("terminalIdLink") {
>
> @Override
>
> public void onClick(AjaxRequestTarget target) {
>
> ArrayList tabs = new ArrayList();
>
>
>
> tabs.add(new AbstractTab(new Model("Details")) {
>
>
>
> public Panel getPanel(String panelId) {
>
> return new TerminalMonitorDetailsTabPanel(
>
> panelId, terminal.getId());
>
> }
>
> });
>
>
>
> terminalsContainer.replace(new AjaxTabbedPanel("terminalDetails",
> tabs));
>
> target.addComponent(terminalsContainer);
>
> }
>
> }
>
>
>
>
>
>
>
> When I click on the "Details" tab then the data returned by the panel
> TerminalMonitorDetailsTabPanel is duplicated below each time.
>
>
>
>
>
>
>
>
>
> Yazeed Isaacs - Java Developer
>
> yazeed@transactionjunction.co.za
>
>
>
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: WebMarkupContainer with AjaxTabbedPanel - duplicating panel data
Posted by Igor Vaynberg <ig...@gmail.com>.
could you paste your cod einto a pastebin that will show it properly
formatted. i cant read it in your email. also make sure you do not
have any divs inside spans, that is invalid html and causes browsers
to do funny things.
-igor
On Mon, Nov 10, 2008 at 4:12 AM, Yazeed Isaacs
<Ya...@transactionjunction.co.za> wrote:
> Hi
>
>
>
> I have a WebMarkupContainer with a AjaxTabbedPanel. When I click on the
> tab it duplicates the panel data.
>
>
>
> What am I doing wrong?
>
>
>
> Here is my code:
>
>
>
> final WebMarkupContainer terminalsContainer = new WebMarkupContainer(
>
> "terminalsContainer");
>
>
>
> terminalsContainer.setOutputMarkupId(true);
>
> terminalsContainer
>
> .add(new ListView("terminalDetails", new
> ArrayList()) {
>
> @Override
>
> protected void populateItem(ListItem item)
> {
>
> }
>
> });
>
>
>
> add(terminalsContainer);
>
>
>
> ......
>
>
>
> AjaxLink link = new AjaxLink("terminalIdLink") {
>
> @Override
>
> public void onClick(AjaxRequestTarget target) {
>
> ArrayList tabs = new ArrayList();
>
>
>
> tabs.add(new AbstractTab(new Model("Details")) {
>
>
>
> public Panel getPanel(String panelId) {
>
> return new TerminalMonitorDetailsTabPanel(
>
> panelId, terminal.getId());
>
> }
>
> });
>
>
>
> terminalsContainer.replace(new AjaxTabbedPanel("terminalDetails",
> tabs));
>
> target.addComponent(terminalsContainer);
>
> }
>
> }
>
>
>
>
>
>
>
> When I click on the "Details" tab then the data returned by the panel
> TerminalMonitorDetailsTabPanel is duplicated below each time.
>
>
>
>
>
>
>
>
>
> Yazeed Isaacs - Java Developer
>
> yazeed@transactionjunction.co.za
>
>
>
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org