Customizing the Tree Component inn ADF Faces..

HI,
I am using the ADF Faces Tree Component and was wondering wheteher we
can use a specific theme instead of the default one..
The scenario's i am looking at are
1) Changing the Style of the Selected Node
2) Programatically can i assign a different styling for a Specific
Node (Previously Selected) in the Tree ??
3) And any info reg Enabling the Drag and Drop functionality ?? As of
now i don't think it is supported. Are there any plans of it being
supported in the furture releases??
Thanks
Sateesh

Hi,
1) See tree skin selectors: http://www.oracle.com/technology/products/jdev/htdocs/partners/addins/exchange/jsf/doc/skin-selectors.html
2) You can reference a managed bean for providing the inline style sheet on a component. This however only works when the tree is re-drawn and not dynamically
3) Drag and drop doesn't work in 10.1.3.x. In 11 this may work - havent tested yet - using a client listener component
Frank

Similar Messages

  • Using the Tree component of ADF

    Hi!
    I am wondering if someone could show me a small example of a tree component with pre-defined columns.
    Thank you in advance for your assistance!

    Would you be able to provide an example or a couple of links to resources about how to do so?
    I've looked at http://download.oracle.com/docs/cd/E12839_01/web.1111/b31973/af_table.htm#CIADBJCJ, but it doesn't quite explain enough for me.
    The example of a treemodel provided there is:
    List<TreeNode> root = new ArrayList<TreeNode>();
    for(int i = 0; i < firstLevelSize; i++)
      List<TreeNode> level1 = new ArrayList<TreeNode>();
      for(int j = 0; j < i; j++)
        List<TreeNode> level2 = new ArrayList<TreeNode>();
        for(int k=0; k<j; k++)
          TreeNode z = new TreeNode(null, _nodeVal(i,j,k)); 
          level2.add(z);
        TreeNode c = new TreeNode(level2, _nodeVal(i,j));
        level1.add(c);
      TreeNode n = new TreeNode(level1, _nodeVal(i));
      root.add(n);
    ChildPropertyTreeModel model = new ChildPropertyTreeModel(root, "children");
    private String _nodeVal(Integer... args)
      StringBuilder s = new StringBuilder();
      for(Integer i : args)
        s.append(i);
      return s.toString();
    }Is a TreeNode a custom class that contains the fields for the tree?

  • Customizing the Tree Component

    Is there a way to set different font sizes and colors for
    different levels of the tree menu?

    I am guessing that you are using AS2 components, as there is
    not a default Tree component for AS3...
    I don't know about font sizes, but you can set depth colors
    for the AS2 Tree.
    The following will set the background colors to black, medium
    grey, lighter grey for the Tree that is named "myTree":
    var colorArray:Array = new Array();
    colorArray.push(0x000000);
    colorArray.push(0x555555);
    colorArray.push(0x999999);
    myTree.setStyle( "depthColors", colorArray );
    Note that this is based on the depth. IE for the node
    structure:
    <node label="First Level">
    <node label="Second Level">
    <node label="Third Level">
    </node>
    </node>
    </node>
    First Level with have a black background, Second Level will
    have a medium grey background and Third Level will have a lighter
    grey background.

  • A question about the Tree Component

    I have try to use the tree component i a flash page, and
    it´s going allright until I´ll want to link the content
    to a page... WHY??
    I have tried a lot of different codes here are those I tried:
    <tree>
    <folder label="Mine own">
    <link label="My page" url="
    http://www.mickesei.se" />
    </folder>
    </tree>
    Nr2:
    <tree>
    <folder label="Mine own">
    <link label="My page" link="
    http://www.mickesei.se" />
    </folder>
    </tree>
    nr3:
    <tree>
    <folder label="Mine own">
    <link label="My page" href="
    http://www.mickesei.se" />
    </folder>
    </tree>
    nr4:
    <tree>
    <folder label="Mine own">
    <link label="My page" get URL="
    http://www.mickesei.se" />
    </folder>
    </tree>
    But nothing seems to work, when I go mouse over it still a
    arrow should it?
    HELP ME PLEASE!!! Micke

    Thanx Jeanne,
    You brought me on a idea with the UIX Developer's Guide and EXPANDABLE_EXPANDED value.
    I couldn't figure out how the expand property was filled, because it wasn't done in the ADF BC ViewObject. We have a Utility class that creates a DataObject from the ViewObject Data and here the expand property was set.
    Now it was easy to build a ExpandAll option. It is possible to access the HttpServletRequest object were the DataObject is created. By setting a attribute in the request I could react on that and give the expand property indeed the value EXPANDABLE_EXPANDED.
    Dennis

  • How do you change the Tree Component Icons?

    Hi,
    I have been trying to get to grips with the tree component. I
    want to
    customise it so that I can have a different icon for each
    different link.
    E.g. a QT logo for a video etc. If no valuse is found for the
    'icon'
    attribute it will just display the default.
    Within my XML file I have created a new attribute for each
    link called
    'icon' and has a value of 'movie.gif' or something similar.
    In my flash file, I have created the following code:
    theTree.iconFunction = function (node:XMLNode) {
    var iconNode:String = item.attributes.icon;
    if (iconNode != undefined) {
    return iconNode;
    However, it does not seem to work. My knowledge of
    ActionScript is pretty
    poor so I assume I have made a mistake in there somewhere.
    Can anyone help
    me with this?
    Thanks!

    Check out the Component Reference... you change the icon for
    a single node, as far as I know there's no automated process beyond
    that. So assuming your tree component instance is named "theTree"
    you might do this to change the icon of the first node:
    theTree.dataProvider = yourXML; // make sure you don't try to
    change the icon before you load data into the tree
    var theNode = theTree.getTreeNodeAt(0); // the first node in
    your tree
    theTree.setIcon(theNode,'myIcon'); // set the icon
    Where "myIcon" is a MovieClip you have in your library that
    you have set the "linkage identifier" as "myIcon".
    That iconFunction doesn't make a whole lot of sense to me,
    because first of all I don't know why it would be attached to
    theTree, and second it's referring to "item" which is not defined,
    and third its taking the parameter "node" and not doing anything
    with it. But perhaps there is some cool way to make a single
    function which handles icons for your entire tree automatically,
    that would certainly be nice.
    However, like I said, as far as I know that function will do
    nothing without calling tree.setIcon() in some way. I just made a
    function which might do what you want -- it recursively loops
    through an entire tree and sets it's icon based on the XML
    attribute "icon":
    function setAllIcons(branch){
    for(var i in branch.childNodes){
    var node = branch.getTreeNodeAt(i);
    theTree.setIcon(node,node.attributes['icon']);
    if(node.hasChildNodes){
    setAllIcons(node);
    So basically, you run setAllIcons(theTree.dataProvider) after
    you have loaded and applied the XML.

  • Where is the API download for ADF Faces 10.1.3.2?

    I can still download adf-faces-10_1_3_0_4 which contains the API documents in a /doc directory.
    Where is the API download for ADF Faces 10.1.3.2?
    Thanks,
    --Todd                                                                                                                                                                                                                                                                                                                                                   

    .. will check if we can make it available
    Frank

  • The Tree component

    Do any one know how to make the tree component transparent?
    I´ve tried a lot of different things but it doesn´t seem
    to work. I´ve tried to make it to a moviclip and drag the
    Alpha to 0 but then it doesn´t work at all. You can´t see
    the nodes..
    Please..
    [email protected]

    I have achieved this by placing the tree and data components
    within a container movie clip, and then changing the alpha of that
    container.
    It worked for me.

  • Change the Tree Component background

    Does anyone know how can i change the Tree Component
    background ?
    PLS HELP

    Check out the Component Reference... you change the icon for
    a single node, as far as I know there's no automated process beyond
    that. So assuming your tree component instance is named "theTree"
    you might do this to change the icon of the first node:
    theTree.dataProvider = yourXML; // make sure you don't try to
    change the icon before you load data into the tree
    var theNode = theTree.getTreeNodeAt(0); // the first node in
    your tree
    theTree.setIcon(theNode,'myIcon'); // set the icon
    Where "myIcon" is a MovieClip you have in your library that
    you have set the "linkage identifier" as "myIcon".
    That iconFunction doesn't make a whole lot of sense to me,
    because first of all I don't know why it would be attached to
    theTree, and second it's referring to "item" which is not defined,
    and third its taking the parameter "node" and not doing anything
    with it. But perhaps there is some cool way to make a single
    function which handles icons for your entire tree automatically,
    that would certainly be nice.
    However, like I said, as far as I know that function will do
    nothing without calling tree.setIcon() in some way. I just made a
    function which might do what you want -- it recursively loops
    through an entire tree and sets it's icon based on the XML
    attribute "icon":
    function setAllIcons(branch){
    for(var i in branch.childNodes){
    var node = branch.getTreeNodeAt(i);
    theTree.setIcon(node,node.attributes['icon']);
    if(node.hasChildNodes){
    setAllIcons(node);
    So basically, you run setAllIcons(theTree.dataProvider) after
    you have loaded and applied the XML.

  • Customized Error/Info  Messages in ADF FACES Pages

    hi every one...
    I need to display customized eerror/info messages in a ADF Faces application.
    How can i use adf:message componenet to do this...

    Hi,
    af:messages show all messages added to the JSF message stack
    FacesContext fctx = FacesContext.getCurrenInstance();
    fctx.addMessage("Some Name Strinng here", new FacesMessage(FacesMessage.SEVERITY_ERROR, "Your error message here",null));
    If <"Some Name Strinng here"> is the id of a component then the error message is also shown below this component
    For customizing error messages - e.g. translating Exceptions into useful user information, see SRDemo, which can be downloaded and installed through JDeveloper Help-->Check for Updates.
    Frank

  • Customizing the Tree

    Hi All,
    For example, consider a book shop,where the different types
    book are available written by different authors.
    here is the my problem statement........................
    Am using the tree controls to display book name as parent
    node,author names as a child nodes to it.for example assume that
    there are 3 books available on Java written by 3 different
    authors.Now the display should look like, Java as the parent node
    and the author names with check box as the child node to it and i
    want make the author name collapsible i.e when i click on the
    author name it should show me the details about the author.
    If there is any book with only one author then it should be
    displayed as a child node(not under the any of the parent node)
    is it possible?Any help can be appreciated.
    Thanks in Advance.

    "sankar83" <[email protected]> wrote in
    message
    news:gmh3nd$dmo$[email protected]..
    > Hi All,
    > For example, consider a book shop,where the different
    > types
    > book are available written by different authors.
    >
    > here is the my problem statement........................
    >
    > Am using the tree controls to display book
    > name
    > as parent node,author names as a child nodes to it.for
    example assume that
    > there are 3 books available on Java written by 3
    different authors.Now the
    > display should look like, Java as the parent node and
    the author names as
    > the
    > child node to it and i want make the author name
    collapsible i.e when i
    > click
    > on the author name it should show me the details about
    the author.
    >
    > If there is any book with only one author then it should
    be
    > displayed as
    > a child node(not under the any of the parent node)
    >
    > is it possible?Any help can be appreciated.
    You can probably do it with a custom DataDescriptor

  • About the recent donation of adf faces

    Just recently I read this article:
    http://www.oracle.com/corporate/press/2007_may/javatoolspreview.html
    It said: "Marking another significant contribution to the open source community, Oracle today open sourced its ADF Faces Rich Client technology, a set of more than 80 rich, AJAX-enabled JSF 1.2 components. Based on this contribution, a new sub-project called Rich Client Framework (RCF) will be created under the Apache MyFaces project. "
    And I am getting a little bit confused.
    Does this mean that the new ADF Faces bundled with the new JDeveloper(11) will be an open sourced version?

    Hi,
    this means that ADF Faces RC that ships with JDeveloper 11 will be give to open sourced. JDeveloper 11 will not be open sourced. We did the same for ADF Faces HTML components of 10.1.3..x which are now available in open source as Apache Trinidad.
    Also, the current ADF Faces libraries in JDeveloper 11 are not the open source libraries. You can get the open source libraries only through Apache once the project goes prime time.
    Frank

  • Problem refreshing the Tree Component icons

    Hello,
    I'm using the Tree, adding the nodes dinamically, following the example: http://www.netbeans.org/kb/55/vwp-databasetree.html
    This Tree shows the access permissions from the users, and show a red icon on the itens without permissions and a green icon on the itens with permissions.
    In the nodes, I add an action that change this permissions when the user click.
    If the permission is Ok on the clicked item, the action remove this permission and vice-versa.
    The action is working fine, but the problem is the refresh of the tree after click. The icons stay like before the click. It is refreshed only if I navigate to another page and return after. Then the icons are showed correct.
    In the method that add the nodes, I select the node icons like this:
    if (havePermissionModulo(grupo, modulo)){
    moduloNode.setImageURL(imgPermissaoOk);
    }else{
    moduloNode.setImageURL(imgPermissaoNegada);
    Where imgPermissaoOk and imgPermissaoNegada have the path to the images.
    Sorry by my english :)

    It is hard to tell
    When the user clicks on an icon, is the page submitted to the server and the page redisplaying itself?
    Is the tree's clientSide property cleared (that is, false).
    Is the browser caching the images? What if you hit a Shift-Reload?

  • Customizing the calendar component

    hi,
    I am using jdev 11.1.2.0
    In calendar component when in the list mode. we are having one button name "Today" and along with date range. My requirment is to display today date when clicking of today button in list mode.
    Is it possible.How can i customize the the toolbar.
    Any help would appreciated.

    Hi,
    Check this out: http://jdevadf.oracle.com/adf-richclient-demo/faces/components/skinningKeys/calendar.jspx
    AP

  • Af:setActionListener can not work fine in the af:iterator in ADF Faces RC

    Hi all,
    af:setActionListener can not work fine in the af:iterator/af:commandbutton. My code is as below:
    <af:iterator value="#{backing_Bean.testList}"   var="var" >
           <h:panelGrid columns="1">
          <af:commandButton icon="images/system/class.png"
                                              text="#{var.name}" >
             <af:setActionListener from="#{var.name}" to="#{backing_Bean.testText}"/>              
          </af:commandButton>
          </h:panelGrid>
    </af:iterator>The name [var.name] can be shown on the command buttoncorrectly, but when I click the button, the name can not be transferred to the testText in backing bean. why?
    Thanks
    Hart

    Hi,
    works for me. Not sure how you want to access to the value, but if the bean is in request scope then the values are only available during this period.
    Frank

  • Unable to find ADF Faces core option in the component palette...

    Hai
    I am learning ADF framework. Iam going through the ADF developers guide..
    When i am layouting a JSF JSP page .. am unable to find the panelPage option...
    In the tutorial i read like this
    component palette-->ADF Faces core ---> panelPage.
    I am unable to find this option...i am using Jdev10.1.3
    any one can help me....

    What exactly can't you find?
    The component palette? It is by default on the right side of JDev.
    The ADF Faces Core option? The component palette is by default initiated on HTML Forms (I think). When you click on this, you'll be able to select the desired option.
    The PanelPage? When selecting ADF Faces Core as describe above, you should see PanelPage among the possibilities.

Maybe you are looking for