Value of attribute defined in Component controller level is not avalabale

Hi Experts,
I am facing one strange thing.
There is one standard WD /PLMU/WDC_RFO which i am enhancing.
I define one attribute at Component controller level and fill it but the value is not available at View level.
The Attribute is although exist at view level but it is blank.
Please help.
Thanks
Mahesh

> I define one attribute at Component controller level and fill it but the value is not available at View level.
>
> The Attribute is although exist at view level but it is blank.
>
> Please help.
>
> Thanks
> Mahesh
are we talking about "attribute" context node- attribute or component controller attribute ?
node/attribute means then you may have to check that the node/context is not invalidated in between after you updated the value and the place where you see in the view.

Similar Messages

  • Setting and getting values to the viewcontroller from component controller

    Hi,
    I'm having a model node in the controller  and the value node int he view which are binded to the UI elements.
    How to set the values in the model nodes to the value nodes in the view through setter method and get the values from the view using getter???
    Could you help me in, how to call a viewController's value node in componenet controller, and set and get the values to it.
    Thanks & Regards,
    Suresh

    Thanks Murtuza..
    i have one more question regarding checkbox by group.
    I have binded the texxt property of the checkbox by group to a context contribute and its type property is selected from a simple type.
    In the view layout on NWDS its showing the label names which i hav given in the simple type. but when i deploy it and run it in browser its just showing only one check box. its not showing the label names.
    how to get the label names, using simple types. i,m able to get it using code.
    how to get it by simpletype??? 
    thanks, suresh

  • Access to an attribute of a value node of a component controller

    Hello experts,
    I'm new to the area of SAP CRM Web Client UI development. My problem is probably very simple and you will surely smile about it.
    I have created my own component with the value node FILE (that consists of five atributes) in the component controller. Unfortunately I have not figured out yet how I can access the value of an attribute.
    The first thing I do not know is where I can find the controller-ID.
    In addition, I get an syntax error Field "TYPED_CONTEXT->FILE->COLLECTION_WRAPPER->GET_FIRST(" unknown in the line with "lo_entity = me->comp_controller->typed_context->file->collection_wrapper->get_first( ).".
    Currently no functionality is included in my code, because firstly I want to understand the basics.
    method OP_FILEUPLOAD.
      data lo_entity       type ref to if_bol_bo_property_access.
      data lv_file_name    type string.
      data lr_file_content type ref to data.
      field-symbols <lv_file_name> type string.
      IF ( comp_controller is INITIAL ).
        get_controller( 'xxxx' ).
      ENDIF.
      lo_entity = me->comp_controller->typed_context->file->collection_wrapper->get_first( ).
      while lo_entity is bound.
        lv_file_name = lo_entity->get_property_as_string( 'FILE_NAME' ).
        lr_file_content = lo_entity->get_property( 'FILE_CONTENT_STRING' ).
        assign lr_file_content->* to <lv_file_content>.
        lo_entity = me->typed_context->file->collection_wrapper->get_next( ).
      endwhile.
    endmethod.
    I hope that I will manage my "problem" with your help!
    Sebastian
    Edited by: Sebastian Lenz on Jun 27, 2011 2:35 PM

    Hi Sebastian,
    The issue is in the following line of your code:
    lo_entity = me->comp_controller->typed_context->file->collection_wrapper->get_first( ).
    The 'typed_context' belongs to your own component controller class and not the standard framework superclass. So, you need to replace this single line of code with something as follows (assuming that your component controller class is ZCL_CUSTOM_BSPWDCOMPONENT_IMPL):
    DATA lr_coco TYPE REF TO ZCL_CUSTOM_BSPWDCOMPONENT_IMPL.
    lr_coco ?= me->comp_controller.
    lo_entity = lr_coco->typed_context->file->collection_wrapper->get_first( ).
    The me->comp_controller reference will refer to the standard framework superclass of all component controllers and this does not have any typed_context attribute with it. The real component controller that gets created when you create a BSP component will have this attribute. That is why you need to first cast it to your own reference type before trying to access its typed_context.
    And if your value node will have only single values, then you can as well do the following to access the attribute ATTRIB1 of context node node1:
    DATA lv_value TYPE string.
    lv_value = lr_coco->typed_context->node1->get_attrib1( attribute path = '' ).
    Basically all attributes can be accessed by above code by using the right getter method.
    Regards,
    Shiromani

  • How Attributes declared in Component level can be used in All the views

    How Attributes declared in Component level can be used in All the views
    For Example :
    say :             context type ref to if_wd_context_node.
    is declared at component controller level and check box public is checked !!
    How can we use this any view in same WDP Component..
    For suppose : in this case
    We want to get the ref of child node using above declared attribute..
    How is it possible?
    Say in detail

    You can do this by doing the exact same like you did with the if_wd_context_node.
    1. Define attribute in Comp Controller and set it PUBLIC.
    2. Access the attribute over the reference of the comp controller, i.e. wd_this within the comp controller itself or wd_comp_controller within somewhere else in the component.
    So if you have, lets say, this defined as attribute in your comp controller:
    Z_MY_TABLE_REF  [X] TYPE REF TO [X] PUBLIC   CL_WD_TABLE.
    And then you want to catch the reference into a local variable within a method or the like within a view:
    DATA: lo_my_table_ref TYPE REF TO CL_WD_TABLE.
    lo_my_table_ref = wd_comp_controller->z_my_table_ref.
    Lekha has already said so as well, I don't really understand where the problem is
    Cheers, Lukas

  • Define attributes in Comp. Controller

    dear all,
    How i can define any variable in Attribute tab in component controller,so that be accessible to other views?

    Hi Ali,
    Once you create the attribute in component controller, you can access this attribute from any view:
      data lo_componentcontroller type ref to ig_componentcontroller .
      lo_componentcontroller =   wd_this->get_componentcontroller_ctr( ).
    *eg. Access comp.controller attribute and assign some value.
      lo_componentcontroller->w_status = 'X'.
    In the above code 'w_status' attribute  is defined under attribute tab of the comp. controller.
    Regards,
    Ravi

  • Unable to access Component Controller attributes from Views.

    Hi,
      I am unable to access the attributes in component controller from methods in View even by using WD_COMP_CONTROLLER.
    Say, I want to access the attribute G_FLAG in component controller from a method in the View Controller by the following code :
      WD_COMP_CONTROLLER->G_FLAG = 2.
    Then an error message is showing up saying -  Field G_FLAG is unknown. It is neither in one of the specified tables nor defined by a DATA statement.
    What should I do? Plz suggest..

    Hi,
    Please check the Public check box of the attribute in the component controller.
    Hopefully it will solve your problem.
    Thanks

  • Cannot access Created Context Attribute from Component Controller

    Hello All,
    I have added a new attribute to a node in my component controller 'LOGONUID' and I cannot access it within my windows within the WDA application.
    DATA lo_nd_url_param TYPE REF TO if_wd_context_node.
      DATA ls_workset TYPE wd_this->element_workset.
      "DATA ls_logonuid TYPE wd_this->element_logonuid.
    I get an error as soon as I try to activate this code in my method in my W_MAIN
    In my component controller I do not see it reference in the SAP generated code in my WD_THIS IF_COMPONENTCONTROLLER?
    * Intf.: ig_componentcontroller
    * Purp.: programming interface for access of this controller within
    *        other controllers of the same component
    *        controller:  <COMPONENTCONTROLLER> of
    *        component:   <zhr_wd_mss>
    * UDate: 20111207 145441
    *=====================================================================*
    interface ig_componentcontroller.
      interfaces: ziwci_hr_wd_mss .
      constants:
        wdctx_context type string value `CONTEXT`.
      constants:
        wdctx_cuifcontext type string value `CUIFCONTEXT`.
      types:
        begin of Element_cuifcontext,
          USERID  type String,
          LASTEVENTOPERATION  type String,
        end of Element_cuifcontext,
        Elements_cuifcontext type
           standard table of Element_cuifcontext
           with default key.
      constants:
        wdctx_messages type string value `MESSAGES`.
      types:
        Element_messages type ZHR_S_MESSAGE,
        Elements_messages type
           standard table of Element_messages
           with default key.
      constants:
        wdctx_workset type string value `WORKSET`.
    I want it to be declared as the constant 'WORKSET'
    thank you
    Edited by: Keith Warnock on Dec 7, 2011 8:55 PM
    Edited by: Keith Warnock on Dec 7, 2011 8:56 PM

    > I have added a new attribute to a node in my component controller 'LOGONUID' and I cannot access it within my windows within the WDA application.
    >
    >
    >
    > DATA lo_nd_url_param TYPE REF TO if_wd_context_node.
    >   DATA ls_workset TYPE wd_this->element_workset.
    >   "DATA ls_logonuid TYPE wd_this->element_logonuid.
    >

    >
    This declaration is not right. There is no element logonuid, you  have the attribute inside a node. workset is a node and thats why you can declare that way.
    easiest way is to declate
    data lv_logonuid type <ddic type> or
    data lv_logonuid type wd_this-><node name>-logonuid.
    You can also use the code generator in (CTRL +F7 ) to get/set attributes.

  • Access context of Component Controller from Views

    Hi,
      In WD Java, I used to set attributes value for Context present in Component controller from the view. I used to write a piece of code at the view level for this.
    How do i do this in WD ABAP. I believ I have to get instance of Component controller like this:
    lr_compcontroller type REF TO ig_componentcontroller.
    lr_compcontroller = wd_this->get_componentcontroller_ctr( ).
    Regards,
    Murali.

    Hi Murali,
    yes you can access the comp_controller in the same sort of way in WDA.
    You declared component usages on the property tab.
    The wizard (ctrl-F7)has various options, check it out.
    One is calling methods on declared controller usages.
    the result is for example such generated code:
    DATA: l_ref_ANOTHER_CONTROLLER TYPE REF TO IG_ANOTHER_CONTROLLER .
          l_ref_ANOTHER_CONTROLLER =   wd_This->Get_Another_Controller_Ctr( ).
    data:
          l_Api_Another_Controller type ref to IF_WD_CONTROLLER.
    See also local interface code in CTRL-SHIFT F1.
    You work directly with this info.  Indeed constants from the interfaces should be used this way.
    Work with the wizard. And declare all usages in the properties tab.
    Moving outside of the framework is possible but not recommended
    regards
    Phil

  • Is it possible to create a component without a component controller?

    Hi every one,
    Is it possible to create a component without a component controller?If yes , how and what is the purpose of this?
    Thanks in advance. Points will be rewarded.

    Hi Prosun Bondopadhyay  ,
                   Component controller is the base of a wda component. its can be considered as the base class. all the other views can be considered as the sub classes of component  controller. so without the base class there is no existence for sub class rt?
    like we can use all the methods and attributes of a component controller(main class) across all the view(sub class) and the viceversa is not possible.
    hence we cannot create a wda without component controller.
    Regards
    Sarath

  • Call component controller method from view

    Hi
    I have created an action in view Thus its event handler is "OnActionDoSomething()"
    And, I have a method in component controller "MethodSaySomething()".
    Now, how can I call MethodSaySomething() from OnActionDoSomething().
    OnActionDoSomething()
    // Call  MethodSaySomething() defined in component controller
    Thanks

    Hi,
        To access the methods present in component controller from View , first u need to add the component controller as the required controller.
    open the view controller --> switch to propertues tab --> add the component controller as required controller(click add controller).
    Now in your action handler , write this below code to add the method:
    wdThis.wdGet<COmponent Controller>().MethodSaySomething();
    Hope it helps
    Thanks and Regards,

  • FPM : OVERRIDE_EVENT_GAF method of Component Controller

    Hello All
    I am not able catch the button evenet value in OVERRIDE_EVENT_GAF method of Component Controller.
    What i have done is
    1) Created FPM Application with Road Map 4 Mainsteps.
    2) In the First Road Map contains view,  having two buttons. On click of buttons need to hide MainStpes
    Example : On Click of Button1 need to show Step1 Step2 and Step3 means Step4 is hiding
              On Click of Button2 need to show Step1 Step3 and Step4 means Step2 is hiding
    3)For the above requirement In the View created two actions for two buttons. In Button1 action written below code.
    Code for Button1 Action in the View
    data: lo_fpm type ref to if_fpm,*lr_event type ref to cl_fpm_event.
    create event
    lr_event = cl_fpm_event=>create_by_id(
    cl_fpm_event=>gc_event_change_step ).
    lo_fpm = cl_fpm_factory=>get_instance( ).
    lr_event->mo_event_data->set_value(
    iv_key = 'B1'
    iv_value = 'BUTTON1').
    4)  onclick of Button 1 when i m trying to get the value of B1 it is coming empty in the OVERRIDE_EVENT_GAF method of Component Controller. Expecting "BUTTON1"  written below code
    Code for OVERRIDEEVENT_GAF method of Component Controller_
    DATA: lo_fpm TYPE REF TO if_fpm,
    lr_event TYPE REF TO cl_fpm_event.
    get reference to FPM API
    lo_fpm = cl_fpm_factory=>get_instance( ).
    create event
    lr_event = cl_fpm_event=>create_by_id(cl_fpm_event=>gc_event_change_step ).
    lr_event->mo_event_data->get_value(iv_key = 'B1' ).
    5) Based on condition planning to hide the steps.
    IF BUTTON1
    Hide Step4
    IF  BUTTON2
    Hide Step2
    Please help how to get value in OVERRIDE_EVENT_GAF method of Component Controller onAction of Button
    Edited by: CarlinWilliams on Jun 17, 2011 1:56 PM
    Edited by: CarlinWilliams on Jun 17, 2011 1:57 PM

    Hi Carlin,
    You need to ensure that you raise the event:
    e.g. here I raise an event to pass some data from an org chart:
    lo_event =
         cl_fpm_event=>create_by_id( zpa_os_org_struc_flex_n_assist=>c_island_nav_up_requested ).
      lo_event->mo_event_data->set_value(
               iv_key = zpa_os_org_struc_flex_n_assist=>c_node_selected_for_nav
               iv_value = ls_nav_node ).
      wd_this->ao_fpm->raise_event( lo_event ).
    Then you need to read the event. In the OVERRIDE_EVENT_GAF method you can read the event by referring to
    io_gaf->mo_event
    e.g.
    io_gaf->mo_event_data->get_value( exporting iv_key = zpa_os_org_struc_flex_n_assist=>c_node_selected_for_nav
                                              importing ev_value = ls_node_detail  ).
    let me know if you need any other help/explanation,
    Cheers,
    Chris

  • Call method of interface controller from component controller

    hi,
    I have created one method in the interface controller of a component. Now i have this method along with attributes to the component controller. Now from the component controller i want to call the method of the interface controller. How do i do it???

    Hi,
    You dont need to call the method from the interface controller when you are in the same component.
    You can call the method which is in the component controller.
    Interface controller is used to expose some methods to a different component.
    Ex Comp a want to expose a method which will be used by comp b then  you need the interface controller in comp a.
    Comp b will use comp a as used component
    then it will invoke the methods.
    Regards
    Ayyapparaj

  • Component controller Vs interface controller

    Hi Experts
    Please state me the difference and similarities between the component controller and interface controller
    Regards
    Noel

    Hi
    Similarities between these two is that both are controller but each having different purpose in the application
    Component Controller
    1.Starting point of any application,(you can't create any app without defining any Component)
    2.Master Controller of the complete Component structure (View ,Model ,interface ,window)
    3.If function defined in Component Controller or Custom Controller it is available to any controller within your  component (Interface, View, Custom) but not available outside.
    Interface Controller
      1. To make Contents outside of the world one separate controller called Interface  Controller come into picture
          whose only task is to exposing of the content to outside.
    take further help from following threads
    1.[Component Controller,Custom Controller,interface controller|Component Controller,Custom Controller,interface controller;
    2. [Basic Question regarding component Controller and component interface|Re: Basic Question regarding component Controller and component interface;
    3.[controllers and components|Re: confused with controllers and components.;

  • Need to bind value attributes of Component controller with value attributes

    Hi,
    I am developing a Java Web Dynpro application which is importing RFC Model.

    Hi Kaushik,
    It is very simple to enter values in webdynpro and to update the ztable through RFC
    All you hav to do is
    1. Create the ztable , RFC to import data into that table,
    2. Create the model in webdynpro with that RFC
    3. First map the ModelInputElements to the component controller(say zid, zname) (you can have your own value attribute in component controller say id , name )
    4. Map the attributes to the view where the input field is there
    5. Now write the code as follows,
    Zxxx in = new Zxxx();
    wdContext.nodeZxx_InputElement.bind(in);
    in.setZid(wdcontext.currentContextElement().getId()); // getId component controllers attribute and getZid is model' s mapped attributre
    in.setZname(wdcontext.currentContextElement().getName()); // getName component controllers attribute and getZname is model's mapped attributre
    /* u need not have to map that model attrobute to component attribute for that */
    try
    in.execute();
    Catch(Eception e)
    e.printStackTrace();
    Regards,
    Sam Charles J.

  • How to get a value of attribute/field From another Component/bol

    Hello
    I have to write some code in Component GS_CM/DocList.
    From 'GS_CM' I have to get a value of field attribute-STATUS_CURRENT
    From BT115QH_SLSQ/Details
    Context Node = BTSTATUSH
    Attributes = STATUS_CURRENT
    In order to check and enable some other functions.
    I know how to do it when I'm in the BT115QH_SLSQ/Details
    lr_status ?= typed_context->btstatush->collection_wrapper->get_current( ).
    lv_statush = lr_status->get_property_as_string( iv_attr_name = 'STATUS_CURRENT' ).
    But, in my Componenet GS_CM/DocList  the field  "BTSTATUSH->COLLECTION_WRAPPER->GET_CURRENT" is unknown. It is not contained in one of the specified tables nor is it defined .
    would be very grateful if you could help to solve this issue.
    Thanks In Advance
    Sima

    Hi Sima,
    then another short hint to the WD_USAGE_INITIALIZE.
    Go to the component workbench, open the component BT115QH_SLSQ. Go now to the component controller class, go to it's methods. You will see that in the coding of the Method WD_USAGE_INITIALIZE, on the class CL_BT115QH__BSPWDCOMPONEN_IMPL:
    WHEN 'CUGSCM' OR 'CUGSCM_DET'.
          CALL METHOD iv_usage->bind_context_node
            EXPORTING
              iv_controller_type  = cl_bsp_wd_controller=>co_type_custom
    "          iv_name             = 'ContentManagementCuCo'     "Custom Controller Name
              iv_name             = 'BT115QH_SLSQ/CUGSCMGenCuCo'     "Custom Controller Name
              iv_target_node_name = 'CMBO'      "Name of Node in this Custom Controller
              iv_node_2_bind      = 'CMBUSOBJ'. "Name of Node in used component GS_CM
          CALL METHOD iv_usage->bind_context_node
            EXPORTING
              iv_controller_type  = cl_bsp_wd_controller=>co_type_custom
              iv_name             = 'BT115QH_SLSQ/CUGSCMGenCuCo'"#EC NOTEXT
              iv_target_node_name = 'ATTRIBUTES'                "#EC NOTEXT
              iv_node_2_bind      = 'ATTRIBUTES'.               "#EC NOTEXT
    Now I checked the context on the component controller and it contains the statusH, the node which you want to use in the component GS_CM. So make sure to prepare the GS_CM component by adding the Status context, and afterwards just add the binding in the code I pointed out above.
    Best regards,
    Erika

Maybe you are looking for

  • Why does a black triangle appear instead of landscape photos from a shared library

    We have an iMac using OSX10.7.5 and running iPhoto 11 v9.4.1.  There are 2 users of the iMac with separate logins.  We have an iPhoto library that is user 1 administers and imports photos to, edits photos etc.  User 1 can access and see all photos wi

  • Clip Within Multiclip Has Out of Sync Audio

    I'm editing a 45 minute multiclip with 3 synchronized camera angles and one of the angles started to slip out of sync about halfway through whenever I'd click on it in the timeline. It started out okay and it's only that one angle, the other two are

  • No way to bring keyboard up in Notes

    I use this program sometimes to keep a log of my dreams as soon as I wake up, and it's very frustrating trying to go back and change a typo. If you hold too long and use the magnifying glass it goes straight to select or select all, no keyboard pops

  • Mac Pro (2006) experiencing kernel crashes - HALP!

    Hello - I'm starting to get these blood-curdling crashes on my 2006 Mac Pro every few days, and it's really starting to worry me. Here's the last panic report that came up; can anyone tell me what information it has to offer about the problem? Also,

  • Error message/Won't uninstall iTunes

    Hi, Whenever I plug-in my iPod the the USB connector my iTunes displays a message, "The software required for communicating with the iPod is not not installed correctly. Please reinstall iTunes to install the iPod's software." But when I try to unins