You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Arjun Dhar <dh...@yahoo.com> on 2010/08/20 08:36:36 UTC

AutoLinkResolver WARNINGS

Hi,I have my markups in another folder and am mounting static pages via a
generic template (so I don't have to use a new class for every static page).
The Static pages are in a Common template, that uses a common menu to
navigate and uses <wicket:link> to get the correct link from Wicket.

Works great; except I see the following in the log, which concerns me. I'd
like to suppress the cause of the log:

WARN  - AutoLinkResolver           - Did not find corresponding java class:
com.mysite.site.pages.templates.static_page_name


Code:
======
 In my extension of "WebApplication.init()" I have:

mount(new MixedParamUrlCodingStrategy(
				"/static", GenericStaticPage.class, new String[]{"pageId"} ));


I also have getResourceSettings().setResourceStreamLocator with the
following:
(to direct the location to the markup files: standard stuff)

	public ResourceStreamLocator getFileResourceStreamLocator(final
ServletContext sc) {
        final IResourceStreamLocator defaultLocator =
super.getResourceSettings().getResourceStreamLocator();
        return new ResourceStreamLocator(){
        	@Override
            public IResourceStream locate(final Class<?> clazz, final String
path) {  		
        		String derivedPath = "/html" +
path.replaceFirst("com/mysite/site/pages", ""); //TODO: Cleanup!	                
                try {
                    URL url = sc.getResource(derivedPath);
                    if (url != null) {
                    	log.debug("[getFileResourceStreamLocator.locate]
derivedPath = " + derivedPath);
                        return new UrlResourceStream(url);
                    }
                } catch(MalformedURLException e) { }

                log.debug("[getFileResourceStreamLocator.locate] default
path = " + path);
                return defaultLocator.locate(clazz, path); //Use default
locator
            }
        };
    }

-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/AutoLinkResolver-WARNINGS-tp2332181p2332181.html
Sent from the Wicket - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Stateless Login Form possible?

Posted by bh...@actrix.gen.nz.
Hi Johan,

Thanks.

How is it possible that this is true with any ImageButton constructor:

(getImageResource() == null && localizedImageResource.isStateless())


On Fri, 20 Aug 2010 13:25:11 +0200, you wrote:

>an image button can be stateless:
>
>	protected boolean getStatelessHint()
>	{
>		return getImageResource() == null && localizedImageResource.isStateless();
>	}
>
>but that must be true.
>
>On Fri, Aug 20, 2010 at 13:19,  <bh...@actrix.gen.nz> wrote:
>> Hi,
>>
>> I had a stateless login form that did actually not expire
>>
>> ... until I added an image as submit button.
>>
>> Sorry to raise this topic again, but AFAIK this has not been answered
>> yet:
>>
>> ImageButton - always stateful ?
>>
>> http://apache-wicket.1842946.n4.nabble.com/ImageButton-always-stateful-td1875620.html
>>
>> I feel I am forced to use ImageButton because I need it as
>> IFormSubmittingComponent so I can distinguish between two different
>> submit methods.
>>
>> It is really as simple as two image buttons on the form - one as
>> login, the other as "forgot password"
>>
>> Many thanks for any ideas!
>>
>> Bernard
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>For additional commands, e-mail: users-help@wicket.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Stateless Login Form possible?

Posted by Johan Compagner <jc...@gmail.com>.
an image button can be stateless:

	protected boolean getStatelessHint()
	{
		return getImageResource() == null && localizedImageResource.isStateless();
	}

but that must be true.

On Fri, Aug 20, 2010 at 13:19,  <bh...@actrix.gen.nz> wrote:
> Hi,
>
> I had a stateless login form that did actually not expire
>
> ... until I added an image as submit button.
>
> Sorry to raise this topic again, but AFAIK this has not been answered
> yet:
>
> ImageButton - always stateful ?
>
> http://apache-wicket.1842946.n4.nabble.com/ImageButton-always-stateful-td1875620.html
>
> I feel I am forced to use ImageButton because I need it as
> IFormSubmittingComponent so I can distinguish between two different
> submit methods.
>
> It is really as simple as two image buttons on the form - one as
> login, the other as "forgot password"
>
> Many thanks for any ideas!
>
> Bernard
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Stateless Login Form possible?

Posted by bh...@actrix.gen.nz.
Hi,

I had a stateless login form that did actually not expire

... until I added an image as submit button.

Sorry to raise this topic again, but AFAIK this has not been answered
yet:

ImageButton - always stateful ?

http://apache-wicket.1842946.n4.nabble.com/ImageButton-always-stateful-td1875620.html

I feel I am forced to use ImageButton because I need it as
IFormSubmittingComponent so I can distinguish between two different
submit methods.

It is really as simple as two image buttons on the form - one as
login, the other as "forgot password"

Many thanks for any ideas!

Bernard


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: AutoLinkResolver WARNINGS

Posted by Arjun Dhar <dh...@yahoo.com>.
Maybe related; but my real issue was different.

So I was mounting pages on a different path. It seems <wicket:link> uses
that AutoLinkResolver stuff and does not keep up with mount changes. So it
was not able to resolve the links on my Markup due to the changed mount
points & resource locator changes (in WebAppplication)

Am not sure if this is a bug, but if I make changes in my mount's in
WebApplication, I'd expect <wicket:link> to keep up. 

On the positive side I don't need<wicket:link> so my markups are now cleaner
as my Application understands the URL's directly; which also gets rid of the
warnings.
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/AutoLinkResolver-WARNINGS-tp2332181p2334613.html
Sent from the Wicket - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org