Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8860275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:14:02+00:00 2026-06-14T15:14:02+00:00

I’m facing a strange problem here. In my page i have two outputPanel .

  • 0

I’m facing a strange problem here. In my page i have two outputPanel. Inside the first, there is a schedule exhibiting my events queried from the database. Inside the other one, there is a datatable exhibiting the same events just as another means of visualization. Furthermore, there is a selectOneRadio that alternates between the two outputPanels. The problem is: When the page loads, the default outputPanel (the one containing the schedule) (SCREEN 1) is loaded perfectly. But when i alternate the selectOneRadio to the outputPanel containing the datatable and then turn back (SCREEN 2), the outputPanel doesn’t load. And the console of the browser shows the following message when i click anywhere on the page:

Uncaught TypeError: Cannot read property 'top' of undefined primefaces.js.xhtml:1
Uncaught TypeError: Cannot read property 'left' of undefined primefaces.js.xhtml:16

Here is the xhtml page:

<!-- Painel de seleção do tipo de exibição -->
            <p:panelGrid columns="2"
                         styleClass="gridNoLine clearBelow">
                <p:selectOneRadio value="#{eventoBean.tipoExibicaoSelecionada}">
                    <p:ajax listener="#{eventoBean.onTipoExibicaoAlterada}"
                            update=":frmEventos:opCalendario :frmEventos:opTabela"/>
                    <f:selectItem itemValue="1" itemLabel="Exibir calendário"/>
                    <f:selectItem itemValue="2" itemLabel="Exibir tabela"/>
                </p:selectOneRadio>
            </p:panelGrid>

            <!-- Painel do Calendário -->
            <p:outputPanel id="opCalendario">
                <p:schedule id="sEventos"
                            value="#{eventoBean.customScheduleModel}"
                            widgetVar="schEventos"
                            locale="pt"
                            rendered="#{eventoBean.tipoExibicaoSelecionada == 1}">
                    <p:ajax event="eventSelect" 
                            listener="#{eventoBean.onEventSelect}" 
                            update=":frmDetalhesEvento"
                            immediate="true" 
                            oncomplete="dlgDetalhesEvento.show();"/>
                    <p:ajax event="dateSelect" 
                            listener="#{eventoBean.onDataSelecionada}"
                            update="@form :frmNovoEditarEvento"
                            oncomplete="dlgNovoEditarEvento.show();"/>
                </p:schedule>
            </p:outputPanel >

            <!-- Painel do DataTable -->
            <p:outputPanel id="opTabela">
                <p:dataTable
                    value="#{eventoBean.eventos}"
                    paginator="true" rows="5" 
                    rowsPerPageTemplate="5,10"
                    paginatorPosition="bottom"
                    paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                    var="evento"
                    rendered="#{eventoBean.tipoExibicaoSelecionada == 2}"
                    emptyMessage="Não há eventos para exibição">
                    <f:facet name="header">
                        Eventos
                    </f:facet>
                    <!-- Colunas de edição e exclusão -->
                    <p:column styleClass="commandColumn">
                        <f:facet name="header">
                            <h:outputLabel value="Editar"/>
                        </f:facet>
                        <p:commandButton image="ui-icon-pencil" 
                                         title="Editar"
                                         update=":frmNovoEditarEvento:pNovoEditarEvento"
                                         oncomplete="dlgNovoEditarEvento.show();">
                            <f:setPropertyActionListener value="#{evento}" 
                                                         target="#{eventoBean.eventoSelecionado}" />
                        </p:commandButton>
                    </p:column>
                    <p:column styleClass="commandColumn">
                        <f:facet name="header">
                            <h:outputLabel 
                                value="Excluir"/>
                        </f:facet>
                        <p:commandButton id="cbViewExcluir" 
                                         oncomplete="dlgExcluir.show();" 
                                         icon="ui-icon-close" 
                                         title="Excluir">
                            <f:setPropertyActionListener value="#{evento}"
                                                         target="#{eventoBean.eventoSelecionado}" />
                        </p:commandButton> 
                    </p:column>
                    <p:column sortBy="#{evento.nmeEvento}" 
                              styleClass="wrap tableTitleWidth">
                        <f:facet name="header">
                            Nome
                        </f:facet>
                        <p:panelGrid columns="1" 
                                     styleClass="gridNoLine">
                            <h:outputLabel id="olViewNomeEvento" 
                                           value="#{evento.nmeEvento}" 
                                           styleClass="t2"/>
                            <p:panelGrid columns="4" styleClass="gridNoLine wrap">
                                <h:outputLabel value="Início: " styleClass="t3"/>&nbsp;
                                <h:outputLabel value="#{evento.dtaInicioEvento}"/>&nbsp;&nbsp;
                                <h:outputLabel value="Término: " styleClass="t3"/>&nbsp;
                                <h:outputLabel value="#{evento.dtaTerminoEvento}"/>&nbsp;
                            </p:panelGrid>
                            <p:separator title="Descrição do evento"/>
                            <h:outputLabel value="#{evento.dscEvento}" 
                                           styleClass="wrap"/>
                            <p:panelGrid columns="4" 
                                         styleClass="gridNoLine">
                                <p:commandButton value="Atividades"
                                                 styleClass="commandButton"
                                                 title="Gerenciar as atividades do evento."
                                                 action="atividades"/>
                                <p:commandButton value="Recursos"
                                                 styleClass="commandButton"
                                                 title="Alocar recursos para o evento."/>
                                <p:commandButton value="Serviços"
                                                 styleClass="commandButton"
                                                 title="Alocar serviços para o evento."/>
                                <p:commandButton value="Participantes"
                                                 styleClass="commandButton"
                                                 title="Gerenciar participantes do evento."/>
                            </p:panelGrid>
                        </p:panelGrid>
                    </p:column>
                </p:dataTable>
            </p:outputPanel>

And here is my bean:

...

private int tipoExibicaoSelecionada = 1;

...

public void onTipoExibicaoAlterada() {
    if (tipoExibicaoSelecionada == 1) { // Exibir como calendario

        // Realizando a lógica de painéis
        exibirComoCalendario = true;
        exibirComoTabela = !exibirComoCalendario;

    } else { // Exibir como DataTable

        // Realizando a lógica de painéis
        exibirComoCalendario = false;
        exibirComoTabela = !exibirComoCalendario;

        if (eventos == null) {
            try {
                // Consultar os eventos para exibir no DataTable
                eventos = eventoService.consultarTodos();
            } catch (Exception e) {
            }
        }
    }
}

public void onEventSelect(ScheduleEntrySelectEvent entrySelectEvent) {

    try {
        // Transformando o evento para Pojo
        eventoSelecionado = ScheduleEventConverter.convertToEventoPojo(eventoService, entrySelectEvent.getScheduleEvent());
    } catch (Exception e) {
    }

}

public void onDataInicioAlterada(DateSelectEvent e) {
}

public void onDataTerminoAlterada(DateSelectEvent e) {
}

public void onDataSelecionada(DateSelectEvent e) {
    // Gerando um novo evento para ser preenchido
    eventoSelecionado = new TbEvento();

}

public void loadModel() {

    try {

        // Carregando o custom schedule model
        customScheduleModel = new CustomScheduleModel();

        // Carregando a lista de publicos
        publicos = publicoService.consultarTodos();

        // Carregando os tipos de eventos
        tiposEventos = tipoEventoService.consultarTodos();

    } catch (Exception e) {
    }
}

I’m using the following maven dependency:

<dependency>
    <groupId>org.primefaces</groupId>
    <artifactId>primefaces</artifactId>
    <version>3.4.2</version>
</dependency>

SCREEN 1:

enter image description here

SCREEN 2:

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T15:14:03+00:00Added an answer on June 14, 2026 at 3:14 pm

    Try to replace <p:selectOneRadio & p:ajax with <h:selectOneRadio & f:ajax

    I’m not a maven user , do double check that you really using only 3.4.2 and take a look at this thread… [PF 3.1 Snapshot] Dialog + OverlayPanel + SelectOneMenu JS E

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I've tracked down a weird MySQL problem to the two different ways I was
I'm making a simple page using Google Maps API 3. My first. One marker
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
this is what i have right now Drawing an RSS feed into the php,
I have a small JavaScript validation script that validates inputs based on Regex. I
I have this code to decode numeric html entities to the UTF8 equivalent character.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.