[seam-issues] [JBoss JIRA] (SOLDER-323) Allow constructor parameter values to be injected via XML
Sam Corbett (JIRA)
jira-events at lists.jboss.org
Mon Mar 19 11:33:47 EDT 2012
Sam Corbett created SOLDER-323:
----------------------------------
Summary: Allow constructor parameter values to be injected via XML
Key: SOLDER-323
URL: https://issues.jboss.org/browse/SOLDER-323
Project: Solder
Issue Type: Feature Request
Reporter: Sam Corbett
I'd like to inject a String into a constructor.
If, for example, I had this constructor on a bean:
{code}
public Stock(String name) {
this.name = name;
}
{code}
I'd like to be able to inject values into it with XML like this:
{code}
<my:Stock>
<s:parameters>
<s:String>XYZ</s:String>
</s:parameters>
</my:Stock>
{code}
Or this:
{code}
<my:Stock>
<s:parameters>
<s:String>
<s:value>XYZ</s:value>
</s:String>
</s:parameters>
</my:Stock>
{code}
The first example currently throws an exception stating: "WELD-001408 Unsatisfied dependencies for type [String] with qualifiers [@Default]". The second throws an exception stating: "Item PARAMETER is not allowed to contain VALUE."
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list