rich:comboBox code works in Chrome and not working in IE8 and Mozilla also??
sivaprasad9394 Oct 29, 2010 7:19 AMHi all,
My model panel page should display the components in the screen as per the combo box selection,It is showing in chrome and not working in IE8.Below is my modelpanel page code.i am using 3.3.3 version Why it is not working in IE and chrome and throwing Caused by: java.lang.NullPointerException???
Model panel page:
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<rich:modalPanel id="info_payment_editModal" moveable="false" resizeable="false"
width="950" height="500" showWhenRendered="false" style="overflow-y: scroll">
<f:facet name="header">
<h:outputText value="Edit Customer Info" styleClass="modalPanel12"/>
</f:facet>
<f:facet name="controls">
<h:panelGroup>
<h:outputLabel value="Press Esc to close"></h:outputLabel>
<h:outputLabel value="(OR)"></h:outputLabel>
<h:graphicImage value="../_assets/image/close.png" id="hidelinkchargerule"
styleClass="hidelink" style="border:0" alt="Close" title="Close"/>
<rich:componentControl for="info_payment_editModal" attachTo="hidelinkchargerule"
operation="hide" event="onclick"/>
</h:panelGroup>
</f:facet>
<a4j:form id="paymethodEditForm" ajaxSubmit="true">
<a4j:region>
<h:panelGrid width="816" border="1">
<a4j:region selfRendered="true">
<a4j:include id="commonPageView" viewId="/existingcustomer/postpaid/header_common_modal.jsp"></a4j:include>
</a4j:region>
<h:panelGrid columns="4">
<h:outputText value="#{msg['existingcustomer.postpaid.modelpanel.currpaymethod']}"/>
<h:outputText value="#{msg.semiColon}"/>
<h:outputText id="postpaidpaymentMethod" styleClass="style1" value="#{paymentInfoBean.pmPaymentMethod}"/>
</h:panelGrid>
<h:panelGrid columns="7">
<h:outputText value="*" styleClass="mandatory_text" />
<h:outputText value="#{msg['existingcustomer.postpaid.modelpanel.newpaymethod']}"/>
<h:outputText value="#{msg.semiColon}"/>
<rich:comboBox id="cbxnewpaymethodField" value="#{editPaymentInfoBean.cbxpmPaymentMethod}"
listClass="myClass"
selectFirstOnUpdate="false" required="true" enableManualInput="false"
defaultLabel="#{msg.defaultLabel}" directInputSuggestions="true"
immediate="true">
<f:selectItems value="#{listBoxBean.selectPaymentMethod}"/>
<a4j:support event="onchange" actionListener="#{editPaymentInfoBean.ajaxoptionCardChangeListener}"
limitToList="true" ajaxSingle="true" eventsQueue="fooQueue" id="ajaxSuppID" immediate="true"
reRender="cbxnewpaymethodField,panelcreditcard,panelchargecard">
</a4j:support>
</rich:comboBox>
</h:panelGrid>
<h:panelGrid columns="5">
<h:outputText value="#{msg['existingcustomer.postpaid.modelpanel.changevipcode']}"/>
<h:outputText value="#{msg.semiColon}"/>
<h:selectBooleanCheckbox />
</h:panelGrid>
<a4j:outputPanel id="panelcreditcard" ajaxRendered="true">
<a4j:region rendered="#{editPaymentInfoBean.flagSelectCard == 'creditcard'}">
<h:panelGrid columns="7">
<h:outputText value="*" styleClass="mandatory_text" />
<h:outputText value="#{msg['existingcustomer.postpaid.modelpanel.creditcardtype']}"/>
<h:outputText value="#{msg.semiColon}"/>
<rich:comboBox id="cbxcardtypeField" listClass="myClass"
selectFirstOnUpdate="false" required="true" enableManualInput="false"
defaultLabel="#{msg.defaultLabel}" directInputSuggestions="true"
value="#{editPaymentInfoBean.creditCardType}">
<f:selectItems value="#{listBoxBean.selectCreditCardType}"/>
</rich:comboBox>
</h:panelGrid>
<h:panelGrid columns="5">
<h:outputText value="*" styleClass="mandatory_text" />
<h:outputText value="#{msg['existingcustomer.postpaid.modelpanel.creditcardno']}"/>
<h:outputText value="#{msg.semiColon}"/>
<td> <h:inputText value="#{editPaymentInfoBean.creditCardNo}" size="28"/>
</h:panelGrid>
<h:panelGrid columns="5">
<h:outputText value="*" styleClass="mandatory_text" />
<h:outputText value="#{msg['existingcustomer.postpaid.modelpanel.holdername']}"/>
<h:outputText value="#{msg.semiColon}"/>
1 - Citibank
</h:panelGrid>
<h:panelGrid columns="7">
<h:outputText value="*" styleClass="mandatory_text" />
<h:outputText value="#{msg['existingcustomer.postpaid.modelpanel.expirydate']}"/>
<h:outputText value="#{msg.semiColon}"/>
<h:inputText value="#{editPaymentInfoBean.expmonth}" size="28"/>
-
<h:inputText value="#{editPaymentInfoBean.expYear}" size="28"/>
</h:panelGrid>
</a4j:region>
</a4j:outputPanel>
<a4j:outputPanel id="panelchargecard" ajaxRendered="true">
<a4j:region rendered="#{editPaymentInfoBean.flagSelectCard == 'chargecard'}">
<h:panelGrid columns="5">
<h:outputText value="*" styleClass="mandatory_text" />
<h:outputText value="#{msg['existingcustomer.postpaid.modelpanel.bankaccount']}"/>
<h:outputText value="#{msg.semiColon}"/>
<h:inputText value="#{editPaymentInfoBean.bankAccount}" size="28"/>
</h:panelGrid>
<h:panelGrid columns="5">
<h:outputText value="*" styleClass="mandatory_text" />
<h:outputText value="#{msg['existingcustomer.postpaid.modelpanel.bankname']}"/>
<h:outputText value="#{msg.semiColon}"/>
<h:inputText value="#{editPaymentInfoBean.bankName}" size="28"/>
</h:panelGrid>
<h:panelGrid columns="5">
<h:outputText value="*" styleClass="mandatory_text" />
<h:outputText value="#{msg['existingcustomer.postpaid.modelpanel.bankroutingno']}"/>
<h:outputText value="#{msg.semiColon}"/>
<td><h:inputText value="#{editPaymentInfoBean.bankRoutingNo}" size="28"/>
</h:panelGrid>
<h:panelGrid columns="7">
<h:outputText value="*" styleClass="mandatory_text" />
<h:outputText value="#{msg['existingcustomer.postpaid.modelpanel.clearinghouse']}"/>
<h:outputText value="#{msg.semiColon}"/>
<rich:comboBox id="cbxclearhouseField" listClass="myClass"
selectFirstOnUpdate="false" required="true" enableManualInput="false"
defaultLabel="#{msg.defaultLabel}" directInputSuggestions="true"
value="#{editPaymentInfoBean.cbxClearingHouse}">
<f:selectItems value="#{listBoxBean.selectclearingHouse}"/>
</rich:comboBox>
</h:panelGrid>
</a4j:region>
</a4j:outputPanel>
<h:panelGrid columns="5">
<h:outputText id="notesField" value="#{msg.notes}"/>
<h:outputText value="#{msg.semiColon}"/>
<h:inputTextarea cols="50" rows="5" value="#{editPaymentInfoBean.pmNotes}"/>
</h:panelGrid>
<h:panelGrid columns="6">
<a4j:commandButton limitToList="true" ajaxSingle="true"
type="button" id="saveButtonId" styleClass="celcocm01" value="#{msg.save}"
oncomplete="Richfaces.hideModalPanel('info_payment_editModal');"/>
<a4j:commandButton limitToList="true" ajaxSingle="true"
type="button" id="resetButtonId" styleClass="celcocm01" value="#{msg.reset}"/>
<rich:componentControl for="info_payment_editModal" attachTo="resetButtonId"
operation="hide" event="onclick" />
<a4j:commandButton limitToList="true" ajaxSingle="true"
type="button" id="cancelButtonId" styleClass="celcocm01" value="#{msg.cancel}"
oncomplete="Richfaces.hideModalPanel('info_payment_editModal')"/>
</h:panelGrid>
</h:panelGrid>
</a4j:region>
</a4j:form>
</rich:modalPanel>
Backing Bean:
public void ajaxoptionCardChangeListener(ActionEvent event)
{
log.info("Calling into ajaxoptionCardChangeListener...");
if(this.getCbxpmPaymentMethod().toString()!=null)
{
log.info("Selected Option:"+this.getCbxpmPaymentMethod().toString());
if(this.getCbxpmPaymentMethod().toString().equals("Credit Card"))
{
setFlagSelectCard("creditcard");
}
if(this.getCbxpmPaymentMethod().toString().equals("Charge Card"))
{
setFlagSelectCard("chargecard");
}
}
}