SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 131 | Next

James Kennard

"Mastering Joomla! 1.5 Extension and Framework Development"


Before we move on, it is important that we understand a bit more about JElement. In
Chapter 3, we talked about the use of the parameter fields in databases. Theses fields
are INI strings, which we can use in conjunction with the JParameter class.
??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ???
Component Design
[ 96 ]
The JParameter class handles these strings and uses XML definitions, like the
ones we have discussed in this chapter, to help comprehend the data. As part of
JParameter we can render the INI string using an XML definition. It is at this point
that JElement kicks in.
A JElement subclass always overrides the fetchElement() method. This method is
what renders a single form input element. Because JParameter deals with INI strings,
a JElement form element can only return a single value. For example, we cannot
define a JElement subclass that renders a select list that allows multiple options to
be selected.
Extending JElement
Before we create a new JElement subclass, we should carefully consider if we need
to.


Pages:
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143