property.java

来自「一个jsp网页布局框架」· Java 代码 · 共 37 行

JAVA
37
字号
package com.opensymphony.module.sitemesh.tapestry;import org.apache.tapestry.Tapestry;/** * Because Tapestry templating works differently than JSP taglibs, * the writeEntireProperty feature is not implemented here.  The built-in * * @Body component is most frequently used, to do something like * this taglib example: * <p/> * <body bgcolor="White"<decorator:getProperty property="body.onload" writeEntireProperty="true" />> * <p/> * it would be done like this in Tapestry: * <p/> * <body jwcid="@Body" bgcolor="White" onload="ognl:@org.opensymphony.module.sitemesh.tapestry@Util.getProperty('onload', requestCycle)"/> * * @author Erik Hatcher */public abstract class Property extends SiteMeshBase {    public abstract String getProperty();    public abstract String getDefault();    public String getValue() {        String propertyName = getProperty();        String propertyValue = getSiteMeshPage().getProperty(propertyName);                if (Tapestry.isBlank(propertyValue)) {            propertyValue = getDefault();        }        return propertyValue;    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?