JSF Tree construction - My Faces Tree2 Component development

Hi
I am planning to recommend JSF and MyFaces for the development of the application.
like Navigation Tree on the left side, header, footer and body ..
1) Can any one share a piece of code to develop Dynamic Navigation Tree(like ServerSideToggling ..I will get the data from backend based on the I will build the Tree with leafs, when we click on leafs we need to call action to redirect to other jsps ) we can achieve this using MyFaces Tree2 Component,Just wondering if anybody know some information, any info is appreciated.
Parent1
|
--Child1__
|--sub child 1
--Child2
--Child3
Parent2
|
--Child1__
|--sub child 1
--Child2
--Child3
Conditions:
1) Need to construct the Tree based on backend data.
2) All the Parents and Children should be links, like when I click on any link, I need to call an action and forward it some other page.
For testing I hardcoded and built one tree, which look similar...but the dynamic tree needs server side toggling..which requires...handling of backend data...constructing a tree...If you could share a sample, I will be appreciated...mean while I will try to do this...
thanks
jish

HI jish,
A couple suggestions.
While the MyFaces (tomahawk) components may be very useful, I would encourage you to make sure you're using JSF from the Mojarra project. It is more stable and better supported: https://javaserverfaces.dev.java.net
Also, I would encourage you NOT to use JSPs. JSF 2.0 will favor a facelets-style syntax, so you should consider using Facelets or JSFTemplating instead. JSP is also slower and more cumbersome to work with. Try: https://jsftemplating.dev.java.net or https://facelets.dev.java.net . Either one of these projects replace JSP and provide "templating" support (which doesn't exist when using JSP) as well as many other features to help you (like JSFTemplating's factories for creating dynamic trees).
I don't use MyFaces Tree2 component (I use Woodstock's Tree component), however, I think the concepts should be the same. Here's some a link to a very complicated example (GlassFish Admin Console Tree code which is generated from several backend sources + updated via Ajax):
https://glassfish.dev.java.net/source/browse/glassfish/admin-gui/src/docroot/peTree.jsf?rev=1.12&view=markup
A more simple example:
<sun:tree text="Tree Example" clientSide="false" url="http://www.google.com">
    <sun:treeNode text="Static Tree Node" actionExpression="#{some.thing}">
        <dynamicTreeNode treeAdaptorClass="com.sun.enterprise.tools.admingui.tree.MBeanTreeAdaptor"
            objectName="com.sun.appserv:type=applications,category=config"
            methodName="getAllDeployedJ2EEApplications"
            text="Dynamic Tree Node"
            url="/applications/enterpriseApplications.jsf"
            attributeName="name"
            childURL="applications/enterpriseApplicationsEdit.jsf?appName=#{$this{valueBinding}.text}" />
    </sun:treeNode>
</sun:tree>Another place to look is the scales project. The lead developer on that project is actively developing a Tree component that will have a very clean interface to interacting with dynamic trees.
Good luck!
Ken Paulsen
https://jsftemplating.dev.java.net

Similar Messages

  • Jdeveleoper- JSF- Tree component

    Hi,
    I am new to JSF and JDeveloper. I want to have a tree component using JSF. Any suggestions on how to create a tree component??
    regards,
    Meenakshi.S

    Hi, currently there is no JSF tree componenet. You can use ADF faces tree or
    myfaces tree2.

  • JSF tree view GUI component and tree node actions

    Hi,
    I am new in using JSF and have a problem with my simple test application.
    The application contains a tree view control with one static tree node and a separate text area. Clicking on the tree node shall fill the text area with the string 'hello'. Seems to be very simple, but it doesn't work.
    What did I do?
    First of all I use the Sun Java Studio Creator 2.
    By double clicking on the tree node in the design window of the IDE a method called treeNode1_action() was created. I also added the String text to the session bean. treeNode1_Action() does not more than setting text='hello' ( getSessionBean().setText('hello'); ).
    The jsp file contains the line
    <ui:textArea binding="#{Page1.textArea}" id="textArea" style="height: 192px; left: 360px; top: 48px; position: absolute; width: 456px" text="#{SessionBean1.text}"/>, so the text of the text area is bound to the session property 'text'.
    Running the application and clicking on the tree node does nothing except reloading the page (no 'hello' inside the text area).
    Using the debugger showed me that the bean property text is set correctly to 'hello', also after reloading the page.
    What did I do wrong?
    What do I have to do to display 'hello' in the text area?
    I would be glad for some good advice to solve my problem and looking forward for an answer.
    Regards from germany
    Matthias

    want to remove the green patch from the jsf tree componentas u said ,, it is COMPONENET so this is a pre-made creator component that u cant chnage its attributes ,,
    instead u can extract Theam.jar file and change the icons ,, u i didnt do it before ,, but u may be find what u want there,
    hope this will help
    good luck
    Mohammed

  • ADF Faces: is mixing JSF RI and ADF Faces tags supported?

    Hi,
    I'm looking at ADF Faces as a future possibility for our application that is currently based on JSF RI.
    When looking at the ADF Faces demo it strikes me that all pages are almost completely built up from ADF Faces tags.
    For instance
    af:form
    af:commandButton
    af:inputText
    are used instead of the equivalent core jsf tags f:form, f:commandButton and f:inputText
    I'm wondering if this is mandatory if we would like to use some ADF Faces components mixed within our existing application.
    In other words: are ADF Faces tags supported in the environment of conventional JSF tags? And mixing ADF Faces JSF components with JSF components by other vendors?
    Another thing that strikes me is that pages are constructed using ADF Faces tags for any and all markup content.
    I guess this is meant to support several different clients (normal browser applications, mobile clients, voice activation over telephone) using different renderers.
    In my experience abstracting markup this way inherently means loss of control over the exact markup that is sent to the client. This is not acceptable for all projects and customers.
    Is embedding ADF Faces tags within template HTML, within f:verbatim tags or not, supported?
    Regards,
    Joost de Vries

    You absolutely can mix JSF RI and ADF Faces tags. This is very much supported! You can swap in <h:form> and <h:commandButton> and <h:inputText>. Our versions support some features that the JSF tags do not, as described in our release notes.
    Your point about using tags to produce all markup is a very cogent one. For some projects, absolute control over HTML will be a necessary requirement, so we do support that style of development. But we believe strongly that the future does not lie in constant handcoding of HTML, but instead in building more powerful, flexible, and reusable components and assembling those into pages. This was one of the themes of a talk I gave with two coworkers at this past JavaOne.
    -- Adam Winer (JSF EG member and ADF Faces lead)

  • Tomahawk tree2 component using css

    hi,
    Is there any way to set new style (css) to Tomahawk tree2 component ?? Can you give me an example ?
    best regards,

    This question is apparently about JSF. This forum is not about JSF.
    To find the correct forum here you have to know that "JSF" is an acronym for [JavaServer Faces|http://forums.sun.com/forum.jspa?forumID=427].

  • JDeveloper 11.1.2.3, ADF Faces: declarative component does not support af:clientListener?

    I am trying to create a declarative component with the following code:
    <?xml version='1.0' encoding='UTF-8'?>
    <af:componentDef xmlns:af="http://xmlns.oracle.com/adf/faces/rich" var="attrs" componentVar="comp" definition="private"
                     xmlns:afc="http://xmlns.oracle.com/adf/faces/rich/component">
        <af:xmlContent>
            <afc:component>
                <afc:display-name>DoubleClickTableDialogClientServerListener</afc:display-name>
                <afc:component-extension>
                    <afc:component-tag-namespace>org.mskcc.crdb.common.declarativecomponent</afc:component-tag-namespace>
                    <afc:component-taglib-uri>http://www.mskcc.org</afc:component-taglib-uri>
                </afc:component-extension>
            </afc:component>
                <af:clientAttribute name="serverListenerType" value="TableDoubleClickEvent"/>
                <af:clientListener method="handleTableDoubleClick" type="dblClick"/>
                <af:serverListener type="TableDoubleClickEvent"
                                   method="#{EditAddDialogTemplateBean.handleTableDoubleClick}"/>
        </af:xmlContent>
    </af:componentDef>
    At runtime I recieve the following error:
    javax.faces.view.facelets.FaceletException: ADF_FACES-60023:Component: DoubleClickTableDialogClientServerListenerComponent[oracle.adf.view.rich.component.fragment.UIXInclude$ContextualFacesBeanWrapper@7170a7, id=dctdcsl1] does not support client listeners.
      at oracle.adfinternal.view.faces.facelets.rich.BaseClientListenerHandler.apply(BaseClientListenerHandler.java:53)
    This component was intended to be dropped off within an af:table component. I would like to hear suggestions on workarounds, one other way I thought about was to create a code template for the three tags, however, the con to this approach is each developer would need to configure this template within jdeveloper. Ideas are appreciated.
    Also a side question, how can I embed code properly with the new forum? [code] tag does not seem to work now.

    Wes, can't help with the real question, but can tell you how to format code
    Change to the advanced editor (top right over the editor field), then you get more options. The one you are looking for is behind the blue '>>'. Here you select the language you want to insert and you get nice code formatting and color.
    Timo

  • How to add adf faces in component pallete of jdeveloper 11g?

    how to add adf faces in component pallete of jdeveloper 11g?

    Hi,
    the replacement of ADF Faces HTML components in JDeveloper 11 is Trinidad. For existing applications, a migration path will be provided in JDeveloper 11 production. I wouldn't recommend configuring ADF Faces in JDeveloper 11.
    You an configure ADF Faces Components in JDeveloper 11 by :
    - Tools --> Manage Libraries
    - Create a User Library
    - select ADF Faces adf-faces-impl.jar
    - Enure the namespace is not af or afh but something different to not cnflic with teh ADF Faces RC components
    Note that adding the ADF Faces components to the component palette will not make them show in the ADF binding context menu nor will it automaticaly set up the web.xml file. The components are available as any other JSF library set
    Again, I wouldn't go this way ;-)
    Frank

  • JSF Tree Node -Removing Green Patch

    Dear Everyone, Anyone, Someone
    I want to remove the green patch from the jsf tree component, it appears whenever we select the tree node, if we have given link from treenode, Can anyone suggest me some way.
    Please do the needful help as soon as possible.
    Regards,
    Ashish Samant

    want to remove the green patch from the jsf tree componentas u said ,, it is COMPONENET so this is a pre-made creator component that u cant chnage its attributes ,,
    instead u can extract Theam.jar file and change the icons ,, u i didnt do it before ,, but u may be find what u want there,
    hope this will help
    good luck
    Mohammed

  • Related to component development.

    Hi folks,
    A very basic jsf question relating to component development. In the component class should all the instance variables have bean type getter and setter property ?
    If the answer to the previous question is no ,then from a design perspective which instance variables shouldn't have a bean type getter and seter property ? Some clarifications may be helpful for me to comprehend the problem.

    Well, it's not required to have a getter/setter for all your component properties. HOWEVER, it's a very good idea to have it anyways.
    You do not need getters and setters for temporary variables, and public static fields. Basically, ask yourself if the user of your component class could potentially ever need use of the property. If yes, then make a getter and setter.
    CowKing

  • JSF tree with radiobuttons support

    Hi everybody,
    I need to create JSF tree with possibility to select both nodes and leaves with radio button.
    The only idea I have now is to create my own component, which will generate [BlueShoes JavaScript tree|http://www.blueshoes.org/_bsJavascript/components/tree/examples/example8.html]
    Perhaps anyone has better idea? Maybe anyone has already met JSF trees with radiob uttons support?
    Thanks beforehand

    unfortunately, the browser usually uses right click to bring up a browser's menu for copy/paste, etc. I don't think javascript can intercept that though I could be wrong.

  • Jsf - how set text from "message component"?

    hi.
    Sorry my bad English.
    How I make to edit the errors messages of the "message component" entailed to the one text field? it is that I want the messages in Portuguese.
    thanks
    venom

    I assume that you are talking about the adf faces message component? If so, take a look at one of the SRDemo samples - both use localized strings for error messages. You can find the developer's guide and instructions for downloading the sample application that uses the same technology stack as your application does, here:
    http://www.oracle.com/technology/products/adf/learnadf.html
    Hope this helps,
    Lynn Munsinger
    JDeveloper Product Management

  • ADF Faces menuTree component example

    I am new to faces technology and I would appreciate if someone can give or point me to a demo creating and managing ADF faces menuTree component. How to dynamically create menus from SQL?
    Regards, Simon

    Hello,
    an example of an ADF Faces Tree component you can find in SRDemoSample. It's used in SRManage.jspx
    hope it helps you a bit, MenuTree should work similar.
    Cheers, Stefan

  • Myfaces tree2 component

    For the first time im using myfaces plugin in RAD 6.0..I wanna use the tree2 component.I have included the tomahawk jar file and other jars in the classpath.But all i wanna know is how to get a tree structure of say a datatable as a node under the tree? Is it possible??If so could you please explain..

    SenkaTatsujin: Have you figured this out?
    If you have could you please share what you did.
    Thanks,
    --Todd                                                                                                                                                                                                                       

  • Tomcat warning - [ComponentRule]{faces-config/component}

    Hi,
    then i start the Tomcat (with my JSF app) in console i see the WARNING
    23.08.2007 15:33:24 com.sun.faces.config.rules.ComponentRule end
    WARNUNG: [ComponentRule]{faces-config/component} Merge(javax.faces.ViewRoot)
    what is that? How to avoid it? Make i something wrong?

    It's letting you know that some other parsed faces-config.xml is providing an
    override to the default component associated with the ViewRoot.
    I believe add-ons like shale do this.

  • Confused about the Business Component Developer Certification

    Excuse me, I´m confused...
    How many certifications are about the Business Component Certification? Three??
    I thought there was just one, the Business Component Developer, which is the 1Z0-860 code...
    but I also have seen these:
    Java EE 6 Enterprise JavaBeans Developer Certified Expert Exam - 1Z0-895
    Java EE 6 Java Persistence API Developer Certified Expert Exam - 1Z0-898
    and now I don´t know which one to study for...
    Are these better? Or just different? Or are the last ones just the new ones and the 1Z0-860 is obsolete?
    Thanks in advance!

    938334 wrote:
    Excuse me, I´m confused...
    How many certifications are about the Business Component Certification? Three??
    I thought there was just one, the Business Component Developer, which is the 1Z0-860 code...
    but I also have seen these:
    Java EE 6 Enterprise JavaBeans Developer Certified Expert Exam - 1Z0-895
    Java EE 6 Java Persistence API Developer Certified Expert Exam - 1Z0-898
    and now I don´t know which one to study for...
    Are these better? Or just different? Or are the last ones just the new ones and the 1Z0-860 is obsolete?
    Thanks in advance!The basic answer to look at the question topics for each exam and and see what fits you. The question topcis should yield insight.
    Additionally the following exam is an OCP
    http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=41&p_org_id=&lang=&p_exam_id=1Z0_860
    The other two are OCE, as far as I can tell. Typically more of an area in depth, but OCE's can vary.
    http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=41&p_org_id=&lang=&p_exam_id=1Z0_895
    http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=41&p_org_id=&lang=&p_exam_id=1Z0_898
    I also notice the earlier exam is J2EE5; the later exams are J2EE6
    Hope this helps a little, but this java stuff is too hard for me and i must stackdump.

Maybe you are looking for

  • Also got an issue with MSI command center, maybe windows is to blame?

    MSI Command Center crashes every time after it's been running a little while, googling it I've noticed there have been a lot of topics about it crashing. I think someone here on this forum suggested reinstalling windows might help :/ Not too keen on

  • Ipod won't restore, not recognized by pc or itunes

    Pressing the select and menu buttons will not restore the ipod. My PC does not recognize the ipod as a disk on the computer and itunes does not recognize the ipdod so it won't update. This also means the ipod updater program won't work to update my i

  • Define logical Key on Logical Dimension Table

    It's recommended to define a logical key for any logical dimension table - in 10g there was a function on the right mouse button, as far as I remember - but in 11g there is no such functionality ? the foreign key can be added by "green plus" button,

  • PeopleSoft Database Update Statistics

    I am trying to find out what is the best practices for implementing the Update statistics on Psoft Database. Any help or documentation regarding will be a great help I am looking for what is the best practice for update statistics on oracle , Interva

  • Output Type in Purchase order.

    Hi Gurs, When purchase order creation  if the output type is created automatically the print immediately check box is Checked defaultly and when entered the output type manually the print immediately  check box is Unchecked. I need the checkbox shoul