[opencms-dev] Use CmsJspActionElement cms on a Java Class

marcio.camurati marcio.camurati.opencms at gmail.com
Sun Mar 9 05:44:18 CET 2008


Hi,

Yes have a good way, you can breate a Bean that extend the basic OpenCMS
class CmsJspBean, if you see at the JavaDOC the class CmsJspActionElement
extend it.

For example:

[code]
public MyCustomJspBean extends CmsJspBean {
    // your methods
}
[/code]

Regards,
Marcio Camurati


enrarjcob wrote:
> 
> Hi,
> 
> I'm triying to obtain the resource folder of my microsite on a java-class
> (I want to create a custom comboBox with information about my microsite),
> but I dont know how to use a cms object there:
> On a JSP web-page, we could use:
> 
> CmsJspActionElement cms = new CmsJspActionElement( pageContext, request,
> response );
> 
> String rutaDirectorio = cms.getRequestContext().getFolderUri();
> 
> int startLevel = CmsResource.getPathLevel(rutaDirectorio);
> 
> But in a Java Class, we dont know what is "pageContext", "request" and
> "response", so 
> Is there another posibility?
> 
> Thanks for all!
> 
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
> 
> 

-- 
View this message in context: http://www.nabble.com/Use-CmsJspActionElement-cms-on-a-Java-Class-tp15919400p15923927.html
Sent from the OpenCMS - Dev mailing list archive at Nabble.com.




More information about the opencms-dev mailing list