History | Log In     View a printable version of the current page. Get help!  
Issue Details [XML]

Key: JSF-1
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Chad Brandon
Reporter: Wenhu Guan
Votes: (View)
Watchers: (View)
Operations

If you were logged in you would be able to see more operations.
JSF cartridge

while page variable's type is an Entity, the generated code has compilation error

Created: 17/Nov/05 07:43 AM   Updated: 17/Nov/05 07:49 PM
Component/s: None
Affects Version/s: None
Fix Version/s: None

Environment: magic draw 9.5,andromda 3.2-rc1-snapshot


 Description   
if the type of a page variable (come from an action to a FrondEndView) is an <<Entity>>, the geneated code initialized the abstract class instead of the implementation class.
say, I modeled an <<Enitity>> Account,
I have a action state "load account detail" which defers a function to controller, the controller function name is loadAccount(accountId,Account). From the "load account detail" action state there is a transition to a <<FrontEndView>> - "display account detail". On the transition, I defined a trigger with a parameter 'account' whose type is Account(a <<Entity>> ).
In the generated form-- DisplayAccountListDetailFormImpl, the following code has compilation error:

public com.softwaredecision.crm.account.Account getAccount()
{
if (this.account == null)
{
this.account = new com.softwaredecision.crm.account.Account();
}
return this.account;
}
please be noted that Account is an abstract class, we must use the implementation class AccountImpl [/code]

 All   Comments   Change History      Sort Order:
Comment by Wenhu Guan [17/Nov/05 07:52 AM]
by the way, the generated DisplayAccountListDetailFormImpl class will be replaced everytime I run maven -o mda

should the implementation class be allowed to remove?

Comment by Chad Brandon [17/Nov/05 03:17 PM]
Thanks for filing the isssue, I'll take a look. In regards to your question about whether or not the form implementation should be regenerated every time, yes it should, the only things that shouldn't are the controller implementation classes.

Comment by Wenhu Guan [17/Nov/05 07:49 PM]
Thanks for the response. Please ask if you need more information.