Re: Tabbed Page

2009-02-13 Thread Igor Vaynberg
inside your first level tab that will contain other tabbed panel you
need  for the inner panel to attach
to.

-igor

On Fri, Feb 13, 2009 at 4:18 AM, Daniel Ferreira Castro
 wrote:
> I am trying to figure out what tag is beeing expected...
>
> This is my base page markup
>
>  http://www.w3.org/TR/html4/loose.dtd";>
> 
> 
> 
> 
> 
> 
>[tabbed panel will be here]
>
>
> 
> 
>
> This is my basepage implementation
>
> public class BasePage extends WebPage {
>private final Listtabs = new ArrayList();
>
>public BasePage() {
>inicializaComponentes();
>add(new AjaxTabbedPanel("tabs", tabs));
>}
>
>@SuppressWarnings("unchecked")
>private void inicializaComponentes(){
>tabs.add(new CadastroTab(new Model ("Cadastro")));
>}
> }
>
> This is the implementation of CadastroTab
> public class CadastroTab extends AbstractTab {
>private static final long serialVersionUID = 4682446014181156021L;
>
>public CadastroTab(IModel id) {
>super(id);
>// TODO Auto-generated constructor stub
>}
>
>@Override
>public Panel getPanel(String arg0) {
>// TODO Auto-generated method stub
>Panel painel = new CadastroPanel(arg0);
>return painel;
>}
> }
>
> This is the markup of CadastroPainel
>
>  http://www.w3.org/TR/html4/loose.dtd";>
> 
> 
> 
> 
>[tabbed panel will be here]
> 
> 
>
> This is the Implementation of CadastroPanel
>
> public class CadastroPanel extends Panel {
>private static final long serialVersionUID = 4682446014181156004L;
>private final List tabs = new ArrayList();
>
>public CadastroPanel(String id) {
>super(id);
>inicializaTabs();
>add(new AjaxTabbedPanel("Cadastro", tabs));
>
>// TODO Auto-generated constructor stub
>}
>
>private void inicializaTabs() {
>tabs.add(new AbstractTab(new Model("Categoria")) {
>public Panel getPanel(String panelId) {
>return new CadastroCategoriaPanel(panelId);
>}
>});
>}
> }
>
> And the last part if the Markup of CadastroCategoriaPanel and its markup
>
> public class CadastroCategoriaPanel extends Panel {
>private static final long serialVersionUID = 4682446014181156010L;
>
>public CadastroCategoriaPanel(String id) {
>super(id);
>// TODO Auto-generated constructor stub
>}
> }
>
> 
> http://www.w3.org/1999/xhtml"; >
> 
> 
> This is tab-panel 3
> 
> 
>
>
> The error that I get is this
>
> WicketMessage: Tag expected
> [markup =
> file:/E:/Daniel/Projetos/ecommFwkBackOffice/target/classes/com/jasp/ecommfwk/pages/common/layout/panels/CadastroPanel.html
>  http://www.w3.org/TR/html4/loose.dtd";>
> 
> 
> 
> 
> [tabbed panel will be here]
> 
> , index = 5, current = [Raw markup]]
>
> Root cause:
>
> org.apache.wicket.markup.MarkupException: Tag expected
> [markup =
> file:/E:/Daniel/Projetos/ecommFwkBackOffice/target/classes/com/jasp/ecommfwk/pages/common/layout/panels/CadastroPanel.html
>  http://www.w3.org/TR/html4/loose.dtd";>
> 
> 
> 
> 
> [tabbed panel will be here]
> 
> , index = 5, current = [Raw markup]]
> at
> org.apache.wicket.markup.MarkupStream.throwMarkupException(MarkupStream.java:465)
> at org.apache.wicket.markup.MarkupStream.getTag(MarkupStream.java:269)
> at
> org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:639)
> at
> org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:114)
> at org.apache.wicket.Component.renderComponent(Component.java:2596)
> at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1521)
> at org.apache.wicket.Component.render(Component.java:2421)
> at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1399)
> at
> org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1586)
> at
> org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:668)
> at
> org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:114)
> at org.apache.wicket.Component.renderComponent(Component.java:2596)
> at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1521)
> at org.apache.wicket.Component.render(Component.java:2421)
> at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1399)
> at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1537)
> at org.apache.wicket.Page.onRender(Page.java:1522)
> at org.apache.wicket.Component.render(Component.java:2421)
> at org.apache.wicket.Page.renderPage(Page.java:926)
> at
> org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:262)
> at
> org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
> at
> org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1200)
> at org.apache.wicket.RequestCycle.step(RequestCycle.java:1271)
> at org.apache.wicket.RequestCycle.steps(RequestCycle.java:13

Re: Tabbed Page

2009-02-13 Thread Daniel Ferreira Castro
I am trying to figure out what tag is beeing expected...

This is my base page markup

http://www.w3.org/TR/html4/loose.dtd";>






[tabbed panel will be here]





This is my basepage implementation

public class BasePage extends WebPage {
private final Listtabs = new ArrayList();

public BasePage() {
inicializaComponentes();
add(new AjaxTabbedPanel("tabs", tabs));
}

@SuppressWarnings("unchecked")
private void inicializaComponentes(){
tabs.add(new CadastroTab(new Model ("Cadastro")));
}
}

This is the implementation of CadastroTab
public class CadastroTab extends AbstractTab {
private static final long serialVersionUID = 4682446014181156021L;

public CadastroTab(IModel id) {
super(id);
// TODO Auto-generated constructor stub
}

@Override
public Panel getPanel(String arg0) {
// TODO Auto-generated method stub
Panel painel = new CadastroPanel(arg0);
return painel;
}
}

This is the markup of CadastroPainel

http://www.w3.org/TR/html4/loose.dtd";>




[tabbed panel will be here]



This is the Implementation of CadastroPanel

public class CadastroPanel extends Panel {
private static final long serialVersionUID = 4682446014181156004L;
private final List tabs = new ArrayList();

public CadastroPanel(String id) {
super(id);
inicializaTabs();
add(new AjaxTabbedPanel("Cadastro", tabs));

// TODO Auto-generated constructor stub
}

private void inicializaTabs() {
tabs.add(new AbstractTab(new Model("Categoria")) {
public Panel getPanel(String panelId) {
return new CadastroCategoriaPanel(panelId);
}
});
}
}

And the last part if the Markup of CadastroCategoriaPanel and its markup

public class CadastroCategoriaPanel extends Panel {
private static final long serialVersionUID = 4682446014181156010L;

public CadastroCategoriaPanel(String id) {
super(id);
// TODO Auto-generated constructor stub
}
}


http://www.w3.org/1999/xhtml"; >


This is tab-panel 3




The error that I get is this

WicketMessage: Tag expected
[markup =
file:/E:/Daniel/Projetos/ecommFwkBackOffice/target/classes/com/jasp/ecommfwk/pages/common/layout/panels/CadastroPanel.html
http://www.w3.org/TR/html4/loose.dtd";>




[tabbed panel will be here]

, index = 5, current = [Raw markup]]

Root cause:

org.apache.wicket.markup.MarkupException: Tag expected
[markup =
file:/E:/Daniel/Projetos/ecommFwkBackOffice/target/classes/com/jasp/ecommfwk/pages/common/layout/panels/CadastroPanel.html
http://www.w3.org/TR/html4/loose.dtd";>




[tabbed panel will be here]

, index = 5, current = [Raw markup]]
at
org.apache.wicket.markup.MarkupStream.throwMarkupException(MarkupStream.java:465)
at org.apache.wicket.markup.MarkupStream.getTag(MarkupStream.java:269)
at
org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:639)
at
org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:114)
at org.apache.wicket.Component.renderComponent(Component.java:2596)
at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1521)
at org.apache.wicket.Component.render(Component.java:2421)
at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1399)
at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1586)
at
org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:668)
at
org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:114)
at org.apache.wicket.Component.renderComponent(Component.java:2596)
at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1521)
at org.apache.wicket.Component.render(Component.java:2421)
at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1399)
at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1537)
at org.apache.wicket.Page.onRender(Page.java:1522)
at org.apache.wicket.Component.render(Component.java:2421)
at org.apache.wicket.Page.renderPage(Page.java:926)
at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:262)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1200)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1271)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1370)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:501)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:455)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:288)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
at
org.mortbay.jetty.security.SecurityHandler.handl

Re: Tabbed Page

2009-02-13 Thread Daniel Ferreira Castro
The problem is.

My case is that I have a Base Page from where all other page inherit a
common layout.
This base page have an AjaxTab.  This ajax tab component have its tabs.
Each of these tabs have a getPanel method and the returned panel have
another Ajax Tab.

Should I have a markup html for each Panel class?

On Wed, Feb 11, 2009 at 11:43 AM, Thomas Mäder
wrote:

> What's the problem? A TabbedPanel is a Panel, so you can return it from
> ITabl.getPanel().
>
> Thomas
>
> On Wed, Feb 11, 2009 at 12:21 PM, Daniel Ferreira Castro <
> dfcas...@gmail.com
> > wrote:
>
> > Is it possible to have other tabbed pannels inside a tabbed panel?
> >
> > Imagine the example http://wicketstuff.org/wicket13/ajax/tabbed-panel.1
> > If I click on first tab, instead of showing This is tab-panel 1 it would
> > show, or at least I would like to, show another tabbed panel with tabs
> and
> > those would have panels.
> >
> > Is it possible?  how?
> >
>
> --
> Thomas Mäder
> Wicket & Eclipse Consulting
> www.devotek-it.ch
>



-- 
"Two rules to succeed in life:
1 - don´t tell people everything you know."

We shall go on to the end.
We shall fight in France
We shall fightover the seas and oceans.
We shall fight with growing confidence and growing strength in the air.
We shall defend our island whatever the cost may be
We shall fight on beaches, we shall fight on the landing grounds,
We shall fight in the fields and in the streets,
We shall fight on the hills.
We shall never surrender.
Winston Churchill


Re: Tabbed Page

2009-02-11 Thread Thomas Mäder
What's the problem? A TabbedPanel is a Panel, so you can return it from
ITabl.getPanel().

Thomas

On Wed, Feb 11, 2009 at 12:21 PM, Daniel Ferreira Castro  wrote:

> Is it possible to have other tabbed pannels inside a tabbed panel?
>
> Imagine the example http://wicketstuff.org/wicket13/ajax/tabbed-panel.1
> If I click on first tab, instead of showing This is tab-panel 1 it would
> show, or at least I would like to, show another tabbed panel with tabs and
> those would have panels.
>
> Is it possible?  how?
>

-- 
Thomas Mäder
Wicket & Eclipse Consulting
www.devotek-it.ch


Tabbed Page

2009-02-11 Thread Daniel Ferreira Castro
Is it possible to have other tabbed pannels inside a tabbed panel?

Imagine the example http://wicketstuff.org/wicket13/ajax/tabbed-panel.1
If I click on first tab, instead of showing This is tab-panel 1 it would
show, or at least I would like to, show another tabbed panel with tabs and
those would have panels.

Is it possible?  how?

On Wed, Feb 11, 2009 at 6:37 AM, uwe janner  wrote:

> thx igor!
>
> but i still cant see how i can define the subPanels.
>
> in facelets, in the parent i would have written:
>name="specialInfo"/>  
>
> then there would be 5 different childs, each one defining the 3
> html-snippets:
> 
> .
>
> that means, the parent knows, somebody of his children has defined a
> snippet
> for "detailInfo", and this will be inserted at the 
> and so the three snippets can stay within the same file, e.g. in a
> "SimpleCustomerDetails.xhtml"
>
> and in wicket?
>
> i see how i would construct 3 different panels ( newpanel1,2 and 3 in your
> example) within the child class extending parentpanel - but every panel i
> create in the overwritten methods needs its own html file, doesnt it?
> that means, for one of the 5 types of customers i would have to write 3
> panels, one for each of the 3 parts:
> SimpleCustomerDetailInfoPanel.html, SimpleCustomerSpecialInfoPanel.html,
> SimpleCustomerAdditionalInfoPanel.html,
> then 3 for VipCustomerDetailInfoPanel.html, and so on, ending up with
> 15
> different html files.
>
> i still dont see the way how i can put e.g.
> SimpleCustomerDetailInfoPanel.html, SimpleCustomerSpecialInfoPanel.html and
> SimpleCustomerAdditionalInfoPanel.html into one html file (as i can do it
> with facelets above), thereby reducing the nr of html files to 5. the 3
> parts belong together.
>
> thx4anyhint, uwe!
>
>
>
> On Wed, Feb 11, 2009 at 2:34 AM, Igor Vaynberg  >wrote:
>
> > class abstract parentpanel extends panel {
> >  private panel panel1, panel2, panel3;
> >
> >  protected abstract panel newpanel1(string id, imodel model);
> >  protected abstract panel newpanel2(string id, imodel model);
> >  protected abstract panel newpanel3(string id, imodel model);
> >
> >  protected void onbeforerender() {
> >if (panel1==null) {
> >  add(panel1=newpanel1("p1", getdefaultmodel());
> >  add(panel2=newpanel1("p2", getdefaultmodel());
> >  add(panel3=newpanel1("p3", getdefaultmodel());
> >   }
> >  super.onbeforerender();
> >   }
> > }
> >
> > -igor
> >
> > On Tue, Feb 10, 2009 at 4:46 PM, uwe janner 
> > wrote:
> > > dear wicketeers,
> > >
> > > i'm facing a problem with page composition where i cant find an elegant
> > > solution; i hope i can explain it comprehensible:
> > >
> > > i have a panel named CustomerInfo.
> > >
> > > there are 5 types of customers in the application.
> > >
> > > most of the CustomerInfo.html is the same for all types of customers -
> > > except three div's:
> > > DetailInfo, SpecialInfo and AdditionalInfo
> > >
> > > these two div's contain different html and different components for
> each
> > > type of customer;
> > >
> > > one way would be to create 15 different panels
> (DetailInfoCustomerType1,
> > > DetailInfoCustomerType2, DetailInfoCustomerType3, ,
> > > SpecialInfoCustomerType1, .)
> > > then, in CustomerInfo-panel i would include the right 3 panels
> depending
> > on
> > > the customer type, e.g. (DetailInfoCustomerType1,
> > SpecialInfoCustomerType1,
> > > AdditionalInfoCustomerType1);
> > >
> > > ok, its no good idea to have 15 separate panels, i want to group the 3
> > > html-snippets together (Detail, Special, Additional)
> > >
> > > how can i achieve this? as i understood, neither panels, nor fragments
> > nor
> > > borders can be used for this.
> > > how could a parent container ( "CustomerInfo" ) fill 3 different areas
> > (the
> > > 3 div's) with 3 different fragments of a child (e.g.
> > > DetailInfoCustomerType2, SpecialInfoCustomerType2,
> > > AdditionalInfoCustomerType2)?
> > >
> > > if the 3 different areas were contiguous/adjacent i could use simple
> page
> > > inheritance, bc then the parent container pulls out the whole child's
> > > content with  .
> > >
> > > in my case i needed sth like 
> > . > > html/>... . > > html/>... .
> > > where with  the parent would only include the
> > part
> > > of the child with wicket:id "xxx"
> > >
> > > thxinadvance,uwe!
> > >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>



-- 
"Two rules to succeed in life:
1 - don´t tell people everything you know."

We shall go on to the end.
We shall fight in France
We shall fightover the seas and oceans.
We shall fight with growing confidence and growing strength in the air.
We shall defend our island whatever the cost may be
We shall fight on beaches, we shall fight on the landing grounds,
We shal