Programming Jakarta Struts, 2nd Edition [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Programming Jakarta Struts, 2nd Edition [Electronic resources] - نسخه متنی

Chuck Cavaness

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید








8.7 Nested Tags


The Struts custom tag libraries
provide a great deal of power and flexibility to the developer. The
freedom to access properties of a bean at any level using nested
properties is very powerful.

There are some restrictions in how this technique can be deployed,
however. When attempting to nest one tag inside another, the inside
tag has certain dependencies on the outside tag that may make it
cumbersome or impossible to cleanly render the dynamic data. There
are workarounds, but these usually involve using scriptlets with Java
within the JSP page. "Nested" tags
were created to solve this problem and to enrich the Struts tag
libraries.

The Nested tag library was created by Arron Bates to make it easier to nest
Struts tags inside one another and to match the ability of the model
layer to nest beans inside one another. The nested tags have become
so popular that they have been added to the core libraries.

Nested tags parallel the current tags supported by the Struts
framework. For example, there are HTML nested tags, Logic nested
tags, and Bean nested tags. There is no need for nested Template
tags, so those don't exist. The major difference is
that nesting is better supported in the nested versions.

The tags within the Nested tag library are used in the same way that
the non-nested versions are. Minor differences exist to allow for
tags to know when they are nested within one another and therefore
can access properties of the parent tag. Other than these small
differences, they are very similar.

You can find more information on the nested tags in the Struts API
documents. Tutorials and more information on the nested tags are
available at http://www.keyboardmonkey.com/struts/indexl.


    / 181