Package org.opencms.jsp.util
Class CmsJspResourceLoadBean
- java.lang.Object
-
- org.opencms.jsp.util.CmsJspResourceLoadBean
-
public class CmsJspResourceLoadBean extends java.lang.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
Fields Modifier and Type Field Description protected CmsObject
m_cms
The OpenCms context of the current user.protected java.util.List<CmsResource>
m_resources
The list of results of the resource loader.
-
Constructor Summary
Constructors Constructor Description CmsJspResourceLoadBean()
No argument constructor, required for a JavaBean.CmsJspResourceLoadBean(CmsObject cms, java.util.List<CmsResource> resources)
Creates a new context bean using the OpenCms context of the current user.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CmsObject
getCmsObject()
Returns the OpenCms user context this bean was initialized with.java.util.List<CmsResource>
getResources()
Returns a list ofCmsResource
instances.void
init(CmsObject cms, java.util.List<CmsResource> resources)
Initialize this instance.
-
-
-
Field Detail
-
m_resources
protected java.util.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, java.util.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 userresources
- the resources to access, must contain objects of typeCmsResource
-
-
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 java.util.List<CmsResource> getResources()
Returns a list ofCmsResource
instances.- Returns:
- a list of
CmsResource
instances
-
init
public void init(CmsObject cms, java.util.List<CmsResource> resources)
Initialize this instance.- Parameters:
cms
- the OpenCms context of the current userresources
- the resources to access, must contain objects of typeCmsResource
-
-