Skip to content
This repository has been archived by the owner on Sep 20, 2022. It is now read-only.
/ telb Public archive

Tapestry5 Expression Language Binding - use OGNL or MVEL expression as component/page parameter value

License

Notifications You must be signed in to change notification settings

bednar/telb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Tapestry5 Expression Language Binding

Description

Support three binding prefix:

  1. el - Default Expression Language (OGNL)
  2. ognl - Object Graph Navigation Library
  3. mvel - MVFLEX Expression Language

Tapestry template

Default

<t:mypackage.mycomponent1 parameter="el:@System@currentTimeMillis()"/>

<t:mypackage.mycomponent2 parameter="el:currentValue + 1"/>

OGNL

<t:mypackage.mycomponent1 parameter="ognl:@System@currentTimeMillis()"/>

<t:mypackage.mycomponent2 parameter="ognl:currentValue + 1"/>

MVEL

<t:mypackage.mycomponent1 parameter="mvel:System.currentTimeMillis()"/>

<t:mypackage.mycomponent2 parameter="mvel:currentValue + 1"/>

Tapestry binding prefix

Default

import org.apache.tapestry5.annotations.Parameter;
import com.github.bednar.TELBConstants;

public class MySuperComponent
{
    @Parameter(defaultPrefix = TELBConstants.EXPRESSION_LANGUAGE)
    private Long parameter;
}

OGNL

import org.apache.tapestry5.annotations.Parameter;
import com.github.bednar.TELBConstants;

public class MySuperComponent
{
    @Parameter(defaultPrefix = TELBConstants.OGNL)
    private Long parameter;
}

MVEL

import org.apache.tapestry5.annotations.Parameter;
import com.github.bednar.TELBConstants;

public class MySuperComponent
{
    @Parameter(defaultPrefix = TELBConstants.MVEL)
    private Long parameter;
}

Overide default expression language

public void contributeApplicationDefaults(final @Nonnull MappedConfiguration<String, String> configuration)
{
    configuration.add(TELBConstants.DEFAULT_EL_SYMBOL, TELBConstants.MVEL);
}

Dependencies

  • Tapestry5 - 5.3.7
  • OGNL - 2.7.3
  • MVEL - 2.1.4.Final

Maven

Release

Synced to Maven Central Repository.

<dependency>
    <groupId>com.github.bednar</groupId>
    <artifactId>telb</artifactId>
    <version>1.0.0</version>
</dependency>

Snapshot

<dependency>
    <groupId>com.github.bednar</groupId>
    <artifactId>telb</artifactId>
    <version>1.0.0-SNAPSHOT</version>
</dependency>

<repositories>
    <repository>
        <id>sonatype-nexus-snapshots</id>
        <name>Sonatype Nexus Snapshots</name>
        <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        <releases>
            <enabled>false</enabled>
        </releases>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </repository>
</repositories>

Links

License

New BSD License

About

Tapestry5 Expression Language Binding - use OGNL or MVEL expression as component/page parameter value

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages