Apple WebObjects 3.5 Manual de usuario Pagina 87

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 120
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 86
Refining Main.wo
87
Specifying Default Values for New Enterprise Objects
When new enterprise objects are created in your application, it’s common
to assign default values to some of their properties. For example, in your
Movies application it makes sense to assign a default value for the
title
attribute so a new movie won’t be displayed in the list of movies as a blank
line.
You could write an action method for the Insert/New button instead of
binding it directly to the display group
insert action method. In the custom
action, you would create a new Movie object, assign default values to it, and
then insert the new object into the display group. However, there are two
additional ways to specify default values for new enterprise objects, without
making explicit assignments:
Assign default values in the enterprise object class.
Specify default values using a display group.
For a particular situation, one of the approaches is usually better than the
other. If the default values are intrinsic to the enterprise object, assign them
in the enterprise object class. For example, consider a Member class with a
memberSince property. It’s likely that you would automatically assign the
current date to
memberSince instead of forcing a user to supply a value. You’ll
see how to use this technique in “Adding Behavior to Your Enterprise
Objects” (page 117).
On the other hand, if the default values are specific to an application or to a
particular user interface, explicitly initialize the object in code or specify the
default values using a display group. In the Movies application, the need for
default values is motivated by Main’s user interface: you need to provide a
default value so users can tell when a newly inserted record is selected. In
another situation, you might not want a new movie to have a default title;
you might instead want a new movie’s title to be blank.
An image in this column means that the variable can be initialized
from the component’s archive.
A means that initialization parameters are already set. The variable
is created and initialized from the archive as a part of the component’s
initialization.
A means that no initialization parameters have been set, and so
the variable isn’t automatically created. Double-click the variable to
configure it and add it to the archive.
Vista de pagina 86
1 2 ... 82 83 84 85 86 87 88 89 90 91 92 ... 119 120

Comentarios a estos manuales

Sin comentarios

Aqua-pure Cyst-FF manuales

Manuales del propietario y guías del usuario para Equipos De Agua Aqua-pure Cyst-FF.
Ofrecemos 1 manuales en pdf Aqua-pure Cyst-FF para descargar gratis por tipos de documentos: Manual de usuario






Más productos y manuales para Equipos De Agua Aqua-pure

Modelos Tipo de documento
CWS150MECJ Manual de usuario   Aqua-Pure CWS150MECJ User Manual, 32 paginas
CSX200 Manual de usuario   Aqua-Pure CSX200 User Manual, 28 paginas
APIF100 Manual de usuario   Aqua-Pure APIF100 User Manual [en] , 36 paginas
3MFF100 Manual de usuario   Aqua-Pure 3MFF100 User Manual, 8 paginas
APUN101 Manual de usuario   Aqua-Pure APUN101 User Manual, 12 paginas
NWS200 Manual de usuario   Aqua-Pure NWS200 User Manual, 24 paginas
CSM1501 Manual de usuario   Aqua-Pure CSM1501 User Manual, 24 paginas
Complete Manual de usuario     Aqua-Pure Complete User Manual, 20 paginas
CBW1001 Manual de usuario   Aqua-Pure CBW1001 User Manual [en] , 20 paginas
APPM150 Manual de usuario   Aqua-Pure APPM150 User Manual [en] , 32 paginas
CBF150 Manual de usuario   Aqua-Pure CBF150 User Manual [en] , 24 paginas