ב"ה using the FormProcessor, all my exceptions seem to have
disappeared. Now I have a problem, that although seems to be a
separate problem is very much intertwined with everything else and I
think it's really one issue.

The page basically looks like this:
Nature Name: [text field]

Locations:
Name           Allow St. Addr           Allow Hosp. Addr       Allow
Doc.           Allow Eqpmt Loc
[text field]              [X]
[X]                   [  ]
[   ]                        [[Remove button]]
 
[[Insert Row button]]
[[Save button]]

And you can add/remove locations, e.g. for nature Hospital Visitation
you would have one location, called "Location" or "Hospital" which is
only allowed to be a hospital (when you enter the request you'll get
drop-downs). A "Food delivery" might have a "From" and a "To," which
can be street addresses, hospital rooms, or even a doctor's office,
but it wouldn't let you select an equipment location.
Now, this app is being rewritten, after I started it in PHP. In the
PHP version (I didn't know how to use multiple submit buttons then)
adding and removing rows was done via a link, so it discarded any
modifications you made to locations. (I'm trying to stay away from
relying on Javascript). Now, with Lift, they are buttons, and so any
modifications you make to locations are saved to the datastore
immediately upon pressing them, because the page needs to reload with
these locations. But neither of these behaviors is optimal. Really, it
should keep track of your changes but only send them to the datastore
when you explicitly press Save. But the page can get reloaded via
Remove/Insert Row in between.
Okay, so I made another RequestVar to hold pending new rows and rows
pending removal, and it shows the page as if they were added and
removed. But what happens if you modify the properties of a location
and then insert a row? Modifying the location that that field was
mapped to is pointless, because we don't want to merge it yet, but
we're going to have to reload it from the datastore in a future
request cycle, before we are able to merge it, because it doesn't seem
to be able to merge an entity that was detached the last time the
entity manager was closed.
What am I supposed to do? Store everything in a fake (never persisted)
nature/locations and then copy all the differences to the managed
entity when processing the Save submit button?
I hope you understand my question, let me know what needs
clarification.
Thanks a ton!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to