You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org> on 2010/12/16 18:15:02 UTC
[jira] Closed: (TAP5-1375) TAPESTRY-2173 have side effect
[ https://issues.apache.org/jira/browse/TAP5-1375?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship closed TAP5-1375.
--------------------------------------
Resolution: Invalid
If you can't bear to but the annotation on the correct constructor, you can always explicitly instantiate the object using the constructor of your choice; letting Tapestry instantiate it is an optimization designed to minimize code but not a necessity.
> TAPESTRY-2173 have side effect
> ------------------------------
>
> Key: TAP5-1375
> URL: https://issues.apache.org/jira/browse/TAP5-1375
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Reporter: Mihail Slobodyanuk
> Priority: Critical
>
> Example:
> @Entity
> public class Ingredient
> {
> public Ingredient(){}
> public Ingredient(String amount, String name)
> {
> .....
> }
> ..........
> }
> When sombody invoke BeanModel.newInstance for Ingredient entity it call ObjectLicator.autobuild and they try sustitute services as parametrs for non-default constructor Ingredient(String amount, String name). This operation leads to failure, and non sence for entities.
> To resolve it i can mark default constructor @Inject annotation, but this way add dependency for entities library bu tapestry-annotation library.
> Other way - improve Registry.autobuild method for trying all constructors, while instantiation do successfull.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.