panelTabSet multiple requests with icefaces/jsf

Viewed 32

I am facing problems where the scenario that the user can double click on the navigation menu tabs.

Since it is a panelTabSet it is mandatory to use a field.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ice="http://www.icesoft.com/icefaces/component"
      xmlns:ace="http://www.icefaces.org/icefaces/components"
      xmlns:icecore="http://www.icefaces.org/icefaces/core">
<!--@elvariable id="messages" type="java.util.ResourceBundle"-->
    <ui:define name="page">
        <ice:outputText styleClass="sectionTitle"
                        value="#{messages['callers_page.title']}" />
    </ui:define>
    <ui:define name="center">
        <ice:form id="formModel">
            
            <br />
            <ice:panelTabSet id="tables"
                             selectedIndex="#{CallersBusinessUi.selectedIndex}" >
        
                <ui:include src="tab_report.xhtml" />
                <ui:include src="tab_customers.xhtml" />
            </ice:panelTabSet>
        </ice:form>
        </ui:define>
    </ui:composition>
    </html>

tab report

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ice="http://www.icesoft.com/icefaces/component"
    xmlns:ace="http://www.icefaces.org/icefaces/components"
    xmlns:icecore="http://www.icefaces.org/icefaces/core">
    <ui:composition>
        <ice:panelTab label="customers">    
             <ace:panel id="panel_customers"
                      widgetVar="myCustomerPanel"
                      closable="false"
                      toggleable="false"
                      collapsed="false"
                      style="width: 100%;">
                <table style="width: 100%;">
                [...]
                </table>
                </ace:panel>
        </ice:panelTab> 
    </ui:composition>
</html>

tab customer

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ice="http://www.icesoft.com/icefaces/component"
    xmlns:ace="http://www.icefaces.org/icefaces/components"
    xmlns:icecore="http://www.icefaces.org/icefaces/core">
<ui:composition>
    <ice:panelTab label="report}">  
                 <ace:panel id="panel_report"
                       widgetVar="myReportPanel"
                       closable="false"
                       toggleable="false"
                       collapsed="false"
                       style="width: 100%;">
                    <table style="width: 100%;">
                        [...]
                    </table>
                    </ace:panel>
                </ice:panelTab> 
</ui:composition>
</html>

I am trying to prevent the user from double clicking on the navigation menu of the panelTabSet.

I tried to use blockUiOnSubmit (icecore) but strangely one tab stopped working after the request.

I tried using SingleSubmit but when double clicking inside the tab, the behavior was not as expected.

What is the workaround to block double clicks on tab navigation with icefaces e jsf 2.0?

0 Answers
Related