You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by technimadhu <te...@gmail.com> on 2012/08/08 21:44:33 UTC
Tabbed Panel error
Hello all,
Newbie here. I have wicket 1.5.7 and trying to use tabbed panel. Looked at
the example page and put the code pretty much same. but Iam getting this
RuntimeException
Last cause: Can not determine Markup. Component is not yet connected to a
parent. [Page class = com.elster.elemconfig.add.ElemConfigAdd, id = 0,
render count = 1]
Pasting my code below, Appreciate any pointers
my html page:
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css"/>
<meta charset="ISO-8859-1">
<title>Add Element Config</title>
</head>
<body>
<form wicket:id="form">
<wicket:extend xmlns:wicket="http://wicket.apache.org">
<p>
[tabbed panel will be here]
</p>
</wicket:extend>
</form>
</body>
</html>
I also have 3 html files with names like TabbedPanelPage$TabPanel1.html,
TabbedPanelPage$TabPanel2.html, TabbedPanelPage$TabPanel3.html and contents
identical to below except the number changes in 'This is tab-panel 1' to 2
and 3
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:wicket="http://wicket.apache.org">
<wicket:panel>
<br/>
This is tab-panel 1
</wicket:panel>
</html>
My Java code below:
public class ElemConfigAdd extends WebPage {
public ElemConfigAdd() {
Form form = new Form("form");
//<snipped other components like button code
// create a list of ITab objects used to feed the tabbed panel
List<ITab> tabs = new ArrayList<ITab>();
tabs.add(new AbstractTab(new Model<String>("first tab"))
{
@Override
public Panel getPanel(String panelId)
{
return new TabPanel1(panelId);
}
});
tabs.add(new AbstractTab(new Model<String>("second tab"))
{
@Override
public Panel getPanel(String panelId)
{
return new TabPanel2(panelId);
}
});
tabs.add(new AbstractTab(new Model<String>("third tab"))
{
@Override
public Panel getPanel(String panelId)
{
return new TabPanel3(panelId);
}
});
form.add(new AjaxTabbedPanel("tabs", tabs));
add(form);
}
//// PRIVATE tab panel classes
private static class TabPanel1 extends Panel
{
public TabPanel1(String id)
{
super(id);
}
};
private static class TabPanel2 extends Panel
{
public TabPanel2(String id)
{
super(id);
}
};
private static class TabPanel3 extends Panel
{
public TabPanel3(String id)
{
super(id);
}
};
}
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Tabbed-Panel-error-tp4651059.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Tabbed Panel error
Posted by technimadhu <te...@gmail.com>.
In my html page, the span tag got removed. so pasting it with pre tag.
[tabbed panel will be here]
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Tabbed-Panel-error-tp4651059p4651061.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Tabbed Panel error
Posted by technimadhu <te...@gmail.com>.
Thx Sven. That was it. I blindly copied the example, without paying attention
to the 'BasePage' being used in the wicket example page, but I don't use the
BasePage. So, I removed the wicket:extend tag in my html and its working
fine
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Tabbed-Panel-error-tp4651059p4651098.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Tabbed Panel error
Posted by Sven Meier <sv...@meiers.net>.
Please check your usage of <wicket:extend>, you seem to use it although
your super component doesn't provide markup.
Sven
On 08/09/2012 04:25 PM, technimadhu wrote:
> Thx. After renaming the html files to ElemConfigAdd$TabPanel1.html ,
> ElemConfigAdd$TabPanel2.html and ElemConfigAdd$TabPanel3.html, I still get
> error
>
> eclipse Console output:
> ERROR - MarkupFactory - Markup not found: Base markup of
> inherited markup not found. Component class:
> com.elster.elemconfig.add.ElemConfigAdd. Enable debug messages for
> org.apache.wicket.util.resource.locator.ResourceStreamLocator to get a list
> of all filenames tried.
> org.apache.wicket.markup.MarkupNotFoundException: Base markup of inherited
> markup not found. Component class: com.elster.elemconfig.add.ElemConfigAdd.
> Enable debug messages for
> org.apache.wicket.util.resource.locator.ResourceStreamLocator to get a list
> of all filenames tried.
> at
> org.apache.wicket.markup.loader.InheritedMarkupMarkupLoader.loadMarkup(InheritedMarkupMarkupLoader.java:69)
>
> my webpage: (http://localhost:8080/). On browser I see this error:
> Last cause: Can not determine Markup. Component is not yet connected to a
> parent. [Page class = com.elster.elemconfig.add.ElemConfigAdd, id = 0,
> render count = 1]
>
> In java side, I add form.add(new AjaxTabbedPanel("tabs", tabs)); and in
> html side, i use the same id 'tabs'
> How do i enable debug logs? I see only info, error logs now.
>
>
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Tabbed-Panel-error-tp4651059p4651091.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> 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: Tabbed Panel error
Posted by technimadhu <te...@gmail.com>.
Thx. After renaming the html files to ElemConfigAdd$TabPanel1.html ,
ElemConfigAdd$TabPanel2.html and ElemConfigAdd$TabPanel3.html, I still get
error
eclipse Console output:
ERROR - MarkupFactory - Markup not found: Base markup of
inherited markup not found. Component class:
com.elster.elemconfig.add.ElemConfigAdd. Enable debug messages for
org.apache.wicket.util.resource.locator.ResourceStreamLocator to get a list
of all filenames tried.
org.apache.wicket.markup.MarkupNotFoundException: Base markup of inherited
markup not found. Component class: com.elster.elemconfig.add.ElemConfigAdd.
Enable debug messages for
org.apache.wicket.util.resource.locator.ResourceStreamLocator to get a list
of all filenames tried.
at
org.apache.wicket.markup.loader.InheritedMarkupMarkupLoader.loadMarkup(InheritedMarkupMarkupLoader.java:69)
my webpage: (http://localhost:8080/). On browser I see this error:
Last cause: Can not determine Markup. Component is not yet connected to a
parent. [Page class = com.elster.elemconfig.add.ElemConfigAdd, id = 0,
render count = 1]
In java side, I add form.add(new AjaxTabbedPanel("tabs", tabs)); and in
html side, i use the same id 'tabs'
How do i enable debug logs? I see only info, error logs now.
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Tabbed-Panel-error-tp4651059p4651091.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Tabbed Panel error
Posted by Sebastien <se...@gmail.com>.
Hi,
As far I see, if your class is ElemConfigAdd and you have 3 inner classes
TabPanel1, TabPanel2, TabPanel3, you have to name your markup as
ElemConfigAdd$TabPanel1.html, ElemConfigAdd$TabPanel2.html,
ElemConfigAdd$TabPanel3.html
Regards,
Sebastien.
On Wed, Aug 8, 2012 at 9:44 PM, technimadhu <te...@gmail.com> wrote:
> Hello all,
> Newbie here. I have wicket 1.5.7 and trying to use tabbed panel. Looked at
> the example page and put the code pretty much same. but Iam getting this
> RuntimeException
>
> Last cause: Can not determine Markup. Component is not yet connected to a
> parent. [Page class = com.elster.elemconfig.add.ElemConfigAdd, id = 0,
> render count = 1]
>
> Pasting my code below, Appreciate any pointers
> my html page:
> <!DOCTYPE html>
> <html>
> <head>
> <link rel="stylesheet" type="text/css" href="style.css"/>
> <meta charset="ISO-8859-1">
> <title>Add Element Config</title>
> </head>
> <body>
> <form wicket:id="form">
>
> <wicket:extend xmlns:wicket="http://wicket.apache.org">
> <p>
> [tabbed panel will be here]
> </p>
> </wicket:extend>
> </form>
> </body>
> </html>
>
> I also have 3 html files with names like TabbedPanelPage$TabPanel1.html,
> TabbedPanelPage$TabPanel2.html, TabbedPanelPage$TabPanel3.html and contents
> identical to below except the number changes in 'This is tab-panel 1' to 2
> and 3
>
> <?xml version="1.0" encoding="UTF-8"?>
> <html xmlns="http://www.w3.org/1999/xhtml"
> xmlns:wicket="http://wicket.apache.org">
> <wicket:panel>
> <br/>
> This is tab-panel 1
> </wicket:panel>
> </html>
> My Java code below:
>
> public class ElemConfigAdd extends WebPage {
> public ElemConfigAdd() {
> Form form = new Form("form");
> //<snipped other components like button code
>
> // create a list of ITab objects used to feed the tabbed panel
> List<ITab> tabs = new ArrayList<ITab>();
> tabs.add(new AbstractTab(new Model<String>("first tab"))
> {
> @Override
> public Panel getPanel(String panelId)
> {
> return new TabPanel1(panelId);
> }
> });
>
> tabs.add(new AbstractTab(new Model<String>("second tab"))
> {
> @Override
> public Panel getPanel(String panelId)
> {
> return new TabPanel2(panelId);
> }
> });
>
> tabs.add(new AbstractTab(new Model<String>("third tab"))
> {
> @Override
> public Panel getPanel(String panelId)
> {
> return new TabPanel3(panelId);
> }
> });
> form.add(new AjaxTabbedPanel("tabs", tabs));
>
> add(form);
> }
> //// PRIVATE tab panel classes
> private static class TabPanel1 extends Panel
> {
> public TabPanel1(String id)
> {
> super(id);
> }
> };
>
> private static class TabPanel2 extends Panel
> {
> public TabPanel2(String id)
> {
> super(id);
> }
> };
>
> private static class TabPanel3 extends Panel
> {
> public TabPanel3(String id)
> {
> super(id);
> }
> };
> }
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Tabbed-Panel-error-tp4651059.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>