Hi,

        The markup associated with RoundCornerBorder is:

<html xmlns:wicket>
  <body>
    <wicket:border>
      <div id="wicket-top">
        <div id="wicket-right">
          <div id="wicket-bottom">
            <div id="wicket-left">
              <div id="wicket-topLeft">
                <div id="wicket-topRight">
                  <div id="wicket-bottomRight">
                    <div id="wicket-bottomLeft">
                      <div id="wicket-contents">
                        <table id="wicket-width" border="0"
width="100%">
                          <tr>
                            <td>
                              <wicket:body/>
                            </td>
                          </tr>
                        </table>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </wicket:border>
  </body>
</html>

        so in my code I wrote:

    add(top);
    top.add(right);
    right.add(bottom);
    bottom.add(left);
    left.add(topLeft);
    topLeft.add(topRight);
    topRight.add(bottomRight);
    bottomRight.add(bottomLeft);
    bottomLeft.add(contents);
    contents.add(width);

        where each one of this is a component. I am wondering, does
this go against the Wicket "best practices" of having each object add
its nested children to itself? I mean, is it wrong for the border
component to do this all in one shot?

        Another similar question: I am injecting a RoundCornerBorder
into HelloWorld.html. The HTML code looks like this:

<html>
<head>
    <title>Wicket Examples - helloworld</title>
    <link rel="stylesheet" type="text/css" href="style.css"/>
</head>
<body>
    <span id="wicket-mainNavigation"/>
    <div id="wicket-box">
      <span id="wicket-message">Message goes here</span>
    </div>
</body>
</html>

        Now, in HelloWorld.java I used:

    RoundCornerBorder border = new RoundCornerBorder("box");
    add(border);
    border.add(new Label("message", "Hello World!"));

        Now, this case is slightly different. In this case, is it
"wrong" for HelloWorld.java to make the border add the Label into
itself? Should I be subclassing RoundCornerBorder and adding the label
inside that subclass? It seems like a lot more work to me, which is why
I'm wondering . . .

Gili



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to