You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Andreas Hartmann <an...@apache.org> on 2005/03/23 16:26:19 UTC

[heads-up] Presentation using JX templates

Hi Lenya devs,

JX templates (used by the usecase framework) makes it possible to
use the Lenya API directly in the view without passing parameters
from the sitemap using input modules. For instance, the following
code is used to generate the language tabs of the site tree:


       <jx:forEach var="language" 
items="${document.getPublication().getLanguages()}">

         <jx:set var="languageVersion"
 
value="${document.getIdentityMap().getFactory().getLanguageVersion(document, 
language)}"/>
         <jx:set var="languageUrl"
                 value="${request.contextPath + publicationId + '/info-' + area 
+ languageVersion.getCanonicalDocumentURL()}"/>

         <td>
           <jx:choose>
             <jx:when test="${language.equals(document.getLanguage())}">
               <a id="${language}" class="lenya-tablink-active" 
href="${languageUrl}"><jx:out value="${language}"/></a>
             </jx:when>
             <jx:otherwise>
               <a id="${language}" class="lenya-tablink" 
href="${languageUrl}"><jx:out value="${language}"/></a>
             </jx:otherwise>
           </jx:choose>
         </td>
       </jx:forEach>


-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: [heads-up] Presentation using JX templates

Posted by Andreas Hartmann <an...@apache.org>.
Gregor J. Rothfuss wrote:
> Torsten Schlabach wrote:
> 
>> Cool! I think it makes sense to move logic out of the sitemaps! This 
>> is a good step.
>>
>> Along the lines ... as we are using JX Templates already in CMS 
>> Screens, would anyone object to using CForms for CMS screens? Our 
>> should be already rather think of XForms?
> 
> 
> what does cforms buy us in addition to what we have with jx and the 
> usecase framework?
> 
>  * validation (already handled by uc fw)
>  * data binding (already handled by uc fw)

I also considered to use CForms for the usecase framework, but it seemed
to add a lot of overhead without providing much benefit. For most usecases,
a simple Java + JXTemplate approach is sufficient and much easier to
understand.

-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: [heads-up] Presentation using JX templates

Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
Torsten Schlabach wrote:
> Cool! I think it makes sense to move logic out of the sitemaps! This is 
> a good step.
> 
> Along the lines ... as we are using JX Templates already in CMS Screens, 
> would anyone object to using CForms for CMS screens? Our should be 
> already rather think of XForms?

what does cforms buy us in addition to what we have with jx and the 
usecase framework?

  * validation (already handled by uc fw)
  * data binding (already handled by uc fw)
  ?

i use xforms with cocoon on a project (chicoon) and it's integration 
into cocoon is kinda clunky. i don't think it would add value for lenya.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: [heads-up] Presentation using JX templates

Posted by Torsten Schlabach <ts...@apache.org>.
Cool! I think it makes sense to move logic out of the sitemaps! This is 
a good step.

Along the lines ... as we are using JX Templates already in CMS Screens, 
would anyone object to using CForms for CMS screens? Our should be 
already rather think of XForms?

Regards,
Torsten

Andreas Hartmann schrieb:
> Hi Lenya devs,
> 
> JX templates (used by the usecase framework) makes it possible to
> use the Lenya API directly in the view without passing parameters
> from the sitemap using input modules. For instance, the following
> code is used to generate the language tabs of the site tree:
> 
> 
>       <jx:forEach var="language" 
> items="${document.getPublication().getLanguages()}">
> 
>         <jx:set var="languageVersion"
> 
> value="${document.getIdentityMap().getFactory().getLanguageVersion(document, 
> language)}"/>
>         <jx:set var="languageUrl"
>                 value="${request.contextPath + publicationId + '/info-' 
> + area + languageVersion.getCanonicalDocumentURL()}"/>
> 
>         <td>
>           <jx:choose>
>             <jx:when test="${language.equals(document.getLanguage())}">
>               <a id="${language}" class="lenya-tablink-active" 
> href="${languageUrl}"><jx:out value="${language}"/></a>
>             </jx:when>
>             <jx:otherwise>
>               <a id="${language}" class="lenya-tablink" 
> href="${languageUrl}"><jx:out value="${language}"/></a>
>             </jx:otherwise>
>           </jx:choose>
>         </td>
>       </jx:forEach>
> 
> 
> -- Andreas
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
> For additional commands, e-mail: dev-help@lenya.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org