Re: [picocontainer-dev] Multi Injection
Shawn <[email protected]>
| Newsgroups | gmane.comp.java.picocontainer.devel |
|---|---|
| Message-ID | <[email protected]> |
Mauro Talevi wrote:
>
> What is the usecase for it? Can't image OTOH why one would choose mixed
> mode.
>
One possible answer.
[code]
public class EditUserAction{
@Inject("${request.id}")
private Long userId
private UserService userService;
@Inject()
public EditUserAction(UserService us){
this.userService = us;
}
public void execute(){
if(userId == null){
redirectTo("/listUser.htm");
return;
}
User user = userService.loadUser(userId);
....
}
}
[/code]
--
View this message in context: http://www.nabble.com/Multi-Injection-tf4286388.html#a12214085
Sent from the NanoContainer - PicoContainer - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email