You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Wayne Pope <wa...@googlemail.com> on 2010/10/11 18:25:13 UTC

Confused about Resource basics

Hi,

I just realised that our session is getting loaded multiple times per
web request. I see that aside from the page request the session is
getting loaded for items such as css, js, etc that are referenced in
the code.
Now I'm trying to make sure I understand resources correctly in terms
of session synchronization. I can;t find much documentation on that
aside from the mention in SharedResources javadoc.

Can someone correct me on this. But aside from SharedResrouces are all
other types of resources sync'd with the session (ie its loaded)?
Including StyleSheetReference, all ResourceReference's, etc?

It seems that all our css and javascript references that are part of
components are going through loading the session.

thanks for any pointers on this as I'm really confused.

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


Re: Confused about Resource basics

Posted by Wayne Pope <wa...@googlemail.com>.
Further to this - if I look at the code in the wicket filter:

resource = webApplication.getSharedResources().get(resourceReferenceKey);

			// If resource found and it is cacheable
			if ((resource != null) && resource.isCacheable())
			{
                                <snip>..
				Session.findOrCreate(request, response);


It seems that shared resources will also load the session etc time.
How can I avoid the session being loaded?



On Mon, Oct 11, 2010 at 6:25 PM, Wayne Pope
<wa...@googlemail.com> wrote:
> Hi,
>
> I just realised that our session is getting loaded multiple times per
> web request. I see that aside from the page request the session is
> getting loaded for items such as css, js, etc that are referenced in
> the code.
> Now I'm trying to make sure I understand resources correctly in terms
> of session synchronization. I can;t find much documentation on that
> aside from the mention in SharedResources javadoc.
>
> Can someone correct me on this. But aside from SharedResrouces are all
> other types of resources sync'd with the session (ie its loaded)?
> Including StyleSheetReference, all ResourceReference's, etc?
>
> It seems that all our css and javascript references that are part of
> components are going through loading the session.
>
> thanks for any pointers on this as I'm really confused.
>

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