2 Replies Latest reply on Feb 2, 2010 9:12 AM by v c

    FacesMessages not working when nested inside iteration components

    v c Newbie

      hihi all,

       

      is there a way to display messages (using the FaceMessages system) that are nested inside an iteration component like rich:orderingList ?

       

      everything i have tried has resulted in the following log warning:

       

      INFO: WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.

      sourceId=j_id48:j_id65:j_id66:j_id67:j_id176:groupList-nameField[severity=(ERROR 2)....

       

      i am using the rich:message tag nested inside the iteration component.

       

      thanks,

      -v

       

       

       


        • 1. Re: FacesMessages not working when nested inside iteration components
          Ilya Shaikovsky Master
          please show the code you tried. I'm not sure that completelly get where you need to display messages.
          • 2. Re: FacesMessages not working when nested inside iteration components
            v c Newbie

            hihi Ilya,

             

            sure, the following is basically what i'm trying to do:

             

             

            <h:form>
            
            <rich:orderingList id="myList" value="myBean.myObjects" var="myItem">
            <rich:column>
            <h:inputText value="myItem.name" />
            <rich:message errorClass="errors" for="myList" />
            </rich:column>
            </rich:orderingList>
            
            <a4j:commandButton value="Submit" reRender="myList" />
            
            </h:form>
            

             

             

            after the form submits there is no message being displayed for the above code.

             

            but, when i place the <rich:message> tag outside of the <rich:orderingList> tag i can see the rendered error message fine.  but this is a problem because i have many fields inside the orderingList and really need 'contextual' error display (i.e. error messages displayed by the field for which it is meant), instead of displaying all messages at the bottom outside of the orderingList.

             

            is what i'm trying to do even possible?  can you please explain what happens inside the iteration component...?  i don't really understand it's behavior and i read somewhere that it "resets the state of all nested components" at the rendering phase...  i am basically trying to embed forms inside of the orderinglist and have it behave like a regular form (that is not embedded inside anything), because i need the re-ordering capability of the orderingList.

             

            -v