On Fri, 30 May 2003 12:01:08 -0400, Rick Reumann wrote: > I'm running into major headaches using the basicPortal approach with an > app that has ProjectBeans, TaskBeans, and NoteBeans. The problem is that > conflicts arise since a taskBean and projectBean both have a field called > "title" and "description." It's complicated by the fact that I have a > ProjectDetailBean which extends ProjectBean and has the fields in it > TaskBean and NoteBean so that I can display on a page the Project with the > list of tasks and notes. When I go from that page to "add a task" it ends > up also changing the ProjectBean title and description to the same Task > title and description. (It doesn't save it to the db, but changes the list > in session scope).
The problem once again falls back to the idea of having the forward of one Action foward to another Action. The problem is that say you have a bean in scope with a field "title" then after you submit your forward forwards to another action which sets up another bean - but that other bean being set up ALSO has a "title" field - which ends up being populated by other bean. To get around this problem I'm not having certain actions forward to other actions. For example I have a projectDetailAction which sets up a ProjectDetailBean (with Project, Tasks, and Notes) and forwards to a displayDetail page. Now when on that page if you click on "add task to this project" you are fowarded to the "taskAdminAction" and eventually after "Save" is submitted (saving the task) the idea I wanted was to then forward to the projectDetailAction. This creates problems as projectDetailAction has a ProjectDetailBean associated with it which ends up having it's title and description populated from the Task bean still in scope. The solution is that after I save the task I set up the ProjectDetailBean inside of the TaskAdminAction and forward directly to the display page. This breaks the concept of particular Actions being only responsible for their unique thing, but I'm at a loss of a better solution. The other solution that isn't 'that' bad is that when the TaskAction fowards over to the ProjectDetailAction I always make sure to create a completely new ProjectDetailBean inside the Action and call ae.setReqBean( theNewBean ) after populatin the bean of course. This solution seems to maybe be better? -- Rick _______________________________________________ MVC-Programmers mailing list [EMAIL PROTECTED] http://www.basebeans.net:8080/mailman/listinfo/mvc-programmers