Addressing dynamically created symbols

I'm not sure what's the best way to address a specific dinamically created symbol because I don't see in Edge's API any way to get the symbol's instance name. The .getSymbol() method would be the easiest way to do it, but it takes the symbol "instance" name and I don't know which one it is. When I use .createChildSymbol() I just pass the symbol "type" name and the parent element name to be put inside but nothing about the symbol instance name that's been created. The .getChildSymbols() method doesn't help much because it retrieves "all" direct children instances found, and I have more than one and of different types.
I need to get one specific symbol among several I created dinamcally, so how should I do it best?
I'm thinking about using .getChildSymbols() and loop through them all, get the DOM of each symbol with .getSymbolElement(), then use the "class" attribute to at least identify the different types of children symbols retrieved. I now have a subset of children-brothers (symbols of the same type = class) and I can walk through them. At this point, my only hope to distiguish them is the z-index parameter I passed when I created the symbols using .createChildSymbol().
One other option would be to "save" the returned handler to each symbol created with .createChildSymbol() in an object like this { symbol: handler, name: "any name", created: "date/time", ... } and save them in an array of objects.
Any better ideas?

Hi juicy_life,
store it into a symbol variable instance that I know will persist (the stage, maybe)
Looks like a global variable
It's just annoying you can get a symbol manually added to your edge animation by its "name" using .getSymbol(), but there is not an easy way to use that function with a dinamically created symbol
May be are you also an AS3 coder used to search through the display list accessing display objetc containers either by index (getChildAt()) or by name (getChildByName()).
mySym.aSymbolInstances will give you an array with all "names" when you create symbols with .createChildSymbol().
Thank you for this helpful information. I didn't know about it.
"name" (ID), something like this: #eid_1379485757227_mySymType
For a manually instantiated symbol symB, nested in symA, itself instantiated in the Stage Symbol, the fully qualified name (ID) is Stage_symA_symB.
It's useful to write a global function for the behavior (on click for example) shared by a group of buttons, provided you adopt a naming convention btn1, btn2, etc. Passing the event objet to that function, you can then recover the number of the clicked button via
evt.target.getAttribute("ID").substr()
This abstraction avoids duplicating the same code (differing only by the button number) on each button.
Gil

Similar Messages

  • Address dynamically created symbol

    Hi - wondering how I can get the name of a dynamically created symbol (using CreateChildSymbol) so i can hide move and otherwise affect the symbols i have created.
    any ideas?
    thanks!

    This recent thread might help you out:
    http://forums.adobe.com/message/5691752#5691752
    Thanks,
    -Elaine

  • How to get a dynamically created symbol to delete itself on click?

    Here's the setup...
    I want to have a dynamically created symbol appear upon click of a hotspot. In this case, you click on a pulsating hotspot and a popup box appears.
    Here's the code I'm using for that.
    //Create an instance element of a symbol as a child of the given parent element
    var mySymbolObject = sym.createChildSymbol("gardern_toxins_popup","stage");
    So we have the symbol "garden_toxins_popup" from my library placed dynamically on the page. I would like to assign an action to the pop-up itself that allows you to remove the symbol from the stage upon click.
    I feel silly for not being able to figure this out. I tried iterations of this bit of code...
    //Get the stage from the composition level, get the symbol
    sym.getComposition().getStage().getSymbol("garden_toxins_popup").delete();
    ...but it doesn't work.
    So I tried thinking like I was back in Flash and tried the following...
    this.parent.removeChild(this);
    But no joy on that as well. Is there something I haven't addressed in this logic or am I going about it in the wrong way? Thanks!

    Hi, chirpieguy-
    You'll want to use the deleteSymbol() API.
    http://www.adobe.com/devnet-docs/edgeanimate/api/current/index.html
    BTW, you should use the capitalized "Stage" to add it to the Stage - the lower case stage has a special meaning with Animate and might not give you what you want..
    sym.createChildSymbol("gardentoxins", "Stage");
    In the symbol itself, create a click event on a container div, then:
    sym.deleteSymbol();
    That being said, you don't need to dynamically create and delete an object.  What you can do is to use hide() and show() on an element and use the coordinates of your click to change the CSS value of top/left of this object so that you don't have to do the object management I highlighted above.
    Hope that points you in the right direction.
    -Elaine

  • Get the ID of a dynamically created symbol from library, INSIDE another symbol.

    Hi everyone,
    I'm trying to get the id from a dynamic created symbol from library.
    When dynamically creating the symbol directly on the stage (or composition level), there's no problem.
    But I just can't get it to work when creating the symbol inside another symbol. 
    Below some examples using both "getChildSymbols()" and "aSymbolInstances" 
    // USING "getChildSymbols()" ///////////////////////////////////////////////////////////////////////// 
    // ON THE STAGE 
    var m_item = sym.createChildSymbol("m_item","Stage");
    var symbolChildren = sym.getChildSymbols(); 
    console.log(symbolChildren[0].getSymbolElement().attr('id')); // ok eid_1391853893203
    // INSIDE ANOTHER SYMBOL
    var m_item = sym.createChildSymbol("m_item", sym.getSymbol("holder").getSymbolElement()); 
    var symbolChildren = sym.getSymbol("holder").getChildSymbols(); // Am i using this wrong maybe?
    console.log(symbolChildren.length) // returns 0 so can't get no ID either
    // USING "aSymbolInstances"" ////////////////////////////////////////////////////////////////////////// 
    // ON THE STAGE
    var m_item = sym.createChildSymbol("m_item","Stage"); 
    console.log(sym.aSymbolInstances[0]); // ok (i guess) x.fn.x.init[1] 0: div#eid_1391854141436
    // INSIDE ANOTHER SYMBOL
    var m_item = sym.createChildSymbol("m_item", sym.getSymbol("holder").getSymbolElement());
    console.log(sym.getSymbol("holder").aSymbolInstances[0]); // Javascript error in event handler! Event Type = element 
    In this post http://forums.adobe.com/message/5691824 is written: "mySym.aSymbolInstances will give you an array with all "names" when you create symbols"
    Could it be this only works on the stage/ composition level only and not inside a symbol? 
    The following methods to achieve the same are indeed possible, but i simply DON'T want to use them in this case:
    1) Storing a reference of the created symbol in an array and call it later by index.
    2) Giving the items an ID manually on creation and use document.getElementById() afterwards.
    I can't believe this isn't possible. I am probably missing something here.
    Forgive me I am a newbie using Adobe Edge!
    I really hope someone can help me out here.
    Anyway, thnx in advance people!
    Kind Regards,
    Lester.

    Hi,
    Thanks for the quick response!
    True this is also a possibility. But this method is almost the same of "Giving the items an ID manually on creation and use document.getElementById() afterwards".
    In this way (correct me if i'm wrong) you have to give it an unique ID yourself. In a (very) big project this isn't the most practical way.
    Although I know it is possible.
    Now when Edge creates a symbol dynamically on the Stage (or composition level) or inside another symbol it always gives the symbol an ID like "eid_1391853893203".
    I want to reuse this (unique) ID given by Edge after creation.
    If created on the stage directly you can get this ID very easy. Like this;
    var m_item = sym.createChildSymbol("m_item","Stage");
    var symbolChildren = sym.getChildSymbols(); 
    console.log(symbolChildren[0].getSymbolElement().attr('id')); // ok eid_1391853893203
    I want to do exactly the same when created INSIDE another symbol.
    var m_item = sym.createChildSymbol("m_item", sym.getSymbol("holder").getSymbolElement());
    Now how can I accomplish this? How can I get the Id of a dynamically created symbol INSIDE another symbol instead of created directly on the stage?
    This is what i'm after.
    Thnx in advance!

  • To delete this dynamically created symbol

    Hello,
    I dynamically created  a symbol :
    var vid = sym.createChildSymbol("video_holder", "Stage");
    vid.getSymbolElement().html("<iframe src='//player.vimeo.com/video/44150607' width='500' height='281' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>");
    vid.getSymbolElement().css({"margin":"auto", "top":"100px"});
    the I want another button to remove that Symbol from Stage :
    vid.deleteSymbol(); or sym.getSymbol("video_holder").deleteSymbol();
    How to do it ?
    thanks forever !
    s.

    1) About sym.getComposition().getSymbols().
    It returns an array. So you have to browse it.
    2) About vid.
    This is the same name but two different variables.
    Because they are only available within their own code panel.
    To go further, see: http://learn.jquery.com/javascript-101/
    You have to read: "scope" and "closures".
    PS : je viens de voir que la vidéo est en français. Vous parlez français ?

  • How to control dynamically created symbols

    Hi, I'm new in edge but thanks to adobe forum that helped me a lot.
    I'm trying to use ".createChildSymbol" to bring my symbols from the library to my stage. And in each symbol I have an OUT label, so every time a new symbol is called by a particular button, the last one plays from OUT label and new one appears at the same place.
    It's all easy for two symbols and I do not need to set any vaiable for them. But I have almost 180 symbols, and a menu of buttons to call them, so every button needs to play the OUT label of the current symbol and also plays the new one and make it as the current one.
    I would be truly thankful if someone help me to fix this problem.
    sym.test = sym.createChildSymbol("test", "Stage");
    sym.getComposition().getStage().setVariable("current", "test");
    var current = sym.getComposition().getStage().setVariable("current");
    sym.current.getSymbolElement().css({position:'absolute', display:'inline-block', top:167, left:91});

    Ok, lets take a look at the code. I've changed the symbol names so it becomes a little more friendly.
    So, I have an array of 4 animations ("animation1",  "animation2",  "animation3",  "animation4") and an array of 4 buttons ("button1",  "button2",  "button3",  "button4"). The names of the symbol instances are the things you have to change.
    This is the code that goes inside Stage/compositionReady
    var current_animation = null; // Index in array_options: 0=a, 1=b, 2=c, 3=d
    var current_animation = null; // Index in array_options: 0=a, 1=b, 2=c, 3=d
    var request_animation = null; // Index in array_options: 0=a, 1=b, 2=c, 3=d
    var array_animation = ["animation1", "animation2", "animation3", "animation4"];
    var array_buttons = ["button1", "button2", "button3", "button4"];
    // Called by timeline.complete/location event inside each Animation
    sym.playRequest_animation = function(){
      sym.getSymbol("animationContainer").getSymbol(array_animation[request_animation]).play('lead_in');
      current_animation = request_animation;
    // Called on button click
    sym.btnClick_animation = function(request_myAnimation) {
      request_animation = request_myAnimation;
      if(current_animation != null){
        sym.getSymbol("animationContainer").getSymbol(array_animation[current_animation]).play('lead_out');
        sym.getSymbol(array_buttons[current_animation]).play('option_exit');
      else{
        sym.playRequest_animation();
    This bit of code goes at the trigger "click" inside all buttons:
    sym.getComposition().getStage().btnClick_animation(0); // 0 index of array = a —> button1
    sym.getComposition().getStage().btnClick_animation(1); // 1 index of array = b —> button2
    sym.getComposition().getStage().btnClick_animation(2); // 2 index of array = c —> button3
    sym.getComposition().getStage().btnClick_animation(3); // 3 index of array = d —> button4
    There's also this code that enables the page, upon load, to open the first animation, therefore animating the first button (and disabling it) - it's located at the trigger "section_lead_in" wich only exists inside button1:
    sym.getComposition().getStage().btnClick_animation(0); // 0 index of array = a
    Finally, this block of code goes inside all animations and are located at 2000ms - during the process where the active animation as almost left the scene:
    sym.getComposition().getStage().playRequest_animation();
    Notice that, for the sake of organization, I have all my animations inside a symbol called "animation_Container".
    Again, if you want, I can give you a hand with your files. Just post it.
    Download the file again for an updated version.
    P.S. I hope I didn't forget anything...

  • How can I dynamically create symbols based on data in a database? For example: as a user selects an option, we want to create color swatch buttons in a certain area on the screen.

    We have all of our data in a Microsoft SQL server database and would like to load fabric options, and then color choices, based on this data. As fabrics are added, and/or color choices are updated, we would like Edge Animate to update automatically, without having to open the project and add/change options. Ultimately we would like to build an interactive designer that would then send all of the user's selections to us in an order. Is this possible?

    There is no like, but contains
    contains(LAST_NAME,'A')

  • When creating a remote address in a pot or other objects you cannot use a / for a address??? my ladders addresses contain such ////// symbols for some addresses?​??

    when creating a remote address in a pot or other objects you cannot use a  /  for a address??? my ladders addresses contain such ////// symbols for some addresses???

    On the AB object, "f" is a float and cannot address individual bits.
    Otherwise, you would replace the "/" with an "_".
    Forshock - Consult.Develop.Solve.

  • How to Position of a dynamically created child symbol.

    Hello Everyone,
    I created symbols instances on the stage by
    for(alpha = 0; alpha < 5; alpha++)
        sym.createChildSymbol("rect", "Stage");
    Now I wanted to set the position of each symbol  - The probelm is I don't know the names of the symbols instances that has been created. so I tried the following
    childSymbols = sym.getChildSymbols();
    for(k = 0; k < 5; k++)
        childSymbols[k].css({"position":"relative","left":k*50});
    it did not position the child symbols where i need it to be..
    HOWEVER, when I tried to apply css to an element inside the symbol it worked.
    for(k = 0; k < 5; k++)
        childSymbols[k].$("Rectangle2").css({"position":"relative","left":k*50});
    Please can anyone help..

    y = 0;
    x = 30;
    $.getJSON('slides.json', function(data){
                     for(alpha = 0; alpha < 5; alpha++){
                         var s = sym.createChildSymbol("rect", "Stage");
                         s.getSymbolElement().css({
                                          "top": x+"px",
                                          "position":"absolute",
                                          "right": y*315+20+"px"
                        x+=100;
                      // y+=100;
                              }//for

  • Uploading data from excel file to a dynamically created internal table

    Hi,
    I have a requirement where i have to upload data from an excel file into a database table. I would be able to determine the structure of the table only at runtime based on the user input.. so i have created an internal table dynamically.
    Could you please tell me if its possible to upload data from an excel file to the dynamically created internal table using any function modules?
    I thought of doing this by declaring a generic internal table of one field and then uploading the *.csv file into it and then splitting it based on "," and then assigning it to the field symbol referencing the internal table.. but my file length exceeds 132 characters and i'm only able to get data of lenght 132 char's in my internal table ( generic one).
    Could anyone please show me a way around this.
    Thanks in advance,
    Harsha

    Sure, check this out.
    report zrich_0002.
    type-pools: slis.
    field-symbols: <dyn_table> type standard table,
                   <dyn_wa>,
                   <dyn_field>.
    data: it_fldcat type lvc_t_fcat,
          wa_it_fldcat type lvc_s_fcat.
    type-pools : abap.
    data: new_table type ref to data,
          new_line  type ref to data.
    data: iflat type table of string.
    data: xflat type string.
      data: irec type table of string with header line.
      data: tabix type sy-tabix.
    data: file type string.
    selection-screen begin of block b1 with frame title text .
    parameters: p_file type  rlgrap-filename default 'c:Test.csv'.
    parameters: p_flds type i.
    selection-screen end of block b1.
    start-of-selection.
    * Add X number of fields to the dynamic itab cataelog
      do p_flds times.
        clear wa_it_fldcat.
        wa_it_fldcat-fieldname = sy-index.
        wa_it_fldcat-datatype = 'C'.
        wa_it_fldcat-inttype = 'C'.
        wa_it_fldcat-intlen = 10.
        append wa_it_fldcat to it_fldcat .
      enddo.
    * Create dynamic internal table and assign to FS
      call method cl_alv_table_create=>create_dynamic_table
                   exporting
                      it_fieldcatalog = it_fldcat
                   importing
                      ep_table        = new_table.
      assign new_table->* to <dyn_table>.
    * Create dynamic work area and assign to FS
      create data new_line like line of <dyn_table>.
      assign new_line->* to <dyn_wa>.
      file = p_file.
      call method cl_gui_frontend_services=>gui_upload
        exporting
          filename                = file
        changing
          data_tab                = iflat
        exceptions
          file_open_error         = 1
          file_read_error         = 2
          no_batch                = 3
          gui_refuse_filetransfer = 4
          invalid_type            = 5
          no_authority            = 6
          unknown_error           = 7
          bad_data_format         = 8
          header_not_allowed      = 9
          separator_not_allowed   = 10
          header_too_long         = 11
          unknown_dp_error        = 12
          access_denied           = 13
          dp_out_of_memory        = 14
          disk_full               = 15
          dp_timeout              = 16
          others                  = 17.
      loop at iflat into xflat.
        clear irec. refresh irec.
        split xflat at ',' into table irec.
        loop at irec.
          tabix = sy-tabix.
          assign component tabix of structure <dyn_wa> to <dyn_field>.
          <dyn_field> = irec.
        endloop.
        append <dyn_wa> to <dyn_table>.
      endloop.
    * Write out data from table.
      loop at <dyn_table> into <dyn_wa>.
        do.
          assign component  sy-index  of structure <dyn_wa> to <dyn_field>.
          if sy-subrc <> 0.
            exit.
          endif.
          if sy-index = 1.
            write:/ <dyn_field>.
          else.
            write: <dyn_field>.
          endif.
        enddo.
      endloop.
    Regards,
    Rich Heilman

  • Passing values to dynamically created internal table

    Hi,
    I have the flat file data as
    f1,f2,f3........so on
    where f1 f2 and f3 are field names.
    I have a variable var which contains the data
    V1,0001,0002.........so on
    data: var type string.
    The value of field f1 is v1
    The value of field f2 is 0001
    The value of field f3 is 0002.......so on
    FIELD-SYMBOLS:     <fs_1> TYPE STANDARD TABLE
    I have dynamically created an internal table for fields f1  f2 f3 ...... using 
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog           = lt_fieldcatalog
        IMPORTING
          ep_table                  = <fs_data>
        EXCEPTIONS
          generate_subpool_dir_full = 1
          OTHERS                    = 2.
      IF sy-subrc <> 0.
      ENDIF.
    ASSIGN <fs_data>->* TO <fs_1>.
    Now for <fs_1> I have to pass the corresponding values of the fields f1 f2 f3 .
    How can i solve this.
    Thanks and regards ,
    Parvatha Reddy

    Hi,
    There is no data in <fs_1>.
    I need to pass the data form the string var to the fields of <fs_1>..
    I understand that you want to populate the internal table <fs_1>.
    for that you fist need work area.. use below statement to create work area..
    DATA: new_line TYPE REF TO data.
    CREATE DATA new_line LIKE LINE OF <fs_1>.
    ASSIGN new_line->*  TO <fs_2>.
    <fs_2> is not your work aread...
    to assign value to each field of you work aread <fs_2>. use statement
    ASSIGN COMPONENT 1 OF STRUCTURE <fs_2> TO <fs_3>.
    <fs_3> = f1 .
    now <fs_3> will point to the first field of work area <fs_2>, f1 is value from your string .. repeat above for each field in workarea, by increasing the component number. Once your work area is filled
    append it to table.
    append <fs_2> to <fs_1>
    apologies if I am not getting the requiremnt correctly..

  • How to synch values of fields (cbo & text) in Master Pages section in dynamically created pages?

    HI folks,
    I have a requirement for a form that has a common master page with a checkbox and text field in it.   The document is basically a table that dynamically adds rows as the user adds entries.   When the first page is full, a second page is dynamically created and the Master page format (including the checkbox & text field) applied to it. 
    When the user sets the checkbox on one page and/or adds text, all of the checkboxes on all of the dynamically created pages (in the master section) and all of the text boxes need to change to show the same values.   
    However, I can't figure out how to address the fields on the other pages.   The number of pages changes from user to user, so I can't address them with a static reference.
    Does anyone know how to keep these fields in synch?
    Thanks in advance!

    It woudl be easier to show than to explain it ...can you share the file? You can send it to [email protected] Include a description of the issue with your email please.
    Paul

  • Create Symbol=Lose Events

    IE-Grouping elements into a symbol causes loss of events.
    Not sure if this is a bug but has anyone else noticed this?
    The workaround I've found is to to group the elements into a div, but then obviously...
    You can try yourself with the lynda tut / chapter 10 /Creating responsive layouts.
    http://www.lynda.com/Edge-Animate-tutorials/Edge-Animate-Essential-Training/108880-2.html
    I noticed this happening to me when Edge 1st introduced responsive layout, but I thought it was something I was doing wrong...
    In the example above the event is being lost on the element not grouped into a symbol.
    Message was edited by: GVD321

    Joe Bowden wrote:
    When you created symbols out of the elements (specifically, putting the Text element in a symbol), the code and events you had previously on the apple image are no longer going to work because that Text element is no longer at the same level as the apple - it's now inside a symbol. In other words, sym.$("Text").html("your text here") can't work because there is no longer a "Text" element there at the Stage level. So the bug, as it is, was in the code used.
    When you want to address an element within a symbol, use the getSymbol method to address the symbol, and then address the element within it. I believe your symbol wasn named "chalkboard"? So in that case, your code should be something like this:
    sym.getSymbol("chalkboard").$("Text").html("your text here");
    The EA Javascript API is your friend:
    http://www.adobe.com/devnet-docs/edgeanimate/api/current/index.html
    hth,
    Joe
    That's what I suspected. A 'targeting level' issue.
    I wasn't sure if there was some magic in the js that compesated for not targeting the Text within the symbol.
    Same rule applies. Got it.
    Obviously I'm not the greatest with code but I'm trying.
    The EA Api makes me nauseous.
    But I'm trying:-)
    Edit
    Altho someone might wanna notify the presenter in that Lynda tut because that fact is not mentioned.
    Message was edited by: GVD321

  • Dynamicly creating an internal table with header line

    Hi experts,
    I am trying to do a read on an internal table using field symbols of type any table. To be able to read more than one row at once, I'd like to read it into another internal table (instead of just one line and instead of looping through them one by one).
    So far the following line rendered an error that the target internal table doesn't have a header line
    read table <fs_v_tab> WITH KEY (<fs_comp>) = <fs_param>-low INTO <fs_v_tab>.
    (also attempted using "<fs_v_tab>->*" & "<fs_v_tab>[]" to be silly)
    Based on the following article, I was wondering if it were possible to dynamicly create an internal table with header line.
    [http://help-abap.blogspot.com/2008/09/dynamic-internal-table-creation.html|http://help-abap.blogspot.com/2008/09/dynamic-internal-table-creation.html]
    Any help or tips on how to dynamicly filter an internal table field-symbol is greatly appreciated!

    Just read the online help:
    This statement reads a row from internal table itab.
    Or more exact:
    This statement reads one row from internal table itab.
    Therefore you can not read multiple lines into another table. The header line is needed to put the result in. And this is not what you intended, the result will be in the header line, not in the table itself.
    If the row to be read is not uniquely specified, the first suitable row is read. In the case of index tables, this row has the lowest table index of all matching rows.
    At least you have to do what you dont wanna do: looping.

  • How to add a table (dynamic created) into a model attribute

    i have dynamically created an internal table. Generally i use model-binding in a stateful MVC-Application.
    Is there a possibiltity to transfer the dynamic table to a model. As far as i know generic attributes are not allowed in the modell class.
    Every hint welcome
    thx in advance

    By some miracle I do have this finally working.  I will warn you up front that the code is not the cleanest (I have stuff copied in from all over the place.  I probably have lots of unused variable references - but I am running out of time to clean it up further).  Also I don't have all the logic to support all your different possible dynamic structure types.  I always use SFLIGHT as my dyanmic structure.  Therefore you will have to adapt the coding to lookup the actual structure type in use.
    So I have a model that has an structure ITAB type ref to data.  In my Model initialization I go ahead and dynamically redfine this to my specific type:
    METHOD init.
      SELECT SINGLE * FROM sflight INTO CORRESPONDING FIELDS OF isflight.
      DATA: struct_type TYPE REF TO cl_abap_structdescr,
        tabletype TYPE REF TO cl_abap_tabledescr.
      struct_type ?= cl_abap_structdescr=>describe_by_name( 'SFLIGHT' ).
      CREATE DATA me->itab TYPE HANDLE struct_type.
    ENDMETHOD.
    Then in my View I have the following:
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <%@extension name="phtmlb" prefix="phtmlb" %>
    <%@extension name="bsp" prefix="bsp" %>
    <htmlb:content design="design2003" >
      <htmlb:page title=" " >
        <htmlb:form>
          <phtmlb:matrix width="100%" >
            <%
      field-symbols: <wa> type any.
      assign model->itab->* to <wa>.
    *  append initial line to <wa_itab> assigning <Wa>.
      data: descriptor type ref to CL_ABAP_STRUCTDESCR.
      descriptor ?= CL_ABAP_STRUCTDESCR=>describe_by_data( <wa> ).
      data: flddescr type DDFIELDS.
      flddescr = descriptor->GET_DDIC_FIELD_LIST( ).
      field-symbols: <wa_field> like line of flddescr.
      data: label type ref to cl_htmlb_label.
      data: input type ref to CL_HTMLB_INPUTFIELD.
      data: binding_string type string.
      "Loop through each field in the structure Definition
      loop at flddescr assigning <Wa_field>.
      clear label.
      clear input.
      concatenate '//model/itab.'
      <wa_field>-FIELDNAME
      into binding_string.
      label ?= cl_htmlb_label=>factory( _for = binding_string ).
      input ?= cl_htmlb_inputfield=>factory( _value = binding_string ).
            %>
            <phtmlb:matrixCell row    = "+1"
                               vAlign = "TOP" />
            <bsp:bee bee="<%= label %>" />
            <phtmlb:matrixCell col    = "+1"
                               vAlign = "TOP" />
            <bsp:bee bee="<%= input %>" />
            <%
      endloop.
            %>
          </phtmlb:matrix>
         <htmlb:button  id="Test" onClick="Test" text="Submit"/>
        </htmlb:form>
      </htmlb:page>
    The key to making this work are custom getter/setters.  In your model class, you can copy from the template methods (Like GETM_S_XYZ for the metadata structure method).  Copy them and remove the _ on the front of the name.  Then change XYZ to the name of the attribute you are binding for.  The following are my custom methods. 
    method get_m_s_itab .
    * uses ****************************************************************
    * data ****************************************************************
    * code ****************************************************************
    * method is supposed to return either info about a specific component
    * of a structure (component is not initial -> return ref to
    * if_bsp_metadata_simple) or the complete structure
    * (component is initial -> return ref to if_bsp_metadata_struct)
      data: l_attribute_ref type ref to data,
               l_attr_ref  type ref to data,
               l_exception     type ref to cx_root,
               l_ex            type ref to cx_sy_conversion_error,
               l_ex_bsp        type ref to cx_bsp_conversion_exception,
               l_ex2           type ref to cx_bsp_t100_exception,
               l_type          type i,
               l_index         type i,
               l_name          type string,
               l_component     type string,
               l_getter        type string.
      data: l_field_ref     type ref to data,
            l_dfies_wa      type dfies,
            rtti            type ref to cl_abap_elemdescr.
      data: crap type string,
              rest type string,
              t_index(10) type c.
      split attribute_path at '[' into crap rest.
      split rest           at ']' into t_index crap.
    ****Dummy Object to avoid dumps
      create object metadata type cl_bsp_metadata_simple
        exporting info = l_dfies_wa.
      call method if_bsp_model_util~disassemble_path
        exporting
          path      = attribute_path
        importing
          name      = l_name
          index     = l_index
          component = l_component
          type      = l_type.
      data: l_dataref type string.
    ****Dynamically determine your actual structure - for this demo
    ****I just hardcode SFLIGHT
      concatenate 'SFLIGHT-' l_component into l_dataref.
      data: field type ref to data.
    ****Create a data object of the specified type
      try.
          create data field type (l_dataref).
        catch cx_sy_create_data_error.
          exit.
      endtry.
      rtti ?= cl_abap_typedescr=>describe_by_data_ref( field ).
      l_dfies_wa = rtti->get_ddic_field( ).
      clear metadata.
      create object metadata type cl_bsp_metadata_simple
        exporting info = l_dfies_wa.
    endmethod.
    method get_s_itab .
    * uses ****************************************************************
    * data ****************************************************************
    * code ****************************************************************
    * get the given value of the component of the struct, e.g.
    *  field-symbols: <l_comp> type any.
    *  assign component component of structure XYZ to <l_comp>.
    *  value = <l_comp>.
      data: l_attr_ref  type ref to data,
              l_field_ref type ref to data.
      data: l_attribute_ref type ref to data,
            l_exception     type ref to cx_root,
            l_ex            type ref to cx_sy_conversion_error,
            l_ex2           type ref to cx_bsp_t100_exception,
            l_type          type i,
            l_index         type i,
            l_name          type string,
            l_component     type string,
            l_getter        type string,
            rtti            type ref to cl_abap_elemdescr.
      field-symbols: <o_data> type any,
                     <n_data> type any.
    *Test
    call method if_bsp_model_util~disassemble_path
        exporting
          path      = attribute_path
        importing
          name      = l_name
          index     = l_index
          component = l_component
          type      = l_type.
    * get a field reference for the assignment
      field-symbols: <wa> type any,
                     <l_comp> type any.
      assign me->itab->* to <wa>.
      assign component l_component of structure <wa> to <l_comp>.
      get reference of <l_comp> into l_field_ref.
    ****Dynamically determine your actual structure - for this demo
    ****I just hardcode SFLIGHT
      data: l_dataref type string.
      concatenate 'SFLIGHT-' l_component into l_dataref.
      data: field type ref to data.
    ****Create a data object of the specified type
      try.
          create data field type (l_dataref).
        catch cx_sy_create_data_error.
          exit.
      endtry.
      assign l_field_ref->* to <o_data>.
      assign field->*       to <n_data>.
      move <o_data> to <n_data>.
    * call conversion routine
      try.
          value = if_bsp_model_util~convert_to_string(
            data_ref           = field
            attribute_path     = attribute_path
            no_conversion_exit = 0 ).
        catch cx_sy_conversion_error into l_ex.
          me->errors->add_message_from_exception(
              condition = attribute_path
              exception = l_ex
              dummy     = value ).
        catch cx_bsp_t100_exception into l_ex2.
          me->errors->add_message_from_t100(
            condition = attribute_path
            msgid     = l_ex2->msgid
            msgno     = l_ex2->msgno
            msgty     = l_ex2->msgty
            p1        = l_ex2->msgv1
            p2        = l_ex2->msgv2
            p3        = l_ex2->msgv3
            p4        = l_ex2->msgv4
            dummy     = value ).
      endtry.
    endmethod.
    method set_s_itab .
    * uses ****************************************************************
    * data ****************************************************************
    * code ****************************************************************
    * assign the given value to the component of the struct, e.g.
    *  field-symbols: <l_comp> type any.
    *  assign component component of structure XYZ to <l_comp>.
    *  <l_comp> = value.
      data: l_attr_ref  type ref to data,
               l_field_ref type ref to data.
      data: l_attribute_ref type ref to data,
            l_exception     type ref to cx_root,
            l_ex            type ref to cx_sy_conversion_error,
            l_ex_bsp        type ref to cx_bsp_conversion_exception,
            l_ex2           type ref to cx_bsp_t100_exception,
            l_type          type i,
            l_index         type i,
            l_name          type string,
            l_component     type string,
            l_getter        type string,
            rtti            type ref to cl_abap_elemdescr.
      field-symbols: <o_data> type any,
                     <n_data> type any.
    *Test
      call method if_bsp_model_util~disassemble_path
        exporting
          path      = attribute_path
        importing
          name      = l_name
          index     = l_index
          component = l_component
          type      = l_type.
    * get a field reference for the assignment
      field-symbols: <wa> type any,
                     <l_comp> type any.
      assign me->itab->* to <wa>.
      assign component l_component of structure <wa> to <l_comp>.
      get reference of <l_comp> into l_field_ref.
    ****Dynamically determine your actual structure - for this demo
    ****I just hardcode SFLIGHT
      data: l_dataref type string.
      concatenate 'SFLIGHT-' l_component into l_dataref.
      data: field type ref to data.
    ****Create a data object of the specified type
      try.
          create data field type (l_dataref).
        catch cx_sy_create_data_error.
          exit.
      endtry.
      assign field->*       to <n_data>.
      move <l_comp> to <n_data>.
    * call conversion routine
      try.
          if_bsp_model_util~convert_from_string(
                               data_ref           = field
                               value              = value
                               attribute_path     = attribute_path
                               use_bsp_exceptions = abap_true
                               no_conversion_exit = 0 ).
        catch cx_sy_conversion_error into l_ex.
          me->errors->add_message_from_exception(
              condition = attribute_path
              exception = l_ex
              dummy     = value ).
        catch cx_bsp_conversion_exception into l_ex_bsp.
          me->errors->add_message_from_exception(
              condition = attribute_path
              exception = l_ex_bsp
              dummy     = value ).
        catch cx_bsp_t100_exception into l_ex2.
          me->errors->add_message_from_t100(
            condition = attribute_path
            msgid     = l_ex2->msgid
            msgno     = l_ex2->msgno
            msgty     = l_ex2->msgty
            p1        = l_ex2->msgv1
            p2        = l_ex2->msgv2
            p3        = l_ex2->msgv3
            p4        = l_ex2->msgv4
            dummy     = value ).
      endtry.
      if <n_data> is initial.
        clear <l_comp>.
      else.
        move <n_data> to <l_comp>.
      endif.
    endmethod.
    I know that is a LOT of nasty code without too much explanation.  I'm afriad there isn't time right now to expand on how it works too much.  Between my day job and trying to finish the BSP book, there just isn't much time left.  Like I said before there is a very large section in the book on this topic that hopefully explains it.  The book will be out in December or early January - but perhaps I will get some time before then to write up something on SDN about this.

Maybe you are looking for

  • Bridge CS4 always opens in the same folder

    Since I upgraded to Photoshop CS4, Bridge always opens in the same folder. It used to open up whatever folder I was working on last. There must be a setting somewhere to tell Bridge to open the last visited folder but I can't seem to find it. Any ide

  • How can I move a folder to another catalog using LR 3

    I have imported a large amount of folder into cat#1, but now i have decided to create cat#2. I have tried to move the "folders" and not "catalog" using the following workflow: 1- Opening cat #1, make selection of folder to be moved 2- Go to file and

  • Creation of Users for Discoverer

    I am using Oracle as Database for my Application. I can have multiple Application users(but the same Oracle user/Schema). For Reports, I would be using Oracle Discoverer where I would like to give access privilege om some Reports to only specific App

  • Gui_Download export to excel delivering only one row in excel output

    Hello, I am using Vista Os with the SAP front end logon 710 and Office 2007. Also my company is using Ecc6.0 in the server. I am able to export the Itab data to excel but all the rows are on the first row in Excel. If i have 3 rows in ITAB then all t

  • VAT and sales & purchase tax

    Hi, 1 In SAP, I do not see the configuration for value added tax but I only can see tax on sales/purchases. why? 2 what is the difference of vat (gst) against sales and purchase tax? thanks rgds