Hi all,
I don9t really understand the operation of WODisplayGroups and how to
use
them.
What I am trying to do:
When a given page loads (a component initialises) it searches for a
record
in a table based on a value that is already in a variable. This is
achieved
with a WODisplayGroup and a pre defined model with a fetch spec. This
part
appears to work. I get a displayedObjects>0 for the DisplayGroup.
Now, the
user never clicks anything on this page to select9 an object in the
DisplayGroup so I need to have access to the row in the DisplayGroup
that I
need, namely the first one as there should only be one.
I want to be able to modify these values via a form on this page, then
write
the new values to the database. Also, I want to be able to insert new
rows
if there was no existing row located (from above). In other words, if
no
row was found in the database, give me some empty fields to type in,
then
when I save, insert instead of update.
The problems I have:
1. The form fields do not display any values - currently using
imageDisplayGroup.selectedObject.imagesImageId for example. I guess
this is
because selected object is null, but don9t know what to do next.
2. I don9t know how to set a new record for the user to enter data in,
then
be able to add some values myself before the insert and have it insert
instead of update. Even if I could see the values in the form, how
would I
assign some other values programatically? If I cast the selected
object to
Images9 and modify the values, does this then have to be put back9
in the
DisplayGroup or does it update the values in the DisplayGroup by
reference?
Any helpful hints would be appreciated ;-)
Thanks,
Dave.