1 Reply Latest reply on Aug 27, 2012 12:07 PM by Rui Albuquerque

    Refractoring/rich:select Problems

    Rui Albuquerque Newbie

      Hi. So i'm doing the user end web-app for a pilot aplication we're developing at my company. Now, its the first i've ever done web-development and jsf.

       

      So, i had this page up and running friday, and before we left, we all joined our parts of the project together, and refractored them into a comon structure for an ear file.

       

      Today, when i came back, the whole page was not working. The code is the same, and i've checked all of the imports and packages in the beans and support classes and the faces-config file....

       

      Anyone has any idea of what could be happening, or what i could be missing?

       

      BTW, the problem is centered around h:selecOneMenu and rich:select wich aparently no longer submit their forms when the a button is pressed/don't call actionListeners...

       

      the page is this one:

        • 1. Re: Refractoring/rich:select Problems
          Rui Albuquerque Newbie

          the page didn't get posted... Here it is:

           

           

           

           

          <!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:h="http://java.sun.com/jsf/html"

                    xmlns:f="http://java.sun.com/jsf/core"

                    xmlns:ui="http://java.sun.com/jsf/facelets"

                    xmlns:rich="http://richfaces.org/rich"

                    xmlns:a4j="http://richfaces.org/a4j" xmlns:p="http://primefaces.org/ui">

           

           

          <h:head />

          <h:body id = "raiz">

                    <div id="container" style="width: 1005px">

                              <div id="support" style="width: 1005px; background-color: #000000">

                                        <u style="float: right; FONT-SIZE: x-small; COLOR: #ffffff">|About</u><u

                                                  style="float: right; FONT-SIZE: x-small; COLOR: #ffffff">Support</u>

                              </div>

                              <div id = "header" style = "COLOR: #ffffff; FONT-SIZE: large;

                                                   FONT-FAMILY: 'Calibri'; margin-bottom: 10px; background-color: #000000">

                                                  <h:graphicImage library = "images" name="logo.png" style = "max-height: 50px; margin-left: 15px;

                                                             margin-top: 15px; margin-bottom: 6px"/>

                                                  <i style ="text-align:left; FONT-SIZE:xx-large;margin-left: 10px">ASAT

                                                            <b style="FONT-SIZE: xx-small; text-align:left">

                                                                      by XYZ

                                                            </b>

                                                  </i>

                                        </div>

                              <div id="content" style="float: right; width: 818px;">

                                        <h:form>

                                                  <rich:panel style="float:left; width:220px; margin-right:5px">

                                                            <f:facet name="header">

                                                                      <h:outputText value="Choose ASR" />

                                                            </f:facet>

                                                            <rich:select value="#{TemperatureBean.asr5k}"

                                                                      enableManualInput="false" defaultLabel="Choose Here"

                                                                      style="Width:180px">

                                                                      <f:selectItems value="#{TemperatureBean.getAsr()}" var="asr"

                                                                                itemLabel="#{asr.getNodenumber()}" />

                                                                      <f:converter converterId="ASRConverter" />

                                                            </rich:select>

           

                                                            <div id="cardSelect" style="float: left; width: 220px">

                                                                                <a4j:commandButton value="Select" render="dataTable"

                                                                                          reRender="dataTable" style="width:65px"

                                                                                          actionListener="#{TemperatureBean.getList}">

                                                                                          <f:attribute name="mode" value="3" />

                                                                                </a4j:commandButton>

                                                            </div>

           

           

                                                  </rich:panel>

                                        </h:form>

                                        <p />

                                        <p />

                                        <p />

                                        <a4j:outputPanel ajaxRendered="true" id="dataTable" rendered="true">

                                                  <rich:dataTable value="#{TemperatureBean.getCards()}" columns="5"

                                                            rows="#{UpperTray.getCards().size()}" var="cards"

                                                            style="text-align:center; width:500px; margin-right:159px; margin-left:159px"

                                                            id="dados">

                                                            <h:column>

                                                                      <f:facet name="header" Render="true">

                                                                                <h:outputText value="Slot" />

                                                                      </f:facet>

                                                                      <h:outputText value="#{cards.getSlot()}" />

                                                                      <f:facet name="footer">

                                                                                <h:outputText value="Slot" />

                                                                      </f:facet>

                                                            </h:column>

           

           

                                                            <h:column>

                                                                      <f:facet name="header">

                                                                                <h:outputText value="Temperature" />

                                                                      </f:facet>

                                                                      <h:outputText value="#{cards.getTemperature()}" />

                                                                      <f:facet name="footer">

                                                                                <h:outputText value="Temperature" />

                                                                      </f:facet>

                                                            </h:column>

           

           

                                                            <h:column>

                                                                      <f:facet name="header">

                                                                                <h:outputText value="Limit Temperature" />

                                                                      </f:facet>

                                                                      <h:outputText value="#{cards.getTempLimit()}" />

                                                                      <f:facet name="footer">

                                                                                <h:outputText value="Limit Temperature" />

                                                                      </f:facet>

                                                            </h:column>

                                                            <h:column>

                                                                      <f:facet name="header">

                                                                                <h:outputText value="Time Stamp" />

                                                                      </f:facet>

                                                                      <h:outputText value="#{cards.getTimeStampTemp()}" />

                                                                      <f:facet name="footer">

                                                                                <h:outputText value="Time Stamp" />

                                                                      </f:facet>

                                                            </h:column>

                                                  </rich:dataTable>

                                        </a4j:outputPanel>

           

                                        <h:form id = "buttonform">

                                                            <h:commandButton value="+Info" render = "out"

                                                             reRender="out"

                                                             style="width:65px">

                                                                      <f:setPropertyActionListener value="#{true}"

                                                                                target="#{TemperatureBean.renderTemp}" />

                                                            </h:commandButton>

                                        </h:form>

                                        <a4j:outputPanel >

                                                  <rich:panel appendID = "false" id = "out" rendered="#{TemperatureBean.isRenderTemp()}">

                                                                      <h3>From:</h3>

                                                                      <h:form>

                                                            <h:selectOneMenu value="#{TemperatureBean.dia}"

                                                                                enableManualInput="false" defaultLabel="Choose Here"

                                                                                style="Width:180px" valueChangeListener = "#{TemperatureBean.submit}">

                                                                      <f:selectItems value="#{TemperatureBean.getDias()}"/>

                                                                      <a4j:ajax event = "valueChange" render = "from" execute = "@this"/>

                                                            </h:selectOneMenu>

                                                                      </h:form>

                                                                      <h:form id = "calendarform">

           

                                                                      <a4j:outputPanel id = "from" layout="block">

           

                                                                                <rich:select value="#{TemperatureBean.selectedDate}"  rendered = "#{not empty TemperatureBean.dia}" 

                                                                                                    enableManualInput="false" defaultLabel="Choose Initial time Here"

                                                                                                    style="Width:150px">

                                                                                          <f:selectItems value="#{TemperatureBean.getItem()}"/>

                                                                                </rich:select>

           

                                                                                <h3>To:</h3>

                                                                                <rich:select value="#{TemperatureBean.selectedDateFinal}" rendered = "#{not empty TemperatureBean.dia}"

                                                                                                    enableManualInput="false" defaultLabel="Choose Final time Here"

                                                                                                    style="Width:150px">

                                                                                          <f:selectItems value="#{TemperatureBean.getItem()}"/>

                                                                                </rich:select>

                                                                      </a4j:outputPanel>

                                                                                <div style = "float:right" >

                                                                                          <h:commandButton value="Submit Dates" render = "line" reRender = "line"

                                                                                                               actionListener="#{TemperatureBean.getList}" submit = "@form">

                                                                                                    <f:attribute name="mode" value="5" />

                                                                                          </h:commandButton>

                                                                                </div>

           

           

                                                            </h:form>

                                                  </rich:panel>

                                        </a4j:outputPanel>

                                        <p:outputPanel id = "chartpanel">

                                                            <h:form id = "chartform">

                                                                                <p:outputPanel id="panel" rendered = "#{TemperatureBean.youcan}">

                                                                                          <p:lineChart id="line" value="#{TemperatureBean.data}"

                                                                                                    legendPosition="ne" title="Temperature Analisys" minY="0"

                                                                                                    maxY="110" style="height:300px" rendered = "#{TemperatureBean.youcan}"/>

                                                                                </p:outputPanel>

                                                            </h:form>

                                        </p:outputPanel>

                              </div>

           

                              <div id="menu" style="text-align: left; float: left; width: 182px">

                                                  <h:form id = "form">

                                                            <rich:panelMenu mode = "server" topGroundExpandedRightIcon = "triangleDown" topGroundCollapsedRightIcon = "triangle"

                                                                                                      groupExpandedLeftIcon = "disc" groupCollapsedLeftIcon = "disc" selectable = "true"

                                                                                                      expandSingle = "false">

                                                                        <rich:panelMenuGroup label = "Index" mode = "server" selectable = "true"

                                                                                  action = "index"/>

                                                                        <rich:panelMenuGroup label = "Core" expanded = "#{Controller.core}">

                                                                                  <rich:panelMenuItem label = "HLR"

                                                                                            actionListener = "#{Controller.setCore}"

                                                                                            mode = "server"/>

                                                                                  <rich:panelMenuItem label = "MSS"

                                                                                            actionListener = "#{Controller.setCore}"

                                                                                            mode = "server"/>

                                                                                  <rich:panelMenuItem label = "MME"

                                                                                            actionListener = "#{Controller.setCore}"

                                                                                            mode = "server"/>

                                                                                  <rich:panelMenuItem label = "SGW"

                                                                                            actionListener = "#{Controller.setCore}"

                                                                                            mode = "server"/>

                                                                                  <rich:panelMenuItem label = "PGW"

                                                                                            actionListener = "#{Controller.setCore}"

                                                                                            mode = "server"/>

                                                                                  <rich:panelMenuItem label = "GGSW"

                                                                                            actionListener = "#{Controller.setCore}"

                                                                                            mode = "server"/>

                                                                                  <rich:panelMenuItem label = "SGSN"

                                                                                            actionListener = "#{Controller.setCore}"

                                                                                            mode = "server"/>

                                                                        </rich:panelMenuGroup>

                                                                        <rich:panelMenuGroup label = "Hardware" id = "Hardware"

                                                                                            expanded = "#{Controller.hardware}"

                                                                                            actionListener = "#{Controller.setHardware}">

                                                                                  <rich:panelMenuGroup label = "Fans" id = "fans"

                                                                                                      expanded = "#{Controller.fans}"

                                                                                                      acionListener = "#{Controller.setFans}">

                                                                                            <rich:panelMenuItem label = "UpperTray" id = "UpperTray"

                                                                                                                action = "UpperTray"

                                                                                                                actionListener = "#{Controller.setFans}"

                                                                                                                mode = "server"/>

                                                                                            <rich:panelMenuItem label = "LowerTray" id = "lowertray"

                                                                                                                action = "LowerTray"

                                                                                                                actionListener = "#{Controller.setFans}"

                                                                                                                mode = "server"/>

                                                                                            <rich:panelMenuItem label = "Comparison" id = "controller"

                                                                                                                action = "CompareTray"

                                                                                                                actionListener = "#{Controller.setFans}"

                                                                                                                mode = "server"/>

                                                                                  </rich:panelMenuGroup>

                                                                                  <rich:panelMenuGroup label = "Cards" id = "cards" expanded = "#{Controller.cards}">

                                                                                            <rich:panelMenuItem label = "Temperature" id = "temperature"/>

                                                                                            <rich:panelMenuItem label = "Inventory" id = "inventory"

                                                                                                                action = "Cards"

                                                                                                                actionListener = "#{Controller.setCards}"

                                                                                                                mode = "server"/>

                                                                                  </rich:panelMenuGroup>

                                                                        </rich:panelMenuGroup>

                                                                        <rich:panelMenuGroup label = "E-NodeB"/>

                                                                      <rich:panelMenuGroup label = "Alarm" expanded = "#{Controller.alarms}">

                                                                                  <rich:panelMenuItem label = "Crash"

                                                                                            actionListener = "#{Controller.setAlarms}"

                                                                                            mode = "server"/>

                                                                                  <rich:panelMenuItem label = "AlarmList"

                                                                                            actionListener = "#{Controller.setAlarms}"

                                                                                            mode = "server"/>

                                                                                  <rich:panelMenuItem label = "SNMP"

                                                                                            actionListener = "#{Controller.setAlarms}"

                                                                                            mode = "server"/>

                                                                        </rich:panelMenuGroup>

                                                                        <rich:panelMenuGroup label = "Configuracoes"

                                                                                            expanded = "#{Controller.configurations}">

                                                                                  <rich:panelMenuItem label = "BGP"

                                                                                                      actionListener = "#{Controller.setConfigurations}"

                                                                                                      mode = "server"/>

                                                                                  <rich:panelMenuItem label = "APN"

                                                                                                      actionListener = "#{Controller.setConfigurations}"

                                                                                                      mode = "server"/>

                                                                        </rich:panelMenuGroup>

                                                                        <rich:panelMenuGroup label = "ECS" expanded = "#{Controller.ecs}">

                                                                                  <rich:panelMenuItem label = "CDR"

                                                                                            actionListener = "#{Controller.setEcs}"

                                                                                            mode = "server"/>

                                                                                  <rich:panelMenuItem label = "PCFR"

                                                                                            actionListener = "#{Controller.setEcs}"

                                                                                            mode = "server"/>

                                                                                  <rich:panelMenuItem label = "DCS"

                                                                                            actionListener = "#{Controller.setEcs}"

                                                                                            mode = "server"/>

                                                                        </rich:panelMenuGroup>

                                                                        <rich:panelMenuGroup label = "Radius"/>

                                                              <rich:panelMenuGroup>

                                                                        <h:link value = "Subscribers" outcome = "subscribers"/>

                                                              </rich:panelMenuGroup>

                                                              <rich:panelMenuGroup label = "Subscribers" mode = "server" selectable = "true"

                                                                                  action = "subscribers"/>

                                                              <rich:panelMenuGroup label = "Localizacao">

                                                              </rich:panelMenuGroup>

                                                    </rich:panelMenu>

                                                  </h:form>

                              </div>

           

           

                              <div id="footer" style="clear: both">

                                        <hr />

                                        <i

                                                  style="FONT-SIZE: x-small; FONT-FAMILY: 'Times New Roman'; float: right">Copyright

            XYZ</i>

                              </div>

                    </div>

           

           

          </h:body>

          </html>