What is Context attribute

Hi,
What is context attribute and how it can be used in XI?
Thanks in Advance,
Ajay.

Hi,
I think it is related to web dynpro:
http://help.sap.com/saphelp_nw04/helpdata/en/76/98384162316532e10000000a1550b0/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c7/a4384162316532e10000000a1550b0/frameset.htm
Regards
Suraj

Similar Messages

  • What is "Primary attribute" in Context attribute property?

    Dear Friends...
    Many properties..in Context attribute properties..
    Attribute name, Type, Read-only, Primary attribute..and so on..
    What is primary attribute and how to check it?
    I don't check it. and i don't know what is this..?
    Please answer..
    Thank you.

    Hi,
      The primary attribute specifies the lead column for the  configuration editor. The maximum of one attribute for each node can be declared as a primary attribute.
    Dependencies:
    The primary attribute is only allowed in the context of configuration controllers.
    Reward if useful.
    Regards,
    Swetha.

  • Using Static Variable against Context Attribute for Holding IWDView

    Dear Friends,
    I have a method which is in another DC which has a parameter of the type IWDView. In my view, I will have an action which will call the method in another component by passing the value for the view parameter. Here, I can achieve this in 2 types. One is - I declare a static variable and assign the wdDoModifyView's view as parameter value and I can pass this variable as parameter whenever calling that method or the second way - create an attribute and assign the same wdDoModifyView's view parameter as its value. Whenever I call this method, I can pass this attribute as parameter. What is the difference between these two types of holding the value since I am storing the same value i.e., wdDoModifyView's view parameter. But when I trigger the action from different user sessions, the first type of code (using static variable) prints the same value in both the sessions for view.hashCode() and View.toString(), but the same is printing the different values when I pass the attribute which holds the view parameter.
    Clarification on this is highly appreciated
    The problem I face is when I use static variable to get the view instance and export the data using the UI element's id, the data belonging to different user sessions is mixed up where as when I use Context Attribute, the same problem doesn't arise. I want to know the reason why it is so. Is there any other place or way where I can get the current view instance of each session instead of wdDoModifyView?

    Hi Sujai ,
    As you have specified the problem that we face when we use  static attributes, when end users are using the application .
    Static means i  have n number of objects but the static variable value will remain same every where.
    when it is context attribute for every object i.e nth object you have a nth context attribute i mean nth copy of the context attribute.
    so every user has a unique Iview parameter , when context is used and
    when static is used  , assume you have userA , his iview is set this intially  and u have another user B , when he is using  , since the variable is static and when you access this variable you will get the value of userA.
    Regards
    Govardan Raj

  • Using dynamic context attributes with flashisland

    I recently started looking at flashislands.
    Going through the SDN tutorials on this topic, I noticed that the declarations of GACDATASOURCE and GACPROPERTY properties inside web dynpro and their counterpart variables inside flex are a bit static (all naming and binding is done at design time).
    So I'm asking if there's a way inside flex to dynamically capture the values of the attributes of a web dynpro context node that is bound to an ArrayCollection variable inside flex without knowing the names and the amount of the attributes of the context node?
    Here's my situation:
    I have a context node (REPORT_DATA) inside web dynpro that at design time has no attributes.
    The attributes and their names are created dynamically at runtime.
    It is even so, that over time the amount of attributes may vary.
    Inside the web dynpro, the contents of this context node (REPORT_DATA) are shown in a (dynamically built) table.
    Besides using the table, I'm trying to show the same contents as a piechart and as a columnchart in a flashisland.
    The ROOTUIELEMENTCONTAINER of the FlashIsland view in web dynpro only contains a GACDATASOURCE element at design time.
    The 'dataSource' property of this GACDATASOURCE is bound to the context node REPORT_DATA.
    The 'name' property of this GACDATASOURCE is bound to an ArrayCollection variable inside flex (named dataSource).
    So much for the static part created at design time.
    At runtime inside web dynpro the correct GACPROPERTY's are created, based on the - over time changing - amount and the names of the context node.
    Suppose my REPORT_DATA context node at runtime starts with 3 attributes: ATTR1, ATTR2 and ATTR3
    Also suppose the node contains 2 elements: [ {"1_1", "1_2", "1_3"} , {"2_1", "2_2", "2_3"} ]
    The dataSource variable inside flex also contains 2 entries with 3 elements each.
    The code to show the value of (for example) the first element of all entries inside the ArrayCollection variable would be:
    +for each( var o:Object in dataSource) {
    var s:String = o.ATTR1;
    Alert.show( "the 1st value = " + s ); // 1_1 for the first entry, 1_2 for the second
    }+
    I can then use the myAC variable inside flex as dataprovider for various other objects.
    This works fine.
    But inside flex I can only capture the value of an attribute when I know its name at design time (like ATTR1 in the sample code above).
    And that's not what I want.
    Inside flex I want to capture the value of the context attributes dynamically in a (correctly typed) flex variable without knowing the names and the amount of the context attributes.
    Is this possible?
    Thanks in advance for - any - response.
    Bart.

    Hi again,
    I tried the same thing by creating a dummy context node without any attributes, and adding all attributes at runtime using the add_attribute method. In that case too, it doesnt work. All the attributes are available in the dynamic attributes of the node element, but are not getting displayed.
    Any help would be greatly appreciated. Thank you.
    regards,
    nithya

  • Values not passing from form to context attributes (value attributes)

    Hi Experts,
    I have bound the properties of theadobe interactive form (WD-Java) to the context attributes but the values are not passing to the value attributes at runtime.
    For your information I have not bound the pdfsource binary attribute of the view to the custom controller pdfsource binary attribute.
    Please advise.
    Thanks,
    Shobhit

    Context
       GetData - ModelNode mapped to controller context (DataSource)
             Attribute1 - Value Attribute (Form Field)
    Is it allright to have the Data Source as a ModelNode (mapped to the controller context node) and then have Value Attributes under the ModelNode which are then bound to the adobe form input fields.
    I know its frustrating to advise on such questions without looking at the code actually. But I would definitely need your support.
    If possible could you mail me a project of yours where you have the form being PREFILLED with some values coming from a RFC FM and then the same form gets posted to SAP though another RFC FM.
    Thanks,
    [email protected]
    OK. When I create a Fresh Adobe Interactive Form application, it works fine.
    The problem Im facing is in the case, when Im using an existing PDF file created in the ABAP stack (TCode SFP). I am importing this PDF file into the WebDynpro Java Application and then binding the fields. So in this case the context binding does not work.
    You guyz are right, I need to check if there is any other script which exists. But still what are views after this update?
    Message was edited by:
            Shobhit Swarup Mathur

  • Procedure for changing context attributes of an UI already mapped in a Task

    Hello,
    I have a problem. I've used the auto-generate UI feature of a BPM Task. This creates a WD component with a view with all the context attributes selected in the step. I've customized this view for being more user friendly.
    However, I 've found that I need to add new attributes to the WD UI that I have to send to the BPM mapping.
    First, I've added the attributes in the .XSD of the BPM Project. What I have to do in the WD Project for adding the new attributes to the context for make them appear in the BPM mapping screen?
    Thanks
    Regards
    SU

    Hello John,
    Thanks for your response. I've made the changes in the WD context in the same node that was automatically created by the UI generation feature.
    Then, I've built and deployed the WD Project. After that, I'm going to the BPM task details and I've reimported the UI component succesfully. However, the new attribute doesn't appear. (I think is because in the WD context is not mapped to anything).
    So I think I have to reimport the BPM context in the WD Project for enable the mapping procedure. But, how I can reimport the new attributes of the BPM in the WD Project? The WD Project doesn't have a BPM context Model for doing a reimport (as I can do it with wsdls).
    Thanks & Regards
    SU

  • Simple Types and Context Attributes

    Hello All,
      Can someone be kind enough to explain the difference between using a context attribute and a Simple Type ? For example... what's the difference (and I am sure there is ) between a context attribute "Name" that is declared to be of String type and a simple type "Name" that is of built-in type String  ?
    from
    Kwok Wei

    Some links on SimpleTypes and its usage.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/value help in web dynpro applications.pdf
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/internationalization of web dynpro applications.pdf
    Regards, Anilkumar

  • Context attributes where used list

    hello,
    is there a way to find out the no longer used context attributes?
    I need something like a where used list mechanism for context attributes.
    My aim is to delete all context attributes which are not bound to any ui elements or not accessed in the abap coding.
    In a larger wda it is a problem to identify the not used context attributes.
    Thank you.
    Kind regards.

    This is a new feature in NetWeaver 7.0 Enahncement Package 2 - but not available before then. It works at the node level however - not the attribute level.  It tells what views and components (cross component context binding) the node is bound to as well as any methods that reference the content node in coding (as long as you use the generated constants for access - such as wd_context->get_child_node( name = wd_this->wdctx_* ) ).

  • WDJ: binding image field to context attribute

    Dear all,
    I filed a form with an image field to allow the user to insert a picture on the form from his PC.
    The form is shared by several Web Dynpro Java View.
    What is the right type of the context attribute  for binding the image field of the form?
    Thanks for your time.
    Regards,
    Mirco

    Hi Chintan,
    I also think it was a binary. but I do not, partly because the image field object is bindable with any data context  (I tried so far with integer, string, binary)
    To share the image between two Web Dynpro vew I used "usePDF" mode but I would like to bind the image with a context attribute so I can use "updateData" mode instead of "usePDF" mode
    Regards,
    Mirco

  • Check Mandatory Fields when state is bound with context attribute

    Hello All,
    Currently i am facing  problem in my SAP SRM 7.0 standard component.
    Actually, i have to remove  mandatory(State = Required) for one of my inputfileds for this I have written below code, but it has been  remove only Red mark * infront of Inputfield, after that, i am trying to save other data, still it is asking me enter the required value.
         here my input field  bound with Context attribute, it is standard attribute.
    data:lo_input1 type ref to cl_wd_input_field.
       lo_input1 ?= VIEW->get_element( 'NAME_FIRST' ).
       lo_input1->set_state( '00' ).
    I am trying to delete state = required property from below component and view
    Component Name : /SAPSRM/WDC_MOFC_PERSON
           View  :  V_PERSON
    Can you help me on this?
    Thanks
    Sandeep.

    Hi Baskaran ,
    Thanks for ur reply ..
    Eveen in that component they have not used cl_wd_dynamic_tool class for mandatory attributes
    I want to share another thing with u that is
    I am trying it in another way
    with the following code which i have done in post exit  is
    let me explain u what i did
    __first of all i got the child node of rootuielementcontaine
    later
    i get the childnode of container_left and assigned it to another class of ref cl_wd_uielemnent
    now where i have struked is
    *CALL METHOD LR_CHILD2->GET_CHILD
    EXPORTING
       ID        = 'FORM_OF_ADDRESS_DROPDOWN'
       INDEX     =
    RECEIVING
       THE_CHILD = LR_C1.
    what the error i am getting is
    OBJECTS_OBJREF_NOT_ASSIGNED
    Please correct me if there is any wrong inn the code ...
    FORM_OF_ADDRESS_DROPDOWN--->ui element dropdown
    r__ DATA lr_container TYPE REF TO cl_wd_uielement_container.
    DATA lt_children  TYPE        cl_wd_uielement=>tt_uielement.
    DATA lr_view      TYPE REF TO if_wd_view.
    DATA lr_child     TYPE REF TO cl_wd_uielement.
       DATA lr_child1     TYPE REF TO cl_wd_uielement.
       DATA lr_child2     TYPE REF TO cl_wd_uielement.
    data : LR_CON1 TYPE REF TO CL_WD_TRANSPARENT_CONTAINER.
    data : LR_CON2 TYPE REF TO CL_WD_TRANSPARENT_CONTAINER.
    SANDEEP
    lr_container ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
    lt_children = lr_container->get_children( ).
    CALL METHOD lr_container->get_child
       EXPORTING
         id        = 'DATACONTAINER'
         index     = 1
       RECEIVING
         the_child = lr_CHILD.
    LR_CON1 ?= LR_CHILD.
    CALL METHOD LR_CON1->GET_CHILD
      EXPORTING
        ID        = 'CONTAINER_LEFT'
        INDEX     = 1
      RECEIVING
        THE_CHILD = LR_CHILD1 .
    DATA : LR_CHILD2 TYPE REF TO CL_WD_TRANSPARENT_CONTAINER.
    LR_CHILD2 ?= LR_CHILD1 .
    *DATA : LR_C1 TYPE REF TO CL_WD_UIELEMENT.
    *CALL METHOD LR_CHILD2->GET_CHILD
    EXPORTING
       ID        = 'FORM_OF_ADDRESS_DROPDOWN'
       INDEX     =
    RECEIVING
       THE_CHILD = LR_C1.
    *DATA : LR_DD TYPE REF TO CL_WD_DROPDOWN_BY_KEY .
    *LR_DD ?= LR_C1 .
    *CALL METHOD LR_DD->SET_STATE
    EXPORTING
       VALUE  = '00'
    sandeep

  • Set context attribute property

    Hello.
    I  have bound the visibility of a ui element to the property of a context attribute.
    What's the syntax the set the property of the context attribute to invisible ?
    Thanks and regards.
    Carola

    Hi Carola.
    Another way:
    METHOD set_shiptos_visible .
      DATA:
        node_ctr_struct                     TYPE REF TO if_wd_context_node,
        elem_ctr_struct                     TYPE REF TO if_wd_context_element,
        stru_ctr_struct                     TYPE wd_this->element_ctr_struct ,
        item_pn_visible                     LIKE stru_ctr_struct-pn_visible.
      node_ctr_struct = wd_context->get_child_node( name = wd_this->wdctx_ctr_struct ).
      elem_ctr_struct = node_ctr_struct->get_element(  ).
      IF visible EQ abap_true.
        elem_ctr_struct->set_attribute(
          EXPORTING
            name =  `PN_VISIBLE`
            value = '02' ).
      ELSE.
        elem_ctr_struct->set_attribute(
          EXPORTING
            name =  `PN_VISIBLE`
            value = '01' ).
      ENDIF.
    ENDMETHOD.

  • Not able to get the context attribute set in ServletContextListener

    Hi all,
    I have written a simple ServletContextListener and set an attribute in it. when i am trying to retrieve the attribute value in my servlet, I am getting as null. Could anybody please let me know about this if i need to add any more changes.
    Below is the complete code of my sample application
    web.xml
    <web-app>
    <servlet>
    <servlet-name>myServlet</servlet-name>
    <servlet-class>com.mypackage.MyServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>myServlet</servlet-name>
    <url-pattern>/*</url-pattern>
    </servlet-mapping>
    <listener>
    <listener-class>
    com.mypackage.MyContextListener
    </listener-class>
    </listener>
    <context-param>
    <param-name>testMe</param-name>
    <param-value>TestedSuccessfully</param-value>
    </context-param>
    </web-app>
    ContextListener
    package com.mypackage;
    import javax.servlet.ServletContext;
    import javax.servlet.ServletContextEvent;
    import javax.servlet.ServletContextListener;
    public class MyContextListener implements ServletContextListener{
    public void contextDestroyed(ServletContextEvent arg0) {
    public void contextInitialized(ServletContextEvent arg0) {
    ServletContext context = arg0.getServletContext();
    String testApplication = context.getInitParameter("testMe");
    context.setAttribute("myTest", "mkmmkmmkm");
    Servlet
    package com.mypackage;
    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.servlet.ServletContext;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    public class MyServlet extends HttpServlet{
    public void doGet(HttpServletRequest request, HttpServletResponse response){
    ServletContext context = getServletContext();
    if(context != null){
    response.setContentType("text/html");
    try {
    String output = (String) getServletContext().getAttribute("testMe");
    PrintWriter out = response.getWriter();
    out.print("The required value is... "+output);
    } catch (IOException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    OUTPUT
    When accessed with any url as below:
    http://localhost:8080/helloworld/u
    gettting output as "The required value is... null" . Because i set the context attribute, I am expecting not null. Can anybody suggest me on this.

    context.setAttribute("myTest", "mkmmkmmkm");
    String output = (String) getServletContext().getAttribute("testMe");You set "myTest" but try to get "testMe"

  • How to set multiple values in one context-attribute

    Hi all,
    Anybody knows a possibility to set multiple Values to a context-attribute?
    I know it how to get it with the following code:
    String break[]= request.getParameterValues("break");
    Now I want to do something like:
    request.setParameterValues(break[no]);
    where no is a counter in a loop.
    With the Method setAttribute(), I overwrite the previous inserted value.
    Thanx
    Robert

    I have not explizit declared break as an array.
    It is the Context- Attribute I want to send. I thaught that I can use it as an array in the same way I can do it when I send Data from an HTML- Form (with multiple values) to an servlet.
    I don't know how to declare the Attribute explizit as an array.
    that it is you wanted to know?
    I think my main problem is to get an array from the servlet to the jsp. Is there an other possibility (other than via Context-Attributes) to do that?
    thanx
    robert

  • How can I remove an OVS extension from a context attribute?

    In our Web Dynpro application we provide a generic search mask to the user. The information about the search fields like labels, length etc. is retrieved from the backend during runtime. Also, the information if there should be a value help available or not is read from the backend during runtime. In case there should be a value help for a search field we just add an OVS extension, using method WDValueServices.addOVSExtension(...). For this, we pass the AttributeInfo of all relevant context attributes to this method.
    The problem is now the following: The user can switch between different kinds of search masks. Because of the generic implementation all use the same Web Dynpro context. So it might be that the search field #1 on the first input mask has a value help whereas search field #2 on the second input mask doesn't. But if we once have added an OVS extension to the context attribute of search field #1 it can apparently never be removed anymore. At least I couldn't find a method to remove it.

    At least your second proposal would work for sure if I had only static context nodes apart from the dynmic OVS context. But in my case I can not use wdContext.reset(false) since I have dynamic context nodes in my controller that would get lost. And unfortunately, there is no method available to reset a specific context node only instead of the whole context.
    I contacted the responsible Web Dynpro developers in the mean time and they offered to implement an API in SP11 to remove the OVS.

  • How to find out which context attributes are mapped to view elements

    Hi All,
    We have a custom WD application ( on ECC 6.0 - SAP Basis 70 ) where we have a context node whose 70 attributes are displayed over 2 seperate views.
    When a user enters the view,  we want to inform him which data was changed. 
    I have written a general method which takes the context node, grabs its attributes and compares values ... messages are generated via the message manager and context element/attributes are linked so that the input elements become red.
    Everything works fine but the only problem is that I do not know which attributes are visible on which view so the user is getting the changes of view 2 on view 1 and vice versa ( if the context is only mapped on 1 view then there is no issue ofcourse ).
    The call is currenlty executed at the views inbound plug ... I also checked the view methods themselves like modify view but nothing seems to lead me to a potential solution ...
    I have looked through almost all API classes available but I cannot find any way to obtain information about the linking of view elements with context elements/attributes during runtime ... And I don't want to 'hardcode' a list of context attributes per view ....
    Has anyone done something similar ?
    Thanks,
    Steven

    Hi All,
    We have a custom WD application ( on ECC 6.0 - SAP Basis 70 ) where we have a context node whose 70 attributes are displayed over 2 seperate views.
    When a user enters the view,  we want to inform him which data was changed. 
    I have written a general method which takes the context node, grabs its attributes and compares values ... messages are generated via the message manager and context element/attributes are linked so that the input elements become red.
    Everything works fine but the only problem is that I do not know which attributes are visible on which view so the user is getting the changes of view 2 on view 1 and vice versa ( if the context is only mapped on 1 view then there is no issue ofcourse ).
    The call is currenlty executed at the views inbound plug ... I also checked the view methods themselves like modify view but nothing seems to lead me to a potential solution ...
    I have looked through almost all API classes available but I cannot find any way to obtain information about the linking of view elements with context elements/attributes during runtime ... And I don't want to 'hardcode' a list of context attributes per view ....
    Has anyone done something similar ?
    Thanks,
    Steven

Maybe you are looking for

  • How do I find the digitizer for a channel?

    I am trying to make a VI that is generic and is configured via a single config file.  The file currently lists all the physical channels along with other things like the name and red/yellow limits for each channel.  Currently, the sample rate is hard

  • JSP is not refreshed

    Hi, After I changed the JSP program and reload the page from the browse, I still get the old image. What's the problem? Thanks.

  • WRT54GS cuts internet connection

    Any ideas?  My WRT54GS cuts the connection after 10 min. Then I make a reset and works again for another 10 min and cuts again.

  • How to is lexical paramter in oracle reports

    I have a query like, select * from t1 where &c1=:v_srep; where t1 is tablename c1 is column name How do I create &c1 and how should I populate it ? Thanks,

  • Custom Column header in MDX

    Hi guys, I am trying to fill MDX query result to a datatable. When i fill datatable column header like [Dim Date].[Day].[Day]. I need it Log Date. Is there any way to change column header ? I mean, in TSQL we using select firstName [User] from users