Yes i have a form, i restarted my AP Server, the JS error stopped, but i
still can see only the root node of the treeTable.
*My home.xhtml:*
*<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:s="http://jboss.com/products/seam/taglib"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ice="http://www.icesoft.com/icefaces/component"
xmlns:tr="http://myfaces.apache.org/trinidad"
xmlns:thr="http://myfaces.apache.org/trinidad/html"
xmlns:rich="http://richfaces.org/rich" template="layout/template.xhtml">
<ui:define name="body">
<h:messages globalOnly="true" styleClass="message" />
<br/>
<tr:document>
<h:form>
<h:outputText value="Test TreeTable with " />
<h:inputText value="#{TEST.numberOfBranches}" />
<h:outputText value=" branches. " />
<h:commandLink value="Go" action="#{TEST.runTest}" />
<tr:panelGroupLayout>
<tr:treeTable value="#{TEST.model}" var="model"
width="100%">
<f:facet name="nodeStamp">
<tr:column>
<tr:outputText value="#{model.thingName}" />
</tr:column>
</f:facet>
</tr:treeTable>
</tr:panelGroupLayout>
</h:form>
</tr:document>
</ui:define>
</ui:composition>*
*And my Java Bean:
**package com.trinidad.trinidad.treetable;
import java.util.ArrayList;
import java.util.List;
import org.apache.myfaces.trinidad.model.ChildPropertyTreeModel;
import org.apache.myfaces.trinidad.model.TreeModel;
import org.jboss.seam.annotations.Name;
@Name("TEST")
public class TestTreeTable {
public TreeModel model;
private ArrayList<TreeThing> modelList;
public String numberOfBranches;
public TestTreeTable() {
numberOfBranches = "5";
modelList = new ArrayList<TreeThing>();
}
public String runTest() {
initializeTest(Integer.parseInt(numberOfBranches));
return "";
}
private void initializeTest(int n) {
TreeThing rootNode = new TreeThing("Scientific classification");
for (int i = 1; i <= n; i++) {
TreeThing kingdom = new TreeThing("Kingdom");
TreeThing phylum = new TreeThing("Phylum");
TreeThing classTreeThing = new TreeThing("Class " + i);
TreeThing order = new TreeThing("Order " + i);
TreeThing family = new TreeThing("Family " + i);
TreeThing genus = new TreeThing("Genus " + i);
TreeThing species = new TreeThing("Species " + i);
genus.getChildren().add(species);
family.getChildren().add(genus);
order.getChildren().add(family);
classTreeThing.getChildren().add(order);
phylum.getChildren().add(classTreeThing);
kingdom.getChildren().add(phylum);
rootNode.getChildren().add(kingdom);
}
modelList = new ArrayList<TreeThing>();
modelList.add(rootNode);
model = new ChildPropertyTreeModel(modelList, "children");
}
public TreeModel getModel() {
return model;
}
public void setModel(TreeModel model) {
this.model = model;
}
public String getNumberOfBranches() {
return numberOfBranches;
}
public void setNumberOfBranches(String numberOfBranches) {
this.numberOfBranches = numberOfBranches;
}
public class TreeThing {
public TreeThing(String name) {
_name = name;
}
public String getThingName() {
return _name;
}
public List<TreeThing> getChildren() {
return _children;
}
private final String _name;
private final List<TreeThing> _children = new
ArrayList<TreeThing>();
}
}**
*
And i can't get more than this:
http://img509.imageshack.us/img509/7847/treetableso7.png
Only the root node is rendered :/
Regards
On Tue, Apr 8, 2008 at 3:55 PM, arne anka <[EMAIL PROTECTED]> wrote:
> seems to be some kind of dom-object, probably a form (what other objects
> could have an action method?).
> where in the rendered html is it placed?
>
>
> On Tue, 08 Apr 2008 16:50:01 +0200, Nuno Sousa <[EMAIL PROTECTED]>
> wrote:
>
> <a id="j_id145:eAll" class="xaf"
> > onclick="_uixt_j_id145.action('show','all',this);return false;"
> > href="#">Expandir Todos</a>
> >
> > The element is the clickable text that says "Expandir Todos" aka "Expand
> > All". It's auto generated by Trinidad when i create the treetable : )
> >
> >
> >
> > On Tue, Apr 8, 2008 at 3:31 PM, arne anka <[EMAIL PROTECTED]> wrote:
> >
> > well, it was only a wild guess :-)
> > > does the javascript accessing this id allow any conclusions what
> > > element
> > > might be meant to have that id?
> > >
> > >
> > > On Tue, 08 Apr 2008 16:27:26 +0200, Nuno Sousa <[EMAIL PROTECTED]
> > > >
> > > wrote:
> > >
> > > It's already in a h:form:
> > > >
> > > > "<tr:document>
> > > > <h:form>
> > > > <h:outputText value="Test TreeTable with " />
> > > > <h:inputText value="#{TEST.numberOfBranches}" />
> > > > <h:outputText value=" branches. " />
> > > > <h:commandLink value="Go" action="#{TEST.runTest}" />
> > > >
> > > > <tr:panelGroupLayout>
> > > > <tr:treeTable value="#{TEST.model}" var="model"
> > > > width="100%">
> > > > <f:facet name="nodeStamp">
> > > > <tr:column>
> > > > <tr:outputText
> > > value="#{model.thingName}"
> > > > />
> > > > </tr:column>
> > > > </f:facet>
> > > > </tr:treeTable>
> > > > </tr:panelGroupLayout>
> > > > </h:form>
> > > > </tr:document>"
> > > >
> > > >
> > > >
> > > > On Tue, Apr 8, 2008 at 3:24 PM, arne anka <[EMAIL PROTECTED]> wrote:
> > > >
> > > > maybe you should put your treetable in an h:form? i remember having
> > > a
> > > > > similar error for a tree.
> > > > >
> > > > >
> > > > > On Tue, 08 Apr 2008 16:10:05 +0200, Nuno Sousa <
> > > [EMAIL PROTECTED]
> > > > > >
> > > > > wrote:
> > > > >
> > > > > Hmm it's my Expand All and Collapse All, when clicked gives me a
> > > > > > JavaScript
> > > > > > Line 18, "Error: '_uixt_j_id362' is not defined".
> > > > > > Any Idea whats generating this error?
> > > > > >
> > > > > >
> > > > > > Thanks
> > > > > >
> > > > > >
> > > > > > On Mon, Apr 7, 2008 at 7:34 PM, Nuno Sousa <
> > > [EMAIL PROTECTED]>
> > > > > > wrote:
> > > > > >
> > > > > > Hi,
> > > > > > > Any place where i can find some examples of TreeTables Usage?
> > > > > > > Including JavaCode, i follow the example at the bottom of this
> > > > > page:
> > > > > > >
> > > http://www.mail-archive.com/[EMAIL PROTECTED]/msg31023.htmland
> > > > > > > the
> > > > > > > only thing i can see is the root element rendered :/
> > > > > > >
> > > > > > > Btw can i make a TreeTable with ColumnGroups using Trinidad in
> > > the
> > > > > > > same
> > > > > > > table?
> > > > > > >
> > > > > > > Thanks
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > Ping is just a number timming is everything
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> > >
> >
> >
>
>
--
Ping is just a number timming is everything