I am having trouble understanding what a NESTED, as opposed to an INDEXED
property is in Java Beans. Here is a snip from the JSP 0.92 spec document,
detailing the properties of a bean named Ticker. My questions are: In the
example discussed below, if the property 'companyName[]' is just an array of
strings, how can the property 'latest' (double) be nested within
companyName[]? Are all these properties located in the same bean? Where
would the "getLatest()" accessor method reside? Thanks for helping me noodle
through this.

Bruce

-----------------SNIP-----------------------------------------
Suppose you had a Bean named Ticker that provided a stock market ticker. The
Bean tracks companies on different stock markets and displays a list of data
about each stock. For example, the Ticker bean might track three companies
on the New York Stock Exchange and three companies on the NASDAQ and display
the stock's latest price during trading (updated at intervals), its high and
low prices for the day, and its previous closing price.

The Bean developer has already given Ticker a few properties:


'market', which describes the name of a stock market

'companyName[]', which is nested in market and is an array containing the
names of the companies Ticker tracks on that market

'latest', which is nested in companyName and returns the stock's latest
price, updated at regular intervals during trading

'high', which is nested in companyName and represents the stock's high price
for the day

'low', which is nested in companyName and represents the stock's low price
for the day

JavaServer Pages notation, we would list the properties this way:


market (a String)
market:companyName[] (an array of String values)
market:companyName:latest (a Double)

etc etc.

----------------------------------------------------------------------------
-----------------

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to