Tutorials to .com

Tutorials to .com » Jsp » Tapestry-hivemind » Tapestry Developer's Guide (6)

Tapestry Developer's Guide (6)

Print View , by: iSee ,Total views: 6 ,Word Count: 347 ,Date: Fri, 17 Apr 2009 Time: 12:07 AM

2.3 Path attribute

JavaBeans framework for the provision of basic JavaBean object naming attribute. tapestry from simple attributes this to the expansion path attribute.
An attribute path is a series of separate cycles of the attribute name. When the path to read an attribute, each attribute is to be read in the series.

In front of "Introduction" section of the example, the reference to the path attribute visit.userName. This path means that the start object (a Tapestry page) attribute of the visit should be to visit, and then visit the user name of the object should be to visit. This is broadly in line with java code getVisit (). GetUserName () the same (with the exception of the visit is not the type of security attributes).

In some cases, the path attribute is used to change the value, rather than read it. When this happens, only the latest property to be written, all other attributes to be read. In other words, the update JavaCode in visit.userName and getVisit (). SetUserName (value) is similar.

The path attribute may be any length; however, they are only treated as NullPointerExceptions be treated with caution as other JavaCode. Is important to note that the path in the attribute does not attribute, apart from the last one, return null. This is often used to complete the comprehensive properties.

2.4 Object Library navigation charts

The properties of a simple path, the object of a strong library navigation charts (OGNL) expression. OGNL in Java, said that after the formation; they can call the methods, comparison, and arithmetic ... and even to create a collection.

OGNL is a separate and Tapestry framework; on OGNL further details, reference may be made http://www.ognl.org


tapestry & hivemind Articles


Can't Find What You're Looking For?


Rating: Not yet rated

Comments

No comments posted.