Warn in Parameter when climbing the application

Asked

Viewed 26 times

0

I made an application using the Demoiselle 2.4.2 JSF+JPA archetype with several view classes extending from AbstractEditPageBean. In some I added a parameter, as in this example:

@ViewController
public class ContratoEstagioInstituicaoEditMB extends AbstractEditPageBean<...

@Inject
@ViewScoped
@Name("c")
private Parameter<String> contratoParametro;

When the application goes up the alert appears on the console:

6188 WARN  org.jboss.weld.Bootstrap - WELD-001440 Scope type @br.gov.frameworkdemoiselle.annotation.ViewScoped() used on injection point [field] @Inject @Name @ViewScoped private br.com.teste.myApp.view.ContratoEstagioInstituicaoEditMB.contratoParametro

Should I worry about it? I’m doing something wrong?

Thank you

Fernando

1 answer

0

Usually @Viewscoped is used in the Managed Bean and not in the parameters of the same.

The warning is just about this.

  • Initially I put without Viewscoped, but MB "lost" the parameter when using the Primefaces Frameworkd Dialog. Then I noticed that in parameter documentation also uses.

  • warn really is because Managedbean already has the Viewcontroler annotation which in turn is a stereotype that also contains Viewscoped and CDI(Weld) should apply the same scope to the attributes. Strange that you are "losing" the parameter. But if this is what solves there are no problems, as it is only a warn.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.