Support JavaBeans in session
----------------------------
Key: BPM-215
URL: http://jira.andromda.org/browse/BPM-215
Project: Bpm4Struts Cartridge
Type: Improvement
Reporter: Roland Szabo
Assigned to: Wouter Zoons
Priority: Minor
It would be nice if the cartridge could utilize the nested property feature of
Struts. That would allow for the modeller to use JavaBeans as parameters for
controller methods, instead of listing every single property. The controllers
would have methods like:
+loadCustomer(customer : Customer)
This would mean that there is a Customer object in the generated form, called
customer. This would also simplify the implementation of the controller, as
most likely the Business Logic classes return a Customer object, or something
like that anyway, there would be no need to copy the fields.
Then the events could contain parameters like:
customer.id : datatype::int
customer.name : datatype::String
These would correspond to the properties of the customer object in the session
object. Similar to the generated Dummy classes for tables, it would be possible
to create dummy classes here too.
Struts supports populating the nested properties, however, the nested class
must not be null when this occurs, otherwise an exception is thrown. This could
be achieved by requiring a default constructor for the nested class (it should
be a JavaBean anyway) and then initializing the nested fields like:
TestBean nested = new TestBean()
or writing special property getter with lazy initialization:
TestBean getNested() {
if (nested == null) nested = new TestBean();
return nested;
}
This behaviour could be recursive, meaning customer.address.street would mean
that there is a further JavaBean as the address property of the customer
object, which has a street property. (Struts allows this)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.andromda.org/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Andromda-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/andromda-devel