Tree Model Implementation

Hi All,
I'm need to create a JATO tree implementation and need some advice. I
want to modify the JATO sample tree implementation so that:
1) The model is cached within the user's session.
2) The model is created on demand. i.e. The data associated with the
branches are only retrieved when the branches are opened.
In the sample application E0115TreeView (view) creates a
SimpleTreeModelImpl (model) each time it is instantiated and
SimpleTreeModelImpl (model) creates dummy data each time it is
instantiated.
1) Is there a standard JATO technique for associating a model with a
view (unlike the sample)? Does this involve the ModelTypeMapImpl class?
My tree data is stored in LDAP, so I can't use a standard JATO database
Model classes.
2) The comment in the SimpleTreeModelImpl class definition indicates
that it is normal practice to store the model in the user's session. Is
there a standard JATO technique for doing this?
3) What would be the best way to extend the sample so that I can create
the model on-demand?
Regards,
Dennis Parrott.
[Non-text portions of this message have been removed]

Thanks Todd,
That makes perfect sense.
Regards,
Dennis parrott.
Todd Fast wrote:
Hi Dennis--
I have now added a SimpleTreeModel interface (which extends TreeModel) andhave added an
mapping in ModelTypeMapImpl static initializer. i.e. To registerSimpleTreeModelImpl with the
ModelManager.This is fine, but you can so without the additional interface if you want.
You don't need to register the model in the ModelTypeMap, and you can
instead just pass the implementation class to ModelManager.
In the tree view constructor instead of creating the SimpleTreeModelImpleach time I use the
ModelManager to retrieve the model, indicating that the model should bestored in the sesssion:
public Treeview(View parent, String name) {
super(parent, name);
RequestContext requestContext = getRequestContext();
ModelManager modelManager = requestContext.getModelManager();
Class clazz = SimpleTreeModel.class;
SimpleTreeModel simpleTreeModel =
(SimpleTreeModel)modelManager.getModel( clazz,clazz.getName(), true, true );
setPrimaryModel( simpleTreeModel );
registerChildren();
}This looks good, EXCEPT for the fact that you shouldn't be able to get the
RequestContext at this point via the class's getRequestContext() method (it
isn't set until after the constructor). However, you can use the static
method RequestManager.getRequestContext() instead.
The final bit I need to implement is the model creation on-demand.Currently the entire model
is constructed on the first access and stored in the session. However,when model is large then
this has a performance impact on constructing it for the first time.Instead I would like to
construct peices of the model as the user accesses them. Any ideas?This is really a function of your model implementation. Nodes that are not
needed in a particular rendering of a TreeModel are never accessed by the
framework in that rendering, so you need to implement your model to lazily
fetch sub-trees of the underlying data structure only as needed. Depending
on the technology you are using, this may or may not be difficult.
I suspect that right now you are fetching the entire tree data structure
when the model is created, and this is the root of the problem. You need to
fetch all nodes that are children of the root on the first request, then
fetch child nodes of the next node the user expands on the next request, ad
infinitum. Otherwise, you will have to settle for a one-time performance
hit per session caused by retrieving the entire tree data structure at once.
If you are using TreeModelBase as your superclass and just implementing the
abstract methods therein, then the implementation of the firstChild() method
is your opportunity to fetch the tree data lazily. This method will be
called on a node to "step down" one level in the tree, and it will only be
called for the nodes that are expanded. You should implement this method to
figure out what node the model is on at the moment, then use that
information to determine if you've already looked up that node's childre in
the backend system, or if you need to go and fetch ONLY the current node's
direct children. As the user descends through the tree, the tree will be
fleshed out and cached lazily, one level at a time, via this mechanism.
Does this make any sense?
Todd
To download the latest version of S1AF (JATO), please visit one of thefollowing locations:
>
Framework + IDE plugin for Sun ONE Studio 4 Update 1, Community Edition:
http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_CE.html
Framework + IDE pluign for Sun ONE Studio 4 Update 1, Enterprise Edition:
http://wwws.sun.com/software/download/products/Appl_Frmwk_2.0_EE.html
Previous versions of JATO:
http://www.sun.com/software/download/developer/5102.html
[Non-text portions of this message have been removed]

Similar Messages

  • How to hide a tree node from the GUI but still keep it in the tree model?

    Hi, All
    I used a JTree in my project in which I have a DefaultTreeModel to store all the tree structure and a JTree show it on the screen. But for some reason, I want to hide some of the nodes from the user, but I don't want to remove them from the tree model because later on I still need to use them.
    I searched on the web, some people suggested method to hide the root node, but that's not appliable to my project because I want to hide some non-root nodes; Some people also suggested to collapse the parent node when there are child to hide, it is not appliable to me either, because there still some other childnodes (sibling of the node to hide) I want to show.
    How can I hide some of the tree node from the user? Thanks for any information.
    Linda

    Here's an example using a derivation of DefaultTreeModel that shows (or does not show) two types of Sneech (appologies to the good Dr Zeus) by overiding two methods on the model.
    Now, there are many things wrong with this example (using instanceof, for example), but it's pretty tight and shows one way of doing what you want.
    Note: to make it useful, you''d have to change the implementation of setShowStarBelliedSneeches() to do something more sophisticated than simply firing a structure change event on the root node. You'd want to find all the star bellied sneech nodes and call fireTreeNodesRemoved(). That way the tree would stay expanded rather than collapse as it does now.
    import javax.swing.JTree;
    import javax.swing.JScrollPane;
    import javax.swing.JOptionPane;
    import javax.swing.JCheckBox;
    import javax.swing.JPanel;
    import javax.swing.tree.TreePath;
    import javax.swing.tree.DefaultTreeModel;
    import javax.swing.tree.DefaultMutableTreeNode;
    import java.awt.Dimension;
    import java.awt.BorderLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.util.Enumeration;
    class FilteredTree
         private class PlainBelliedSneech {
              public String toString() { return "Plain Bellied Sneech"; }
         private class StarBelliedSneech {
              public String toString() { return "Star Bellied Sneech"; }
         private class FilteredTreeModel
              extends DefaultTreeModel
              private boolean mShowStarBelliedSneeches= true;
              private DefaultMutableTreeNode mRoot;
              FilteredTreeModel(DefaultMutableTreeNode root)
                   super(root);
                   mRoot= root;
              public Object getChild(Object parent, int index)
                   DefaultMutableTreeNode node=
                        (DefaultMutableTreeNode) parent;
                   if (mShowStarBelliedSneeches)
                        return node.getChildAt(index);
                   int pos= 0;
                   for (int i= 0, cnt= 0; i< node.getChildCount(); i++) {
                        if (((DefaultMutableTreeNode) node.getChildAt(i)).getUserObject()
                                            instanceof PlainBelliedSneech)
                             if (cnt++ == index) {
                                  pos= i;
                                  break;
                   return node.getChildAt(pos);
              public int getChildCount(Object parent)
                   DefaultMutableTreeNode node=
                        (DefaultMutableTreeNode) parent;
                   if (mShowStarBelliedSneeches)
                        return node.getChildCount();
                   int childCount= 0;
                   Enumeration children= node.children();
                   while (children.hasMoreElements()) {
                        if (((DefaultMutableTreeNode) children.nextElement()).getUserObject()
                                            instanceof PlainBelliedSneech)
                             childCount++;
                   return childCount;
              public boolean getShowStarBelliedSneeches() {
                   return mShowStarBelliedSneeches;
              public void setShowStarBelliedSneeches(boolean showStarBelliedSneeches)
                   if (showStarBelliedSneeches != mShowStarBelliedSneeches) {
                        mShowStarBelliedSneeches= showStarBelliedSneeches;
                        Object[] path= { mRoot };
                        int[] childIndices= new int[root.getChildCount()];
                        Object[] children= new Object[root.getChildCount()];
                        for (int i= 0; i< root.getChildCount(); i++) {
                             childIndices= i;
                             children[i]= root.getChildAt(i);
                        fireTreeStructureChanged(this, path, childIndices, children);
         private FilteredTree()
              final DefaultMutableTreeNode root= new DefaultMutableTreeNode("Root");
              DefaultMutableTreeNode parent;
              DefaultMutableTreeNode child;
              for (int i= 0; i< 2; i++) {
                   parent= new DefaultMutableTreeNode(new PlainBelliedSneech());
                   root.add(parent);
                   for (int j= 0; j< 2; j++) {
                        child= new DefaultMutableTreeNode(new StarBelliedSneech());
                        parent.add(child);
                        for (int k= 0; k< 2; k++)
                             child.add(new DefaultMutableTreeNode(new PlainBelliedSneech()));
                   for (int j= 0; j< 2; j++)
                        parent.add(new DefaultMutableTreeNode(new PlainBelliedSneech()));
                   parent= new DefaultMutableTreeNode(new StarBelliedSneech());
                   root.add(parent);
                   for (int j= 0; j< 2; j++) {
                        child= new DefaultMutableTreeNode(new PlainBelliedSneech());
                        parent.add(child);
                        for (int k= 0; k< 2; k++)
                             child.add(new DefaultMutableTreeNode(new StarBelliedSneech()));
                   for (int j= 0; j< 2; j++)
                        parent.add(new DefaultMutableTreeNode(new StarBelliedSneech()));
              final FilteredTreeModel model= new FilteredTreeModel(root);
              JTree tree= new JTree(model);
    tree.setShowsRootHandles(true);
    tree.putClientProperty("JTree.lineStyle", "Angled");
              tree.setRootVisible(false);
              JScrollPane sp= new JScrollPane(tree);
              sp.setPreferredSize(new Dimension(200,400));
              final JCheckBox check= new JCheckBox("Show Star Bellied Sneeches");
              check.setSelected(model.getShowStarBelliedSneeches());
              check.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent e) {
                        model.setShowStarBelliedSneeches(check.isSelected());
              JPanel panel= new JPanel(new BorderLayout());
              panel.add(check, BorderLayout.NORTH);
              panel.add(sp, BorderLayout.CENTER);
              JOptionPane.showOptionDialog(
                   null, panel, "Sneeches on Beeches",
                   JOptionPane.DEFAULT_OPTION,
                   JOptionPane.PLAIN_MESSAGE,
                   null, new String[0], null
              System.exit(0);
         public static void main(String[] argv) {
              new FilteredTree();

  • Bette way to referenced tree model nodes from UI to perform actions on them

    A singleton facade is built.
    Its init() method loads several "tree model configs", each of them referenced by a name.
    This singleton creates a Project instance for a given "tree model config" calling the facade method -> createProject(String pjrName, String modelConfigName)
    When the Project is built a new Model instance is set ( remember the model instance is a tree holding nodes )
    The new Project instance built is added to a List that the facade has and then it's returned to the UI part that called ->createProject(prjName,modelconfigName)
    Given the Project instance the UI has to build a JTree representation of the model that the project references and the UI will have button actions that should call methods of the Nodes of the model referenced by the Project.
    Doing it this way the UI will be able to reference objects directly without going through the facade.
    Maybe I should return to the UI something like a ProjectKey instance instead of letting have the UI the Project instance ?
    It should be better if I process the possible node actions behind the Facade and not the UI, but how can I do it ?
    Having a ProjectKey in my UI I could ask the facade a model tree representation but not having the real nodes, otherwise having some NodeKey instances ?

    Sounds like you want to represent a tree structure, without a reference to the real tree.
    I'll take it further: maybe you don't want the UI to know there's a real tree data-structure with nodes and pointers to children, because maybe you build the tree on the fly from a database.
    So use the Builder pattern instead of committing to a specific data structure.
    Google results for Builder pattern: http://www.google.com/search?hl=en&q=builder+pattern&btnG=Google+Search
    Your UI should know how to construct nodes and children graphically, when told. This means it should have methods like addNode, but related to the domain: addSubProject maybe.
    A Project object is the Director, knowing which part goes where, but it doesn't know the real end result (a JPanel or HTML). So it has a method buildProject(Builder e) or exportProject(Exporter e), where all logic of assembling the parts is.
    When you have that, write a class JTreeProjectExporter implements Exporter.
    Hope this helps.

  • XML and Tree Model !!!

    I am wanting to implement the tree model from xml data.
    I am new to this so would appreicate any help filling in the gaps. My aim is to reflect this xml file in a JTreeTable format (I have left out the table model implementation.)
    A sample xml file looks like this :
    <?xml version="1.0" ?>
    <exam>
    <Column class="xTableModel">Attribute</Column>
    <Column class="String">Value</Column>
    <Question>
    <Id>1</Id>
    <Type>TF></Type>
    <Text>Napolean was french ?></Text>
    <Answer>True</Answer>
    <Mark>3</Mark>
    </Question>
    </exam>
    How I am Reading the file:
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder parser = factory.newDocumentBuilder();
    doc = parser.parse(xmlfile);
    Tree Model Methods. //Not really sure what i am doing here.
    public Object getChild(Object node, int i)
    Node parent = ((Node) node);
    Object child = parent.getChildNodes().item(i);
    return child;
    public int getChildCount(Object node)
    Node parent = ((Node) node);
    // int child = parent.getChildNodes().getLength();
    return 1;
    public boolean isleaf(Object node)
    Node parent = ((Node)node);
    Node child = parent.getFirstChild();
    return (child == null);
    }

    you can use a adapter pattern to convert the xml element to a TreeModel, this can be used by JTree

  • Creating Tree Model in JDeveloper 11.1.2

    hi!
    I tried the steps written in blog below but it didn't work. The output was 'no data to display'. Can anyone suggest me where I can find full procedure according to JDeveloper 11.1.2 for creating our own Tree model.
    [http://www.yonaweb.be/creating_your_own_treemodel_adf_11g_0]
    Thanks in advance!!
    Edited by: 886029 on Sep 22, 2011 4:51 AM

    You can check the tree demos here:
    http://www.oracle.com/technetwork/developer-tools/adf/documentation/adf-faces-rc-demo-083799.html
    for examples of beans with tree model.
    Of course if you are just accessing a database, then using ADF BC or JPA/EJB will get you there without any code needed.

  • Problem in Exploring the Decision Tree Model on Lesson 4 Basic Data Mining SSAS

    Hello everyone,
    I've tried to follow all the steps mentioned in Basic Data Mining Tutorials, but I've an odd problem in the Lesson 4 - Exploring the Decision Tree Model (http://technet.microsoft.com/en-us/library/cc879269.aspx).
    It's stated that "As you view the TM_Decision_Tree model
    in the Decision Tree viewer, you can see the most important attributes at the left side of the chart. “Most important” means that these attributes have the greatest influence on the outcome. Attributes further down the tree (to the right of the chart) have
    less of an effect. In this example, age is the single most important factor in predicting bike buying. The model
    groups customers by age, and then shows the next more important attribute for each age group. For example, in the group of customers aged 34 to 40, the number of cars owned is the strongest predictor after age."
    But, I got a different result from what mentioned in the tutorial. I got the number of cars owned as the most important attribute, then followed by the attribute age.
    Do you guys know why?
    Thanks in advance

    HI,
    BEGIN
       INSERT INTO DT_CA_SETTINGS_TEST (SETTING_NAME, SETTING_VALUE) VALUES
       (dbms_data_mining.TREE_TERM_MINPCT_NODE,to_char(1));
    END;
    That is not "Mode" its "NODE".
    Now Execute.
    Cheers..

  • JTree - with two tree Models

    I have two types of tree Models that I would like to combine into one tree i did the combination this way:
    public CombainedTreeModel(BaseTreeModel firstSubTree,BaseTreeModel secondSubTree) {
    super(null);
    BaseTreeNode root=new BaseTreeNode("root");
    insertNodeInto(firstSubTree.getTreeRoot(),root,GuiConstants.INDEX_ZERO);
    insertNodeInto(secondSubTree.getTreeRoot(),root,GuiConstants.INDEX_ONE);
    and used the combined model (that is extends of BaseTreeModel -> DefaultTreeModel.) as the input of the tree.
    I see that there are elements in the tree but they are not visible.....
    what is the problem?

    I had a bit different interpertation for the MVC in swing:
    model - is a pure java class holds the data
    control- the treeModel that pass the commands to the model and after the comand was done - remove/add/update node from the tree and commite reload so the view will be refreshed
    view - the Jtree
    Everything in this model used to be ok until i combined two tree model to a third model so they will be displayed together.
    this is how I remove a node:
    public void removeContentServer(int contentServerId) throws BitBandGuiRemoveException, BitBandGuiFindException {
    if (logger.isDebugEnabled())
    logger.debug("ContentTreeModel.removeContentServer");
    BaseContentTreeNode contentServerNode = getContentServerNode(contentServerId);
    networkModel.removeContentServer(contentServerId);
    contentServerNode.removeFromParent();
    if (logger.isDebugEnabled()) {
    logger.debug("remove content server from the model" + contentServerId);
    synchronized (contentServerNode) {
    contentServerNode.removeFromParent();
    if (logger.isDebugEnabled()) {
    logger.debug("remove content server from the tree model");
    reload(root);
    }

  • Simple Tree Model  displays the subtree on second click

    Hi,
    I want to display a simple tree model structure with root "Tableset" and subnodes like "MARA". If i click on Mara it has to display all the fields from that table.
    But it takes two clicks till the subtree opens? I suppose it needs something like a "fresh Tree".
    Sinan

    Hello Sinan,
    you have to call the method expand_root_nodes of the tree model:
    CALL METHOD model->expand_root_nodes
              EXPORTING expand_subtree = expand_subtree
                        level_count    = level_count.
    expand_subtree:
    If you set this parameter to 'X' , the system expands all subtrees of the root nodes
    level_count:
    Specifies the depth to which the root nodes should be expanded. Possible values:
    0
    : Only the root nodes themselves are expanded 1
    : The root nodes and their first level of child nodes are expanded n
          : The root nodes are expanded down to their nth level of child nodes.
    Note: If you set the expand_subtree parameter to 'X' , the value of level_count is ignored.

  • About ALV tree model transaction

    Hi Every One..
       I got a requirement that we need to display some transactions in alv tree model. and if we click on that transaction then it should display that transaction in next half of custom container (like se80 transaction) .
      Please help me out, it's urgent..
    Thanks & Regards,
    Nagalakshmi

    Hi Nagalakshmi,
    Check these sample codes:
    BCALV_TREE_SIMPLE_DEMO
    BCALV_TREE_DEMO
    BCALV_GRID_DEMO
    BCALV_FULLSCREEN_DEMO_CLASSIC
    BCALV_FULLSCREEN_DEMO
    BCALV_DEMO_HTML
    BC_ALV_DEMO_HTML_D0100
    BCALV_TREE_SIMPLE_DEMO
    Reward If Useful.
    Regards,
    Chitra

  • Column selection with column tree model

    Hello!
    I created a column tree model. I would like to be able to select a column when i click on its header. How can I do that? There is no problem to select one item. I try to select all the items of a column but if do that this is the lines which are selected. The item_selection parameter is set to 'X'.
    Thanks in advance,

    Hi,
    I am not sure if I understood your problem right. But just in case, if you are referring to this...
    You say you need a check box to select your nodes. So you would have to add your item names in a separate column and then add the check box in a separate column using ADD_COLUMN method. You would have to use treemcitac structure and make use of ADD_ITEMS to add them.
    Once you add the column for check box, code your logic and build your tree hierarchy with all the correct node keys. For example, the root node will have node_key = 1 and parent_key = 0. The node that comes under the root node in the first hierarchy level will have node_key = 2 and parent_key = 1. Code your logic so that you build your tree hierarchy.
    Build the tree structure using treemcnota as you have done. Add the nodes built using treemcnota using ADD_NODES.
    According to your requirement,
    COL1                                                                           COL2 (for checkbox)  } -> Build using treemcitac
    Preimport (Root)  -> Root Node
    Request Checks (Node_1)  -> parent_key = Preimport
    Check Req Status (Item_1) -> parent_key = Request Checks (Node_1)
    Check Req Scope (Item_2)
    Check Req Componenets (Item_3)
    Object List Checks (Node_2)
    Check obj type (Item_1)
    check deletions (Item_2)
    Object Checks (Node_3)
    "Build the tree nodes using treemcnota and add these nodes using ADD_NODES
    Again, I am not sure if your problem is this. Hope this might be helpful.

  • ADF 10g  TREE MODEL

    HI
    Can any one send me a Tree model example
    how can i made it generate manualy
    i have this but its not working its just apear the root without any children
    public Object getDefaultFocusRowKey() {
    FacesContext context = FacesContext.getCurrentInstance();
    Application app = context.getApplication();
    Object editor =
    app.getVariableResolver().resolveVariable(context, "editor");
    UIComponent comp =
    (UIComponent)app.getPropertyResolver().getValue(editor, "root");
    Object focusRowKey = null;
    if (comp != null && comp instanceof UIXTree) {
    UIXTree tree = (UIXTree)comp;
    Object oldKey = tree.getRowKey();
    try {
    tree.setRowKey(null);
    tree.setRowIndex(0);
    focusRowKey = tree.getRowKey();
    } finally {
    tree.setRowKey(oldKey);
    return focusRowKey;
    private TreeModel createTree() throws IntrospectionException {
    AppModuleImpl app =
    (AppModuleImpl)Configuration.createRootApplicationModule("model.app.AppModuleImpl",
    "AppModuleLocal");
    RowKeyPropertyModel rowKeyPropModel =
    new RowKeyPropertyModel(getTreeChild(app, 0), "root");
    return new RowKeyPropertyTreeModel(rowKeyPropModel, "root", "root");
    private List getTreeChild(AppModuleImpl app, int parent) {
    List root = new ArrayList();
    Map mapRoot = new HashMap();
    mapRoot.put("en_desc", "aaa");
    Map mapRoot2 = new HashMap();
    mapRoot2.put("en_desc", "hh");
    List rooth = new ArrayList();
    Map mapRooth = new HashMap();
    mapRooth.put("en_desc", "hh2");
    rooth.add(mapRooth);
    mapRoot2.put("root", rooth);
    root.add(mapRoot);
    root.add(mapRoot2);
    return root;
    }

    Hi Frank,
    RowKeySetImpl doesn't appear to exist in the 10g version I have, though there is a RowKeySet What I seems to be having trouble understanding is what format the path needs to be in and how I give it to the tree to force the expansion.
    After some reading on the topic I tried something like this:
    PathSet pathSet = new PathSet();
    pathSet.setTreeModel(getTreeModel());
    pathSet.getKeySet().addAll(ArrayList of Paths) // [0,0,2,3] for instance
    But regardless of what I use in the ArrayList (the tutorial I found used Strings, but I also tried Integers), I always ALWAYS get errors.
    I'm hoping there is an easier way to achieve this, it's frustrating the lack of documentation on 10g yet my hands are tied and I'm forced to continue down this path.

  • Failed to open model viewer error, for Decision Tree Model

    Oracle 11.0.2
    SQL Developer 3.0.04
    I am trying to follow ODM tutorial here :
    http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/11g/r2/prod/bidw/datamining/ODM11gR2.htm
    After completing initial analysis, I want to investigate the Decision Tree model more closely. As I choose View Models > CLAS_DT_1_1, I get an error message:
    Failed to open model viewer
    Details are:
    java.lang.RuntimeException: not instanceof RoundedTreeNode
         at oracle.dmt.dataminer.mviewer.dtree.model.TreeNode.assignPropertyChangeListener(Unknown Source)
         at oracle.dmt.dataminer.mviewer.dtree.DecisionTreeEditor.setPropertyChangeListener(Unknown Source)
         at oracle.dmt.dataminer.mviewer.dtree.DecisionTreeEditor.open(Unknown Source)
         at oracle.ideimpl.editor.EditorState.openEditor(EditorState.java:283)
         at oracle.ideimpl.editor.EditorState.createEditor(EditorState.java:184)
         at oracle.ideimpl.editor.EditorState.getOrCreateEditor(EditorState.java:95)
         at oracle.ideimpl.editor.SplitPaneState.canSetEditorStatePos(SplitPaneState.java:232)
         at oracle.ideimpl.editor.SplitPaneState.setCurrentEditorStatePos(SplitPaneState.java:195)
         at oracle.ideimpl.editor.TabGroupState.createSplitPaneState(TabGroupState.java:102)
         at oracle.ideimpl.editor.TabGroup.addTabGroupState(TabGroup.java:379)
         at oracle.ideimpl.editor.EditorManagerImpl.createEditor(EditorManagerImpl.java:1403)
         at oracle.ideimpl.editor.EditorManagerImpl.createEditor(EditorManagerImpl.java:1337)
         at oracle.ideimpl.editor.EditorManagerImpl.openEditor(EditorManagerImpl.java:1263)
         at oracle.ide.editor.EditorUtil.openDefaultEditorInFrame(EditorUtil.java:164)
         at oracle.dmt.dataminer.workflow.WorkflowContextMenu$2.actionPerformed(Unknown Source)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
         at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
         at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)
         at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)
         at java.awt.Component.processMouseEvent(Component.java:6504)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
         at java.awt.Component.processEvent(Component.java:6269)
         at java.awt.Container.processEvent(Container.java:2229)
         at java.awt.Component.dispatchEventImpl(Component.java:4860)
         at java.awt.Container.dispatchEventImpl(Container.java:2287)
         at java.awt.Component.dispatchEvent(Component.java:4686)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
         at java.awt.Container.dispatchEventImpl(Container.java:2273)
         at java.awt.Window.dispatchEventImpl(Window.java:2713)
         at java.awt.Component.dispatchEvent(Component.java:4686)
         at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:707)
         at java.awt.EventQueue.access$000(EventQueue.java:101)
         at java.awt.EventQueue$3.run(EventQueue.java:666)
         at java.awt.EventQueue$3.run(EventQueue.java:664)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
         at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
         at java.awt.EventQueue$4.run(EventQueue.java:680)
         at java.awt.EventQueue$4.run(EventQueue.java:678)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:677)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
    I get this error for Decision Tree Model only. For other models, there is no problem. How can I fix it?
    Thank you.

    After setting system language to English, be sure to restart SQL Dev to retry the test.
    Make sure you have the latest patches installed.
    Go to menu: Help-> About. In the About dialog, select the Extensions tab and check if you have Data Miner version 11.2.0.2.04.40. If not, go to menu Help->Check for Updates, and install the SQL Developer and Data Miner patches.
    SQL Dev 3.0 is not certified with Java 7.
    Thanks,
    Marat
    Edited by: mspivak on Jan 10, 2012 12:33 PM
    Edited by: mspivak on Jan 10, 2012 12:33 PM
    Edited by: mspivak on Jan 10, 2012 12:34 PM

  • Fully expanded tree using tree model

    Hi every body,
    I have represented into jtree form after reading xml document using the tree model. But I want to displayed
    the fully expanded tree at the screen when program run.
    Please help me.
    Thanks
    Edited by: ahmadgee on Jul 11, 2008 3:42 AM

    Thanks for your help
    For get the the tree in expanded form, I am using the expandAPath funtion by the following way.
    public class XMLTreePanel extends JPanel {
           private JTree tree;
           private XMLTreeModel model;
           public XMLTreePanel() {
                    setLayout(new BorderLayout());
            model = new XMLTreeModel();
         tree = new JTree();
         tree.setModel(model);
         tree.setShowsRootHandles(true);
         tree.setEditable(false);
         expandAPath(tree);
         JScrollPane pane = new JScrollPane(tree);
         pane.setPreferredSize(new Dimension(300,400));
         add(pane, "Center");
         final JTextField text = new JTextField();
                    text.setEditable(false);
         add(text, "South");
         tree.addTreeSelectionListener(new TreeSelectionListener() {
              public void valueChanged(TreeSelectionEvent e) {
              Object lpc = e.getPath().getLastPathComponent();
              if (lpc instanceof XMLTreeNode) {
                   text.setText( ((XMLTreeNode)lpc).getText() );
    public void expandAPath(JTree tree){               
         for(int i=1; i<tree.getRowCount(); ++i) {
              tree.expandRow(i);            
    public void setDocument(Document document) {
         model.setDocument(document);
    public Document getDocument() {
         return model.getDocument();
    }

  • Tree Structure Implementation in Java.

    1>
    How should i implement a "Tree Structure" in Java Based application.?How would i map the entries to the database table?how many tables will i require for this implementation.?
    List records<String> = new ArrayList<String>();
    records.add("null");
    records.add("Product");
    records.add("Category");
    records.add("P1");
    records.add("P2");
    records.add("P3");
    records.add("C1");
    records.add("C2");
    records.add("C3");
    so how should i implement a Tree Structure for the above record set.
    //P1,P2,P3 belong to Parent {Product}
    //C1,C2,C3 belong to Parent {Category}
    Sample code provided will be helpful

    How should i implement a "Tree Structure" in Java Based application.?The quotes suggest you don't know what a tree structure is, regardless of the development language. Fix that first (your understanding of what a tree structure is). [url http://en.wikipedia.org/wiki/Tree_structure]Here is probably a good start.
    How would i map the entries to the database table?how many tables will i require for this implementation.?It depends on what your tree structure represents, in particular it depends on whether the leaves and intermediate nodes of the trees have are homogeneous (e.g. have a common interface). There is no general rule.
    I suggest you start by looking in the Java API at all the classes whose names start with 'Tree' (TreeSet and TreeMap are probably the best ones to start with) and read the documentation carefully. Then try to write some code that uses one and come back if/when you have any problems.(sorry Winston) I think this is a very bad advice.
    These classes are particular implementations, respectively of a set (in the mathematical sense) and of a map (associative table), which happen to use a "tree structure" for their internal business. Their API doesn't help building a custom "tree structure" (they may be used that way, but it's certainly not the easiest nor even a particular handy way to build tree structures).
    Maybe their implementation may be a good example of how to build a Tree structure, but they use a particular type of tree (+red-black tree), not a general one. This may or may not be the OP's case, I wouldn't bet on it.
    OP you're welcome to come back with more specific questions and details. Good luck with Java.
    Edited by: jduprez on Oct 16, 2010 2:45 PM
    Edited by: jduprez on Oct 16, 2010 2:49 PM
    After checking the Javadoc: indeed TreeSet only uses a TreeMap for its implementation, so the only one out of the two which does directly uses a tree structure in its implementation is TreeMap.
    Edited by: jduprez on Oct 16, 2010 2:51 PM
    And, to reiterate, I stand by my claim that TreeMap is not a good example of a general Tree structure: in particular it uses a tree to map keys to values, its main business is the "mapping" part, not the tree as a storage medium. Neither the keys nor the values know anything about their "children".

  • How to Display folder structure in Content repository as a tree model

    Hi,
    I have a requirement in which i need to display a hierarchical folder structure in UCM as a hierarchical model in my portal. Which approach should I follow. Expecting suggestions.. I'm using jdeveloper 11.1.1.5.
    Thank you

    Sorry , my earlier reply was a bit hasty...
    So do you need a navigation model based on a UCM content query ?
    Or
    Would the document manager taskflow work ?
    And you don't need any MDS customization (Terribly sorry for my post above). The default behavior of the document manager is to display the folder structure on the left and the contents on the right.
    After you add the DocManager taskflow, go to its properties in composer and make sure the layout is selected as "Explorer". Once you do this, you should notice that a new split pane has appeared, and its collapsed by default. Save the page and open the split pane to see a tree structure of the folder hierarchy in UCM.
    Would this work for you ?
    -Jeevan

Maybe you are looking for

  • Cannot delete file SAP0000.TSK.bck

    hi    I am installing ECC5.0 ides on windows 2000.     I have finished intalling central instance but when doing database instance i am getting following error This is a trace of SAP0000.log file DbSl Trace: ORA-1403 when accessing table SAPUSER (DB)

  • File to File Adapter Error

    Hi all - IDOC - File scenario works but in file to file scenario i get this error in the communication channel monitoring. Error: com.sap.aii.af.ra.ms.api.ConfigException: Some of the IS access information is not available. SLDAcess property may be s

  • Libretto U100 looses often connection to the Wlan hub

    Hi I am having problem with my wireless network card. I am often loosing connection with the hub. I read on another forum that it maybe a good idea to update the drivers. I have never done this before and I want to ensure I do it correctly. Can you p

  • Calling GuidedProcess from WebDynpro ABAP

    Hi all can anybody tell me that how to call GP from webdynpro ABAP. and what are the advantages and disadvantages in this scenario?? if anyone reply then it would be the great help to me Regards Suresh babu

  • Long time for activation of integration models

    Hi Experts, I am getting error that I am unable to trace the actual reason from system log or the QRFC monitor (APO inbound Q) Refresh, unlock, reset etc does not change the status. Most LUWu2019s are executed but for some LUWu2019s are taking longer