You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "Tang, Jason" <ja...@ubc.ca> on 2005/11/09 22:49:24 UTC

orgApacheMyfacesJsListenerSetExpressionProperty is not defined

Dear all,

I tried using jsValueChangeListener on a drop down to hide/unhide the component in my jsp. 

	  <h:outputLabel for="degree" value="#{adms_messages['program_degree']}"/>
                  <h:selectOneMenu id="degree" value="#{form.degree}" required="true">
                    <f:selectItem itemValue="" itemLabel="select a degree"/>
                    <f:selectItems value="#{form.degreeList}"/>
                    <t:jsValueChangeListener for="degreeOptionLabel" expressionValue="($srcElem.options[$srcElem.selectedIndex].value=='MENG  ')?$destElem.style.display='inline':$destElem.style.display='none';"/>
                    <t:jsValueChangeListener for="degreeOption" expressionValue="($srcElem.options[$srcElem.selectedIndex].value=='MENG  ')?$destElem.style.display='inline':$destElem.style.display='none';"/>
                    <t:jsValueChangeListener for="degreeOptionError" expressionValue="($srcElem.options[$srcElem.selectedIndex].value=='MENG  ')?$destElem.style.display='inline':$destElem.style.display='none';"/>
                  </h:selectOneMenu>
                  <h:message id="degreeError" for="degree" styleClass="errorMessages"/>

                  <h:outputLabel id="degreeOptionLabel" for="degreeOption" value="#{adms_messages['program_degreeOption']}"/>
                  <h:selectOneMenu id="degreeOption" value="#{form.degreeOption}" required="false">
                    <f:selectItem itemValue="" itemLabel="select a degree option"/>
                    <f:selectItems value="#{form.degreeOptionList}"/>
                  </h:selectOneMenu>
                  <h:message id="degreeOptionError" for="degreeOption" styleClass="errorMessages"/>

But I keep getting the following error in the javascript console of the browser:
Error: orgApacheMyfacesJsListenerSetExpressionProperty is not defined
that the js listener is not working...

I checked that the following script tag

<script src="/sscportal/faces/myFacesExtensionResource/jslistener.JsValueChangeListenerTag/11302665/JSListener.js" type="text/javascript"><!--
//--></script></head>

is properly embedded in the header so it should be able to access the javascript. 

Did I do anything wrong?
- Jason