5 Replies Latest reply on Jun 9, 2006 9:50 AM by gavin.king

    Seam component hides managed bean with same name

    armita

      I am getting lots of:
      WARN [SeamVariableResolver] Seam component hides managed bean with same name
      What is the meaning of it?

        • 1. Re:  Seam component hides managed bean with same name
          gavin.king

          It means there is a bean in a JSF context variable with the same name as a Seam component.

          • 2. Re:  Seam component hides managed bean with same name
            simonxx

            I'm getting this warns too,

            I don't know why because i've done everything like in "Example showing you how to generate a CRUD web application from a database using JBoss Eclipse IDE" tutorial.

            I don't know too if that can be reason of my problem with this application. Everythin works fine but application dont see data in database and dont add any data to database.

            I dont know what is going on.

            • 3. Re:  Seam component hides managed bean with same name
              anders.hedstrom

              My guess is that if you use a h:dataTable you are using the same name in <h:dataTable var="name" as you have named one of your Seam components.

              • 4. Re:  Seam component hides managed bean with same name
                alesj

                 

                "gavin.king@jboss.com" wrote:
                It means there is a bean in a JSF context variable with the same name as a Seam component.


                I'm using Seam with JBoss Portal.

                I get the same warning on a simple logout:

                <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
                <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
                <f:view>
                 <h:form>
                 Hello <h:outputText value="#{currentUser.username}"/>!
                 <p/>
                 <h:commandLink action="#{gulogout.logout}" value="Logout"/>
                 </h:form>
                </f:view>
                
                
                @Stateless
                @LoggedIn
                @Name("gulogout")
                public class LogoutAction implements Logout {
                
                 @In
                 Context sessionContext;
                
                 public String logout() {
                 Seam.invalidateSession();
                 sessionContext.set(USER_VAR, null);
                 sessionContext.set(LOGGED_IN, null);
                 return "login";
                 }
                
                }
                


                name: java.lang.String = {java.lang.String@11536}"gulogout"
                component: java.lang.Object = {$Proxy266@11580}"LogoutAction"
                managedBean: java.lang.Object = {$Proxy266@11581}"LogoutAction"

                Where / when is my jsf context variable created?

                Rgds, Ales

                • 5. Re:  Seam component hides managed bean with same name
                  gavin.king

                  There was a bug in the CVS version of Seam that caused this. I fixed the bug yesterday.