0 Replies Latest reply on Jun 4, 2008 6:26 PM by oneilltg

    simpleTogglePanel with opened="false" rquires links inside t

    oneilltg

      Hello,
      I'm upgrading from RF3.1.4 to RF3.2.1 and I noticed a different behavior (assuming bug) for links within a simple toggle panel when the panel defaults to closed.

      I have an h:commandLink within the toggle, and after opening the toggle, when I first click the link, it appears that the page re-loads and I don't go to my link destination. I click it again, and it works as desired. I've found that I can changed opened="true" and it works fine. I could also change switchType to server, and it works fine. Neither is the best solution for my application, since I have a lot of data within the simple toggle so I don't want to default it to open, and it is slow if I change to server mode.

      Is this a known bug?

      Here is a very simple test case. The first toggle labeled "default closed" is the one that doesn't behave as I expected (and how it did in 3.1.4).

      Thanks,
      Tom

      xhtml:


      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
      xmlns:s="http://jboss.com/products/seam/taglib"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:rich="http://richfaces.ajax4jsf.org/rich"
      xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
      xmlns:app="http://www.aluapaddockpro.com/jsf"
      template="../template/nonAjaxLayout.xhtml">
      <ui:define name="content">

      <h:form>




      <rich:simpleTogglePanel width="650px" opened="false" switchType="client" label="Default Closed">
      <h:commandLink value="RandomLink" action="#{mySuperSimpleBB.clicked}" />
      </rich:simpleTogglePanel>




      <rich:simpleTogglePanel width="650px" opened="true" switchType="client" label="Default Open">
      <h:commandLink value="RandomLink" action="#{mySuperSimpleBB.clicked}" />
      </rich:simpleTogglePanel>




      <rich:simpleTogglePanel width="650px" opened="false" switchType="server" label="Default Closed, Server">
      <h:commandLink value="RandomLink" action="#{mySuperSimpleBB.clicked}" />
      </rich:simpleTogglePanel>




      <rich:simpleTogglePanel width="650px" opened="true" switchType="server" label="Default Open, Server">
      <h:commandLink value="RandomLink" action="#{mySuperSimpleBB.clicked}" />
      </rich:simpleTogglePanel>
      </h:form>
      </ui:define>
      </ui:composition>


      backing bean:



      package action.com.paddockPro.backingBean;

      import org.jboss.seam.annotations.Logger;
      import org.jboss.seam.ScopeType;

      import org.jboss.seam.annotations.Scope;
      import org.jboss.seam.annotations.Begin;
      import org.jboss.seam.annotations.Create;
      import org.jboss.seam.annotations.Name;
      import org.jboss.seam.log.Log;

      @Name("mySuperSimpleBB")
      @Scope(ScopeType.CONVERSATION)
      public class MySuperSimpleBB {

      @Logger Log log;


      public MySuperSimpleBB()
      {
      }

      @Begin(join=true)
      @Create
      public void init()
      {
      }

      public void clicked() {
      log.info("hello world!");
      }
      }