How to reuse popup component?

Hi,
I have a <af:popup> defined in my jspx page which will show up when mouse over the last column in the table. This mouse over popup shows standard information like "Created By", "Creation Date", "Last Updated By", "Last Updated Date". Hence, many other UI pages have the same requirement. So my question is how can reuse this popup component? Currently, its codes in embedded in the jspx page. Here is a code snipplet in the jspx:
<af:table>
<af:column sortable="false" headerText="Std Info"
id="c16">
<af:image source="/images/activity_status.gif"
id="i1">
<af:clientAttribute name="createdBy"
value="#{row.bindings.CreatedByUser.inputValue}"/>
<af:clientAttribute name="creationDate"
value="#{row.bindings.CreationDate.inputValue}"/>
<af:clientAttribute name="lastUpdatedByUser"
value="#{row.bindings.LastUpdatedByUser.inputValue}"/>
<af:clientAttribute name="lastUpdatedDate"
value="#{row.bindings.LastUpdatedDate.inputValue}"/>
<af:showPopupBehavior popupId=":::p1"
triggerType="mouseOver"
align="endAfter"/>
</af:image>
</af:column>
</af:table>
*<af:popup id="p1" contentDelivery="lazyUncached"*
launcherVar="source" eventContext="launcher">
*<af:panelFormLayout id="pfl1">*
*<f:facet name="footer"/>*
*<af:panelLabelAndMessage label="Created By" id="plam1">*
*<af:outputText value="#{viewScope.createdBy}" id="ot2"/>*
*</af:panelLabelAndMessage>*
*<af:panelLabelAndMessage label="Creation Date" id="plam2">*
*<af:outputText value="#{viewScope.creationDate}"*
id="ot3"/>
*</af:panelLabelAndMessage>*
*<af:panelLabelAndMessage label="Last Updated By"*
id="plam3">
*<af:outputText value="#{viewScope.lastUpdatedByUser}"*
id="ot4"/>
*</af:panelLabelAndMessage>*
*<af:panelLabelAndMessage label="Last Updated Date"*
id="plam4">
*<af:outputText value="#{viewScope.lastUpdatedDate}"*
id="ot5"/>
*</af:panelLabelAndMessage>*
*</af:panelFormLayout>*
*<af:setPropertyListener from="#{source.attributes.createdBy}"*
*to="#{viewScope.createdBy}"*
*type="popupFetch"/>*
*<af:setPropertyListener from="#{source.attributes.creationDate}"*
*to="#{viewScope.creationDate}"*
*type="popupFetch"/>*
*<af:setPropertyListener from="#{source.attributes.lastUpdatedByUser}"*
*to="#{viewScope.lastUpdatedByUser}"*
*type="popupFetch"/>*
*<af:setPropertyListener from="#{source.attributes.lastUpdatedDate}"*
*to="#{viewScope.lastUpdatedDate}"*
*type="popupFetch"/>*
*</af:popup>*
Thanks.
-Mina

You can try this too..
have a popup in a seperate jspx like popup.jspx.
<af:popup binding="#{backingBeanScope.backing_popup.p1}" id="p1">
I could open that popup in another jspx page by using subview.
<f:subview id="popupView">
<jsp:include page="/popup.jspx"/>
</f:subview>
Within command button:
<af:showPopupBehavior popupId="popupView:p1"/>

Similar Messages

  • How to reuse GS_CM component?

    Hi All,
    My requirement is to add an additional Attachment(GS_CM Component) to the Grantor Application Transaction.
    The Grantor Application already has an Attahcment View(Standard) and the documents are uploaded against Business Object BUS2000270.
    I was able to define the GS_CM Component under Component Usage and the Attachment Window is getting displayed. But the 'Upload' buttons are disabled.  How do I upload documents against our own Business Object say 'ZBUS200270'.
    Is  this possible? If so how do I go about it?
    Regards,
    Joseph

    You can try this too..
    have a popup in a seperate jspx like popup.jspx.
    <af:popup binding="#{backingBeanScope.backing_popup.p1}" id="p1">
    I could open that popup in another jspx page by using subview.
    <f:subview id="popupView">
    <jsp:include page="/popup.jspx"/>
    </f:subview>
    Within command button:
    <af:showPopupBehavior popupId="popupView:p1"/>

  • Invoking popup component programmatically

    Hi
    I am invoking popup component programmatically for that
    i have a link
    i have added a popup componet inside the af|form (for eg:popup id=p3) and bind the popup to a managed bean with name popup
    In the Action property of my commandlink, i have invoked a method in the managed bean( for eg.the method caller() )
    In my bean class i have used:-
    public class classname{
    private RichPopup popup;
    public void setPopup(RichPopup popup) {
    this.popup = popup;
    public RichPopup getPopup() {
    return popup;
    public String caller() {
    showPopup(popup, null);
    return null;
    public static void showPopup(RichPopup popup, UIComponent component) {
    FacesContext context = FacesContext.getCurrentInstance();
    String alignId = (component==null) ? null : component.getClientId(context);
    StringBuilder script = new StringBuilder();
    script.append("var popup = AdfPage.PAGE.findComponent('").append("p3").append("'); ")
    .append("if (!popup.isPopupVisible()) { ")
    .append("var hints = {}; ");
    if (alignId!=null) {
    script.append("hints[AdfRichPopup.HINT_ALIGN_ID] = '").append(alignId).append("'; ")
    .append("hints[AdfRichPopup.HINT_ALIGN] = AdfRichPopup.ALIGN_AFTER_END; ");
    script.append("popup.show(hints);}");
    ExtendedRenderKitService erks = Service.getService(context.getRenderKit(), ExtendedRenderKitService.class);
    erks.addScript(context, script.toString());
    But in my page when i clicked the link it doesnot invoke the popup component....
    am i missing with something......... please help
    Thanks
    sudeep

    yeah i even tried to call the "showPopup(popup, null);" from the actionlistener of the commandlink but no invoke........
    as u suggested http://ifelix.blogspot.com/2010/11/how-to-invoke-popup-component.html i followed this ........
    and my jsff
    <af:column sortProperty="contractFileName" sortable="false" id="c10"
    headerText="Contract File Name" width="166">
    <af:commandLink text="#{row.bindings.contractFileName.inputValue}"
    id="cl2" partialSubmit="true"
    actionListener="#{selContractName.OnClickOfContract}"
    binding="#{selContractName.conName}"
    action="#{selContractName.caller}">
    </af:commandLink>
    </af:column>
    Edited by: SKD on Sep 12, 2011 7:02 PM

  • F2 on Popups? (Or how to get the Component if F2 is not working)

    Hello Experts,
    I wonder if somebody has a tip how to get the component of popups?
    The F2 Help is not working there.
    The Popup I'm actually looking at is called by a button. Is it possible to find out the called component by looking at the button Event? (I have tried - but the source does not tell me any component)
    Thanks for answers...
    Regards
    Chris

    Chris,
    F2 should definitely work if it is a UI component.
    You see pop ups on button clicks and F4 value helps. F2 should work in these cases.
    For some attributes with F4 help, a DDIC search help is attached. Here F2 does not work.
    Anyhow to find out which component it is calling, you use this method
    check in the event handler(for button pop ups) or in the outbound plugs specifies in GET_V method(for F4 pop ups) if there is a code like
    CALL METHOD comp_controller->window_manager->create_popup etc.,
    A Component Usage will be passed to the method. You can check for the component usage in the Run Time Repository.
    You will get the component details.
    Regards,
    Masood Imrani S.

  • How to display the Component view in the Pop up

    HI.
    I created one Z Component.
    In that i put one Button name as a POPUP.
    when i press that Button i want open an another component View or Same Component another View.
    How it is possible.
    I am writing the code in Event Handler.
    CALL METHOD COMP_CONTROLLER->IF_BSP_WD_WINDOW_MANAGER~CREATE_POPUP
      EXPORTING
        IV_INTERFACE_VIEW_NAME = 'ZKRI_NAVIGATION/DetailsOV' 
        IV_USAGE_NAME          =  'ConfigStdAlone'
        IV_TITLE               = 'Hello'
      RECEIVING
        RV_RESULT              =  confirm_popup.
    confirm_popup->set_on_close_event( iv_event_name = 'POPUP_CLOSED' iv_view = me ).
      confirm_popup->open( ).
    But i did not get the Popup with the view.
    How it is possible. Please expalin how to call another view in pop up with in the Same Component.
    How to call another component view

    Hi,
    Did you create a component usage of the Z component in the Run time Repository ?
    You can look into any of the standard fields with an F4 help for sample code..like Business Partner etc.,
    Regards,
    Masood Imrani S.
    Edited by: Masood Imrani on May 12, 2009 4:23 PM

  • JDeveloper 11.1.2.3 on glassfish 3.1.x: problem with popup component

    Hi
    How does pop up component works in JDeveloper 11.1.2.3 - adf essentials?
    This is the sample code what me trying and no pop-up comes up.
    <af:commandButton text="popuptest" useWindow="true" id="cb10">
    <af:showPopupBehavior popupId="testpopup" triggerType="click"/>
    </af:commandButton>
    <af:popup id="testpopup" >
    <af:commandButton text="popupbuttontest" id="cb9"/>
    </af:popup>
    Can anyone please advice how to go about with pop-up component.
    Thanks

    Hi All
    Any help would be appreciated.
    The pop-ups are not working.
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document title="main.jsf" id="d1">
    <af:form id="f1">
    <af:commandButton text="commandButton 1" id="cb1" useWindow="true" partialSubmit="true">
    <af:showPopupBehavior popupId="p1"/>
    </af:commandButton>
    <af:popup childCreation="deferred" autoCancel="disabled" id="p1">
    <af:commandButton text="commandButton 2" id="cb2"/>
    </af:popup>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>
    Does css or any custom components in the project can create this problem?
    Thanks
    Edited by: 982693 on Jan 24, 2013 11:39 PM

  • Tomahawk popup component problem

    How can i rewrite popup component or write my custom component for renders a popup which displays on not a mouse event - i need by button click event. Anybody can help me ?
    Thnx

    I was use <jp:popupBox> and put into <t:dataTable> which has <h:inputText> and <h:selectBooleanCheckbox> in rows - they are not save value, they set null in my Bean. I am reading about it in forums look at that
    http://www.mail-archive.com/[email protected]/msg18007.html in this post talking about jenia problem (" I just got a response on the Jenia forum. It currently isn't possible
    to put an input box in a popup box, but it is being worked on.")

  • Trying to create a popup component

    I'm creating a DataChoiser component that looks like edit field along with button to popup date choiser panel. This panel is wery simple, but my problem in this:
    When I'm trying to popup my panel it seems to be right, but panel don't hides when I'm clicking anywhere else not in this panel, but I need this.
    Here is code that shows popup panel, it's wery short and I hope you can help me with this.
    DateChoiserPnl pnl = new DateChoiserPnl();
         // Calculating coords of popup component to be shown
         Point myLoc = getLocationOnScreen();
         int myWidth = getWidth();
         int myHeight = dateTxt.getHeight();
         Dimension pnlSize = pnl.getPreferredSize();
         int x = myLoc.x + myWidth - pnlSize.width;
         int y = myLoc.y + myHeight;
         if (popup != null) {
         popup.hide();
         popup = null;
         popup = pupFact.getPopup(this.getParent(), pnl, x, y);
         popup.show();
    pupFact is object of type PopupFactory and popup is object of type Popup
    Oleg

    I have new question here, maybe somebody knows this: when I'm adding new FocusListener to my popup panel it doesn't fire focusLost to my listener, maybe it's problem of panel? Then how can I figure out when my panel losts focus?

  • How to close PopUp (from taskflow region)???

    Can someone, please, explain how to solve this use-case:
    I have PopUp in which I put a region (in which is a small TaskFlow consiting of 2 JSFFs). I want to have Cancel and OK buttons in both JSFFs in TaskFlow. How to close PopUp from within TaskFlow ??? I saw the TaskFlow Return component in ADF TaskFlow diagram components (in palette) but haven't found any help/documentation on it. Or, should I use Return listener on command button used to rise popup (but, still, how to close popup from taskflow?)?
    Any help would be great!
    Thanks in advance,
    Marko

    mimarko,
    Regions/Taskflows are meant to be isolated reusable components. They are not meant to
    have knowledge of their parent or container. That said, code contained with in a region should not attempt to reach out an modify the parent. Regions can fire contextual events that can be handled by a listener declared in the parent pages pageDef. However, attempting to close a popup from a context listener would be bad practice. The easiest fixt is to put the popup in the taskflow for your region. That will create a reusable popup that you can use through out your application.
    --Ric                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to construct the component tree in my custom component?Help!

    Hi, i am writing a custom component like this:
    public class HtmlCategory extends HtmlPanelGrid
         public void processRestoreState(javax.faces.context.FacesContext context,
                java.lang.Object state)
              setColumns(1);
              HtmlCommandLink link=new HtmlCommandLink();
              link.setValue("Let's Bingo");
              MyUtil.setActionListener(context,link,"#{temp.mytest}");
              UIParameter param=new UIParameter();
              param.setName("name");
              param.setValue("Robin!");
              link.getChildren().add(param);
              param.setParent(link);
              getChildren().add(link);
              link.setParent(this);
              super.processRestoreState(context,state);
    }         you see, i want to construct the compont tree at Restore View phase this way,because the structure of the component tree will always be the same, so i don't the user to write extra code.
    But the children of the component are not rendered,the renderer of the HtmlCategory component just extends the HtmlGridRenderer(myfaces) directly,and always calls the "super" methods in the encode methods of the renderer.
    I got a message from the console:
    Wrong columns attribute for PanelGrid id0:id4: -2147483648
    but i have set the columns attribute in the code above, so what's happening? or please give some advice about how to render the component tree by myself in Restore View with the tree constructing code in the custom component class code,just lke the code above.
    Best Regards:)
    Robin

    Well, i don't know if i have got my question clear.
    usually, according to the tags you use in the jsf page, a component tree will be created at the Restore View phase,for example:
    <f:form>
      <h:panelGrid ...........>                         
              <h:dataTable ................>
              </h:dataTable>
       </h:panelGrid>
    </f:form>but because i am writing a component for my web app, all the child components and their attributes are not likely to change. so i want to reduce the tags into one custom tag, and construct the component tree internally by myself.But it is not the case of backing bean.So i wrote the the code in the method:
    public void processRestoreState(javax.faces.context.FacesContext context,java.lang.Object state)as it is shown in my orginal message.But it seems that it is not right way to construct my component tree.So where should i put the code that construct the component tree?Overriding the method :
    public void processRestoreState(javax.faces.context.FacesContext context,java.lang.Object state)is not the right way?
    Best Regards:)
    Robin

  • How to show Popup window in OAF on click of a button

    How to show Popup window in OAF on click of a button (Without using Javascript)
    1. I have one OAF page on which i should have button Called "Next"
    2. On clicking of this button a new window/page should be displayed with the image stored in database. on clicking on this "Next" button again next image from the database should be displayed on the newly opened window/page.
    3. Is it possible to configure OAF to render window_II in the opposite screen of window_I where the OAF client resides? (If the OAF-client resides in screen_I render window with image in screen_II). That is, at the first click on the Next-button, window_II appers on screen_II and not some random location. The user will have 2 screen/monitors on his work place.
    4. Given that the two windows reside on each screen, is it possible to make OAF remember the position of window_II ? The goal of this is to force the window to pop up on the same location on the same screen next time the Next-button is pressed.
    5. If window_II is closed (eg. by using X) and the Next-button in window_I is pressed again, will window_II pop up in the same location and screen as previously ?
    6. Is it possible to have a Print-button in window_I what prints the scanned picture in window_II ? Is it possible to have the click on this Print-button to open the standard print dialog on top of window_II ? Could the button be placed in window_II as well, having the same functionality ?

    I have tried to open home page window. You can change the URL according to your requirement.
    import oracle.apps.fnd.framework.webui.OAUrl;
    StringBuffer l_buffer = new StringBuffer();
    l_buffer.append("javascript:mywin = openWindow(top, '");
    String url = "/OA_HTML/OA.jsp?OAFunc=OAHOMEPAGE"; // Calling Oracle Home Page
    OAUrl popupUrl = new OAUrl(url, OAWebBeanConstants.ADD_BREAD_CRUMB_SAVE );
    String strUrl = popupUrl.createURL(pageContext);
    l_buffer.append(strUrl.toString());
    l_buffer.append("', 'lovWindow', {width:750, height:550},false,'dialog',null);");
    pageContext.putJavaScriptFunction("SomeName",l_buffer.toString());
    Above code will open the new page in new window.
    Thanks
    --Anil                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to reuse a jar file in another application

    i have created a jar file.Now i want to reuse this jar file in another java program.Could anyone please guide me with the steps of how to reuse a jar file

    i have created a jar file.Now i want to reuse this
    jar file in another java program.Could anyone please
    guide me with the steps of how to reuse a jar fileput your jar file in class path and import the class which u want to reuse in your code so that u can access all the methods in that class in ur code.

  • How to change material component for a Purchase Order?

    How to change material component for a Purchase Order?
    I need FM .
    PLEASE help

    Dear ,
    Create PO with item category L....There in Item detail you will get tab for material.
    There click in component Button, it will take you to the component screen there you can assign and deassign components.
    Hope this helps.
    Regards
    Utsav

  • How to extract every component in an array?

    Hello everyone!
    Do you know how to extract every component from an array field?
    For example:
    The following is the defination of a table:
    CREATE TABLE test (
    id NUMBER PRIMARY KEY,
    name VARCHAR2(32),
    shape MDSYS.SDO_GEOMETRY
    And then I insert a new record:
    INSERT INTO test VALUES(
    1,'first',
    MDSYS.SDO_GEOMETRY(
    2003,
    NULL,
    NULL,
    MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),
    MDSYS.SDO_ORDINATE_ARRAY(1,1, 5,7)
    The Question is I want to read the every component (for example 1,1,5,7) in the sdo_ordinate_array one by one. Who knows how to write the SQL?
    I have tried "select a.shape.sdo_ordinates(1) from test a". But it can't work.
    Thank you very much!

    One solution is to read each ordinate from a cursor ina SQL block. Here is an example:
    set serveroutput on
    SET serveroutput on SIZE 1000000
    set concat on
    DEFINE layername = 'LAYER';
    DEFINE geomcolname = 'GEOM';
    DECLARE
    id varchar2(10);
    longitude number;
    latitude number;
    logmile number;
    i number;
    theLayer varchar2(32);
    theGeomCol varchar2(32);
    BEGIN
    FOR rec IN (SELECT ROWID, id, &geomcolname FROM &layername ) LOOP
    id := rec.id;
    i := 1;
    while i < rec.geom.sdo_ordinates.count loop
    longitude:=rec.geom.sdo_ordinates(i);
    latitude:=rec.geom.sdo_ordinates(i+1);
    logmile:=rec.geom.sdo_ordinates(i+2);
    dbms_output.put_line(id || ',' || longitude || ',' || latitude || ',' || logmile);
    i := i + 3;
    end loop;
    END LOOP;
    commit;
    END;
    Maybe that will help.
    Dave
    David R. Miller
    Michael Baker Jr., Inc.
    3601 Eisenhower Avenue
    Alexandria, VA 22314
    [email protected]
    www.mbakercorp.com

  • Urgent !please help!! how to get children component in encodeBegin()?

    hello all
    how can get children component in encodeBegin()?because when encodebegin the tree is not constituted so i can't get children component,how to solve?
    please help!

    You aren't providing enough information to know for sure what is going on, but a likely problem is that you're rendering a JSP page with a new component tree for the first time, so the components are getting built as the page executes.
    In the EA3 release, this caused a problem, because encodeBegin() was called from the doStartTag() method of the JSP tag (i.e. before the child components have been created). However, in EA4 the call to encodeBegin() was moved to doEndTag(), so the child components should now be getting created already.
    In order to debug this any further, we'll need a specific example of what you're doing, and what version of JavaServer Faces you're trying it with.
    Craig

Maybe you are looking for

  • Kernel Panic -- can't get around it

    A KERNEL PANIC appeared out of nowhere requiring a reboot. I obliged (several times) and each time the computer reboots, the Kernal Panic message appears immediately again. No time to even move the mouse. To remedy, I've done the following: 1) Unplug

  • Free windows7 upgrage

    I went to get my upgrade via the HP site on a link that clearly stated free shipping, went through all the sign up protocol, only to find out that I am being charged $13 shipping. The point of my gripe is that this charge shows up after I give my per

  • Flex SDK 3.4 Tree Item Renderer Root Folder displays Tooltip for Child

    I have a Flex Tree that uses a custom item renderer.  The item renderer extends Tree Item Renderer and I add my button in commit properties (since the data is dynamic) and I use update displaylist to move it to the right position.  I set the button t

  • Pre-order & Authorization Expiration Date

    On July 11th I placed a pre-order with ToysRUs.com for an item that will be released on October 16th. However, according to my PayPal account, the authorization expiration date for that order is August 10th. Toys 'R Us will not allow me to change my

  • A850+ with chinese characters on phone app despite UK English setting

    Have just received a new 850+ running Android  4.2.2 and firmware A850+_S118_140226 Pretty much all the apps show English except the inbuilt phone app which is mixed English/Chinese.  For example, under an incoming number are Chinese characters.  I'v