0 Replies Latest reply on Jun 12, 2008 4:56 AM by Luca Borzani

    More Duplicate Id Oddities - After Cut

    Luca Borzani Newbie

      I have this page(see below). Notice the tab with id 'lvl_tab'. If a cut the code between the rich:tab(s) tags i receive a duplicate id error. If i leave the code as is all works fine. The point is: what's the logic behind that? If you look well at the code you'll notice i have already removed all other tabs' content. (in an attempt to discover which was the guilty tab). I don't undestand what is the problem with this page...can anyone figure out why?

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.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:a4j="http://richfaces.org/a4j"
       xmlns:rich="http://richfaces.org/rich"
       xmlns:rts="http://www.runtime.it/jsf">
       <ui:composition>
       <a4j:keepAlive beanName="opportunity" ajaxOnly="true"/>
       <a4j:outputPanel id="opp-panel" layout="block">
       <rich:panel header="Aggiorna Opportunità">
       <h:panelGrid columns="4" styleClass="myTable" columnClasses="labelColumn,inputColumn">
       <h:outputLabel value="#{oppLabel.bpCode}" />
       <h:panelGroup>
       <h:inputText styleClass="binocols" disabled="true" value="#{opportunity.opportunityBean.selectedBpCode}" id="hdn_bp_id" />
       <rts:popupTrigger id="id_bp-trigger" for="id_bp_popup" reset="true" img="/resources/images/16x16/edit-find1.png"
       bean="${searchBean}" action="reinit">
       <f:attribute name="search_action" value="100" />
       </rts:popupTrigger>
       </h:panelGroup>
      
       <h:outputLabel value="#{oppLabel.oppDescr}" />
       <h:inputText id="opp_descr" styleClass="formField" binding="#{opportunity.descriptionInput}" value="#{opportunity.opportunityBean.sapOpportunityDescription}" />
      
       <h:outputLabel value="#{oppLabel.contact}" />
       <h:selectOneMenu id="opp_cnt" styleClass="formField" binding="#{opportunity.contactSelect}" value="#{opportunity.opportunityBean.sapContact}" >
       <f:selectItems value="#{opportunity.contacts}" />
       </h:selectOneMenu>
      
       <h:outputLabel value="#{oppLabel.nrOpp}" />
       <h:inputText id="opp_nr" styleClass="formField" disabled="true" value="#{opportunity.opportunityBean.sapOppId}" />
      
       <h:outputLabel value="#{oppLabel.impFact}" />
       <h:inputText id="opp_imp_fact" styleClass="formField" value="#{opportunity.invoiceImport}" disabled="true"/>
      
       <h:outputLabel value="#{oppLabel.oppStatus}" />
       <h:inputText id="opp_status" styleClass="formField" disabled="true" value="#{opportunity.displayStatus}" />
      
       <h:outputLabel value="#{oppLabel.bpArea}" />
       <h:panelGroup>
       <h:inputText id="hdn_area_bp" styleClass="binocols" style="background:#EEE; color: #3f3f3f;" disabled="true" value="#{opportunity.opportunityBean.selectedAreaBp}" />
       <rts:popupTrigger id="area_bp-trigger" for="area_bp_popup" reset="false" img="/resources/images/16x16/edit-find1.png"
       bean="${searchBean}" action="reinit">
       <f:attribute name="search_action" value="102" />
       </rts:popupTrigger>
       </h:panelGroup>
      
       <h:outputLabel value="#{oppLabel.openingDate}" />
       <rich:calendar id="opp_open_dt" locale="#{view.locale}" popup="true" binding="#{opportunity.openDateCalendar}"
       datePattern="dd/MM/y" enableManualInput="false" value="#{opportunity.opportunityBean.sapOpeningDate}" />
      
       <h:outputLabel value="#{oppLabel.sellPers}" />
       <h:selectOneMenu id="opp_sell_pers" styleClass="formField" disabled="#{not userBean.userInfo.root}" value="#{opportunity.opportunityBean.sapSellPerson}" >
       <f:selectItems value="#{opportunity.sellpersons}" />
       </h:selectOneMenu>
      
       <h:outputLabel value="#{oppLabel.closureDate}" />
       <h:inputText id="opp_cls_dt" styleClass="formField" disabled="true" value="#{opportunity.closureDate}"/>
      
       <h:outputLabel value="#{oppLabel.responsible}" />
       <h:panelGroup>
       <h:inputText styleClass="binocols" disabled="true" value="#{opportunity.opportunityBean.selectedResponsible}" id="hdn_resp" />
       <rts:popupTrigger id="respons_opp-trigger" for="respons_opp_popup" reset="true" img="/resources/images/16x16/edit-find1.png"
       bean="${searchBean}" action="reinit">
       <f:attribute name="search_action" value="106" />
       </rts:popupTrigger>
       </h:panelGroup>
      
       <h:outputLabel value="#{oppLabel.notConclAct}" />
       <h:inputText id="opp_not_concl" styleClass="formField" disabled="true" value="#{opportunity.notConcludedOpportunities}" />
      
       <rts:filler count="2" />
      
       <h:outputLabel value="#{oppLabel.closurePercent}" />
       <rich:progressBar id="opp_cls_perc" value="#{opportunity.prcClosure}" disabled="true"
       label="#{opportunity.prcClosure} %" enabled="false" minValue="-1" maxValue="100" />
      
       <h:inputHidden id="id_bp_popup_x" value="#{opportunity.opportunityBean.sapBpId}" />
       <h:inputHidden id="area_bp_popup_x" value="#{opportunity.opportunityBean.sapAreaBp}" />
       <h:inputHidden id="respons_bp_popup_x" value="#{opportunity.opportunityBean.sapResponsible}" />
       <h:inputHidden id="channel_bp_popup_x" value="#{opportunity.opportunityBean.sapChannelBp}" />
       </h:panelGrid>
       </rich:panel>
       </a4j:outputPanel> <!-- bp panel -->
      
       <a4j:outputPanel id="tab_set" layout="block">
       <rich:tabPanel id="tab-panel" switchType="client" >
       <rich:tab label="#{tab.potTab}" id="pot_tab" binding="#{opportunity.potentialTab}">
       <h:panelGrid styleClass="myTable" columnClasses="labelColumn,inputColumn" columns="2">
       <h:outputLabel value="#{oppLabel.plannedCls}" />
       <rich:calendar id="opp_planned_cls" locale="#{view.locale}" popup="true" binding="#{opportunity.closeDateCalendar}"
       datePattern="dd/MM/y" enableManualInput="false" value="#{opportunity.opportunityBean.sapPlannedClosure}" />
      
      
       <h:outputLabel value="#{oppLabel.potImp}" />
       <h:inputText id="opp_pot_imp" styleClass="formField" binding="#{opportunity.potentialImportInput}" value="#{opportunity.opportunityBean.sapPotentialImport}" />
      
       <h:outputLabel value="#{oppLabel.pondImp}" />
       <h:inputText id="opp_pond_imp" styleClass="formField" disabled="true" value="#{opportunity.wtImport}" />
      
       <h:outputLabel value="#{oppLabel.grossMargin}" />
       <h:inputText id="opp_gross_prc" styleClass="formField" binding="#{opportunity.grossMarginPrcInput}" value="#{opportunity.opportunityBean.sapGrossMarginPrc}" />
      
       <h:outputLabel value="#{oppLabel.totMargin}" />
       <h:inputText id="opp_gross_tot" styleClass="formField" disabled="true" value="#{opportunity.totalGrossMargin}" />
      
       <h:outputLabel value="#{oppLabel.intLev}" />
       <h:selectOneMenu id="opp_int_rate" styleClass="formField" binding="#{opportunity.interestRateSelect}" value="#{opportunity.opportunityBean.sapInterestRate}" >
       <f:selectItems value="#{opportunity.interests}" />
       </h:selectOneMenu>
      
      
       </h:panelGrid>
       </rich:tab>
      
       <rich:tab label="#{tab.genTab}" id="gen_tab" binding="#{opportunity.generalTab}">
      
       </rich:tab>
      
       <rich:tab label="#{tab.levTab}" id="lvl_tab" binding="#{opportunity.levelTab}">
       <a4j:support actionListener="#{opportunity.retrieveLevels}" event="ontabenter" reRender="all_levels" ajaxSingle="true" />
       <a4j:outputPanel id="all_levels" ajaxRendered="true">
       <a4j:commandButton type="button" action="#{contactNavigation.reset}" reRender="addcontact-view" oncomplete="Richfaces.showModalPanel('addContactPanel');" styleClass="button" value="#{msg.addContact}" />
       <rich:spacer height="10" width="1" />
       <rich:dataTable value="#{opportunity.contacts}" rows="10" id="levels_tbl" var="lvl" rendered="#{not empty opportunity.levels}" style="width:100%;">
       <f:facet name="header">
       <rich:columnGroup>
       <rich:column>
       <h:outputText value="" />
       </rich:column>
       <rich:column>
       <h:outputText value="#{msg.contactName}" />
       </rich:column>
       <rich:column>
       <h:outputText value="#{msg.contactPosition}" />
       </rich:column>
       <rich:column>
       <h:outputText value="#{msg.contactPhone}" />
       </rich:column>
       <rich:column>
       <h:outputText value="#{msg.contactMobile}" />
       </rich:column>
       <rich:column>
       <h:outputText value="#{msg.contactEmail}" />
       </rich:column>
       <rich:column>
       <h:outputText value="#{msg.contactEmail}" />
       </rich:column>
       </rich:columnGroup>
       </f:facet>
       <rich:column>
       <a4j:commandLink type="submit" reRender="editcontact-view" actionListener="#{opportunity.edit}" oncomplete="Richfaces.showModalPanel('editContactPanel')">
       <h:graphicImage value="/resources/images/16x16/Edit1.png" style="width:16px; height:16px; cursor:pointer" />
       <a4j:actionparam name="contactId" value="#{lvl['line']}" />
       </a4j:commandLink>
       </rich:column>
       <rich:column>
       <h:outputText value="#{lvl['Data di inizio']}" />
       </rich:column>
       <rich:column>
       <h:outputText value="#{lvl['Data di chiusura']}" />
       </rich:column>
       <rich:column>
       <h:outputText value="#{lvl['Addetto alle vendite']}" />
       </rich:column>
       <rich:column>
       <h:outputText value="#{lvl['%']}" />
       </rich:column>
       <rich:column>
       <h:outputText value="#{lvl['Importo potenziale']}" />
       </rich:column>
       <rich:column>
       <h:outputText value="#{lvl['Importo ponderato']}" />
       </rich:column>
       <f:facet name="footer">
       <rich:datascroller />
       </f:facet>
       </rich:dataTable>
       </a4j:outputPanel>
       </rich:tab>
      
       <rich:tab label="#{tab.resumeTab}" id="res_tab" binding="#{opportunity.resumeTab}">
      
       </rich:tab>
       </rich:tabPanel>
       </a4j:outputPanel>
      
       <a4j:outputPanel layout="block" style="text-align: center; margin-top: 1.0em;">
       <h:commandButton value="Salva" onclick="promptSave();" type="submit" styleClass="button" action="#{opportunity.save}" />
       <h:commandButton value="Reset" type="reset" immediate="true" styleClass="button" />
       </a4j:outputPanel>
       <rich:spacer width="1" height="5" title="Here is a spacer..."/>
       </ui:composition>
      </html>