How to bind UI Element with Context Node Attribute Element

Hi,
I'm building my view dynamically in the wdDoModifyView method.
Is it possible to bind a "TextView" element to a specific element of an attribute node?
Scenario:
Node_Employees
|
+- Attribute_Code
|
+- Attribute_Name
Node Contents:
Employees
|
+- Code: 1, Name: Employee 1
|
+- Code: 2, Name: Employee 2
|
+- Code: 3, Name: Employee 3
I need to do something like binding a TextView UI element to the "Name" attribute of the element #2, what would result to show "Employee 2" on my view.
How can I do this?
Thanks in advance,
Geraldo.

Hi Saravanan,
First I populate the context node and it won't change during view's lifecycle.  After that, I build my view and bind the TextView UI elements to the node context attributes elements.
If the node has 10 elements, I will build 10 TextView UI elements and bind them to each attribute element.
Regards,
Geraldo Brígido.

Similar Messages

  • Is it possible to bind the elments with context node dynamically?

    Hi All,
    Is it possible to dynamically bind elements with context nodes?
    In other words, at runtime, can we change the binding of an Inputfield to another context. Or a table to programmatically bind to another table?
    Regards,
    urbashi

    hi urbashi.......
          it is possible..
           you should first pass the id of he ui element and then bind it.
           for ex:
             if there is an input field, you can get the attribute that is bound, using cl_wd_input_field->bound_value.
             if you want to set an attribute, use cl_wd_input_field->bind_value.
             the first one will give an idea of how a valueshould be given.
    ---regards,
       alex b justin

  • How to bind ADF table with a collection of elements using backing bean.

    Hi Experts,
    My JDev version is 11.1.1.6.0.
    I need to bind ADF table with a collection of elements using backing bean.
    My backing bean consists of 6 lists of strings, where each list represents a column of table. How can I populate the entries of table with these lists.
    Thanks
    Gopi

    Hi,
    Create an object representing the row (setter/getter). Then have a list of these objects. Drag and drop the table and point its value to the list and the type to the row object
    Frank

  • How to find if a particular context node attribute is changed.

    Hi,
    When a screen is opened, the context node attribs has some values.  On some event, i wanted to check if one particular attribute in the context node has changed.  Is it possible to figure this out.
    (ps note that I need not find if any change has happened to the entire table but only one column (attribute) of the node.  Note that the node has cardinality 0...n.  So there are multiple possible values)
    Thanks in advance.
    regards,
    suresh.

    Hi,
    If you use the [Context change log|http://help.sap.com/saphelp_nw2004s/helpdata/en/ae/f95e42ff93c153e10000000a1550b0/frameset.htm]
    and loop over the result table, looking for a certain attribute name and node name,
    you'll get all the changes of that attribute, for all elements in that node.
    grtz,
    Koen

  • Generic Java class for working with Context Nodes

    Hi,all
    I would like to write generic Java class for working with Context Nodes:
    populating node,
    add element to node,
    update node element,
    remove node element
    Any ideas how can I do it?

    Hi,Armin
    Thanks for your answer.
    I have many nodes with the same structure,but different data.
    I don't want to work with each one of them individually.
    This is the main reason.
    Regards,
    Michael
    Any ideas?

  • How to search data from a context node.

    Hi Friends,
    Thanks for ur help for previous problem . I am facing some other problem i.e how to
    search data from a context node.
    i have a context node :-
    Car(main node) which consist of details, owners, engine and Brand  as its sub node.
    the value attibutes of difft nodes are:-
    Car-  category
    Details-  Mileage, Price, registration_no, miles_used
    owner -  name, phnno,addrs
    Brand -  main_brand, co_brand
    Engine- Bhp,Rpm
    Now i have to apply a search criteria on the basis of price, miles_used .
    pls help to implement that .
    Thanks & regards
    Pravin jha

    Hi PRAVIN,
                       What I can understand from your problem is that, you have a list with various properties and you want to display them and search them in your WD App. If I am correct, use the following approach:
    Instead of using "details, owners, engine and Brand" Nodes, use the attributes inside the parent node. i.e in the node Car, add all the attributes viz. Mileage, Price, registration_no, miles_used, name, phnno,addr etc.
    Now you can create a table of this node "Car" and can easily search on the basis of any criteria.
    I hope this solves your issue. If you are looking for something else, please revert, I'll be happy to help you.
    Cheers!!!
    Umang

  • How to bind Temporary Queue to Context in FioranoMQ

    I have two JMS clients sending messages to each other via FioranoMQ.
    And one client creates a temporary queue, for example
    Temporary Queue auction1Queue = qSession.createTemporaryQueue();
    My question is how to bind this auction1Queue to Context? so that the client on the side can lookup
    I don't use the usual way of set/getJMSReplyTo() to message because it will change the logic of my program.
    With SonicMQ, I just simply bind it like this
    jndi.bind("auction1", auction1Queue);
    then the other side just need to jndi.lookup("auction1")
    and with ActiveMQ it is even simpler
    Both side just need to lookup for the same name like that
    jndi.lookup("dynamicQueues/auction1");
    http://activemq.apache.org/jndi-support.html
    But FioranoMQ does not support both of the above operations.
    I don't really know how to do the same thing with FioranoMQ.
    Hope that somebody can help me.
    Thank you very much
    Edited by: dannytrinh1 on Apr 16, 2009 5:53 AM

    How to look up for temporary queue by using temporary queue name using JNDI context. I am getting lookup faild error" for temporary queue. While trying to bind this temporary queue name to jndi , it is throwing an exception as: notsupported exception. I am using ActiveMQ 5.2.
    See below sample code...
    tq = session.createTemporaryQueue();
    jndiContext.bind("queue.MyTempQueue",tq);

  • How to modify the data of Context Node of type table in BSPCOMP WB

    Hi,
    I have context node which is of table type. Now, beofre displaying the table, I have to delete few entries from this context node.
    Could you please help me out, how exactly I can handle this?
    Component: BP_DATA (Enhanced)
    View: MarketingAttributesEOVP
    Context Node: ATTRIBUTES 
    Thanks,
    Sandeep

    Make use of ON_NEW_FOCUS method of the context node to achieve the same. Get the collection first and then iterate it remove the entities which are not needed and then set the rest of the collection. You can also check standard code for reference.
    Rg,
    Harshit Kumar

  • ABAP: dynamic context node + attribute for DROP_DOWN_BY_KEY

    Hello,
    I need to create a Node with attributes dynamically and than assign it to a DROP_DOW_BY_KEY element in ABAP.
    I create drop down this way:
    drop_down_figure = cl_wd_dropdown_by_key=>new_dropdown_by_key( bind_selected_key = 'REPOSITORY.FIGURES' on_select = 'GET_OPERATOR' ).
      cl_wd_grid_data=>new_grid_data( element = drop_down_figure ).
      ui_container->add_child( drop_down_figure ).
    However, here I bind to REPOSITORY.FIGURES. Instead of doing this I need to bind it to an attribute that I create.
    I can access wd_context but I am not sure how to create a node in wd_context, then attribute for that node that will contain items for drop down.
    bind_selected_key is type of String. If I create a node with attribute how do I cast it to a String so I can pass it to a constructor of a drop down?
    Thank you.

    Hi Georgy,
    There is a 3 - series weblog for this.
    The first one is:
    /people/thomas.szcs/blog/2005/12/28/dynamic-programming-in-web-dynpro-abap--introduction-and-part-i-understanding-ui-elements
    The following are the the general steps for creating a node and table where table name is input by the user:
    DATA:
      UI Elements
        group_1       TYPE REF TO cl_wd_uielement_container,
        new_tab       TYPE REF TO cl_wd_table,
      Context Nodes
        dyn_node      TYPE REF TO if_wd_context_node,
        tabname_node  TYPE REF TO if_wd_context_node,
      Node Info
        rootnode_info TYPE REF TO if_wd_context_node_info,
      Data Reference (for internal table)
        stru_tab      TYPE REF TO data,
      String (for table name)
        tablename     TYPE string.
      FIELD-SYMBOLS:
        <tab> TYPE table.
    1) * get node info of context root node
      rootnode_info = wd_context->get_node_info( ).
    2) * create sub node named TEST1 of structure (tablename)
      cl_wd_dynamic_tool=>create_nodeinfo_from_struct(
        parent_info = rootnode_info
        node_name = tablename
        structure_name = tablename
        is_multiple = abap_true ).
    3) * get instance of new node
      dyn_node = wd_context->get_child_node( name = tablename ).
    4) ***** create new UI element table *******************************************************
      new_tab = cl_wd_dynamic_tool=>create_table_from_node(
    ui_parent = group_1
    table_id  = 'TESTTAB'
    node      = dyn_node ).
    5) ***** fill context node with data *******************************************************
    create internal table of (tabletype)
      CREATE DATA stru_tab TYPE TABLE OF (tablename).
      ASSIGN stru_tab->* TO <tab>.
    Get table content
      SELECT * FROM (tablename) INTO CORRESPONDING FIELDS OF TABLE <tab>.
    Bind internal table to context node.
      dyn_node->bind_table( <tab> ).
    Regards,
    Srini.

  • How to set default value to a node attribute programmatically?

    Hi Experts
             How to set a default value to a context node attribute programmatically? Any code snippet will be really helpfull. I am talking about the attribute inside a node in context.
    Note: This is for webdynpro for ABAP
    Thanks
    Gopal

    Hi Gopal,
    Assume you have the node called TEST and attribute called NAME then to set the value of NAME, you can use the following code say in WDDOINIT method or any other method.
    data:
        Node_Test                           type ref to If_Wd_Context_Node,
        Elem_Test                           type ref to If_Wd_Context_Element,
        Stru_Test                           type If_Componentcontroller=>Element_Test ,
        Item_NAME                           like Stru_Test-NAME.
    navigate from <CONTEXT> to <TEST> via lead selection
      Node_Test = wd_Context->get_Child_Node( Name = wd_This->wdctx_Test ).
    get element via lead selection
      Elem_Test = Node_Test->get_Element(  ).
    set single attribute
      Elem_Test->set_Attribute(
        exporting
          Name =  `NAME`
          Value = 'Value').
    Note: You can use Weddynpro code wizard to get this code. (Ctrl+F7)
    Regards,
    Srini.

  • XPath to select elements with specific namespace attribute?

    To select all elements with a specific attribute, i can use
    //*[attribute::val1='true']for elements that look like
    <Name val1="true">hello</Name>But how can i select them, if the attribute has a namespace:
    <Name myns:val1="true">hello</Name>?

    If JDOM is used to parse a node with XPath, node namespace should be added to the XPath.
    XPath xpath=XPath.newInstance("/@myns:val1='true');                
      xpath.addNamespace("myns", "http://www.w3.org/2001/XMLSchema-Instance");

  • Error while genetrating gettter method on Context node attribute

    Hi,
    I am working in SAP CRM 7.0 Ehp1.Now I need to create get_p_a and set_p_a method
    on context node attribute.But while selecting attribute and clicking on right and selecting
    on generate P-Getter,getting an error (error message - View not copied or enhanced with wizard; processing not possible).
    This is a custom context node attribute and need to create gettter,setter method.
    Kindly assist on this or suggest is there any way to create method on required context node attribute.
    Regards
    Viren

    Hi there,
    Creation of Getter  Setter is not possible for the AET Generated Views and Components.
    It seems your view is generated using AET Table enhancement feature of Ehp1 and the context node is thus a based on a Z BOL object created by a feature of AET of Ehp1
    For such context node, generation of getter setters is not  possible with right click.
    If you need any of GET_ , SET_, GET_P_ or GET_V , then you need to copy the GET_P_XYZ etc method you find on context node class.
    Hope this helps
    Thanks & Regards
    Suchita

  • Read Context  Node/Attribute option in webdynpro code wizard not available

    Hi Expets,
    I am new to webdynpro Abap, i have developed a small application to set default values for two fields. i want to use code wizard to implement the code. When i click on code wizard icon  in application tool bar, i have found lot of option like Method call in current controller, method call in used controller, Instantiate used component ... etc. But i didn't find the option Read Context Node/Attribute. Do i need to do any settings to get that. Kindly suggest. Your help will be greatly appreciated.
    Venkat

    Hi,
    Check the NW release,
    I checked with NW 7.02 - 2 tabs were available.
    with NW 7 - only 1 tab was available which you mentioned.
    Additional tab (Context ) might have been added after NW release 7.0.
    Regards
    Manas Dua

  • XmlObject - set value of element with a particular attribute

    Hi,
    In a xmlObject I try to set the value of xml element with a particular attribute but it doesn't work
    //get value of element with a particular attribute
    var myValue = xmlObject.ELEMENTS.ELEMENT.(@category == "myCategory"))// works fine
    //set value of element with a particular attribute
    var myValue = "foo"
    xmlObject.ELEMENTS.ELEMENT.(@category == "myCategory"))= myValue // doesn't work
    Thanks for your help
    Regards

    Hi Dirk,
    For example :
    var xmlObject = new XML ( "<rootElement> <elements> <element category='foo1'>value1</element> <element category='foo2'>value2</element> <element category='foo3'>value3</element> </elements></rootElement>");
    myValue = xmlObject.elements.element.(@category == "foo1");
    $.writeln(myValue)// return value1
    // Now I want modify value1 to value99 like this
    xmlObject.elements.element.(@category == "foo1")= "value99"; //doesn't work
    I hope I was clear in my explanation ;-)
    Regards

  • I am learning to use Photoshop Elements with my recently downloaded Elements 13.  I am disappointed that there is no longer a golden section grid option.  Does anyone know if there is a way I can get this?  Is there an upgrade to a more advanced photoshop

    I am learning to use Photoshop Elements with my recently downloaded Elements 13.  I am disappointed that there is no longer a golden section grid option.  Does anyone know if there is a way I can get this?  Is there an upgrade to a more advanced photoshop or a plug in that has it as an option?

    You might have a look at the affordable Elements+ add-on.
    It has a script to enable guides with the golden ratio.
    Guides

Maybe you are looking for