本文整理汇总了Java中org.thymeleaf.standard.StandardDialect类的典型用法代码示例。如果您正苦于以下问题:Java StandardDialect类的具体用法?Java StandardDialect怎么用?Java StandardDialect使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
StandardDialect类属于org.thymeleaf.standard包,在下文中一共展示了StandardDialect类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: YadaDialect
import org.thymeleaf.standard.StandardDialect; //导入依赖的package包/类
/**
*
* @param config
*/
public YadaDialect(YadaConfiguration config) {
// We will set this dialect the same "dialect processor" precedence as
// the Standard Dialect, so that processor executions can interleave.
super("Yada Dialect", "yada", StandardDialect.PROCESSOR_PRECEDENCE);
this.config = config;
}
示例2: runTest
import org.thymeleaf.standard.StandardDialect; //导入依赖的package包/类
@Test
public void runTest() {
TestExecutor testExecutor = new TestExecutor();
testExecutor.setDialects(Arrays.asList(new StandardDialect(), new ThymeleafExtrasDialect()));
testExecutor.execute("classpath:whitespace.thtest");
assertEquals(true, testExecutor.getReporter().isAllOK());
}
示例3: runTest
import org.thymeleaf.standard.StandardDialect; //导入依赖的package包/类
@Test
public void runTest() {
TestExecutor testExecutor = new TestExecutor();
testExecutor.setDialects(Arrays.asList(new StandardDialect(), new ThymeleafExtrasDialect()));
testExecutor.execute("classpath:utextafter.thtest");
assertEquals(true, testExecutor.getReporter().isAllOK());
}
示例4: runTest
import org.thymeleaf.standard.StandardDialect; //导入依赖的package包/类
@Test
public void runTest() {
TestExecutor testExecutor = new TestExecutor();
testExecutor.setDialects(Arrays.asList(new StandardDialect(), new ThymeleafExtrasDialect()));
testExecutor.execute("classpath:utextbefore.thtest");
assertEquals(true, testExecutor.getReporter().isAllOK());
}
示例5: initialize
import org.thymeleaf.standard.StandardDialect; //导入依赖的package包/类
private synchronized void initialize(final FhirContext theContext) {
if (initialized) {
return;
}
logger.info("Initializing narrative generator");
classToName = new HashMap<Class<?>, String>();
nameToNarrativeTemplate = new HashMap<String, String>();
try {
loadProperties("/rsc/narrative/custom.properties");
} catch (IOException e) {
logger.info("Failed to load property file.", e);
}
profileTemplateEngine = new TemplateEngine();
ProfileResourceResolver resolver = new ProfileResourceResolver();
profileTemplateEngine.setTemplateResolver(resolver);
StandardDialect dialect = new StandardDialect() {
public Set<IProcessor> getProcessors(String theDialectPrefix) {
Set<IProcessor> retVal = super.getProcessors(theDialectPrefix);
retVal.add(new NarrativeAttributeProcessor(theContext, theDialectPrefix));
return retVal;
}
};
profileTemplateEngine.setDialect(dialect);
initialized = true;
}
示例6: ShiroDialect
import org.thymeleaf.standard.StandardDialect; //导入依赖的package包/类
public ShiroDialect() {
super(DIALECT_NAME, "shiro", StandardDialect.PROCESSOR_PRECEDENCE);
}
示例7: initialize
import org.thymeleaf.standard.StandardDialect; //导入依赖的package包/类
private synchronized void initialize(final FhirContext theContext) {
if (myInitialized) {
return;
}
ourLog.info("Initializing narrative generator");
myClassToName = new HashMap<Class<?>, String>();
myNameToNarrativeTemplate = new HashMap<String, String>();
List<String> propFileName = getPropertyFile();
try {
if (myApplyDefaultDatatypeTemplates) {
loadProperties(DefaultThymeleafNarrativeGenerator.NARRATIVES_PROPERTIES);
}
for (String next : propFileName) {
loadProperties(next);
}
} catch (IOException e) {
ourLog.info("Failed to load property file " + propFileName, e);
throw new ConfigurationException("Can not load property file " + propFileName, e);
}
{
myProfileTemplateEngine = new TemplateEngine();
ProfileResourceResolver resolver = new ProfileResourceResolver();
myProfileTemplateEngine.setTemplateResolver(resolver);
StandardDialect dialect = new StandardDialect() {
@Override
public Set<IProcessor> getProcessors(String theDialectPrefix) {
Set<IProcessor> retVal = super.getProcessors(theDialectPrefix);
retVal.add(new NarrativeAttributeProcessor(theContext, theDialectPrefix));
return retVal;
}
};
myProfileTemplateEngine.setDialect(dialect);
}
myInitialized = true;
}
示例8: FlashMessagesDialect
import org.thymeleaf.standard.StandardDialect; //导入依赖的package包/类
public FlashMessagesDialect() {
super(DIALECT_NAME, "flash", StandardDialect.PROCESSOR_PRECEDENCE);
}
示例9: configureSequence
import org.thymeleaf.standard.StandardDialect; //导入依赖的package包/类
@BeforeClass
public static void configureSequence() {
executor.setDialects(Arrays.asList(new StandardDialect(),
new DataAttributeDialect()));
}
示例10: ShiroDialect
import org.thymeleaf.standard.StandardDialect; //导入依赖的package包/类
public ShiroDialect() {
super(NAME, PREFIX, StandardDialect.PROCESSOR_PRECEDENCE);
}
示例11: TogglzDialect
import org.thymeleaf.standard.StandardDialect; //导入依赖的package包/类
public TogglzDialect() {
this(NAME, DEFAULT_PREFIX, StandardDialect.PROCESSOR_PRECEDENCE);
}
示例12: AbstractTogglzTest
import org.thymeleaf.standard.StandardDialect; //导入依赖的package包/类
public AbstractTogglzTest() {
featureManager.enable(FEATURE_1);
TestFeatureManagerProvider.setFeatureManager(featureManager);
executor.setDialects(Arrays.asList(new StandardDialect(), new TogglzDialect()));
executor.setReporter(new ConsoleTestReporter());
}
示例13: ThymeleafProcessorDialect
import org.thymeleaf.standard.StandardDialect; //导入依赖的package包/类
/**
*
* 创建一个新的实例 ThymeleafProcessorDialect.
*/
public ThymeleafProcessorDialect() {
super(DIALECT_NAME, DIALECT_PREFIX, StandardDialect.PROCESSOR_PRECEDENCE);
}