4 Replies Latest reply on Feb 10, 2010 10:41 AM by Rocky S

    Avoid calling onchange event on page load?

    Rocky S Master

      This selectOneMenu code snippet has been defined in page *.xhtml page. The problem is when this .xhtml loads, it calls the functions present inside the onchange event. How to avoid calling these functions on page load ?

       

           <h:selectOneMenu id="cId"
            value="#{collatRptCatgryTypeList.catgoryId.str}"
            valueChangeListener="#{categoryId.valueCalled}"
            onchange="submit();#{collatRptCatgryMapList.typeId.setMtr(0)}" 
               converter="javax.faces.Integer">
            <s:selectItems var="cc" value="#{collatRptCatgryListMax.resultList}"
             label="#{cc.catgryDesc}" itemValue="#{cc.catgryId}"
             noSelectionLabel="All Report Category" />
           </h:selectOneMenu>