1 Reply Latest reply on Feb 13, 2012 5:23 AM by napartar

    Problem showing a modal panel in RichFaces 4

    napartar

      Hello everybody,

       

      I have a problem with the componentControl element, I have a faces page which has a toolbar and a dropdownMenu is displayed here. My idea is when clicking a menuItem from there, a modal panel has to appear in the screen. My implementation of dropDown menu is this one (it's located inside the toolbar).

       

      <h:form>

                      <rich:toolbar>

       

                          <rich:dropDownMenu rendered="#{logedBean._LoggedIn=='true'}">

                              <f:facet name="label">

                                  <h:panelGroup>

                                      <h:outputText value="#{msg.DATOS_GENERALES}" />

                                  </h:panelGroup>

                              </f:facet>

                              <rich:menuItem label="#{msg.DATOS_USUARIO}">

                                  <rich:componentControl target="panel" operation="show"

                                      event="click" />

                              </rich:menuItem>

                              <rich:menuItem label="#{msg.PROPIEDADESSESION}"

                                  reRender="propiedadesSesion">

                                  <rich:componentControl target="propiedadesSesion"

                                      operation="show" event="click" />

                              </rich:menuItem>

                              <rich:menuSeparator />

                              <rich:menuItem label="#{msg.LOGOUT}" action="#{logedBean.logout}" />

                          </rich:dropDownMenu>

      ...

       

      Problem is that my target panels "panel" and propiedadesSesion are displayed during few seconds and after dissapear. It seems the page it's refreshing, but don't know why, cause there are not reRender operations. Any idea what the problem can be?

       

      Thanks in advance!

        • 1. Re: Problem showing a modal panel in RichFaces 4
          napartar

          It seems Richfaces 4 component control should work without "event" attribute, however, if I omit it the parser is giving me an error... It looks like rich is not able to recognize "click" event, because problem is the same if I declare event with an empty value (event=""). Any idea?