Support three binding prefix:
- el - Default Expression Language (OGNL)
- ognl - Object Graph Navigation Library
- mvel - MVFLEX Expression Language
<t:mypackage.mycomponent1 parameter="el:@System@currentTimeMillis()"/>
<t:mypackage.mycomponent2 parameter="el:currentValue + 1"/>
<t:mypackage.mycomponent1 parameter="ognl:@System@currentTimeMillis()"/>
<t:mypackage.mycomponent2 parameter="ognl:currentValue + 1"/>
<t:mypackage.mycomponent1 parameter="mvel:System.currentTimeMillis()"/>
<t:mypackage.mycomponent2 parameter="mvel:currentValue + 1"/>
import org.apache.tapestry5.annotations.Parameter;
import com.github.bednar.TELBConstants;
public class MySuperComponent
{
@Parameter(defaultPrefix = TELBConstants.EXPRESSION_LANGUAGE)
private Long parameter;
}
import org.apache.tapestry5.annotations.Parameter;
import com.github.bednar.TELBConstants;
public class MySuperComponent
{
@Parameter(defaultPrefix = TELBConstants.OGNL)
private Long parameter;
}
import org.apache.tapestry5.annotations.Parameter;
import com.github.bednar.TELBConstants;
public class MySuperComponent
{
@Parameter(defaultPrefix = TELBConstants.MVEL)
private Long parameter;
}
public void contributeApplicationDefaults(final @Nonnull MappedConfiguration<String, String> configuration)
{
configuration.add(TELBConstants.DEFAULT_EL_SYMBOL, TELBConstants.MVEL);
}
- Tapestry5 - 5.3.7
- OGNL - 2.7.3
- MVEL - 2.1.4.Final
Synced to Maven Central Repository.
<dependency>
<groupId>com.github.bednar</groupId>
<artifactId>telb</artifactId>
<version>1.0.0</version>
</dependency>
<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>