<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert Zchn";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.HTMLVorformatiertZchn
        {mso-style-name:"HTML Vorformatiert Zchn";
        mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert";
        font-family:Consolas;
        color:black;}
span.E-MailFormatvorlage19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
p.Default, li.Default, div.Default
        {mso-style-name:Default;
        margin:0cm;
        margin-bottom:.0001pt;
        text-autospace:none;
        font-size:12.0pt;
        font-family:"Arial","sans-serif";
        color:black;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor="white" lang="DE" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hi Babak,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">maybe this helps:<o:p></o:p></span></p>
<p class="Default"><b><span lang="EN-US" style="font-size:14.0pt">8.2 Accessing OpenCms functionality via the EL
</span></b><span lang="EN-US" style="font-size:14.0pt"><o:p></o:p></span></p>
<p class="Default"><span lang="EN-US" style="font-size:11.0pt">OpenCms comes with several Java beans to provide access to OpenCms-specific functionality in JSPs. In general, if required, an object of each bean could be made available separately in a JSP. Also
 several tags of the <cms:> taglib initialize and expose objects of such beans (see section 8.1).
<o:p></o:p></span></p>
<p class="Default"><span lang="EN-US" style="font-size:11.0pt">Since OpenCms 9.0.1 the variable
</span><span lang="EN-US" style="font-size:11.0pt;font-family:Consolas">cms </span>
<span lang="EN-US" style="font-size:11.0pt">is present in the page scope for each JSP. It makes an object of type
</span><span lang="EN-US" style="font-size:11.0pt;font-family:Consolas">org.opencms.jsp.util.CmsJspStandardContextBean
</span><span lang="EN-US" style="font-size:11.0pt">available. The object provides a convenient way to access the most important OpenCms functions via JSTL/EL. Thus, in most cases no bean at all has to be included and initialized manually, and also formerly
 required use of scriptlet code becomes obsolete. <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">The standard context bean has a very rich interface. In particular, access to several other Java beans shipped with OpenCms is granted. A complete overview of the functionality exposed via the
 standard context bean can be looked up in the JavaDoc of the current OpenCms version. Look up the documentation of the class
</span><span lang="EN-US" style="font-size:11.0pt;font-family:Consolas">CmsJspStandardContextBean</span><span lang="EN-US" style="font-size:11.0pt">. Starting there, you can easily explore the interfaces of all other beans accessible via the standard context
 bean as well. Aware of the naming conventions for Java Beans, you obtain an overview of the properties available in EL.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Taken from the documentation pdf shipped with OpenCms 9.0.1.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">If you need it, let me know.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Best regards<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Kai<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">Von:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext"> opencms-dev-bounces@opencms.org [mailto:opencms-dev-bounces@opencms.org]
<b>Im Auftrag von </b>Babak<br>
<b>Gesendet:</b> Donnerstag, 20. November 2014 17:56<br>
<b>An:</b> opencms-dev@opencms.org<br>
<b>Betreff:</b> Re: [opencms-dev] Java Expression Language EL Question<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">And with doing a bit more research found that
<a href="http://www.opencms.org/taglib/cms">http://www.opencms.org/taglib/cms</a> is mapped to /WEB-INF/opencms.tld in web.xml<br>
<br>
    <jsp-config><br>
        <taglib><br>
            <taglib-uri><a href="http://www.opencms.org/taglib/cms">http://www.opencms.org/taglib/cms</a></taglib-uri><br>
            <taglib-location>/WEB-INF/opencms.tld</taglib-location><br>
        </taglib><br>
    </jsp-config><br>
<br>
<br>
So CMsJspLoader is going to load taglib.cms from /WEB-INF/opencms.tld<br>
but still can't track cms.element in tag library file.<br>
does CMsJspLoader actually instantiate cms object when it loads it ?<br>
<br>
even I don't know how ${cms.locale} is being translated.<br>
<br>
Thanks for help.<br>
<br>
Babak<br>
<br>
<o:p></o:p></p>
<div>
<p class="MsoNormal">On 11/20/2014 2:23 AM, Babak wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal" style="margin-bottom:12.0pt">So I did a bit of research and found that all usable taglibs are defined in the
<b>/WEB-INF/config/opencms-vfs.xml<br>
<br>
</b>    <loader class="org.opencms.loader.CmsJspLoader"><br>
                    <param name="taglib.cms"><a href="http://www.opencms.org/taglib/cms">http://www.opencms.org/taglib/cms</a></param><br>
<br>
but still can't figure how to translate ${cms.element.id} or ${cms.element.settings.boxschema}<br>
<br>
<br>
<br>
<o:p></o:p></p>
<div>
<p class="MsoNormal">On 11/19/2014 8:00 PM, Babak wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal" style="margin-bottom:12.0pt">I am trying to understand how ${cms.element.id}is being translated in below source code.
<br>
<br>
<a href="https://github.com/alkacon/vie-related/blob/master/resources/detail.jsp">https://github.com/alkacon/vie-related/blob/master/resources/detail.jsp</a>
<br>
<br>
I mean, where at source code I should look to find the result of ${cms.element.id}?
<br>
<br>
I know EL and I know cms is an object but in most of the codes I don't see any cms object
<br>
being instantiated, and it only being used in code. <br>
<br>
Does cms object being instantiated implicitly ? <br>
from which class and how do I find the result of <div class="box ${cms.element.settings.boxschema}">
<br>
<br>
<br>
Thanks <br>
Babak <br>
_______________________________________________ <br>
This mail is sent to you from the opencms-dev mailing list <br>
To change your list options, or to unsubscribe from the list, please visit <br>
<a href="http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev">http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev</a>
<br>
<br>
<br>
<br>
<o:p></o:p></p>
</blockquote>
<p class="MsoNormal"><br>
<br>
<br>
<br>
<o:p></o:p></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>This mail is sent to you from the opencms-dev mailing list<o:p></o:p></pre>
<pre>To change your list options, or to unsubscribe from the list, please visit<o:p></o:p></pre>
<pre><a href="http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev">http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev</a><o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre><o:p> </o:p></pre>
<pre><o:p> </o:p></pre>
</blockquote>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>