0 Replies Latest reply on Jul 15, 2008 3:04 PM by E Aish

    Please help with this error - width is null or not an object

    E Aish Novice

      Hi,

      Let me explain the situation and the problem that I am facing. I tried many options - like trying one line at a time, etc. Nothing helps me for the last 2 days. If you could help me with the solution, I really appreciate and grateful to you.


      I have a small web application that starts with the index page. This index page has a header at the top, left side menu and the contents will be displayed on the right side depending on the menu item selected on the left hand side. Also, at the top and below the header, I have included rich:toolbar. The tool bar and the left menu item lists the same programs.

      For only one program, when I selected that program thru the left hand side menu, I get the "Width is null or not an object" Javascript error message in the browser. When I select the same program from the tool bar at the top, I do not get this error.

      I tried this program line by line and even with the following lines , I get the error:

      <a4j:outputPanel id="SummaryTable_oPanel" >

      <rich:scrollableDataTable value="#{TableDetail.dissummarytbl}"
      var="category">
      </rich:scrollableDataTable>
      </a4j:outputPanel>

      Fortunately, This error does not occur when I select the program from tool bar at the top. I opened "view source" and picked the line number that the JS scripts displays the error. Those lines are: (I could not post the source as this window is not accppeting it)

      The left hand side menu is the following program
      =================================
      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
      <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
      <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
      <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>

      <rich:panelMenu id="mainMenu"
      mode="ajax" iconExpandedGroup="disc" iconCollapsedGroup="disc"
      iconExpandedTopGroup="chevronUp" iconGroupTopPosition="right"
      iconCollapsedTopGroup="chevronDown" style="width:170px;background-color:#B0E0E6;border:thin solid blue"
      expandSingle="true" styleClass="menustyle">

      <rich:panelMenuGroup label="Tables"
      expanded="true" immediate="true" ignoreDupResponses="true" name="tables">

      <rich:panelMenuItem label="Summary Table" name="Summary"
      action="#{UINavigation.doSummary}" reRender="centerGrid" styleClass="menustyle">
      </rich:panelMenuItem>

      <rich:panelMenuItem label="Dir Info Table" name="DirInfo"
      action="#{UINavigation.doDirInfo}" reRender="centerGrid" styleClass="menustyle">
      </rich:panelMenuItem>

      <rich:panelMenuItem label="Db Queue Table" name="DBQueue"
      action="#{UINavigation.doDBQueue}" reRender="centerGrid" styleClass="menustyle">
      </rich:panelMenuItem>

      <rich:panelMenuItem label="Input Queue Table" name="IQTable"
      action="#{UINavigation.doIQTable}" reRender="centerGrid" styleClass="menustyle">
      </rich:panelMenuItem>

      <rich:panelMenuItem label="Error Table" name="Error"
      action="#{UINavigation.doError}" reRender="centerGrid" styleClass="menustyle">
      </rich:panelMenuItem>
      </rich:panelMenuGroup>
      </rich:panelMenu>

      The top tool bar program is the following
      ==========================
      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
      <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
      <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
      <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>

      <rich:toolBar width="775px">

      <rich:dropDownMenu value="Tables">

      <rich:menuItem value="Summary Table" action="#{UINavigation.doSummary}" />
      <rich:menuItem value="Dir Info Table" action="#{UINavigation.doDirInfo}"/>
      <rich:menuItem value="Db Queue Table" action="#{UINavigation.doDBQueue}"/>
      <rich:menuItem value="Input Queue Table" action="#{UINavigation.doIQTable}"/>
      <rich:menuItem value="Error Table" action="#{UINavigation.doError}"/>
      </rich:dropDownMenu>
      </rich:toolBar>

      Please let me know if you need additional information to suggest.

      Thanks
      Aish