myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Swift <>
Subject Getting an IndexOutOfBoundsException with tomahawk tree component
Date Tue, 15 Aug 2006 10:40:02 GMT


I have tried asking this question on the users list but no one is replying.
Sorry if I have made a mistake trying this list but I am stuck.

Using myfaces and tomahawk both 1.1.5 snapshot. In Webspere 5.1 test

I am receiving the IndexOutOfBoundsException when I try to change my tree
model while my tree is expanded.
I think it is when the model is shorter than the number of nodes expanded on
the page.

Not sure if this is a bug or there is a way of collapsing the tree before
changing the model.

My page is shown below.
When the user clicks the OK command button then the tree model changes based
on the selectOneMenu.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<%@ taglib uri="" prefix="h"%>
<%@ taglib uri=" " prefix="f"%>
<%@ taglib uri="" prefix="t"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="IBM Software Development Platform">
<META http-equiv="Content-Style-Type" content="text/css">
<LINK href="theme/Master.css" rel="stylesheet" type="text/css">
<LINK rel="stylesheet" type="text/css" href="theme/stylesheet.css">
<LINK rel="stylesheet" type="text/css" href="theme/basic.css">
<LINK rel="stylesheet" type="text/css"
    <f:loadBundle basename="" var="msgs" />
    <h:form id="form">
        <h:outputText value="Search Revision No" />
        <h:inputText id="searchNo" value="#{treeTable.partNumber}"
            <f:validateLength minimum="8" />
        <h:commandButton value="#{}"
            action="#{treeTable.updateLevel1Parts}" styleClass="buttonStyle"
        <h:message for="searchNo" />
        <h:outputText value="#{msgs.partNumber}" />
        <h:selectOneMenu value="#{treeTable.selectedRevision}" >
            <f:selectItems value="#{treeTable.level1Parts }" />
        <h:commandButton value="#{msgs.ok}"
            rendered="#{treeTable.selected}" styleClass="buttonStyle" />
        <t:tree id="tree" value="#{treeTable.treeModel}" var="treeItem"
            styleClass="tree" nodeClass="treenode" headerClass="treeHeader"
            footerClass="treeFooter" rowClasses="evenRow, oddRow"
            columnClasses="col1, col2" selectedNodeClass="treenodeSelected"
                <f:facet name="header">
                    <h:outputText value="Part Number"
                        style="padding-left: 10px; text-align: left; width:
150px" />
                <h:outputText value="#{}" style="padding-left:
10px" />
                <f:facet name="header">
                    <h:outputText value="Level" />
                <h:outputText value="#{treeItem.isoCode }" />
                <f:facet name="header">
                    <h:outputText value="Description"
                        style="padding-left: 10px; text-align: left; width:
200px" />
                <h:outputText value="#{treeItem.description}"
                    style="padding-left: 10px" />
            <f:facet name="footer">
                <h:outputText value="Footer" />

    <P>Place content here.</P>
    <h:outputLink value=" index.faces">
        <h:outputText value="#{msgs.mainIndex}" />


View this message in context:
Sent from the My Faces - Dev forum at

View raw message