Dynamic treeview bound to XML

Perhaps this isn't advanced enough to be here, if its not let
me know and I will post elsewhere.
I am fairly new to coldfusion but am learning quickly. I have
a coldfusion page I want to add a treeview to. I'm not sure if
cftree has the power I need. This tree will be dynamically
generated based on an xml document I plan on returning using
cfquery pointing to an sql server database. I was wondering if
anyone had any experience, examples, or advice on how to approach
this.
Any feedback would be greatly appreciated.

Hi Steve!
1. If your Schema has a minoccurance and maxoccurance (e.g. maxoccurance=unbound)represented in the element, the LCD should make it work by itself.
2. If you didn't fulfill point one, try to add [*] at the end of the binding. e.g. default binding = PurchaseItem[*]
good luck!
Håkon

Similar Messages

  • List View Bound to XML Map Data

    HI Have a list view that is bound to xml mapped data.  It seems that on connection refresh that new data is not being updated into the SWF.  My Binding is directly onto the cell ranges that are mapped into excel, so on updates the size of the maped table changes/rewrites over the old data.
    When I refresh I am not picking up the newest data in the list view.  Any thoughts on this on how I can fix.
    Regards,
    Mark

    Thank you Ganesh, but I am not on Enterprise edition.  I am successfully bringing in live xml data, however mapping more than one Query result from one xml file is giving my project some problems.  Refreshing a list View I think is causing this issue.  From within my project in design view I can Refresh the data.
    When I publish the file to html/SWF when I refresh other components are refreshing but the list view and one other is not refreshing.....

  • How to set dynamic color , based on xml element

    Hi,
    We have a requirement, where based on certain conditions, a cell will be shown in a specific color. We would like the coloir to be based on an XML element. The xml element will have values like '#FF00FF' etc..
    We tried using xsl attribute with the following syntax ,
    <xsl:attribute xdofo:ctx="block"name="color"><?stdcolor?></xsl:attribute><?end if?>
    where stdcolor is the xml element, but when we use this , this is giving a syntax error.
    Let us know, if this is possible or is there any other alternate way to do this.
    Regards,
    - Vasu -

    Hi Vasu,
    http://winrichman.blogspot.com/2008/09/how-to-set-dynamic-color-based-on-xml.html
    use the following :)
    <xsl:attribute xdofo:ctx="block" name="color" ><xsl:value-of select="stdcolor" /></xsl:attribute>
    TO get the colors you wanted , you can refer to
    http://www.w3schools.com/Html/html_colors.asp

  • Generation of Interactive file dynamically based on a XML document.

    Hi Experts,
    I got a new requirement for a dynamic interactive PDF form, can somebody help me if its possible to do so and is fo how ..?
    I will have a dynamic XML file generated and placed in a location with list of fields, attributes, events and webservices information.
    Now I need to read this XML (from a J2EE APP or any other technology would do) based on the fields and properties spedified, need to generate a PDF document, based on events specified generate buttons and bind the web service.
    At runtime when a visibile button is clicked send data to this web service.
    Does anybody cameacross such a requirement ...?
    Thanks in Advance,
    Sai

    Hello Sai,
    I won't be too expecting using Flex. The layout generated need not necessarily be compatible with the SAP ALCD.
    Although, it must be possible to generate a pdf dynamically because every element used in the form layout is stored as a xfo-file (e. g. button.xfo) within the installation directories. Have a look! So, you can assemble a form layout based on the xfo-elements completely dynamically.
    So, you need an empty layout. You can load the layout by cl_fp_wb_form=>load and form->get_layout( ). Change it, store and generate by function FP_FORM_GENERATE. But it will need some efforts!
    Good luck!
    Regards,
    Alexander

  • How can we display dynamic fields from a XML CLOB?

    Jdeveloper Version : 11.1.1.4.0 (11g)
    We are calling a database package.procedure from a page VO and it returns a result set. The result set is mainly a XML CLOB. Within XML CLOB, we have various sections which we need to parse and display those on JSF page. Couple of sections within XML are having dynamic fields which means the number of fields returned under that section may change depending upon data conditions. We need to find technical way of displaying those dynamic fields (field name and its data – both are part of XML).
    Please suggest how can this be achieved.
    Thanks

    <?xml version="1.0" encoding="UTF-8" ?>
    <nodes>
    <node>
    <category_id>3</category_id>
    <parent_id>2</parent_id>
    <name>Mobile</name>
    <is_active>1</is_active>
    <position>1</position>
    <level>2</level>
    <children>
    <node name="Nokia" category_id="6" parent_id="3" is_active="1" position="1" level="3">
    <node name="Nokia N79" category_id="7" parent_id="3" is_active="1" position="2" level="3" />
    <node name="Nokia N95" category_id="7" parent_id="3" is_active="1" position="2" level="3" />
    <node name="Nokia N97" category_id="7" parent_id="3" is_active="1" position="2" level="3" />
    </node>
    <node name="Samsung" category_id="7" parent_id="3" is_active="1" position="2" level="3">
    </node>
    </children>
    </node>
    <node>
    <category_id>4</category_id>
    <parent_id>2</parent_id>
    <name>Laptop</name>
    <is_active>1</is_active>
    <position>2</position>
    <level>2</level>
    <children></children>
    </node>
    <node>
    <category_id>5</category_id>
    <parent_id>2</parent_id>
    <name>Monitor</name>
    <is_active>1</is_active>
    <position>3</position>
    <level>2</level>
    <children></children>
    </node>
    <node>
    <category_id>8</category_id>
    <parent_id>2</parent_id>
    <name>Camera</name>
    <is_active>1</is_active>
    <position>4</position>
    <level>2</level>
    <children></children>
    </node>
    </nodes>
    Is this correct format to create dynamic menu?

  • OIM Reporting: How to pass a dynamic parameter in the xml file

    Hi,
    I am generating a custom report in OIM. My stored procedure is ready and I am getting the required data when I query the database. However,while displaying it through the xml file, I need to filter the fetched data by group name. The glitch present here is that the group name is dependent on the resource selected and so the group parameter is dynamic. How can I pass this dynamic group parameter in the xml file to filter the data. Which attributes are to be used. Can anyone please help me out regarding this?
    Thanks in Advance,
    SK

    The OOTB OIM reporting mechanism does not support dependant LOVs, which is
    what you are asking for.

  • Dynamic table with strange XML

    Probably I should write my problem before, instead of asking "part-questions".<br /><br />I have an XML like this:<br /><Root><br />  <Elem1 value="ss"><br />  <Elem2 value="ss2"><br />  <ElemInTable1 value="s" index="0"><br />  <ElemInTable2 value="s" index="0"><br />  <ElemInTable1 value="s" index="1"><br />  <ElemInTable2 value="s" index="1"><br /></Root><br /><br />Explanation: <br />Elements: <br />a) ElemX are normal fields. <br />b) ElemInTableX are elements which represent a table. All elements with the same attribute index are in the same row.<br /><br />I am trying to create a form which will allow me to have an dynamic table (adding and deleting rows), which will fill both attributes ('value' and 'index'). <br />I am out of ideas who to bind fields to textfields, or how to "repair" XML with javascript. Still something does not work correctly.

    Hello,<br />you have to change your XML to smth like this:<br /><br /><?xml version="1.0" encoding="iso-8859-1"?><br /><root>          <br />  <Elem1 value="ss"/> <br />  <Elem2 value="ss2"/> <br />  <table1><br />     <ElemInTable1 value="s" index="0"/> <br />     <ElemInTable1 value="s" index="1"/> <br />  </table1>     <br />  <br />  <table2><br />  <ElemInTable2 value="s" index="0"/>   <br />  <ElemInTable2 value="s" index="1"/> <br /></table2><br />     <br /></root><br /><br />and make this file as source for DataConnection.<br /><br />After that you will be able to bind tables and add instances.

  • Dynamic Table Width for XML Renderer

    Hi Guys,
    I'm looking for a way to get a XML documents with a dynamic table width.
    Using a dynamic result table doesn't work.
    The test program looks like this.
    REPORT  xml_test.
    TYPE-POOLS: ixml.
    DATA: go_ixml TYPE REF TO if_ixml.
    go_ixml = cl_ixml=>create( ).
    DATA:  go_xml_document TYPE REF TO if_ixml_document.
    go_xml_document = go_ixml->create_document( ).
    DATA: go_xml_root_elm TYPE REF TO if_ixml_element.
    go_xml_root_elm  = go_xml_document->create_simple_element(
               name = 'flights'
             parent = go_xml_document
             value  = 'Texas Flight' ).
    DATA: go_xml_main_elm TYPE REF TO if_ixml_element.
    go_xml_main_elm  = go_xml_document->create_simple_element(
                  name = 'airline'
                parent = go_xml_root_elm  ).
    DATA: lv_rc TYPE i.
    lv_rc = go_xml_main_elm->set_attribute( name = 'code' value = 'LH401' ).
    DATA: go_xml_streamfactory TYPE REF TO if_ixml_stream_factory.
    go_xml_streamfactory = go_ixml->create_stream_factory( ).
    * Static Creation of X tab ---------------------------------------------
    DATA: BEGIN OF gs_xml_line,
             data(255) TYPE x,
           END OF gs_xml_line.
    DATA:  gt_xml_table       LIKE TABLE OF gs_xml_line,
           gv_xml_size        TYPE i,
           go_ostream         TYPE REF TO if_ixml_ostream.
    * END Static Creation of X tab ------------------------------------------
    * Dynamic Creation of X tab ---------------------------------------------
    FIELD-SYMBOLS: <lf_x_tab>  TYPE STANDARD TABLE,
                   <lf_x_stru> TYPE ANY.
    DATA: lt_fldcat TYPE lvc_t_fcat.
    DATA: lr_tab TYPE REF TO data,
          lr_stru  TYPE REF TO data,
          ls_fldcat TYPE lvc_s_fcat,
          lv_dyn_width TYPE i.
    lv_dyn_width = 255.
    * Append Dynamic Field.
    CLEAR ls_fldcat.
    ls_fldcat-fieldname = 'DATA' .
    ls_fldcat-datatype  = 'X'.
    ls_fldcat-inttype   = 'X'.
    ls_fldcat-intlen    = lv_dyn_width.
    APPEND ls_fldcat TO lt_fldcat .
    * Create dynamic internal table and assign to FS
    CALL METHOD cl_alv_table_create=>create_dynamic_table
      EXPORTING
        it_fieldcatalog = lt_fldcat
      IMPORTING
        ep_table        = lr_tab.
    ASSIGN lr_tab->* TO <lf_x_tab>.
    * Create dynamic work area and assign to FS
    CREATE DATA lr_stru LIKE LINE OF <lf_x_tab>.
    ASSIGN lr_stru->* TO <lf_x_stru>.
    CHECK sy-subrc  = 0.
    * END Dynamic Creation of X tab ------------------------------------------
    * Static Table works
    go_ostream = go_xml_streamfactory->create_ostream_itable( table = gt_xml_table ).
    * Dynamic Table doesn't work
    go_ostream = go_xml_streamfactory->create_ostream_itable( table = <lf_x_tab> ).
    * Show result
    DATA: go_renderer        TYPE REF TO if_ixml_renderer.
    go_renderer = go_ixml->create_renderer( ostream  = go_ostream
                                            document = go_xml_document ).
    lv_rc = go_renderer->render( ).
    gv_xml_size = go_ostream->get_num_written_raw( ).
    DATA: lv_str  TYPE string,
          lv_xstr TYPE xstring.
    LOOP AT gt_xml_table INTO gs_xml_line.
      lv_xstr = gs_xml_line-data.
      CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
        EXPORTING
    *                          FROM_CODEPAGE       = '8500'
          in_xstring          = lv_xstr
    *                          OUT_LEN             =
       IMPORTING
         out_string          = lv_str.
      WRITE: / lv_str.
    ENDLOOP.
    If the static table is used, the program gets a result, but it doesn't work with the dynamic table.
    * Static Table works
    go_ostream = go_xml_streamfactory->create_ostream_itable( table = gt_xml_table ).
    * Dynamic Table doesn't work
    go_ostream = go_xml_streamfactory->create_ostream_itable( table = <lf_x_tab> ).
    Any Ideas?
    Thanks in advance
    Dominik

    I've never used dynamically changing popup items variable before, and I'm not sure it will work(?)
    But, if it's displaying a long string, it does not sound like 'items' is being assigned a proper table yet.
    I don't know what you mean by a  "chunk" of values. I assume you mean table.
    In any case, if SYPNEventResults[1].title is a string, then SYPNEventResults[1].value can be any legal lua type.
    Likewise for SYPNEventResults[2], SYPNEventResults[3], ...
    If you can index/display the title with this syntax, e.g. LrDialogs.message( SYPNEventResults[1].title ), then the popup should be initialized thusly:
    viewFactory:popup_menu {
           items = SYPNEventResults,
           value = LrView.bind('eventname2'),
           width_in_chars = 40,
    if a function is returning multiple values, then to get it into a table "array", do this:
    local tableArray = { myTableArrayFunc( myTableArrayParameters ) }
    Does this help?
    Rob

  • Dynamic variable and/or XML LazyLoader HELP

    I am loading images via xml lazyloader into my air app
    I need var b to be "img" +  item.id dynamically
    any ideas???
    for each (var item : LoadingItem in lazy.items)
                        var b : Bitmap = lazy.getBitmap(item.id);
                        addChild(b);
    If you dont know the lazyloader code then can you please explain how to create a dynamic variable for a bitmap???

    so i should set type here
    var img:bitmap = {}
    then create the variable like this in my for statement?
    img[this[item.id]] = lazy.getBitmap(item.id);
    lets say item was 1,2,3
    Then
    img[1]
    img[2]
    img[3]
    would be able to hold a different bitmap
    thanks in advanced

  • Dynamic element binding between XML based PDF form and WDA context

    Hi Experts,
    I am working on a XML based interactive form.There is a table node in the XML interface which generated by WDA context, and binding on a subform in the PDF form.
    I tried to add instances to the subform using javascript. Unfortunately, I can not get the internal table in WDA.
    If I initialize the table to 10 lines in WDA , and then add 5 line to it in PDF, when I submit the PDF, I can only get 10 lines in the WDA framework. It seems that the element which is create dynamically can not be past to the interface.
    Could you tell me why? And is there any other better solution? I just want build a table in PDF form in runtime and pass it to WDA context.
    Thanks a lot!
    Best Regards,
    Guo Guo Qing

    Hi Thomas,
    Thank you for your reply.
    I think the performance will be a problem if I create the elment in WDA using submit event. I need to create hundreds of record dynamically. I must find some way to reduce the communication between the WDA and PDF form. Maybe I can set a container with a number of elements before the PDF output. Do you have some better ideas?
    Best Regards,
    Guo Guo Qing

  • Dynamic Form bound to schema...

    I have a form that is bound to an XSD schema. There is also quite a bit of dynamic content. ie: users can add a new row to a table.
    My problem is that since it is bound, when the user adds new rows and enters data, the data in the same column of every row changes as well... since each column has the same binding.
    Is there a way in the schema to represent dynamic content? eg. more than one instance of a particular subform. Or is there another way I can tackle this issue?
    Thanks in advance.

    Hi Steve!
    1. If your Schema has a minoccurance and maxoccurance (e.g. maxoccurance=unbound)represented in the element, the LCD should make it work by itself.
    2. If you didn't fulfill point one, try to add [*] at the end of the binding. e.g. default binding = PurchaseItem[*]
    good luck!
    Håkon

  • Dynamically assigning variable in xml loop

    I am trying to dynamically assign a variable name so I can
    build an accordian nav from and XML doc. the code looks like this:
    ACnav['depthChild0']._alpha = 0;
    ACnav.setStyle("color", 0x0ffffff);
    ACnav.setStyle ("openEasing",
    mx.transitions.easing.strong.easeout);
    ACnav.setStyle ("selectionDuration",
    mx.transitions.duration.slow);
    navXML = new XML();
    navXML.ignoreWhite = true;
    navXML.load("menu1.xml");
    oY=5;
    var currentSection = 0;
    function buildNav () {
    DisposableXML = new XML();
    TempXML = new XML();
    button = new Array();
    //buttonNum = new Array();
    subitem = new Array();
    menuItem = new Array();
    o = new Array ();
    subitemlocation = new Array();
    DisposableList = new Array();
    buttonList = navXML.firstChild.childNodes;
    i = 0;
    sectionLength = buttonList.length;
    while (i<=buttonList.length) {
    if (buttonList
    .nodeName.toLowerCase() == "button") {
    DisposableXML = buttonList;
    DisposableList = DisposableXML.childNodes;
    buttonName = buttonList
    .attributes.name;
    set ("buttonNum", "buttonNumber"+i);
    trace(buttonNum);
    ii = 0;
    //trace(buttonName+"-"+buttonNum);
    //ACnav.createChild("View", buttonNum, {label: buttonName,
    icon: "mainNav"});
    button = ACnav.createChild("View", buttonNum, {label:
    buttonName, icon: "mainNav"});
    oY=5
    while (ii<=DisposableList.length) {
    TempXML = DisposableList[ii];
    if (DisposableList[ii].nodeName.toLowerCase() == "subitem")
    subitem = TempXML.attributes.name;
    //subitemlocation = TempXML.attributes.location;
    subitemNum="subitemNum"+[ii]+
    //trace(buttonNum+"-"+subitemNum+"-"+subitem);
    menuItem = ACnav.buttonNum.createChild("subNav",
    subitemNum, {childText: subitem});
    menuItem
    .move(0, oY);
    oY=(oY+25);
    //trace(buttonNum);
    ii = Number(ii)+1;
    i = Number(i)+1;
    //trace(button);
    trace(menuItem);
    redraw();
    //gotoAndPlay('reload');
    The problem lies with this line: button =
    ACnav.createChild("View", buttonNum, {label: buttonName, icon:
    "mainNav"});
    If I quote the "buttonNum", it works, but jumbles the subnav
    items together vs in the proper node. I need to have that declared
    dynamically so that each parent node has a differentID and then
    createchild goes under that. Anyway, I've tried alot of stuff over
    the last few days and its getting frustrating.
    Thanks for the help if anyone contributes!

    You shouldn't need to do a concat within the XQuery path parameter. Try the following:
    bpws:getVariableData('inputVariable','payload','/ns1:Request/ns1:instance[bpws:getVariableData(&quot;j&quot;)]')

  • Creating a dynamic nested menu with xml data received from a webservice

    I need to create a dynamic menu based on a xml returned by a webservice.
    the xml comes basically in this format:
    [quote]
    <resposta>
        <status>Success</status>
        <mensagem>Whatever</mensagem>
        <dados>
            <projeto nome="name" cliente="client name">
                <atividade nome="name">
                    <etapa>
                        <nome>name</nome>
                         <other_attributes>...</other_attributes>
                    </etapa>
                    (other etapas)
                 </atividade>
                 (other atividades)
            </projeto>
            (other projetos)
        </dados>
    </resposta>
    [/quote]
    What I need is to create a menu like:
    - Projeto.Nome - Projeto.Cliente:
        - Atividade.nome:
            (start button) etapa1
            (start button) etapa2
    - Projeto2.Nome - Projeto2.Cliente:
        - Atividade.nome:
            (start button) etapa1
            (start button) etapa2
    And so on...
    I've tried using an HTTPService and a DataGroup, this code above works fine for  display the projeto's names:
    [quote]
    <s:HTTPService id="loginService"
                            url="http://timesheet.infinitech.local/services"
                            method="POST" contentType="application/xml"
                            result="handleLoginResult();"
                            fault="handleFault(event);" >
                            <s:request xmlns="">
                                <requisicao>
                                    <tipo>login</tipo>
                                    <usuario>{campoUsuario.text}</usuario>
                                    <senha>{campoSenha.text}</senha>
                    </requisicao>
                </s:request>
    </s:HTTPService>
    and the DataGroup:
    <s:DataGroup dataProvider="{tarefasService.lastResult.resposta.dados.projeto}" width="100%" y="100" x="20"
                         includeIn="Principal">
                <s:layout>
                    <s:VerticalLayout />
                </s:layout>
                <s:itemRenderer>
                    <fx:Component>
                        <s:ItemRenderer>
                            <s:layout>
                                <s:HorizontalLayout />
                            </s:layout>
                            <s:Button />
                            <s:Label text="{data.nome}" />
                        </s:ItemRenderer>
                    </fx:Component>
                </s:itemRenderer>
            </s:DataGroup>
    [/quote]
    I have then tried including another datagroup inside the datagroup item renderer, but I just couldn't get it to work anyway, and tried it in a lot of ways... (basically, it would be a datagroup with dataProvider={data.atividade}).
    Can anyone tell me how to get this to work?
    I've uploaded an example xml, you can use it as the url for the HTTPService:
    http://www.pdinfo.com.br/example.xml
    Thanks in advance.

    Hi,
    A lot of the information you need is in Adobe's scripting guide http://www.adobe.com/go/learn_lc_scriptingReference  Also there is a very useful Adobe guide to Calculations and Scripts (and while it is for version 6 it is still very good because of the way it is laid out) http://partners.adobe.com/public/developer/en/tips/CalcScripts.pdf
    The Javascript could be used in the Layout: Ready event.
    For italic font:
    if (...some test...)
         this.font.posture = "italic";
    else
         this.font.posture = "normal";
    For bold font:
    if (...some test...)
         this.font.weight = "bold";
    else
         this.font.weight = "normal";
    The script will change the font for the complete field. I don't think you can change parts of a field.You can also change font colour and font type (the guides above will help).
    Good luck,
    Niall

  • Dynamically Creating Bounded taskflow

    Hi
    Is there any option to create bounded taskflow dynamically that is through coding not by wizard. I have some java utility and by passing it taskflow name and jsff name it automatically create bounded taskflow.

    Yes I want to create bounded task flow. I want to dynamically bind page fragment to links in menu without manually creating there bounded taskflow.
    My Use case is that I have DB driven menu. I have hundred page fragment which I have to call from that menu in dynamic region. I don't want to manually create bounded task flow to open page fragment in region. I want to read form name from database and automatically create bounded task flow for that page automatically if it is not created. Otherwise I have to create these hundred or may be more bounded task flow manually and set task flow id to open particular page fragment.
    or
    Is there any other good way to dynamically bind page fragment to command links in menu.

  • Understanding ON Bounded/Unbounded XML source files...

    Hi,
    An ADF application can have multiple unbounded/bounded task files. But at runtime all unbounded task files become one single fat file.
    Is my understanding correct?
    Can any one please anwer me?
    Thank you in advance..
    Srinivas
    Edited by: Srinivas.b on May 6, 2010 12:16 PM

    Can we use more than one unbounded taskflow?: Yes, but why would you want to? General you only need one unbounded task flow to call multiple bounded task flows.
    Does ADF treat all of them as one file? At design time their separate, at runtime I believe it merges them into one "entity", but it doesn't actually create a new file, it's probably a single memory construct similar to what happens in JSF for multiple faces-config.xml files. See:
    http://one-size-doesnt-fit-all.blogspot.com/2007/01/using-multiple-faces-configxml-files-in.html
    CM.

Maybe you are looking for