jueves, 13 de septiembre de 2007

Struts2 action wiring (not wired)

En el appctx el wiring del bean cableando la property quedaba en null

bean name="countryAction"
class="edu.matias.region.web.struts.actions.CountryAction"
property name="manager" ref="countryManager" /
/bean

sin embargo por constructor (creando el constructor en el action) enlazo:

bean id="countryAction" scope="prototype"
class="edu.matias.region.web.struts.actions.CountryAction"
constructor-arg ref="countryManager" /
/bean



Bean xml annotation change STR1>STR2

En vez del campo name, los bean en el appctx se identifican con el campo id.