|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectwicket.Resource
wicket.markup.html.WebResource
public abstract class WebResource
Base class for web resources. See the base class Resource for
details on resources in general, including how they can be shared in an
application.
| Field Summary |
|---|
| Fields inherited from interface wicket.IResourceListener |
|---|
INTERFACE |
| Constructor Summary | |
|---|---|
WebResource()
Construct. |
|
| Method Summary | |
|---|---|
protected void |
configureResponse(Response response)
Allows implementations to do configure the response, like setting headers etc. |
protected void |
setHeaders(WebResponse response)
Subclasses can override this to set there headers when the resource is being served. |
| Methods inherited from class wicket.Resource |
|---|
getParameters, getResourceStream, invalidate, isCacheable, onResourceRequested, setCacheable, setParameters |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WebResource()
| Method Detail |
|---|
protected final void configureResponse(Response response)
Resource
configureResponse in class Resourceresponse - the responeResource.configureResponse(wicket.Response)protected void setHeaders(WebResponse response)
response.setDateHeader("Expires", System.currentTimeMillis() + (3600 * 1000));
response.setHeader("Cache-Control", "max-age=" + 3600);
So if a resource wants to control this or doesn't want to set this info it should
override this method and don't call super.
response - The WebResponse where set(Date)Header can be called on.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||