Error in t:tree component of tomahawk

I am using tree component of tomahawk like this in my xhtml file
<t:tree id="tree" value="#{treeBean.tree}"
styleClass="tree"
nodeClass="treenode"
selectedNodeClass="treenodeSelected"
expandRoot="true">
</t:tree>
and this is my class file,
public class TreeBean
private DefaultTreeModel tree;
public DefaultTreeModel getTree() {
return tree;
public void setTree(DefaultTreeModel tree) {
this.tree = tree;
public TreeBean()
DefaultMutableTreeNode root = new DefaultMutableTreeNode("XY");
DefaultMutableTreeNode a = new DefaultMutableTreeNode("A");
root.insert(a);
DefaultMutableTreeNode b = new DefaultMutableTreeNode("B");
root.insert(b);
DefaultMutableTreeNode c = new DefaultMutableTreeNode("C");
root.insert(c);
DefaultMutableTreeNode node = new DefaultMutableTreeNode("a1");
a.insert(node);
node = new DefaultMutableTreeNode("a2 ");
a.insert(node);
node = new DefaultMutableTreeNode("b ");
b.insert(node);
a = node;
node = new DefaultMutableTreeNode("x1");
a.insert(node);
node = new DefaultMutableTreeNode("x2");
a.insert(node);
tree = new DefaultTreeModel(root);
but when i run my xhtml file, i am getting error like this,
java.lang.NullPointerException
     at org.apache.myfaces.custom.tree.HtmlTree.addToModelListeners(HtmlTree.java:806)
at org.apache.myfaces.custom.tree.HtmlTree.encodeBegin(HtmlTree.java:683)
at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:232)
     at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
     at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
     at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:580)
     at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:585)
     at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
     at java.security.AccessController.doPrivileged(Native Method)
     at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
     at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
     at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:245)
     at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50)
     at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)
     at java.security.AccessController.doPrivileged(Native Method)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)
     at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:585)
     at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
     at java.security.AccessController.doPrivileged(Native Method)
     at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
     at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
     at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:217)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:197)
     at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50)
     at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)
     at java.security.AccessController.doPrivileged(Native Method)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)
     at incture.view.SecurityFilter.doFilter(SecurityFilter.java:62)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:585)
     at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
     at java.security.AccessController.doPrivileged(Native Method)
     at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
     at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
     at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:217)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:197)
     at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50)
     at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)
     at java.security.AccessController.doPrivileged(Native Method)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
     at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
     at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
     at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
     at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
     at java.lang.Thread.run(Thread.java:595)
How to solve this,
Regars,
Vinutha.

Hi i have the same problem, Did you found a solution ?

Similar Messages

  • Tree Component AS3 Error

    When I click a leaf in the Tree Component I have a function
    called using the itemClick Property. When I click a node (the
    folder icons) I get the AS3 error below. Does this only show up
    with Debug versions of Flash Player. Plus how do I stop this error
    from occurring if the user happens to have the debug version
    installed?
    Error #2044: Unhandled ioError:. text=Error #2032: Stream
    Error.
    at main/loadMyXML()
    at main/collectionSelect()
    at main/__gTree_itemClick()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.core::UIComponent/dispatchEvent()
    at mx.controls.listClasses::ListBase/mouseClickHandler()
    at mx.controls::Tree/mouseClickHandler()

    ORA-00600 internal errors should be reported to Oracle Support by SR. If you don't have a support contract try searching the web for more information and possible fixes or workarounds.
    From the information available on MOS, if the type of the PG.ID_PAR_PLANO_GER column is not VARCHAR2, then try converting P22_ID_PAR_PLANO_GER to the same type.

  • Code for Tree component(tomahawk )

    I am new to JSF,I want a tree component in my page and i want to construct the tree by retriving data from database.I searched most of materials but could'nt find any good one.

    How would it match the trees? What have you done so far?
    /Kaj

  • MyFaces Tree Component Rendering

    Hi all,
    I am adding myfaces client tree Component to my panel.Its not rendering and its throwing exception.
    anyhelp would be appriciated
    Thanks
    Sudha

    Hi,
    I am trying to render myfaces client tree on faces portlet using RAD 6.0. As RAD does not support JSF 1.1, I have commented DOCTYPE from faces-config.xml in tomahawk.jar file.
    Root of the tree is getting displayed without "+" sign. And when I click on it,
    javascript error "Object Expected" occurs.
    I am not able to figure out the problem from last 2 days. So, Please help me out if you can.
    Thanks in anticipation.
    ~Madhura

  • Tree component menu

    Hi guyz,
    I’ve developed a menus using
    Tree Component with
    xml connector. can anybody help me to control its speed,
    like in my scenario;
    suppose, 3 nodes captioned (item 1 & item 2),
    - item 1 has 10 sub items and item 2 option has 5
    issue #1: there's no speed synchronization b/w both (item1
    & item2). item 1 has take more time to popup then item2 coz of
    xml data.
    issue #2: I want to increase the speed of popup or scrolling.
    Please help me that how can I optimize my menu and resolve
    these issues. Please tell me any book, development kit (software),
    extensions etc. for reference or help.
    Thanks
    mail me
    Raheel

    there is pool size error is coming.Why do people allude to an error without posting the actual error message?
    (in other words - please post the full error message/stack trace)

  • Tree component in Sun Studio Creator

    Hello.
    I have a problem with Tree component in Sun Java Studio Creator when i use it.
    Error:
    com.sun.rave.web.ui.appbase.ApplicationException: org.apache.jasper.JasperException: java.net.MalformedURLException: no protocol: /layout/layout.dtd
    Please, tell me, how to use this component?
    Thank you.

    java.net.MalformedURLException: no protocol:
    /layout/layout.dtdDid you ever bother to read the error message? It tells you what's wrong, and it tells you how to fix it.
    "/layout/layout.dtd" is not a valid URL. Fix that.

  • Tree component bug

    We use a tree component on client side with several tree nodes.
    We have a tree action for them.
    It usually works fine, but randomly getCookieSelectedTreeNode() method returns null (empty string). Sometimes no error after 10 clicks, but sometimes it returns null after a few click.
    If somebody have a solution for this, please let us know.

    I have a solution for my problem now. It turns out that my issue wasn't quite the same as the original problem cited by K_Gabor.
    Our issue was machine specific and was down to the fact that getCookieSelectedTreeNode() will return null if cookies are blocked by the browser. Not really surprising given the name of the method, but it is something that should be kept in mind when using this method.
    Given that cookies are frequently blocked, is there an alternative method for getting the selected node that doesn't rely on cookies?
    Cheers,
    Chris.

  • Getting error : Expected a child component type of UISelectItem/UISelectIte

    Hi,
    I am using facelet and third party tool for displaying Grid.
    When I am using following code then getting the error :
    "Expected a child component type of UISelectItem/UISelectItems for component type javax.faces.SelectOne"
    Code:
    <ig:column sortBy="phoneNumber">
    <f:facet name="header">
    <h:outputText value="Phone Number" />
    </f:facet>
    <h:selectOneMenu value="#{DATA_ROW.phoneNumber}" >
    <f:selectItems value="#{mylist.list1}"/>
    </h:selectOneMenu>
    </ig:column>
    Please suggest to resolve the issue.

    following is the component tree at which this error is occured:
    <HtmlSelectOneMenu disabled="false" id="_ig26" immediate="false" localValueSet="false" readonly="false" rendered="true" required="false" transient="false" valid="true">
    <UISelectItems id="_ig27" rendered="true" transient="false"/>
    </HtmlSelectOneMenu>

  • Garbage Collection Issue for Tree Component

    Dear:
    When I created a new Tree instance dynamically by following code, and clicked any tree node randomly and then I removed it via another button, but I found this instance couldn’t be removed by GC, if I just created this tree without mouse action, it can be removed by GC.
    Tree Component:
    -- TreeView
    <mx:canvas>
    <mx:Tree dataProvider="{data}"  />   // data is a XML staments
    </mx:canvas>
    Create Tree:
               public function createView(event:Event):void{
                  var view:TreeView = new TreeView ();
                  view.name="myTree";
                  addChild(view);
                  view=null;
    Remove Tree:
               public function deleteView(event:Event):void{
                  var view:TreeView= TreeView( _con.getChildByName("myTree"));
                  removeChild(view);
    Could someone give me some suggestion?
    Thanks a lot

    Hi ajmcfarlane,
    This is my first post here. I'm fairly new to AS3 still and
    have been getting my education from a number of places. The best
    education i have found is from the book located at
    http://www.learningactionscript3.com/
    Rich Shupe address this problem of removing the child from
    memory. I Downloaded your file and found 2 problems and resolved
    one of them. By now you might have already solved this anyway.
    To remove the child from the Display List use -->
    removeChild(myChildObject);
    To remove the object from memory use --> myChildObject =
    null;
    You did these two steps but in the incorrect order, just by
    moving the 'myChildObject = null' under the removeChild code makes
    it work.
    I found running a few trace statements after fixing the first
    problem, i found the second problem. The error of trying to remove
    a child when it is no longer there.
    You just need to rework the design so that the order of
    events fires as you want. Below is the traces i used and the output
    that is received.
    function Click1(e:MouseEvent){
    trace("four ", loadedcontent);
    modLoader.unload();
    modLoader = null;
    function unloadCompleteHandler(event:Event):void{
    trace("one ", loadedcontent);
    removeChild(loadedcontent);
    trace("two ", loadedcontent);
    loadedcontent = null;
    trace("three ", loadedcontent);
    output
    Loaded mem: 20668 KB
    four [object MainTimeline]
    one [object MainTimeline]
    two [object MainTimeline]
    three null
    unLoaded mem: 23352 KB
    So you can see the click event is firing of the unload first,
    when i think you want that last.
    I hope this has been of some help :)

  • Issue with af:tree component

    Hi All,
    I am using JDev 11.1.1.6
    I am creating a tree component with collection model.I want to provide different action to each node,so I have defined an action attribute in the bean
    which I set in the constructor as shown below
    TestTree node1 = new TestTree("node1", "#{TreeBean.action1}");
    Is this the correct approach..This gives me "method not found " error when I click on the node.
    Below is the code for tree component :
    <af:tree value="#{TreeBean.model}" id="t1" var="node"
    styleClass="AFStretchWidth" inlineStyle="height:600.0px;">
    <f:facet name="nodeStamp">
    <af:commandLink text="#{node.label}" id="cl1" immediate="true"
    actionListener="#{node.action}"/>
    </f:facet>
    <f:facet name="pathStamp"/>
    </af:tree>

    Hi Vinay,
    UseCase :
    I want a tree showing navigation links . these navigation links will be used to open a new page in panelTabbed Layout.

  • Unable to implement Programmatic ADF Faces Tree component in jdev 11g

    I have referred to the posts " [Back to programming: Programmatic ADF Faces Tree component|http://one-size-doesnt-fit-all.blogspot.com/2007/05/back-to-programming-programmatic-adf.html] " and " [Follow-up: Programmatic ADF Faces Tree in JDev 11g|http://one-size-doesnt-fit-all.blogspot.com/2007/05/follow-up-programmatic-adf-faces-tree.html] ",
    The first post showed how to construct the elements in the tree programmatically rather than relying on bindings (in JDeveloper 10.1.3)
    and the second post tells the only difference in 11g .
    I am trying to implement the elements of the tree programatically in Jdev 11g(specifically 11.1.1.0.2) but no result is coming .
    There is no compilation/run time error , its just that the tree is not visible.
    Can anyone suggest any key points which should be focussed during this implementation?

    Hi,
    follow the description
    http://www.oracle.com/technology/products/adf/adffaces/11/doc/demo/adf_faces_rc_demo.html
    to install the ADF Faces RC component demo in JDeveloper. It has a tree example. Have a look at their implementation and dapt it to your needs
    Frank

  • 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

  • Bug in Tree Component

    Hi All,
    I am facing a problem in the dynamic tree which i created. I had created actionhandler for tree leaf node and actionListener for collapsible nodes but in a particluar case where the user first clicks a tree leaf node and after the tree is reloaded from the server if the user next clicks the collapsible node the actionhandler is invoked instead of actionListener and an execption is thrown which i have pasted below. It seems to me like this is happening because the focus is still on leaf node when the user clicks the collapsible node as the tree uses cookies to track the selected node. It seems like a bug in tree component. Does anybody knows any workaround for this
    Exception Handler
    Description: An unhandled exception occurred during the execution of the web application. Please review the following stack trace for more information regarding the error.
    Exception Details: javax.faces.el.PropertyNotFoundException
    Error getting property 'page1' from bean of type javax.faces.component.UIViewRoot
    Possible Source of Error:
    Class Name: com.sun.faces.el.PropertyResolverImpl
    File Name: PropertyResolverImpl.java
    Method Name: getValue
    Line Number: 107

    Do you still have this problem? Try posting your question in this thread.
    http://forum.sun.com/jive/thread.jspa?threadID=102657&tstart=0
    Thanks
    K

  • A tree component

    Hello,
    I'm presently looking for a JSF tree component. I need one which not only would allow me to display a little icon next to my leaves names, but which would allow me to display a checkbox too.
    I've tried the Apache MyFaces tree, in the Tomahawk sub-project. But it looks like I won't manage to add a checkbox without changing its code.
    A clue, anyone ? With MyFaces or anything else ?
    AlienQueen

    below is my code from my project
    perhaps it is useful for your problem
    * Copyright 2005 The Apache Software Foundation.
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
    * http://www.apache.org/licenses/LICENSE-2.0
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    * See the License for the specific language governing permissions and
    * limitations under the License.
    package com.itlt.clb.action;
    import org.apache.myfaces.custom.tree2.HtmlTree;
    import org.apache.myfaces.custom.tree2.TreeNode;
    import org.apache.myfaces.custom.tree2.TreeNodeBase;
    import org.apache.myfaces.custom.tree2.TreeModel;
    import org.apache.myfaces.custom.tree2.TreeModelBase;
    import com.itlt.clb.entity.Agency;
    import com.itlt.clb.util.HibDb;
    import com.itlt.clb.util.Loginer;
    import com.itlt.clb.util.constant.ConstParas;
    import javax.faces.context.FacesContext;
    import javax.faces.application.FacesMessage;
    import javax.faces.component.UIComponent;
    import javax.faces.validator.ValidatorException;
    import javax.faces.event.ActionEvent;
    import java.io.Serializable;
    import java.util.List;
    * Backer bean for use in example. Basically makes a TreeNode available.
    * @author Sean Schofield
    * @version $Revision: 1.9 $ $Date: 2007-05-31 09:17:44 $
    public class TreeBacker implements Serializable
    private TreeModelBase _treeModel;
    private HtmlTree _tree;
    private boolean select;
    public boolean isSelect() {
              return select;
         public void setSelect(boolean select) {
              this.select = select;
         public TreeNode getTreeData()
              String formatFolder = "foo-folder";
              int agencyCodeLen = 5;//&#20195;&#29702;&#32534;&#30721;&#38271;&#24230;
              long agencyId = Loginer.getCurLogin().getUserclerk().getAgency().getId();
              TreeNode treeData = null;
              //&#39318;&#20808;&#24471;&#21040;&#20013;&#28207;&#36890;&#30340;&#25968;&#25454;.
              List chinaLinkList = HibDb.queryHQL("from Agency a where a.id ='"+agencyId+"' and a.status = '"+ConstParas.common3Status.ACTIVE.getStatus()+"'", 0, 0);
              Agency chinaLinkAgency = null;
              if(chinaLinkList != null && chinaLinkList.size() > 0){
                        chinaLinkAgency = (Agency)chinaLinkList.get(0);
                        if(chinaLinkAgency.getCode().length()==agencyCodeLen)
                             formatFolder = "foo-folder";
                        else
                             formatFolder = "bar-folder";
                        treeData = new TreeNodeBase(formatFolder, "<input type='checkbox' id='agency_"+chinaLinkAgency.getId()+"' value='"+chinaLinkAgency.getId()+"' onclick='getSelectAgency(this)'>"+chinaLinkAgency.getName()+"", false);
              // construct a set of fake data (normally your data would come from a database)
              List list = HibDb.queryHQL("from Agency a where a.agency.id='"+chinaLinkAgency.getId()+"' and a.status = 'A'", 0, 0);
              Agency agency = null;
              Agency subAgency = null;
              Agency subAgencyPoint = null;
              TreeNodeBase personNode = null;
              TreeNodeBase folderNode = null;
              TreeNodeBase folderNodePoint = null;
              for(int i=0;i<list.size();i++){
                   agency = (Agency)list.get(i);
                   if(agency.getAgency() != null){
                        if(agency.getCode().length()==agencyCodeLen)
                                       formatFolder = "foo-folder";
                                  else
                                       formatFolder = "bar-folder";
                        personNode= new TreeNodeBase(formatFolder, "<input type='checkbox' id='agency_"+chinaLinkAgency.getId()+"_"+agency.getId()+"' value='"+agency.getId()+"'onclick='getSelectAgency(this)'>"+agency.getName()+"", false);
                        //&#21435;&#25214;&#21040;&#25152;&#26377;&#23646;&#20110;&#23427;&#30340;&#38144;&#21806;&#28857;
                        //System.out.println(" agency.getId() = "+agency.getId());
                             List subList = HibDb.queryHQL("from Agency a where a.agency.id = '"+agency.getId()+"'and a.status ='"+ConstParas.common3Status.ACTIVE.getStatus()+"'", 0, 0);
                             for(int k=0;k<subList.size();k++){
                                  subAgency = (Agency)subList.get(k);
                                  if(subAgency.getCode().length()==agencyCodeLen)
                                            formatFolder = "foo-folder";
                                       else
                                            formatFolder = "bar-folder";
                                  folderNode = new TreeNodeBase(formatFolder, "<input type='checkbox' id='agency_"+chinaLinkAgency.getId()+"_"+agency.getId()+"_"+subAgency.getId()+"' value='"+subAgency.getId()+"'onclick='getSelectAgency(this)'>"+subAgency.getName()+"", false);
    //                              folderNode.getChildren().add(new TreeNodeBase("document", "X050001", true));
    //                              personNode.getChildren().add(folderNode);
                                  List subListPoint = HibDb.queryHQL("from Agency a where a.agency.id = '"+subAgency.getId()+"' and a.status = '"+ConstParas.common3Status.ACTIVE.getStatus()+"'", 0, 0);
                                  for(int l=0;l<subListPoint.size();l++){
                                       subAgencyPoint = (Agency)subListPoint.get(l);
                                       if(subAgencyPoint.getCode().length()==agencyCodeLen)
                                                 formatFolder = "foo-folder";
                                            else
                                                 formatFolder = "bar-folder";
                                       folderNodePoint = new TreeNodeBase(formatFolder, "<input type='checkbox' id='agency_"+chinaLinkAgency.getId()+"_"+agency.getId()+"_"+subAgency.getId()+"_"+subAgencyPoint.getId()+"' value='"+subAgencyPoint.getId()+"'onclick='getSelectAgency(this)'>"+subAgencyPoint.getName()+"", true);
                                       folderNode.getChildren().add(folderNodePoint);
    //                                        personNode.getChildren().add(folderNode);
                                  personNode.getChildren().add(folderNode);
                        treeData.getChildren().add(personNode);
    return treeData;
    * NOTE: This is just to show an alternative way of supplying tree data. You can supply either a
    * TreeModel or TreeNode.
    * @return TreeModel
    public TreeModel getExpandedTreeData()
    return new TreeModelBase(getTreeData());
    public void setTree(HtmlTree tree)
    _tree = tree;
    public HtmlTree getTree()
    return _tree;
    public String expandAll()
    _tree.expandAll();
    return null;
    private String _nodePath;
    public void setNodePath(String nodePath)
    _nodePath = nodePath;
    public String getNodePath()
    return _nodePath;
    public void checkPath(FacesContext context, UIComponent component, java.lang.Object value)
    // make sure path is valid (leaves cannot be expanded or renderer will complain)
    FacesMessage message = null;
    String[] path = _tree.getPathInformation(value.toString());
    for (int i = 0; i < path.length; i++)
    String nodeId = path;
    try
    _tree.setNodeId(nodeId);
    catch (Exception e)
    throw new ValidatorException(message, e);
    if (_tree.getNode().isLeaf())
    message = new FacesMessage(FacesMessage.SEVERITY_ERROR,
    "Invalid node path (cannot expand a leaf): " + nodeId,
    "Invalid node path (cannot expand a leaf): " + nodeId);
    throw new ValidatorException(message);
    public void expandPath(ActionEvent event)
    tree.expandPath(tree.getPathInformation(_nodePath));
    it support your checkboxi
    Message was edited by:
    lysmart

  • Error while Deleting Software Component

    Hi All,
    I am getting following error while deleting Software Component Version:
    Unable to Delete object DELETEDEMO_COMPONENET, 1.0 of delete.
    You cannot delete a sotware component version if it contains imported interfaces.
    Is there any shortcut isntead of deleting all objets manuually?
    Sri

    Hi Sri.
    It's very simple
    Solution:
    Double Click on Software Component, On Right Hand side >Go to Software Component Version->Delete the software component.If all the necessary Objects have been properly deleted, there will be no problem in Deleting the Software Componet version
    1) Delete the created Data Types, Message Types, Message Interfaces, Message Mappings, and Interface Mappings.
    2) There should be no Imported SAP Objects in the Software Component. If any delete them and activate changes.
    3) Delete all namespaces in the editor using sign. Do not save the changes.
    4) Delete the two default data types that are created in the Interface Objects-->Data Types of the software component version (ExchangeFaultdata, ExchangeLogdata). Now save changes for the s/w component version and activate the changes. Ignore the warnings that pop-up.
    5) The radio button for u201CInterface import should be at u201CNot permittedu201D instead of u201CImport RFC and IDoc Interfaces from SAP Systems Permittedu201D.
    6) Now go to Software component version menu in the right hand pane. Click on delete and the software component vanishes from left hand pane 
    >> Is there any shortcut isntead of deleting all objets manuually?
    NO.. other way or any any shortcut for this
    Abid

Maybe you are looking for

  • Function Module Does not exist

    Hello Experts, I am trying to run the initialization for the Billing conditions 2lis_13_vdkon datasource. Job is getting cancelled and the following error messages are coming when i check the job log in source system Job started Step 001 started (pro

  • My airport utility can't find the airport device.

    Everything is connected. I bought the device about eight months ago and have used it successfully to set up wireless networks twice. Now i have a DSL modem, and there was an error that the IP was in use. So i followed some tips online to reset both d

  • Partition pruning doesn't work

    Hi all, in this query I've joined 3 tables, each of them partitioned along the field PARTITION_KEY_PRE: SELECT * FROM t_cp_pp_basdat basdat LEFT OUTER JOIN t_cp_pp_custom custom ON basdat.pre_processing_id = custom.pre_processing_id AND basdat.partit

  • Infinite loop at db_open

    Hi! There is another problem on multi-process env. $ pstack 17778 #0 0x0057cc62 in memcmp () from /lib/tls/libc.so.6 #1 0x088652e0 in ?? () #2 0x08291bf6 in __env_setup () #3 0x081ad39e in __db_open () #4 0x082a5639 in __db_open_pp () #5 0x0814dc2c i

  • Muse will not sign in to BC

    I see a similar problem but the solution given is incomplete. I have my site ready to update but my Adobe password has changed since I last updated. So, Preferences>Publish>Publish with Account, but then what? Should I select switch accounts? I don't