How to get the reference of the View controller in from Custome controller

Hi friends,
From one of the Custome controllers in my Component,I am raising a popup based on conditions.
I want to subscribe to popup buttons.
Following is the code that I have written.
IF LT_RECEIPTS_T[] IS not INITIAL.
    data lo_window_manager type ref to if_wd_window_manager.
    data lo_api_component  type ref to if_wd_component.
    data lo_window         type ref to if_wd_window.
*BREAK-POINT.
    lo_api_component  = wd_comp_controller->wd_get_api( ).
    lo_window_manager = lo_api_component->get_window_manager( ).
    lo_window         = lo_window_manager->create_window(
                       window_name            = 'W_PERSONALCARDPOPUP'
                       message_display_mode   = if_wd_window=>co_msg_display_mode_selected
                       button_kind            = if_wd_window=>co_buttons_okcancel
                       message_type           = if_wd_window=>co_msg_type_none ).
    lo_window->open( ).
    DATA: view_controller TYPE REF TO if_wd_view_controller.
    view_controller = wd_this->wd_get_api( ).
    CALL METHOD lo_window->subscribe_to_button_event
      EXPORTING
        button      = if_wd_window=>co_button_ok
        action_name = 'OK'
        action_view = view_controller.
as I am In Custome controller,wd_get_api is returing of type if_wd_controller,but the subscribe_to_button_event
requires action_view of data type if_wd_view_controller.
but,my problem is that I can keep the view only Custome controller.
when I pass the 'VIEW_CONTROLLER' variable to method subscribe_to_button_event,I am getting the error  as type missmatch.
Please suggest how I can rectify this error.
Regards,
Xavier.P

Hi Xavier,
You try this
1. Define an attribute in your custom controller to hold your popup window reference for e.g lr_popup of type if_wd_window
2. Store the popup window reference in lr_popup when calling your popup
lo_api_component = wd_comp_controller->wd_get_api( ).
          lo_window_manager = lo_api_component->get_window_manager( ).
          wd_this->lr_popup = lo_window_manager->create_window(
                          window_name = 'W_PERSONALCARDPOPUP'
                          message_display_mode = if_wd_window=>co_msg_display_mode_selected
                          button_kind = if_wd_window=>co_buttons_okcancel
                          message_type = if_wd_window=>co_msg_type_none ).
         wd_this->lr_popup->open( ).
3. Define the custom controller usage in the properties of your popup view
4. In WDDOINIT of your popup view write the following
DATA lr_custom_controller TYPE REF TO ig_<Custom Controller>.
        lr_custom_controller = wd_this->get_<Custom Controller>_ctr( );
        lr_custom_controller->lr_popup->subscribe_to_button_event(
     button = if_wd_window=>co_button_ok
     action_name = 'OK'
     action_view = wd_this->wd_get_api( ) ).
5. Define the event handler for OK in your popup view
Best Regards,
Loveline

Similar Messages

  • How to get the view link definition from the view link accessor

    Hi,
    I am using Jdev 10.1.3 and ADF BC. I am trying to do deep copy in a master/details view, after the new child record is created, I want to update the foreign key attribute. I know I can get the list of attribute definitions from the row in the view object, which include the view link accessors, I am wondering if I can get the view link definition from the view link accessors, so that I can get the source and destination attribute names.
    Thanks!

    Hi,
    you should get this through
    ViewObject vo = this.findViewObject("LocationsView1");
    int indx = vo.getAttributeIndexOf("DepartmentsView");
    ViewAttributeDefImpl vAttrDefImpl = (ViewAttributeDefImpl) vo.getAttributeDef(indx);
    ViewLinkDefImpl vdefImpl = (ViewLinkDefImpl) vAttrDefImpl.findViewLinkDefImpl();
    Note that this code starts from the ApplicationModuleImpl class, which is why I used this.findViewObject().
    Frank

  • How to get the view Object in UserDefined Action

    Hi  All,
       Any body tell me how to get the view object , like the view object avilable in the wdDoModifyView() method as parameter.
    I have requirement like, i want to change the , no of rows displaying in the table should be changed at the runtime based onthe no of rows  selected in the dropdown box.
    The action which i created will be assigned to that dropdown box, on select of the available option, i will get the view object and change the properties of the "maxrows" of the table .
    so for getting the view object in the  the Action methods tell me what is the procedure for getting the current view object.

    Hello Vishal,
    Simply create a value attribute (say rowCount) of type 'integer' and bind it to the 'visibleRowCount' property of your table. Then, in the actionHandler get the value from the UI element (in your case, I guess it is drop down) and set it to the attribute 'rowCount' like this.
    wdContext.currentContextElement.setRowCount(
        wdContext.current<nodeElement>.set<AttributeBound toDropDown>);
    Bala

  • How to get the backup of photos from  i cloud id ?

    plz provide me the answers as soon as possible.

    BALAJI_PRASANNA wrote:
    Hello,
    I am very new to Labview. Í have an image of an LED and wanted to find the luminance value. I got the luminance image from the IMAQ ExtractSingleColorPlane but the value is not displaying. I just wanted to know how to get the value of luminance from the IMAQ ExtractSingleColorPlane. I have attached what i have done below.
    Thanks in advance.
    Before learning about LabVIEW, learn about images.  An Image (in LabVIEW) is a "representation of an image", that is, the wire itself doesn't really have a "value", but "points to" a collection of data that can be "imaged" (i.e. looked at as through it were a picture), "manipulated" (for example, extracting a color plane, basically getting the "red channel", an image looking as through it were viewed through a red filter), and possibly returning arrays of numbers representing the intensity of the light at a certain position in the picture.  
    BS

  • I would like to know how to get the unrestricted quantity excluding actual customer ordr quantities on a given group of items?

    I would like to know how to get the unrestricted quantity excluding actual customer ordr quantities on a given group of items?

    Hi , Welcome to the HP Forums!
    It is a terrific place to find answers and tips!
    For you to have the best experience in the HP forum I would like to direct your attention to the HP Forums Guide.Learn How to Post and More I grasp you would like to replace the keyboard and would like the part number and where to purchase one. Here is a link to the HP Pavilion 17 Notebook PC HP Pavilion 15 Notebook PC Maintenance and Service Guide .  Please note chapter 3, page 20, item 2 for the replacement keyboard part numbers. You stated you were having a difficulty locating where to purchase the part.  Here is a link to  HP Notebook PCs - Ordering HP Certified Replacement Parts for your convenience. You can also try a Google search with the part number for other vendors that may have one.   To say thanks for replying please click the thumbs up icon below. If this has addressed your query please choose solution provided to help other people locate this information.   Best of Luck!

  • How to get the default selection color from JTable

    Hi, there,
    I have a question for how to get the default selection color from JTable. I am currently implementing the customized table cell renderer, but I do want to set the selection color in the table exactly the same of default table cell renderer. The JTable.getSelectionBackgroup() did not works for me, it returned dark blue which made the text in the table unreadable. Anyone know how to get the window's default selection color?
    Thanks,
    -Jenny

    The windows default selection color is dark blue. Try selecting any text on this page. The difference is that the text gets changed to a white font so you can actually see the text.
    If you don't like the default colors that Java uses then use the UIManager to change the defaults. The following program shows all the properties controlled by the UIManager:
    http://www.discoverteenergy.com/files/ShowUIDefaults.java
    Any of the properties can be changed for the entire application by using:
    UIManager.put( "propertyName", value );

  • Anyone knows how to get the photos after IMG_9999 from iphone? :-(ps:... i got them all in my camera roll but when i connected to the computer there's nothing after IMG_9999..

    anyone knows how to get the photos after IMG_9999 from iphone? :-(ps:... i got them all in my camera roll but when i connected to the computer there's nothing after IMG_9999.. many thanks :-)

    They show in the camera roll, just not your computer?
    Have you checked every folder that is in the DCIM folder?

  • How to Get the excel sheet formula from the server side into the j2me app?

    How to Get the excel sheet formula from the server side into the j2me application?
    Here the excel sheet is in server side.i want to do get the excel sheet values (only some part of the excel sheet based on some conditions) from server side into j2me.In j2me I want to done some client side validation based on the formula of excel sheet.Then i resend the new updated data to the server.
    But here deosn't know any mehtod to get the excel sheet formula from server side.So kindly help me to get the excel sheet formula from the server.
    So how to get the excel sheet formula frome the server side into j2me Application...
    Plz guide me to solve this issue...
    thanks & regards, Sivakumar.J

    You should not post a thread more than once. You've crossposted this question to another forum. I have deleted that one.

  • How to get the failover partner name from C++ client

    Hi All,
    I have configured the mirroring session for my application.
    I want to modify the connection string with failover partner name.
    Could any one please let me to know how to get the failover partner instance from C++ client dynamically.
    Thanks,
    Prasad.

    Are you looking for this?
    http://www.connectionstrings.com/sql-server-2012/
    http://stackoverflow.com/questions/25534972/auto-failover-multiple-connections-to-mirror-database-when-principal-goes-down

  • How to get the Portal Page name from PLSQL?

    Can anyone tell me how to get the portal page name from my dynamic page using plsql?
    Apparently you can get the page id and work it out from there, but my calls to get the page id are not returning any values anyway.
    My code for attempting to get the page id is below.
    <oracle>
    declare
    v_pageid varchar2(30);
    begin
    v_pageid := wwpro_api_parameters.get_value('_pageid', '/pls/portal30');
    htp.print('Page is '|| v_pageid);
    end;
    </oracle>
    Ideally I'd actually just like to get the page name. Is there a straightforward way to do this?
    Thanks in advance!
    Sarah

    Few clarifications -
    1. wwpro_api_parameters cannot be used to get default portal
    page parameters such as '_pageid', '_dad', '_schema' etc.,
    2. Page information can be obtained through any components which
    are available in that particular page. For example, in case of
    dynamic page, we need to publish it as a portlet and add it to the
    page. This process creates necessary packages in the DB, but we
    will not have access to the portlet methods.
    So, I would prefer creating a simple DB provider & portlet and access
    page title from its show method as follows -
    //Declare local variable l_page_id, l_page_title as varchar2
    select page_id into l_page_id from wwpob_portlet_instance$ where
    portlet_id = p_portlet_record.portlet_id and
    provider_id = p_portlet_record.provider_id;
    select name into l_page_title from wwpob_page$ where id=l_page_id;
    More information on DB provider can be found at
    http://portalstudio.oracle.com/pls/ops/docs/FOLDER/COMMUNITY/PDK/articles/understanding.database.providers.html
    Secondly, usage of wwpro_api_parameters.get_value method is
    incorrect. This method expects two arguments -
    <ul>
    <li><b>p_name : </b> The name of the parameter to be returned.</li>
    <li><b>p_reference_path : </b> An unique identifier for a portlet instance on the current page.</li>
    </ul>
    p_reference_path would be something like 99_SNOOP_PORTLET_76535103 and not some type of path as its name suggests.
    The following code fragment fetches all parameters available
    for a portlet.
    Note : Copy this code into 'show' method of your portlet.
    //Declare l_names, l_values as owa.vc_arr
    * Retreive all of the names of parameters for this portlet
    l_names := wwpro_api_parameters.get_names(
    p_reference_path=>p_portlet_record.reference_path);
    * Retreive all of the values of parameters for this portlet
    l_values := wwpro_api_parameters.get_values(p_names=>l_names,
    p_reference_path=>p_portlet_record.reference_path);
    //Loop through these arrays to get parameter information
    htp.p('<center><table BORDER COLS=2 WIDTH="90%" >');
    htp.p('<tr ALIGN=LEFT VALIGN=TOP>');
    htp.tableData(wwui_api_portlet.portlet_heading('Name',1));
    htp.tableData(wwui_api_portlet.portlet_heading('Value',1));
    htp.tableRowClose;
    if l_names.count = 0 then
    htp.p('<tr ALIGN=LEFT VALIGN=TOP>');
    htp.p('<td COLSPAN="2">'
    ||wwui_api_portlet.portlet_text(
    'No portlet parameters were passed on the URL.',1)
    ||'</td>');
    htp.tableRowClose;
    else
    for i in 1..l_names.count loop
    htp.p('<tr ALIGN=LEFT VALIGN=TOP>');
    htp.tableData(l_names(i));
    htp.tableData(l_values(i));
    htp.tableRowClose;
    end loop;
    end if;
    htp.p('</table></center>');
    Hope it helps...
    -aMJAD.

  • How to get the byte[] size dynamically from the StreamMessage object

    Hi all,
    Using JMS, I am receiving the FDF file as StreamMessage from the queue and attaching it to the PDF file which is present in the local system.
    For that, I have written the code as follows:
    {color:#0000ff} Message msg = jmsTemplate.receive();
    if(msg !=null && msg instanceof StreamMessage)
    StreamMessage message = (StreamMessage) msg;{color}
    {color:#ff6600}//hardcoded the byte array size value
    {color}{color:#0000ff} byte[] bytes = new byte[{color:#ff0000}856{color}];
    System.out.println("read msg="+message.readBytes(bytes));{color}
    {color:#0000ff}PdfReader pdfreader = new PdfReader("D:\\Managing_Workflows_No_Comment.pdf");
    PdfStamper stamp = new PdfStamper(pdfreader, new FileOutputStream("D:\\12345.pdf"));
    FdfReader fdfreader = new FdfReader(bytes);
    stamp.addComments(fdfreader);
    {color} {color:#0000ff} stamp.close();
    {color}{color:#000000}The above code is working fine except with the hardcoded of {color:#ff0000}byte array{color}{color:#ff0000} size value{color} which is given in {color:#ff0000}RED{color} in color.
    Can anybody know, {color:#000000}*how to get the byte[] size dynamically from the StreamMessage*{color} object ?
    Any help would be highly beneficial for me !!!!
    Thanks and Regards,
    Ganesh Kumar{color}

    When you create your stream message you could add an property to your message, something like streamSize that would contain the number of bytes in your stream message. Then you could get this property from the message before declaring your array.
    Tom

  • How to get the View for a particular Document position?

    Hi there,
    Does anyone know how to get the "deepest" View that is responsible for rendering a particular Document offset?
    I tried looking at modelToView() and some other methods, but I am lost.
    Can anyone please help me?
    Thanks,
    Swati

    Bart--
    To find the table cell of the insertion point, you could use something like:
    InterfacePtr<ITextStoryThread> storythreadp(txtModel->QueryStoryThread(startPos + 1));
    InterfacePtr<ICellContent> cellcontentp(storythreadp, UseDefaultIID());
    if (! cellcontentp) {
      // Not a table cell, so see if it's the primary thread (kTextStoryBoss/ITextModel).
      InterfacePtr<ITextModel> threadmodelp(storythreadp, UseDefaultIID());
      if (threadmodelp) {
        // It's the primary thread...
      else {
        // It's something else with an ITextStoryThread (note, footnote, etc.).
    else {
      // The insertion point's in a table cell (kTextCellContentBoss).
      InterfacePtr<ITableModel> tableModel(cellcontentp->GetTableModel(), UseDefaultIID());
      GridID gridID(cellcontentp->GetGridID());
      GridAddress gridLoc(cellcontentp->GetGridAddress());
      // ...and so on.
    Hope this helps get you where you want to go.
    Chris Roueche / Freelance Developer

  • Java3D - how to get the viewing frustum coordinates

    Hi all!
    I am so desperate to find out how to retrieve the viewing frustum (truncated pyramid) coordinates (xyz) in Java3D.
    Please let me know. I checked the API docs but no luck.
    I am sure there must be some way (or method) of extracting these (xyz) coodrinates from this frustum.
    Thanks!

    firstly I humbly admit I am not that familiar with openGL so I dont know what those functions are doing ..but still I might be missing what is it you are looking for...u saying "to get xyz" coordinates of truncated pyramid ... u need 8 points (depending on the way you wanna calculate it)to create viewing frustum so which one u looking for? ....btw there is a viewing frustum method to get points but unfortunately due to j3d setup by the time u get them using that method 2 frames will go by .... so
    View view = viewer.getView();
    double point1 = view.getBackClipDistance() * SOME_CONSTANT;
    double point2 = view.getFrontClipDistance();
    double point3 = view.getFieldOfView();
    double point4 = (double) view.getCanvas3D(0).getWidth() /
    (double) view.getCanvas3D(0).getHeight();
    double point5 = Math.tan(point3 / SOME_CONSTANT) * point2;
    double point6 = point5 / point4;
    double point7 = (point5 / point1) * point1;
    double point8 = point7 / point4;
    now just just normals and u can setup up your 6 planes of the view frustum ...

  • How to get the view tree from a jsp page

    Hi,
    I would like to get the view tree of a jsp page. The idea is to dynamically include the content of one or more jsf pages into a UIPanel during a "value changed" event.
    So, i could get from an arbitrary page like ...
    <%@ taglib uri="http://java.sun.com/jsf/core"   prefix="f" %>
    <%@ taglib uri="http://java.sun.com/jsf/html"   prefix="h" %>
    <h:panelGrid columns="3" width="100%" rowClasses="gridTop">
        <h:outputText value="#{someBean.someValue}"/>
    </h:panelGrid>... the corresponding List of components...
    Any idea?

    Thanks for your answer Jayashri,
    The view tree can be retrieved by this way during the page is parsed, for example with scriptlets <%%>, or once the page has been parsed (the view has been builded and attached to the FacesContext).
    My problem is to get the view tree of a page from another Context.
    The idea is to build a dynamic layout of some pages that represents "views". I can imagine this like the concept of perspectives and views of Eclipse IDE.
    Because of the difficulty to build it with pure JSP (cannot use dynamic ID nor JSTL ForEach), I try to build it into my backing bean and to bind it with a <h:panelGrid/>. By this way, I'm not able to use the <jsp:include/> tag as I usually did to include some content into the view tree.
    Sorry for my english ;)
    - Renaud.

  • How to get the Newly added fileds from Oracle to BW

    Hi ,
    We have created the view in the DB side and extracted the data to BW side. After that in the DB side they have added new filed. I want to extract the data for that filed also. But that filed is not displaying in the data source itself. We have deleted the sources system assignment to that particular info source and generated the data source in the source system side, and then also I an unable to get the newly added filed in the data source. We are extracting the data from the ORACLE data base. Please let me know the steps how to get the newly added filed in the data source.
    Thanks,
    Visu

    Hi Yadav,
    yes i have alreday created the info objects in the BW side. In the Oracle DB i can see the fileds in the data sources. Newly added filed is not displaying where as previous all fileds are displaying in the oracle DBside.
    Thanks,
    Visu

  • How to get the XML Source again from the same RDF ???

    If the one new column is added in the .rdf file, then how u create your new XML source by submitting the same cp?
    When I ran the cp for 1st time, I was able to get xml source by view output, save it, make rtf and make data defn and template creation.
    But how to get the XML source If the one new column is added in the same .rdf file?
    Thanks
    Ud.

    The simple answer is: you don't.
    Not only is it simply not possible, but the entire concept of "the active browser" doesn't exist.
    You were on the right track with your code to retrieve the page directly from the server, but as you noticed that code will only work for regular http connections.
    For https and other protocols you will need to use appropriate libraries for each protocol. Something like Apache Commons can help you with that. There are networking libraries in there for a lot of commonly used protocols.

Maybe you are looking for

  • Compare Sting with Bind Variable

    Hi I have a Query like this select tsk.name from table.name where upper(tsk.name) like upper(:be) here in :be i may enter stings like 'Design', 'Design-Review','Design-Rework' i need to check only for the string 'Design' please let me know to compate

  • In bdc po line items

    hi friends, i take header table (ekko) one seperate internal table. and item data(ekpo) one seperate table. iam not taken commen fields in both tables. iam getting data from .txt file all header data and item data into one file internal table. iam al

  • Excel.exe is still there in the Memory

    Hi I am creating an excel object using asp.net Though I am closing the objects and marshalling the excel object there still displays a excel.exe process in the memory... If I am running my application 50 times , say..I have 50 Excel.exe reference in

  • Poor Image quality of photos that are loaded into imovie 09 for slideshows

    I've been scouring through the topics on the subject and cannot seem to find a definitive answer. I use imovie primarily to make photo slideshows mainly for my wedding photography. imovie HD (the 06 version) was/is fantastic. imovie 09 however seems

  • Menus are not appearing in DRM

    Hi, I am facing some unknown issue but I am not able to see any menus in DRM. Please someone can help. Thanks,