2 Replies Latest reply on Aug 4, 2006 7:58 AM by Philipp Taprogge

    In attribute requires value for component

    Philipp Taprogge Newbie

      I am totally confused...
      I am working with an existing Seam application running inside JBoss Portal (JBoss 4.0.4.GA, EJB3 rc8, Portal 2.4.0.CR3) with the MyFacesGenericPortlet.
      All existing components work.
      Now I tried to add a new component and get said error.
      I have stripped it down in trying to find the cause, but had no luck.
      Perhaps one of you can tell me what I am doing wrong.

      This is my POJO to hold the entered information. Even scoping it "SESSION" did not make any difference.

      public class UserInput {
       private String username;
       private String password;
       public String getPassword() {
       return password;
       public void setPassword(String aPassword) {
       this.password = aPassword;
       public String getUsername() {
       return username;
       public void setUsername(String aUsername) {
       this.username = aUsername;

      This is my SessionBean:

      @Conversational(ifNotBegunOutcome = Outcome.REDISPLAY)
      public class UserActionBean implements UserAction {
       private static Logger logger = Logger.getLogger(UserActionBean.class);
       @PersistenceContext(type = EXTENDED)
       private EntityManager em;
       @In(create = true)
       private UserInput theUser;
       public String beginStuff() {
       logger.info("begin called");
       logger.info("Data so far: username="
       + theUser.getUsername());
       return Outcome.REDISPLAY;
       public void destroy() { }

      And this is the jsp I use as default view for the portlet:

      <table border="0">
       <td align='left'>username:</td>
       <td><h:inputText id="username"
       required="true" />
       <h:message style="color:red" for="username" /></td>
       <td align='left'>password:</td>
       <td><h:inputText id="password"
       required="true" />
       <h:message style="color:red" for="password" /></td>
       <td height='60' align='left'>
       <h:commandButton type="submit" value="create user"
       action="#{usercreate.beginStuff}" /></td>
       <td align="right"><input type="reset" value="reset"></td>
      <h:messages style="color:red" />

      Now, entering no information at all results (correctly) in "required" messages to be displayed for each field.
      Entering any data and hitting the button results in a
      org.jboss.seam.RequiredException: In attribute requires value for component: usercreate.theUser

      being thrown.

      Any thoughts?

      Regards, Phil