JSTreeBrowser

I4m trying to show my Categories table, which is self-related and have the following structure :
CATG_ID - Id of the Category
NAME - Name
CATG_CATG_ID - Id of the father
Well, i had created the app module, and all the needed structures in BC4J, to my self-related view (called CategoryView1). So I4ve tried to show my structure in a JSTreeBrowser, on a JSP page. It worked, but not properly. Let me explain this : it showed only 2 records that are father and son, but they4re in the middle of the hierarchy. Some like this
Cookies
Chocolate Cookies
The problem that i see is that the Category cookies does have a father called 'Food' and 'Food' have a father too. Why does this other categories doesn4t appear ? It is something with the order of the records in the table or not ?
Any guess ? Thanks !
null

<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Alessandro Dias ():
I4ve found a way to do it.
I have changed my query in the View, using a CONNECT BY in the Query Statement. And it Worked fine.
Now i have one question about tree. My tree have been generated, but all the clickable components (links, expand/collapse icons) aren4t working ! What do I have to do to make tem available. The links all use the following strucuture :
"javascript:void disptree0.loadPage(X, window );", where X is the number of the category chosen.
and the expand/collapse icon use this :
javascript:void disptree0.toggle(X, window);
I ask you how do i change those values and how do i get more documentation about JSTreeBrowser, the other methods and attributes it has that aren4t in the Documentation.
Thank u all
<HR></BLOCKQUOTE>
I ve the same problem. Do you manage to use this webbeans?
thanks
Jean-Noel

Similar Messages

  • ? parameters & JSTreeBrowser

    I have a JSTreeBrowser based on a view that is self-referential. It works fine. But I need to restrict the rows that appear using a bind variable (?). I put the ? in the View object's where clause, set Use ?Type parameters and compiled. The View Object compiled fine. But when I try to access the JSTreeBrowser in my JSP page, I get a SQL Exception which says ...SystemUsers.NAME = ?..., error in SQL. Any thoughts on why the ? variable is not being passed to the View?

    MTTR - You need total number of Breakdowns ans Total Downtime of all these. Then Divide the D/Time by numebr of BDns.
    MTBR - You need to compute the interval between all these BDn. Add all these intervals and divide by the number of BDns.
    Also Go through this document.
    MTTR, MTBR, Failure Rate, Availability and Reliability

  • JSP, View Object and ? parameter

    I have a view object that uses a ? type parameter in its query. The use ? type parameter checkbox has been marked in the view and the view compiles successfully.
    Now this view is being used by the Data Web bean JS Tree Browser in a JSP page.
    The JSP code
    <jsp:useBean class="oracle.jbo.html.databeans.JSTreeBrowser" id="roleMenuTree" scope="request" >
    <%
    roleMenuTree.setDepthLevel(6);
    roleMenuTree.setReleaseApplicationResources(false);
    roleMenuTree.setDisplayAttributes("Name");
    roleMenuTree.initialize(pageContext,"Tasksys_TasksysAppModule.MenuTreeView");
    Object x[] = new Object[1];
    x[0] = "tasksys";
    roleMenuTree.getRowSet().getViewObject().setWhereClauseParams(x);
    roleMenuTree.getRowSet().getViewObject().executeQuery();
    roleMenuTree.render();
    %>
    </jsp:useBean>
    But I end up getting the following error. WHY ?
    Error: 500
    Location: /tasksys/jsp/login_submit.jsp
    Internal Servlet Error:
    javax.servlet.ServletException: JBO-27122: SQL error during statement preparation. Statement: SELECT Menus.ID, Menus.NAME, Menus.DESCRIPTION, Menus.MODULE, Menus.MEN_ID FROM MENUS Menus WHERE menu_allowed(?, to_char(id)) = 'Yes'
    void org.apache.jasper.servlet.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
    void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
    void org.apache.tomcat.core.ServletWrapper.doService(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
    void org.apache.tomcat.core.Handler.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
    void org.apache.tomcat.core.ServletWrapper.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
    void org.apache.tomcat.core.ContextManager.internalService(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
    void org.apache.tomcat.core.ContextManager.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
    void org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(org.apache.tomcat.service.TcpConnection, java.lang.Object[])
    void org.apache.tomcat.service.TcpWorkerThread.runIt(java.lang.Object[])
    void org.apache.tomcat.util.ThreadPool$ControlRunnable.run()
    void java.lang.Thread.run()
    null

    You need to prepare the query using the setWhereClauseParams(x) call, before you initialize your data web bean. Otherwise, if you call the methods after you initialize your web bean, the context has already been set and the error occurs.
    You should insert another data web bean into your page somewhere at the top and use it to setup your query and create a view object. You should remove this bean's Render() method since you are only interested in the Initialize() method here. Add your code to prepare the query and create the view object.
    Then when your JS Tree Browser executes, it will be able to call getRowSet() on the View Object you created already.

Maybe you are looking for