Hi all,
Sorry to bother again, I am developing an application using Appfuse 2.0 m5.
Many bugs has been solved by this News Group, related BBS or myself. Now I
met a question mainly about the business model. I appriciate somebody could
spend time to give me some advice.
First descript my use case:
What I am developing is an application for Industrial Project Siting
Management. There are 2 main business entity: Project and Location of the
project. The relationship is bidirectional One-To-One.
Public class Project extends BaseObject {
…
Private LocationInfo locInfo = new LocationInfo();
…
}
Use case 1: Find Project entity from database where Project’s locInfo is
NULL. And display them in projectList. Done.
Use case 2: Edit or add Project through Project Form, Done
http://localhost:8080/projectform.html?id=2 mapped to
ProjectFormController
projectform.jsp include basic properties except the LocationInfo. Because at
this time, the project is not sited yet.
Use case 3: assign a Jobsite(LocationInfo) to Project. I reuse the
ProjectForm in Use Case 2.
And the Url is http://localhost:8080/projectform.html?id=2&method=locate
Projectform.jsp has a <c:chose> tag <c:when test=”${method == ‘locate’}”>
when this is TRUE.
<form:input path=”locInfo.something” id=”locInfo.something/>
<form:error …/>
<appfuse:lable …/>
When I run the application, and input the url with “method=locate” The form
is no different from what is in Use Case 2!!!!!
So could anybody find out where is wrong?
Maybe My ProjectFormController should inject LocationInfoManager? Now my
ProjectFormController has only ProjectManager
What I am asking could be descript as:
The example of the appfuse has only one entity Person. I could follow the
step and I could complete it successfully.
What if it is a one-to-one bidirectional relationship?
Eg. Person and Car (This is not a good example, because Person could has
more than one Car.)
Person could has one Car or has not any Car.
Person who has no Car could has one in the future.
Then My question could be simple as: What you should add in
PersonController.java personform.jsp? anybody any advice?
Guorick
9/8/2007
--
View this message in context:
http://www.nabble.com/How-to-extend-the-example-of-Appfuse--tf4405405s2369.html#a12568205
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]