5102 Posts in 1520 Topics by 1116 members
|Go to End|
22 November 2009 at 4:00am
How does the DOM store it's data compared to the CTF?
Does it work in exactly the same way, so that I can just swap out DOM for CTF and keep all the data and relationships in tact?
The option to reorder entries looks like a real bonus, as that seems to be the biggest flaw with the CTF..
22 November 2009 at 9:04am
Yep, the DOM is just an extention of the CTF class. It pulls in the same data (i.e. DataObjects) and displays them in the same way just adding a new skin, more functionality and a much faster popup window. Honestly I don't think I could go back to a CTF now, it would just seem so.......windows 98!
6 January 2010 at 2:52am Last edited: 6 January 2010 2:53am
I copied the code here after creating my own code from scratch to try and correct an error. The problem is this: When using a FileIFrameField or ImageField I always get the the same message instead of FileIFrameField or ImageField in the popup:
'You can add files once you have saved for the first time.'
I can then save the record in the popup, close it, reopen the record for editing and THEN I can add a file.
I know where this comes from, it has to do with line 14 in sapphire/forms/FileIFrameField.php:
$data = $this->form->getRecord(); // returns no data
Somebody know what I can do about this? (Creating a mysite/forms/MyFileIFrame.php class for instance, but am not sure what to change or add)
EDIT: tested it on 2.3.3 and 2.3.4
6 January 2010 at 3:13am
I don't think you can do anyuthing, this comes from the fact that before you save it the DataObject has no ID so it cannot have relationships like attaching an image. However when using DOM it should refresh when pressing save so that you can add the image strait away without having to open the popup again.
6 January 2010 at 12:27pm
Thanks for the reply - I will look into using DOM.
|Go to Top|