you are going off topic. lets keep this thread about how we want the urls to look like.
i will start another thread with your reply.

-Igor


On 12/11/05, Johan Compagner <[EMAIL PROTECTED]> wrote:
This method has to be rewritten:

public final void mountPackage(String path, Package packageToMount)
    {
        if (!path.startsWith("/"))
        {
            path = "/" + path;
        }

        mountPath(path, new PackagePathMountEncoder(path, packageToMount));
    }

to not use the Package object (so that users don't have to do MyClass.class.getPackage())

Because getPackage() doesn't have to return the package it can also return null (and we know that because we already had these problems in wicket!!)

So my fix would be to also give the class object in that method:

public final void mountPackage(String path, Class classForThePackage)
    {
        if (!path.startsWith("/"))
        {
            path = "/" + path;
        }

        mountPath(path, new PackagePathMountEncoder(path, classForThePackage));
    }


and then we can look inside our code if the Package object is there or else extract it as a string from the classname.

johan


Reply via email to