-
1. Re: nesting editable tables finally solved...
deanhiller2000 Jun 21, 2010 1:48 PM (in response to deanhiller2000)grrrr, so ran into one BIG problem that is solvable with this solution. You have to make sure the urls are parameter driven such that the params help load the page AND more importantly when you click add or edit, you need to make sure the correct top level item from the top table is reloaded OR you may be adding items to the wrong top level table.
For example. If you have a table of Cars which each car has a table of colors(all addable/editable). When you go to the read only car page with http://xxxxx/?car=honda, when the user clicks add color or edit car, you need to reread the car param and load it in those action methods. Your other option is to outject it into session BUT then all hell breaks loose when a user uses two tabs and goes to a honda and then to a BMW as BMW is in the session then and clicking edit on BMW would result in editing the honda.
I suppose there is a way to do this with page context as well somehow. Do page params last from response to next request such that I can reinject the previous requests page params though into the action method? (It seems like they should but I though I remember that not working once).
I maybe could even have #{carActions.edit(car)} and in my ShowReadOnlyAction.java have
@Scope(PAGE) private Car car;
I wonder if that works as then I don't need to worry about the url at all and reloading it though I have to do mgr.find again since I just started a new conversation of course and car is detached now.
later,
Dean