panels dont wrap, they replace. if you want to wrap something use a Border

-igor

On Mon, Apr 21, 2008 at 5:22 PM, neo anderson
<[EMAIL PROTECTED]> wrote:
>
>  Does it mean that one can insert a panel  between two tags? But if I have
>  already defined a panel (e.g., accordion menu) Then wrapping the orginal
>  panel (accordion menu) directly by a  new one (menu) is disallowed? Because
>  I found out if I have a panel (Menu) at the top level, which contains the
>  Accordion Menu (also extends panel), then the Markup Exception thrown.
>  However, if changing the Menu to extends WebMarkupContainer, then the web
>  page (after loaded to the web caontainer) would go blank.
>
>  The purpose of wrapping accordion menu by another panel is because I want to
>  divide the web page into several sections, including content, menu, banner,
>  etc. What is the better way to achieve it?
>
>  Thank you very much.
>
>  Thanks your reply.
>
>
>
>  igor.vaynberg wrote:
>  >
>  > a panel can contain any other panel, but it has to be attached to
>  > empty tags since the whole point of the panel is to inject what goes
>  > between the tags.
>  >
>  > -igor
>  >
>  >
>  > On Sun, Apr 20, 2008 at 4:09 PM, neo anderson
>  > <[EMAIL PROTECTED]> wrote:
>  >>
>  >>  Does this mean the Panel class itsself can not contain another Panel
>  >>  component inside its own class?
>  >>  For instance,
>  >>
>  >>  A.html
>  >>  <wicket:panel>
>  >>     <div wicket:id="accordionMenu"/>
>  >>  </wicket:panel>
>  >>
>  >>  A.class
>  >>
>  >>  public class A extends Panel{
>  >>     public A(String id){
>  >>         super(id);
>  >>         ...
>  >>         AccordionPanel panel = new AccordionMenu("accordionMenu"); //
>  >>  extends another panel
>  >>         ...
>  >>     }
>  >>  }
>  >>
>  >>  I encounter the same problem. Then I solve it by extending
>  >>  WebMarkupContainer instead of Panel directly (i.e., class A exnteds
>  >>  WebMarkupCintainer); as below:
>  >>
>  >>  A.html
>  >>  <wicket:webMarkupContainer>
>  >>     <div wicket:id="accordionMenu"/>
>  >>  </wicket:webMarkupContainer>
>  >>
>  >>  public class A extends WebMarkupContainer{
>  >>     public A(String id){
>  >>         super(id);
>  >>         ...
>  >>         AccordionPanel panel = new AccordionMenu("accordionMenu"); //
>  >>  extends another panel
>  >>         ...
>  >>     }
>  >>  }
>  >>
>  >>
>  >>
>  >>
>  >>  However, I do not understand the reason why it has to do so. Hope
>  >> someone
>  >>  can give me more detail explanation or point me where there has such
>  >> explain
>  >>  because the java doc Panel
>  >>
>  >> 
> (http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/org/apache/wicket/markup/html/panel/Panel.html)
>  >>  seemingly does not explain this.
>  >>
>  >>  Thanks for help.
>  >>
>  >>
>  >>
>  >>
>  >>  Timo Rantalaiho wrote:
>  >>  >
>  >>  > On Tue, 25 Mar 2008, Ryan O'Hara wrote:
>  >>  >> WicketMessage: Markup of type 'html' for component
>  >>  >> 'org.apache.wicket.markup.html.panel.Panel' not found. Enable debug
>  >>  >> messages for org.apache.wicket.util.resource to get a list of all
>  >>  >> filenames tried:
>  >>  >> [MarkupContainer [Component id = hoverMenu, page =
>  >>  >> edu.chop.bic.cnv.ui.Login, path =
>  >>  >> 0:loginTabbedHeader:hoverMenu.Panel, isVisible = true, isVersioned =
>  >>  >> true]]
>  >>  > ...
>  >>  >> public TabbedHeader(String panelId){
>  >>  >>         super(panelId);
>  >>  >>         add(new Panel("hoverMenu"));
>  >>  >>         Link link = new Link("loginLink") {
>  >>  >>             public void onClick(){
>  >>  >>                 setResponsePage(Login.class);
>  >>  >>             }
>  >>  >>         };
>  >>  >>         add(link);
>  >>  >>         link.add(new Label("login", "Login"));
>  >>  >> }
>  >>  >
>  >>  > Put add(new WebMarkupContainer("hoverMenu")); instead of
>  >>  > Panel.
>  >>  >
>  >>  > ...or better yet remove the whole hoverMenu component if it
>  >>  > contains nothing? Or are you going to replace it with
>  >>  > something with content?
>  >>  >
>  >>  > Best wishes,
>  >>  > Timo
>  >>  >
>  >>  > --
>  >>  > Timo Rantalaiho
>  >>  > Reaktor Innovations Oy    <URL: http://www.ri.fi/ >
>  >>  >
>  >>  > ---------------------------------------------------------------------
>  >>  > To unsubscribe, e-mail: [EMAIL PROTECTED]
>  >>  > For additional commands, e-mail: [EMAIL PROTECTED]
>  >>  >
>  >>  >
>  >>  >
>  >>
>  >>  --
>  >>  View this message in context:
>  >> http://www.nabble.com/Panel-problem-tp16289023p16800071.html
>  >>  Sent from the Wicket - User mailing list archive at Nabble.com.
>  >>
>  >>
>  >>
>  >>
>  >>  ---------------------------------------------------------------------
>  >>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  >>  For additional commands, e-mail: [EMAIL PROTECTED]
>  >>
>  >>
>  >
>  > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: [EMAIL PROTECTED]
>  > For additional commands, e-mail: [EMAIL PROTECTED]
>  >
>  >
>  >
>
>  --
>  View this message in context: 
> http://www.nabble.com/Panel-problem-tp16289023p16819061.html
>
>
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to