I'm attempting to understand the @Inject Annotation and how it can be used. I'm trying to create a tag library that needs to look up action data, so following the pattern from the FormTag I added this methods to my tag class:
private boolean enableDynamicMethodInvocation = true; private Configuration configuration; private ActionMapper actionMapper; /** * Inject a flag as to whether Dynamic Method Invocation is enabled * * @param enable "true" to enable */ @Inject(StrutsConstants.STRUTS_ENABLE_DYNAMIC_METHOD_INVOCATION) public void setEnableDynamicMethodInvocation (String enable) { enableDynamicMethodInvocation = Boolean.parseBoolean(enable); log.debug("Dynamic Method Invocation Enabled {}",enable); } //setEnableDynamicMethodInvocation /** * Inject the Struts Configuration for looking up the proper Action * * @param config The Struts Configuration */ @Inject public void setConfiguration (Configuration configuration) { this.configuration = configuration; log.debug("Struts Configuration {}",configuration); } //setConfiguration /** * Inject the Action Mapper * * @param actionMapper The Action Mapper */ @Inject public void setActionMapper (ActionMapper actionMapper) { this.actionMapper = actionMapper; log.debug("Struts Action Mapper {}",actionMapper); } //setActionMapper But the attributes never get injected into the class. Is there something else that I have to configure to get this working? Thanks. (*Chris*) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]