有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java什么是扩展,我们如何使用它?

一位大学的朋友正在学习使用tapestry框架的web编程,他问我是否可以帮他做家庭作业。 作业中的一个问题是:

What is expansion, and how do we use it?

这是我第一次听到这件事

你知道这个话题是关于什么的吗

我有点困惑。有没有用这个名字命名的OOP原则


共 (3) 个答案

  1. # 1 楼答案

    根据this tutorial它基本上是字符串插值

    First is the way we display the current date and time: ${currentTime}. This syntax is used to access a property of the page object, a property named currentTime. Tapestry calls this an expansion. The value inside the braces is the name of a standard JavaBeans property supplied by the page. As we'll see in later chapters, this is just the tip of the iceberg for what is possible using expansions.

    这不是一个OO术语——它是Tapestry的一部分

  2. # 3 楼答案

    发件人:http://tapestry.apache.org/exploring-the-project.html

    Expansions are an easy way of including some dynamic output when rendering the page. By default, an expansion refers to a JavaBeans property of the page:

     <p>The current time is: ${currentTime}</p>