How to propagate an event to another page.

Hi guys,
I have a page (say Main.jsp), which will instantiate another page(say Sub.jsp) when is loaded on screen. Means at the same time user can see both Main.jsp & Sub.jsp on the same screen. (Sub.jsp is called by Main.jsp). There is a button on Sub.jsp and
I want to handle the �onclick� event in Main.jsp in stead of in Sub.jsp.
On the other words, I want to propagate the button clicked event from Sub.jsp to Main.jsp Any idea for this?
Thanks

Yes this a button click, which is suppose to handle by
java script on another page.
Here is sample code from both Main.jsp & Sub.jsp and
i did what you suggested(as follow) but didn't work and received an error.
Sub.jsp
<HTML>
<input type="button" id="BtnEnter" onclick="BtnEnterClicked()">
</HTML>
Main.jsp
<HTML>
<form name="formMain">
</form name="formMain">
<SCRIPT>
     function BtnEnterClicked(){
     alert('Button ENTER in Sub.jsp is clicked');
</SCRIPT>
</HTML>
Please let me know if i missed something.

Similar Messages

  • How can I call AM from another page

    Hi,
    I have come across a situation which I am not sure how to solve it. Here is the issue. I have a custom requirement to add another page to an already existing custom page. The first page used to hold the data and commit buttons however because of requirements, we want users to add some comments on the second page and then save the data. In other words the save button is now suppose to move to the second page.
    The dilemma I have is that the method that used to be called from the PFR CO of Page 1 was linked to page 1 AM which had that commit method.
    I still want to re-use the method from the Page 1 AM since there is a lot of logic involved. How can I call that method while I am in my second page from my CO?
    I am using setForwardURL and I am retaining AM from page 1.
    Also, if this is not feasible what are other alternatives. Any ideas would be appreciated.
    Edited by: user501998 on Jan 7, 2010 12:21 AM

    Hi,
    Can you give me an example? I mean do I just call the AM like in the example below...in my PFR...of Page 2 Controller. I thought this would be giving me an error method not found or something since it would be looking at the AM of my current page. I will try it and see but if there is another syntax can you please provide it.
    Thanks
    Partial code from PFR of Page 2
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    if(eventName.equals("save"))
    if ( respName.endsWith("Admin") )
    am.invokeMethod("commitTransaction"); --- This is the AM Method in Page 1...
    } else
    throw new OAException("Shipper successfully updated.", OAException.CONFIRMATION);

  • How to add a link to another page

    Hello,
    I am new to Adobe Designer 7.0, I'm liking it so far, I had a question though, I was wondering how I could make a link from one page to another. For instance, I want to have a table of contents and I want the user to be able to click on the word whatever that may be and for it to go to the page which they chose.
    I appreciate your responses!!
    Mac Mendez

    Mac, the best way to do this is use a Button and change it to look like a hyperlink (color, etc.). Add a setFocus JavaScript on the Click event to a field on the page you want it to go to; e.g.,
    xfa.host.setFocus("Page3.TextField1");
    If there is not a field on the page, make a hidden field for it to jump to.

  • How to reference a region in another page?

    Hi,
    Say in page A there are a few regions defined (pl/sql, reports...)
    A page B in the same application would like to have a few of those regions, exactly the same. Is it possible to reference/symlink to them or do they have to be re-created and maintained in two places?
    Thanks,
    Marius

    reusable modular components that maintain state from one page to the next
    That is exactly what Page 0 is designed for.
    I agree that the fact that Page 0 components are magically processed by the SHOW engine is a little unexpected. The Page Definition page could put a (readonly?) stub on every page that that component would render on. But this is tricky to design. If you have setup your Page 0 components to conditionally render using some complex logic, you don't want the Builder running that logic every time it displays the Page Definition page!
    Instead, the Page Event view could be enhanced to show Page 0 components as I suggested at Enhancement request: Include application-level events
    If you do end up putting a report region on Page 0, please be aware of a bug as we discuss at Re: Report region on Page 0: Pagination issue
    Hope this helps.

  • How to Listen an event before the page Renders

    Hi , we fired an event from the header . I want to listen the payload and show that data from the payload in a portlet on the page.
    But am not getting the data into the portlet. From the logs i can see that after the pageflow action executed, backing file is executed.

    What part of the lifecycle are you using in the backing file?
    Consider using handlePostBackData in your backing file.
    See:
    http://download.oracle.com/docs/cd/E13155_01/wlp/docs103/portlets/ipc.html
    Also, for some older but good basic reading, see:
    http://download-llnw.oracle.com/docs/cd/E13218_01/wlp/docs81/sp3/pdf/netix.pdf
    http://download.oracle.com/docs/cd/E13218_01/wlp/docs81//sp3/pdf/ipcguide.pdf

  • How to redirect a workfow to another page after it initiated through a post in a form html?

    have this but it isn't work...
    <form action="/etc/workflow/instances" method="post" enctype="multipart/form-data">
                    <input type="hidden" name="_charset_" value="utf-8"/>
                    <input type="hidden" name="model" value="/etc/workflow/models/buy-album/jcr:content/model"/>
                    <input type="hidden" name="payload" value="${currentAlbum.currentNodePath}"/>
                    <input type="hidden" name="payloadType" value="JCR_PATH"/>
                    <input type="hidden" name=":redirect" value="/content/discostore/en/homepage/discDetailPage/californication_red_hot.html" />
                    <input type="submit"/>
                </form>

    Where are you putting this code? In a Before Header section?
    I can see there are some possible compilation issues with the code. I think you'd better use:
    BEGIN
    IF APEX_UTIL.CURRENT_USER_IN_GROUP(p_group_name=> 'Customer')
    THEN
    htp.init;
    owa_util.redirect_url('f?p=&Custlogin.:1:&APP_SESSION.');
    END IF;
    END;
    Anyway, I would use branches to achieve what you need in your page. One branch for each type of user you would like to redirect... so, for example sending user to page "x" if condition above is met:
    -Condition Type=PL/SQL Expression
    -Expression=APEX_UTIL.CURRENT_USER_IN_GROUP(p_group_name=> 'Customer')
    Edited by: Kleber M on May 23, 2013 12:00 PM

  • How to listen one event before another

    Hello All,
    In my code i m using 2 Events (selectionEvent , FocusEvent) at one object(Gallery). when i select any object in gallery , focus event comes first before Selection Event. but i want selection event shud come before Focusevent. so that i may perform some operations in widgetSelected(SelectionEvent e){...} before the method focusGained(FocusEvent e){....}
    please suggest me in this direction.

    We'll stay in this one: [http://forums.sun.com/thread.jspa?threadID=5345923]

  • How to listen one event before another event

    Hello All,
    In my code i m using 2 Events (selectionEvent , FocusEvent) at one object(Gallery). when i select any object in gallery , focus event comes first before Selection Event. but i want selection event shud come before Focusevent. so that i may perform some operations in widgetSelected(SelectionEvent e){...} before the method focusGained(FocusEvent e){....}
    please suggest me in this direction.

    You should, however, be able to write your focusGained method in such a way, that it does different things according to the selection state of your widget and your widgetSelected method in such a way, that it does different things according to the focus state of your widget.

  • Handle an event which accrued on another page?

    Hi,
    I'd like to know how can i handle an event which is accrued on another page.
    More info: Suppose I have two JSP pages "Main.jsp" & "Sub.jsp". There is a frame on Main.jsp and Sub.jsp will load on that frame.
    In brief same screen is included two JSP pages, Main.jsp & Sub.jsp.
    Now there is a button on Sub.jsp and i want to do an action on Main.jsp when that button clicked.
    Is that possible? How?

    Both Main.jsp and Sub.jsp are on the same screen. There is nothing to load.
    You can imagine that the screen is divided to two part. Up is Main.jsp & down is Sub.jsp. And both are loaded
    at the same time. Now a button which is located in Sub.jsp is clicked. I want to trap it at the Main.jsp and handle it.
    So, the question is How Main.jsp can sense(capture) that the button on Sub.jsp is clicked.
    please let me know if still is not clear.

  • How to cancel the event in Item Adding and display javascript message and prevent the page from redirecting to the SharePoint Error Page?

    How to cancel the event in Item Adding without going to the SharePoint Error Page?
    Prevent duplicate item in a SharePoint List
    The following Event Handler code will prevent users from creating duplicate value in "Title" field.
    ItemAdding Event Handler
    public override void ItemAdding(SPItemEventProperties properties)
    base.ItemAdding(properties);
    if (properties.ListTitle.Equals("My List"))
    try
    using(SPSite thisSite = new SPSite(properties.WebUrl))
    SPWeb thisWeb = thisSite.OpenWeb();
    SPList list = thisWeb.Lists[properties.ListId];
    SPQuery query = new SPQuery();
    query.Query = @"<Where><Eq><FieldRef Name='Title' /><Value Type='Text'>" + properties.AfterProperties["Title"] + "</Value></Eq></Where>";
    SPListItemCollection listItem = list.GetItems(query);
    if (listItem.Count > 0)
    properties.Cancel = true;
    properties.ErrorMessage = "Item with this Name already exists. Please create a unique Name.";
    catch (Exception ex)
    PortalLog.LogString("Error occured in event ItemAdding(SPItemEventProperties properties)() @ AAA.BBB.PreventDuplicateItem class. Exception Message:" + ex.Message.ToString());
    throw new SPException("An error occured while processing the My List Feature. Please contact your Portal Administrator");
    Feature.xml
    <?xml version="1.0" encoding="utf-8"?>
    <Feature Id="1c2100ca-bad5-41f5-9707-7bf4edc08383"
    Title="Prevents Duplicate Item"
    Description="Prevents duplicate Name in the "My List" List"
    Version="12.0.0.0"
    Hidden="FALSE"
    Scope="Web"
    DefaultResourceFile="core"
    xmlns="http://schemas.microsoft.com/sharepoint/">
    <ElementManifests>
    <ElementManifest Location="elements.xml"/>
    </ElementManifests>
    </Feature>
    Element.xml
    <?xml version="1.0" encoding="utf-8" ?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <Receivers ListTemplateId="100">
    <Receiver>
    <Name>AddingEventHandler</Name>
    <Type>ItemAdding</Type>
    <SequenceNumber>10000</SequenceNumber>
    <Assembly>AAA.BBB, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8003cf0cbff32406</Assembly>
    <Class>AAA.BBB.PreventDuplicateItem</Class>
    <Data></Data>
    <Filter></Filter>
    </Receiver>
    </Receivers>
    </Elements>
    Below link explains adding the list events.
    http://www.dotnetspark.com/kb/1369-step-by-step-guide-to-list-events-handling.aspx
    Reference link:
    http://msdn.microsoft.com/en-us/library/ms437502(v=office.12).aspx
    http://msdn.microsoft.com/en-us/library/ff713710(v=office.12).aspx
    Amalaraja Fernando,
    SharePoint Architect
    Please Mark As Answer if my post solves your problem or Vote As Helpful if a post has been helpful for you. This post is provided "AS IS" with no warrenties and confers no rights.

    Recommended way for binding the list event handler to the list instance is through feature receivers.
    You need to create a feature file like the below sample
    <?xmlversion="1.0"encoding="utf-8"?>
    <Feature xmlns="http://schemas.microsoft.com/sharepoint/"
    Id="{20FF80BB-83D9-41bc-8FFA-E589067AF783}"
    Title="Installs MyFeatureReceiver"
    Description="Installs MyFeatureReceiver" Hidden="False" Version="1.0.0.0" Scope="Site"
    ReceiverClass="ClassLibrary1.MyFeatureReceiver"
    ReceiverAssembly="ClassLibrary1, Version=1.0.0.0, Culture=neutral,
    PublicKeyToken=6c5894e55cb0f391">
    </Feature>For registering/binding the list event handler to the list instance, use the below sample codeusing System;
    using Microsoft.SharePoint;
    namespace ClassLibrary1
        public class MyFeatureReceiver: SPFeatureReceiver
            public override void FeatureActivated(SPFeatureReceiverProperties properties)
                SPSite siteCollection = properties.Feature.Parent as SPSite;
                SPWeb site = siteCollection.AllWebs["Docs"];
                SPList list = site.Lists["MyList"];
                SPEventReceiverDefinition rd = list.EventReceivers.Add();
                rd.Name = "My Event Receiver";
                rd.Class = "ClassLibrary1.MyListEventReceiver1";
                rd.Assembly = "ClassLibrary1, Version=1.0.0.0, Culture=neutral,
                    PublicKeyToken=6c5894e55cb0f391";
                rd.Data = "My Event Receiver data";
                rd.Type = SPEventReceiverType.FieldAdding;
                rd.Update();
            public override void FeatureDeactivating(SPFeatureReceiverProperties properties)
                SPSite sitecollection = properties.Feature.Parent as SPSite;
                SPWeb site = sitecollection.AllWebs["Docs"];
                SPList list = site.Lists["MyList"];
                foreach (SPEventReceiverDefinition rd in list.EventReceivers)
                    if (rd.Name == "My Event Receiver")
                        rd.Delete();
            public override void FeatureInstalled(SPFeatureReceiverProperties properties)
            public override void FeatureUninstalling(SPFeatureReceiverProperties properties)
    }Reference link: http://msdn.microsoft.com/en-us/library/ff713710(v=office.12).aspxOther ways of registering the list event handlers to the List instance are through code, stsadm commands and content types.
    Amalaraja Fernando,
    SharePoint Architect
    Please Mark As Answer if my post solves your problem or Vote As Helpful if a post has been helpful for you. This post is provided "AS IS" with no warrenties and confers no rights.

  • How do I move clips from one Event to another?

    How do I move clips from one Event to another?
    As soon as I got the new iMovie, I started importing clips and making video's. Unfortunately, I hadn't fully understood the Events feature, so all of my clips are in a single "New Event" Event. I have now created several other Events and named them properly and would like to sort all of my clips into their proper "Event" folders. How do you do that?

    Ahh, Ok. I actually had to go to Lynda.com to watch a training video of this highly bassackwards maneuver, but now I have it. In other words, while the intuitive thing is to make a new event to hold the clip you want and then open the old event and drag the clip into it's new event, the only way to accomplish this maneuver is to NOT create a new event, but rather, go to the clip AFTER the one you want to move, select it and then Right-Click on it and select SPLIT EVENT BEFORE SELECTED CLIP (or go to FILE>SPLIT EVENT BEFORE SELECTED CLIP). Then you wait a few seconds while the program thinks a bit (no feedback it is doing this - just a pause) and then it automatically creates a new event with the clip you wanted. Now just double-click the new event and name it something meaningful.
    Thanks for your help!

  • How do I move apps from one page to another?

    How do I move apps from one page to another?

    From a previous thread:
    Touch and hold any icon for a couple of seconds. They'll all start to wobble. Touch and drag the one you want to move to the side of the screen and the next screen will appear; drop the icon on whatever screen you want it on.
    You can also do it quicker in iTunes - connect the phone and click the Apps tab in the main window. You'll see a picture of your phone with the apps laid out. Just click and drag

  • How do you move icons from one page to another?

    How do you move icons from one page to another?

    hold down on an app till everything start shaking then move it to one side of the ipad and it'll change "pages" after a second or two.

  • How can I put a message in a page after an action in another page?

    Hi everybody, I know that what I try to explain is a bit difficult to understand without know all the context but I try to do it the same:). I have a datatable that contains a list of student. In another page I insert a new student. When I click on "save" button I save the new student and I return to the page with the datatable. The problem is: when I add a student I must notify the user that the student is added correctly with a message in the 1st page like "The student is added correctly". This message must display only after I added the student not when I see for the first time the page with the datatable. How can i do this? Thanks to all.

    I use your suggestion but it doesn't work. I create a bean named MessageHandler with scope request. In its constructor i put an empty value for the variable addStudent_message, and in the page that the message should be I have this line of code:
    <h:outputText rendered="#{!empty messageHandler.addStudent_message}" value="#{messageHandler.addStudent_message}"/>
    In the bean I used to add a student I have a MessageHandler object and in the method that add a student, before the return statement, I put this:
    handler.setAddStudent_message("Studente aggiunto correttamente");
    When I run, it gives me this error:
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Error calling action method of component with id _idJsp1:save
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)
    root cause
    javax.faces.FacesException: Error calling action method of component with id _idJsp1:save
         org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:74)
         javax.faces.component.UICommand.broadcast(UICommand.java:106)
         javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:94)
         javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:168)
         org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:343)
         org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
    root cause
    javax.faces.el.EvaluationException: Exception while invoking expression #{addStudentBean.save}
         org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:153)
         org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
         javax.faces.component.UICommand.broadcast(UICommand.java:106)
         javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:94)
         javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:168)
         org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:343)
         org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
    root cause
    java.lang.NullPointerException
         beanDomain.AddStudentBean.save(AddStudentBean.java:68)
         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:585)
         org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:129)
         org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
         javax.faces.component.UICommand.broadcast(UICommand.java:106)
         javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:94)
         javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:168)
         org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:343)
         org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.23 logs.
    It seems that it doesn't find the MessageHandler object. What do you think?

  • How to retrieve a page item value in another page?

    Hi,
    how to retrieve a page item value in another page?
    say P55_COURSES_TO_EVALUATE is my page item name and it is a select list.Based on the value selected,in the next page i shd show details related to the selected value and for this i need P55_COURSES_TO_EVALUATE value in the next page.How Do I get it?When I try to retrieve the values it simply returns nothing.
    Any pointers would be really helpful.
    Thanks in advance.

    Hi,
    Could you please tell how you try use it ?
    If you set value to item P55_COURSES_TO_EVALUATE and submit page, value is saved to session state.
    Then you can use that item in any page like
    :P55_COURSES_TO_EVALUATEYou can not access page value in javascript/jQuery from other pages like
    $v('P55_COURSES_TO_EVALUATE')
    document.getElementbyID('P55_COURSES_TO_EVALUATE')
    $(#P55_COURSES_TO_EVALUATE)Because item is not in other pages. In javascript from other pages you can use
    var a = '&P55_COURSES_TO_EVALUATE.';Regards,
    Jari

Maybe you are looking for

  • Unexpected quit problem

    So I see Apple's fix for the "application unexpectedly quit" problem in iDVD '08. I'm supposed to delete this folder, among others: ~/Library/Application Support/iDVD/Installed Themes and ~/Library/Caches/com.apple.idvd I know they are in my home dir

  • Duplicating a database restored to disk instead of ASM

    Hello, I have the primary database, a RAC and it has all the archivers on ASM. When I do a duplicate command, archivers are restored to $ORACLE_HOME/dbs datafile 20 switched to datafile copy input datafile copy RECID=26 STAMP=778627959 file name=+DGD

  • Mac OS 10.5 will not install

    I have a powerbook G4 (non-intel) running 10.4.11. I need to upgrade to 10.5 so that I can sync with my iPad. When I put the 10.5 disk in and try and install I get the message that OS 10.5 can not install on this computer.  How can I get 10.5 to inst

  • Books? AS3 & Web Design...

    Im new to everything programming wise, the epitome of a newbie. But I really want to learn. I can work the timeline, make animations etc, but I cant get tutorials to teach me actionscript because they either expect you to have background knowledge or

  • HT4796 It has been migrating for for 19 hours.  What is taking so long?

    It has been migrating for for 19 hours.  What is taking so long?