It is passed in the constructor. Look at this:

        public WicketExampleHeader(String id, String exampleTitle, WebPage page)
        {
                super(id);
                add(new InspectorBug("inspector", page));
                add(new Label("exampleTitle", exampleTitle));

You can see exampleTitle is the second constructor argument. This
constructor is used in one place only: WicketExamplePage:

        public WicketExamplePage(IModel model)
        {
                super(model);
                final String packageName = getClass().getPackage().getName();
                add(new WicketExampleHeader("mainNavigation",
Strings.afterLast(packageName, '.'), this));
                explain();
        }

As you can see, it passes in the last name of the package. Now to
conclude, all the examples extend from WicketExamplePage:

package wicket.examples.linkomatic;

import wicket.examples.WicketExamplePage;
import wicket.markup.html.basic.Label;

public final class BookDetails extends WicketExamplePage
{

So in this case, you'll see that the BookDetailsPage in the linkomatic
example displays 'linkomatic' as the title, as that is the last
element of the package.

Eelco



On 5/9/06, Geertjan Wielenga <[EMAIL PROTECTED]> wrote:
Hi all,

In the Wicket examples, there's this Label component:

add(new Label("exampleTitle", exampleTitle));

And this is rendered like this:

<span wicket:id="exampleTitle">Example Title Goes Here</span>

However, I don't understand where the value comes from. In other words,
where is "exampleTitle" defined???

Gj


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-develop mailing list
Wicket-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-develop



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
_______________________________________________
Wicket-develop mailing list
Wicket-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to