org.opencms.jsp.util
Class CmsJspResourceLoadBean

java.lang.Object
  extended by org.opencms.jsp.util.CmsJspResourceLoadBean

public class CmsJspResourceLoadBean
extends Object

Allows JSP access to the results of a <cms:resourceload ... > operation using the JSTL and EL.

Since:
8.0
See Also:
CmsJspTagResourceLoad, CmsJspResourceAccessBean

Field Summary
protected  CmsObject m_cms
          The OpenCms context of the current user.
protected  List<CmsResource> m_resources
          The list of results of the resource loader.
 
Constructor Summary
CmsJspResourceLoadBean()
          No argument constructor, required for a JavaBean.
CmsJspResourceLoadBean(CmsObject cms, List<CmsResource> resources)
          Creates a new context bean using the OpenCms context of the current user.
 
Method Summary
 CmsObject getCmsObject()
          Returns the OpenCms user context this bean was initialized with.
 List<CmsResource> getResources()
          Returns a list of CmsResource instances.
 void init(CmsObject cms, List<CmsResource> resources)
          Initialize this instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_cms

protected CmsObject m_cms
The OpenCms context of the current user.


m_resources

protected List<CmsResource> m_resources
The list of results of the resource loader.

Constructor Detail

CmsJspResourceLoadBean

public CmsJspResourceLoadBean()
No argument constructor, required for a JavaBean.

You must call init(CmsObject, List) and provide the required values when you use this constructor.

See Also:
init(CmsObject, List)

CmsJspResourceLoadBean

public CmsJspResourceLoadBean(CmsObject cms,
                              List<CmsResource> resources)
Creates a new context bean using the OpenCms context of the current user.

The current request context locale is used.

Parameters:
cms - the OpenCms context of the current user
resources - the resources to access, must contain objects of type CmsResource
Method Detail

getCmsObject

public CmsObject getCmsObject()
Returns the OpenCms user context this bean was initialized with.

Returns:
the OpenCms user context this bean was initialized with

getResources

public List<CmsResource> getResources()
Returns a list of CmsResource instances.

Returns:
a list of CmsResource instances

init

public void init(CmsObject cms,
                 List<CmsResource> resources)
Initialize this instance.

Parameters:
cms - the OpenCms context of the current user
resources - the resources to access, must contain objects of type CmsResource