ItemPressed Event ActionSuccess=True is not firing

Hi,
   I have written code in one of my addons to Capture the ActionSuccess=True part of the ItemPressed event of the "Add" button on the Delivery Note window. This event works perfectly fine when I launch the window from the "Delivery" menu item under Sales A/R.
However, I cannot this event does not fire when the Delivery note is launched from the "Pick and PAck manager" under the Inventory menu.
If pVal.ItemUID = "1" And pVal.ActionSuccess = True And pVal.BeforeAction = False Then
' DO some ACTION
End if
I would appreciate it if you could provide some ideas on whether this a know SAP issue or provide some ideas on how I can fix this issue.
Thanks,
Gopal

The FormDataEvent solved my problem in both cases since I only was interested in doing an action after the delivery was updated/added.
Se VB6-code below to implement this event :
(Events filters added when the addon starts.. :
    Set oFilter = oFilters.Add(et_FORM_DATA_ADD)
    oFilter.Add 140 'Delivery
    Set oFilter = oFilters.Add(et_FORM_DATA_UPDATE)
    oFilter.Add 140 'Delivery
Private Sub m_conApp_FormDataEvent(ByRef BusinessObjectInfo As SAPbouiCOM.BusinessObjectInfo, ByRef BubbleEvent As Boolean)
On Error GoTo ERROR_HANDLER
    If (BusinessObjectInfo.BeforeAction = True) Then 'Before Event
    'Do something
    Else 'After event
        Dim Form As SAPbouiCOM.Form
        Set Form = m_conApp.Forms.Item(BusinessObjectInfo.FormUID)
        Dim bisObj As SAPbouiCOM.BusinessObject
        Set bisObj = Form.BusinessObject
        Dim uid As String
        uid = bisObj.Key
        If (BusinessObjectInfo.Type = "15" And (BusinessObjectInfo.EventType = et_FORM_DATA_ADD Or BusinessObjectInfo.EventType = et_FORM_DATA_UPDATE)) Then
           If uid <> "" Then
            Select Case BusinessObjectInfo.Type
            Case 15 ' Delivery document
                Dim strBpCode As String
                Dim strDocNum As String
                Dim strDocEntry As String
                strDocNum = Trim(Form.DataSources.DBDataSources.Item("ODLN").GetValue("DocNum", 0))
                strBpCode = Trim(Form.DataSources.DBDataSources.Item("ODLN").GetValue("CardCode", 0))
                strDocEntry = Trim(Form.DataSources.DBDataSources.Item("ODLN").GetValue("DocEntry", 0))
                Debug.Print strDocNum + " " + strDocEntry + " " + strBpCode
                Select Case BusinessObjectInfo.EventType
                    Case et_FORM_DATA_UPDATE
                    'DO SOMETHING AFTER DELIVERY-UPDATE
                Case et_FORM_DATA_ADD
                    'DO SOMETHING AFTER ADDING DELIVERY
                End Select
            End Select
           End If
        End If
    End If
Exit Sub
ERROR_HANDLER:
    Debug.Print CStr(Err.Number) + " " + CStr(Err.Description)
End Sub

Similar Messages

  • ItemPressed Event ActionSuccess is always false when in Add Mode

    Hi experts,
    i have a question regarding the ActionSuccess property in the ItemPressed Event.
    When working with a UserForm and an Ok Button (ID = 1) then the ActionSuccess never gets true when pressing the Button when the UserForm is in Add-Mode.
    Is this normal behaviour or a bug?
    Thank you for your help
    Matthias

    Hi Edy,
    yes, the form was in add mode.
    I'm in the ItemPressed Event, BeforeAction=true.
    There the addon does it's work and after that I set the FormMode to OK.
    This closes the form!
    Why I'm in BeforeAction=true? Because i have to know if the form is in add mode or in update mode, because I do different things regarding to the form mode.
    @Eric:
    That's halfway true. B1 sets the FormMode to OK when the form was in update mode, but not, when the form was in the add mode.
    Thank you
    Matthias

  • OnRowUpdating Event not firing in my DataGrid in custom web part in my production SharePoint 2013 Foundation instance

    Hi,
    I have a custom visual web part that I've developed for SharePoint 2013 Foundation.  I am using Visual Studio 2013 to develop this web part. 
    In my visual web part I have GridView that I use to update data in a SQL 2008 R@ Server Database.  In dev and test the OnRowUpdatingEvent fires properly, but in production it does not.  I have the same version of SharePoint running on dev/test/prod. 
    The main difference between the three environments is the hardware.  Production has a much beefier sever than dev and test.  Dev and test are also virtual machines where production is.
    At first I thought my problem was cache related, and I made adjustments per this article:
    http://www.dmcinfo.com/latest-thinking/blog/id/8657/fix-sharepoint-2013-distributed-cache-timeouts
    That didn't help because the event is still not firing.  I took my test application and pointed it to the production database, and that event still fires in test but not in production. So I believe that eliminates database permission errors since I'm
    using the same credentials in both instances.
    My guess is that I need to change some settings in the production environment, but I'm not sure at this point what that might be.
    Any suggestions on what settings to look at?
    Brian
    Brian Hochgurtel
    My blog

    Try this solution :
    http://stackoverflow.com/questions/5893373/c-sharp-rowupdating-method-not-called-when-update-is-clicked-in-a-gridview

  • Sharepoint 2013 document library incoming email without attachment not firing event and not getting email

    sharepoint document library incoming email without attachment not firing event and not getting email
    If email contains attachment it works. Is there any setting in document library that will allow emails and eventhandler to fire with out attachment?
    MCTS Sharepoint 2010, MCAD dotnet, MCPDEA, SharePoint Lead

    What is the purpose of email sent to document library if no attachment. What document library will do what that email if it cant find attachment to save and create a spdoc object. If you want to store email/communication body then opt for site mailbox
    app.
    Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.

  • CS Extension, Script UI and events not firing in Photoshop CS5

    Hi!
    I'm a bit confused with two technologies dealing with SWF panels. There was a technique in the previous versions of Photoshop when SWF content has been loaded into a ScriptUI Window. Is it changed? Or does it still work together with CS Extension extensions?
    I have a script that creates ScriptUI Window and then loads an SWF into it. It has a custom 'mousemove' event listener that helped to move this window around the screen. Now - in the new Photoshop CS5 (I tried 12.0.1 as well) - it seems like the 'mousemove' event is not fired for ScriptUI windows containing SWFs.
    I'm not sure, maybe it has something to do with the new SWF treament in CS5?
    If I'm wrong, then I'm sorry, if this question doesn't fall into this forum's area of expertise.
    Thank you!

    10x,
    You saved my ***!
    It actually has to include both the PHSP "AND" the PHXS host names for it to work - this is stupid!
    If I only use PHXS the extension manager is not able to install the extension, saying it cannot find a host that matches the manifest (even though my photoshop IS the extended variation, so in a sense it's more acurate manifest-wise), and if I only use the PHSP, it IS loaded but doesn't appear in the application!
    AND THERE IS NO DOCUMENTATION ON THIS PHENOMENON ANYWHERE!
    THIS IS BEYOND IRRESPONSIBLE!
    Thank you very much david, but please, as you are an adobe employee, get this message to the right people, if you can.
    I know the corporate agenda would probabely be the incentivise people to register to the 1500$ program to get the extension-builder, by keeping the alternative inconvenient, but this issue is beyond inconvenient, it's border-line cruelty!

  • Event.deactivate is not firing with flash plugin 10,2,152,26 embeded in IE 8 and above

    I am working on a portal which is built in flex. I wanted to perform some action based on my applications is in focus or out of focus. So  I tried to use two Events for this purpose Event.Activate and Event.Deactivate inside my flex code.
    These events fire perfectly in FF 3.0 and above, Safari, Chrome and these events get triggered till IE 7.
    But when I switch to IE 8 and above versions with latest flash player plugin 10,2,152,26 the Event.deactivate is not firing, and I am not able to detect whether my Flex application is out of focus.
    I tried doing some research around this issue both using Flex Events and Javascript approach using window.onfocusin and window.onfocusout, but still no luck in IE 8 and higher versions with latest Flash plugin 10,2,152,26.
    Has someone faced this kind of issue. Any help or solution to this problem would be appreciated. As we have a large number of users viewing this portal in IE 8 with latest flash plugin.
    The code is simple and I have pasted below:
    package {
      import flash.display.*;
      import flash.utils.*;
      import flash.events.*;
      public class Main extends Sprite {
        public function Main() {
          this.addEventListener(Event.ACTIVATE, activateListener);
          this.addEventListener(Event.DEACTIVATE, deactivateListener);

    this is a known issue (or, really a collection of issues) related to how the deactivate event works in different browsers.  check colin moock's blog.
    for most, but not all, purposes using a mouseleave event works well-enough.

  • PlEASE HELP EASY QUESTION: unload event is not firing at all.

    Hi, onUnload event is not firing in Safari browser. I tried with different ways to capture that event but i failed to capture that event. So please help me on this, give suggestions to capture that event. Or any other event is firing when window is closing. Actually, i need to execute when window is closing. But in Safari the window is closing without firing of any events.

    Safari doesn't execute the unLoad action when closing windows, period!
    It only executes it when loading another page.
    I might be wrong but I think Safari doesn't allow you to close a window with Javascript at all. All close events are blocked.
    Maybe a SWF file can do it somehow. But I'm not sure...

  • WHEN-CUSTOM-ITEM-EVENT - not firing. Please Help

    Hi Grant,
    WHEN-CUSTOM-ITEM-EVENT - not firing. Please Help..
    I need a help from you.
    1) I have developed an form to browse the client machine and upload the file on server / table
    2) Registered the form in Oracle Apps 11.5.10.
    3) Currently i am able to open the File_Dialog and browse throught the clients machine
    But when ever user selects any file and says Open, i am not able to retrieve the file name. wHEN-CUSTOM-ITEM-EVENT is not
    firing. I am sure how we can invoke this CUSTOM-ITEM-EVENT.
    To devlop the form i have referred PERWSIMG.fmb - of Oracle (Apps) HRMS which uploads the employee photo in the Database.
    Hence i have used the same java code / Implementaion Class.
    Please help...
    Regards
    Sameer

    Hi Francois,
    You were right. I re-loaded the zip file and the original version works. Odd, as I don't remember ever modifying those files.
    But my original issue still remains.
    The only code I've added is this:
    Color mycolor = this.getBackground() ;
    setBackground(mycolor);to the CalendarFrame constructor. How could this be causing the trigger to not fire?
    Could it be the way I created the bean? I copied all the java files to my project, attached the libraries, created a deployment profile. Everything compiles without errors or warnings, and the jar is created without issues. The java console doesn't give any errors either.
    Thanks for all your help,
    A
    Edited by: Abigail Parmar on Mar 26, 2009 1:01 PM

  • Kinect is not firing MultiSourceFrameArrived event after some time

    Hi,
    I am using Kinect v2 with EmguCV in my application. I am performing some image processing task on the acquired frame. I noticed that after some time (1-2 minutes) the Kinect is not firing MultiSourceFrameArrived event.
    Below is the snippet of the code-
    public partial class KinectForm : Form
    KinectSensor kinect;
    MultiSourceFrameReader reader;
    CoordinateMapper coordinateMapper;
    public KinectForm()
    kinect = KinectSensor.GetDefault();// Get the connected kinect Sensor
    coordinateMapper = this.kinect.CoordinateMapper;
    reader = kinect.OpenMultiSourceFrameReader(FrameSourceTypes.Color | FrameSourceTypes.Depth);
    kinect.Open();// Start reading the data from kinect
    InitializeComponent();
    private void FrameArrivedDisplayMode(object sender, MultiSourceFrameArrivedEventArgs e)
    var reference = e.FrameReference.AcquireFrame(); // Get a reference to the arrived frame
    ColorFrame colorFrame = reference.ColorFrameReference.AcquireFrame(); // Access color frame
    DepthFrame depthFrame = reference.DepthFrameReference.AcquireFrame(); // Access depth frame
    if (colorFrame != null && depthFrame != null)// Do not proceed, if any frame is expired
    RenderColorPixels(colorFrame);
    RenderDepthPixels(depthFrame);
    // Lots of image processing is being performed here
    if (colorFrame != null) colorFrame.Dispose();
    if (depthFrame != null) depthFrame.Dispose();
    private void KinectForm_FormClosing(object sender, FormClosingEventArgs e)
    if (this.reader != null)
    this.reader.Dispose();
    this.reader = null;
    if (this.kinect != null)
    this.kinect.Close();
    this.kinect = null;
    private void displayModeRadioButton_CheckedChanged(object sender, EventArgs e)
    if (displayModeRadioButton.Checked)
    reader.MultiSourceFrameArrived += FrameArrivedDisplayMode;
    else
    reader.MultiSourceFrameArrived -= FrameArrivedDisplayMode;
    The above code was working earlier, but later on once I added more processing on the data, the event was not fired at all after some point of time.
    I am disposing the frame every time. Why this is happening? How to fix this problem?
    Thanks

    Carmine, Thanks a lot for prodding the references. I am in the process of designing it.
    Meanwhile, since as you said the above code was holding the frame data and disposing the frame after processing it, so I though of changing the style little bit. Please see the code below-
    private void FrameArrivedDisplayMode(object sender, MultiSourceFrameArrivedEventArgs e)
    var reference = e.FrameReference.AcquireFrame(); // Get a reference to the arrived frame
    ColorFrame colorFrame = reference.ColorFrameReference.AcquireFrame(); // Access color frame
    DepthFrame depthFrame = reference.DepthFrameReference.AcquireFrame(); // Access depth frame
    if (colorFrame != null && depthFrame != null) // Do not proceed, if any frame is expired
    ColorFrame.CopyConvertedFrameDataToArray(ColorFramePixels, ColorImageFormat.Bgra);
    depthFrame.CopyFrameDataToArray(DepthFrameData);
    colorFrame.Dispose();
    depthFrame.Dispose();
    //Here I am doing image processing
    Now, this way I am not using some of the frames but it should work, since the frame is disposed earlier.
    But still after some time, the event is not fired out.
    Why? Can you tell me the reason?
    Thanks
    Ravi

  • JSC on Tomcat 5.5.20 - Session/Applicaton Bean events not firing

    Hi,
    I am running a JSC app on Tomcat 5.5.20.
    Session and application bean events init and destroy are not firing.
    they work fine on my development machine using the Sun App server..
    Anyone have any ideas?
    Thanks
    Colin

    Hi,
    This is actually a Tomcat bug that was introduced from versions 5.5.20 and higher.
    If you create your application in a path that contains spaces you will encounter this problem.
    The workaround is to create your application at a path with no spaces.
    Here's the bug on Tomcat's website:
    http://www.mail-archive.com/[email protected]/msg37222.html
    It should be fixed in Tomcat 5.5.24
    You won't even need to create a listener or add any jar files.
    Hope this helps
    Yousuf

  • Firefox not firing .add_endRequest function

    I have a dropdown box inside the tabpanel in my asp.net web application. in that dropdown I have calling on onselectedindexchange event. After changing the values in the drop down box the function endrequesthandler function "Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);" firing successfully when browsing my site with IE. While browsing my site with Firefox the function endrequesthandler function "Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);" is not firing. Can anyone give your valuble suggestion for solving this problem? This one is very urgent for our project. Many thanks...
    in my aspx page,<br />
    <br />
    <pre><nowiki><ajaxtoolkit:TabPanel ID="TbDailyMatches" runat="server" HeaderText="Daily Matches">
    <ContentTemplate>
    <asp.Label id="Label1" runat="server"></asp:label>
    <asp:DropDownList ID="dropdown1" AutoPostBack="true" runat="server"
    Height="25px" Width="150px" Style="left: 135px;
    top: 34px;" OnSelectedIndexChanged="dropdown1_SelectedIndexChanged">
    </asp:DropDownList>
    </ContentTemplate></ajaxtoolkit:TabPanel>
    </nowiki></pre>
    in my codehind,
    <pre><nowiki>protected void dropdown1_SelectedIndexChanged(object sender, EventArgs e)
    label1.Text = "<b>Alert:</b> " + dropdown1.SelectedValue;
    Load(dropdown1.SelectedValue);
    </nowiki></pre>
    my javascript
    <pre><nowiki>function FormLoad() {
    Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
    function EndRequestHandler(sender, args) {
    alert('label1');
    }</nowiki></pre>

    I guess we don't have a lot of .Net developers on this site.
    Obviously your server-side .Net code has to be translated into corresponding client-side JavaScript in order to add event handlers to the page. And errors running that JavaScript should appear in the Error Console (Ctrl+Shift+j).
    If the console doesn't provide any insight, can you provide a link to the page that has the problem? Then it would be possible to view the code that Firefox actually is (or is supposed to be) executing.

  • ItemEditEnd not firing in DataGrid

    In one particular DataGrid it's not firing - all other in my
    app work fine. I've had another Flex developer to look at my code
    just in case I'm going mad or something, and he thinks it's a bug
    in Flex framework somewhere. I'm using Flex Builder 2.0.1 FWIW
    Here is isolated code that exhibits the same behaviour
    (breakpoint in onEdit event listener func does not trigger). Much
    of it may seem superfluous but in actual app it's neccessary in the
    actual app (I just tried to isolate the cause!).
    Any ideas?
    quote:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    creationComplete="onInit();"
    >
    <mx:Canvas
    xmlns:mx="
    http://www.adobe.com/2006/mxml"
    xmlns:woccu="org.woccu.components.*"
    width="100%" height="100%" id="ccc"
    paddingTop="0" paddingLeft="0" paddingRight="0"
    >
    <mx:Script>
    <![CDATA[
    import mx.events.DataGridEvent;
    import mx.events.DataGridEventReason;
    import mx.collections.ArrayCollection;
    // Dataprovider
    private var _dp:ArrayCollection;
    // This will contain array (hash) accessible by bottombar or
    somesync
    [Bindable]
    public var bottomBar:Array;
    public function onInit():void
    _dp=new ArrayCollection([{PK: 'Matt', label: "XXX", col1:
    'Matthews', col2: 'XEXE', level: 1}]);;
    entrygrid.dataProvider=_dp;
    trace('init');
    public function refresh():void
    // TODO: check if entity ID and other props are not blank!
    // Refresh contents or somesync
    // Callback function - when the data arrives
    protected function onData(result:Array):void
    // Builds our dataprovider or somesync
    var tmpDPRow:Array;
    var _bottomBar:Array=new Array();
    _dp=new ArrayCollection();
    for ( var j:String in result ) {
    // First, check level. If 0 this row belongs to bottombar
    if ( result[j]["level"] == "0" ) {
    var pk:String=result[j]["PK"];
    pk=pk.replace("-","_"); // - is not valid in object ID, so
    we replace with _
    _bottomBar[pk]=new Object();
    _bottomBar[pk]["label"]=result[j]["label"];
    _bottomBar[pk]["value"]=result[j]["col2"];
    } else {
    // Go over fields
    tmpDPRow=new Array();
    tmpDPRow["PK"]=result[j]["PK"];
    tmpDPRow["label"]=result[j]["label"];
    tmpDPRow["col1"]=result[j]["col1"];
    tmpDPRow["col2"]=result[j]["col2"];
    _dp.addItem(tmpDPRow);
    // Apply bottom bar
    this.bottomBar=_bottomBar;
    // Apply all data to datagrid
    this.entrygrid.dataProvider=_dp;
    public function onEdit(event:DataGridEvent):void {
    trace ('fire in the whole!');
    if ( event.reason == DataGridEventReason.CANCELLED ) {
    return;
    // MUST URGENTLY UPDATE frickin database!
    this.refresh(); // Subtotals have changed - need refresh
    ]]>
    </mx:Script>
    <!--
    Note the hack below: column widths are absurdly large values
    The idea is that Flex will resize down and keep the
    proportions
    -->
    <mx:DataGrid xmlns:mx="
    http://www.adobe.com/2006/mxml"
    width="100%" height="100%" showHeaders="false"
    itemEditEnd="onEdit(event)" id="entrygrid">
    <mx:columns>
    <mx:DataGridColumn width="0" visible="false"
    dataField="PK">
    </mx:DataGridColumn>
    <mx:DataGridColumn width="70000"
    itemRenderer="mx.controls.TextInput" editable="false"
    dataField="label">
    </mx:DataGridColumn>
    <mx:DataGridColumn width="15000"
    itemRenderer="mx.controls.TextInput" editable="false"
    dataField="col1">
    </mx:DataGridColumn>
    <mx:DataGridColumn width="15000"
    itemRenderer="mx.controls.TextInput" rendererIsEditor="true"
    editable="true" dataField="col2">
    </mx:DataGridColumn>
    </mx:columns>
    </mx:DataGrid>
    </mx:Canvas>
    </mx:Application>

    Never mind... found the cause. Turns out DataGrid wont fire
    itemEditEnd unless it's editable property is true. Of course this
    is not documented anywhere...

  • Selectedindexchanged not firing in 2010

    hi guide me please my selectedindexchanged not firing in 2010 webpart ....we are moving solution to 2007 to 2010 .in 2007 working fine 2010 not working
    please help me
    AutoPostBack=True also checked
    protected void dropBusinessArea_SelectedIndexChanged(object sender, EventArgs e)
    Response.Write(dropBusinessArea.SelectedValue);
    fngetProductCategories();
    fngetProducts();
    fngetComplaints();
    fngetAssignmentType();
    fngetCompDesc();
    fnCalculateDueDate();
    fn_GetKnowBaseItems();
    fn_GetBulkComplaints();
    protected void dropProductCategory_SelectedIndexChanged(object sender, EventArgs e)
    fngetProducts();
    fngetComplaints();
    fngetAssignmentType();
    fngetCompDesc();
    fnCalculateDueDate();
    fn_GetKnowBaseItems();
    fn_GetBulkComplaints();

    Hi,
    Here is a blog about code conversion from SharePoint 2007 to SharePoint 2010 for your reference:
    http://snahta.blogspot.com/2010/02/code-conversion-from-sharepoint-2007-to.html
    If the issue still exists,  I suggest you debug your code and check whether the event method is executed.
    In SharePoint 2010, we can also use visual web part to achieve it.
    http://www.c-sharpcorner.com/uploadfile/Roji.Joy/creating-web-parts-for-sharepoint-2010-using-visual-studio-2010/
    http://www.codeproject.com/Articles/136857/Developing-Web-Parts-for-Sharepoint
    Best regards
    Dennis Guo
    TechNet Community Support

  • Many threads on application.onDisconnect not firing but seemingly no solution

    I've dug some threads up and included links at the end of this post. Have some more work to do researching it but figured I'd get the ball rolling.
    Essentially one can't depend on application.onDisconnect() firing at the close of a client's browser.  It happens sometimes.  But with some apps, it just doesn't happen at all.  I've watched the FMS management console as I've repeatedly opened and closed a particular app I'm developing.  Connections don't die with each browser close.  The net result is a piling up of connections.  My app has a "connected users" list in it.  It gets packed with multiple connections from the same client.
    Eventually, after 5-10 mins, the connections disappear on their own.  Not good though.  One of the functions in my app lets someone select a user in the list and send a direct chat.  This feature isn't working because disconnections are not registering real time.  Some of the people in the user list are not really there anymore.
    I get the problem in both IE8 and FireFox 3.5.3 on FMS 3.52.  Others have reported the problem in various browsers and FMS versions going way back. Problem's been around for some time.
    This guy has the same problem and a nice description, although he experienced only in IE:
    onDisconnect Errors in Internet Explorer: (http://www.flashnewz.com/ondisconnect-errors-in-internet-explorer/)
    After reading the accounts at the links gathered below, I get the feeling it might not necessarily be an FMS problem alone, but rather some combo of browser, SWFObject implementation, and perhaps particular features used (or not used) in the client ActionScript.  Nobody's seemed to nail down the precise combination though.
    Pretty much a show stopper.  Has anyone developed viable work arounds?
    Thread: onDisconnect() IE7 problem: (http://fmsguru.com/forum/messages.cfm?threadid=EEC6D52A-BAB2-526D-5CD9FF490332B8D8)
    onDisconnect Not Firing in IE6/7 With SWFObject 2: (http://www.flashcomguru.com/index.cfm/2008/8/7/swfobject-problem-ie-fms)
    Do not call onDisconnect when closing browser: (http://www.wowzamedia.com/forums/showthread.php?t=5521)
    BUG -Flash Media Interactive Server 3: (http://www.justskins.com/forums/bug-flash-media-interactive-server-3-a-141282.html)
    onDisconnect Event in FMS 2.0: (http://forums.adobe.com/thread/98366)
    Topic: Detecting ungraceful disconnects? (http://www.flashcomguru.com/forum/forum_posts.asp?TID=2848&PN=0&TPN=2)
    Why Flash Media Server does not call application.onDisconnect handler: (http://stackoverflow.com/questions/359727/why-flash-media-server-does-not-call-application -ondisconnect-handler)

    ////////////////////////////////////////////////////////////////////////////////////client side///////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////
    var nc = new NetConnection()
    nc.onStatus = function (o)
    trace(o.code);
    nc.connect("rtmp://YourAccount.rtmphost.com/AppDirectory");
    nc.imHere = function(p_b)
    trace("imHere");
    return (true)
    ////////////////////////////////////////////////////////////////server side///////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////
    load("Delegate.asc");
    application.onConnect = function(p_o)
    this.acceptConnection(p_o);
    p_o.clientIsBad= function()
      trace ("is bad")
      clearInterval(this.resultInt);
      clearInterval(this.checkInt);
      application.disconnect(this);
    p_o.clientIsGood = function()
      trace ("is good")
      clearInterval(this.resultInt);
    p_o.checkValid = function()
      trace("watcha!");
      clearInterval(this.resultInt)
      this.resultInt = setInterval( p_o, "clientIsBad", 2000 );
      this.call("imHere",{onResult:Delegate.create(p_o, this.clientIsGood),onStatus:Delegate.create()} );;
    p_o.checkInt = setInterval( p_o, "checkValid", 120000 );

  • af:serverListener not fired on a jspx page load

    Hi,
    I'm using JDeveloper 11g Update 1.
    I would like to fire a serverListener on a jspx page load.
    The javascript method that i'm using is fired while the server listener is not fired.
    Here's the code.
    <pre>
    //In my jspx
    <af:document title="Page Title" clientComponent="true">
    <af:clientListener method="fireServerListener" type="load"/>
    <af:clientAttribute name="serverListenerType" value="serverMethod"/>
    <af:serverListener type="serverMethod" method="#{myBean.serverMethod}"/>
    <f:facet name="metaContainer">
    <trh:script source="js/lib.js"></trh:script>
    </f:facet>
    //In lib.js
    function fireServerListener(event){
    var source = event.getSource();
    var immediate = this._immediate;
    var params = {};
    var srvLstnrType = source.getProperty("serverListenerType");
    AdfCustomEvent.queue(source, srvLstnrType, params, immediate );
    //In my bean
    public void serverMethod(ClientEvent clientEvent) {
    System.out.println("serverMethod() is called");
    </pre>
    Please, give any ideas how to resolve it.
    Best Regards,
    JavaDeVeLoper

    Hi Frank,
    I've tried what's suggested. I've placed the trh:script at the bottom of the page.
    The server listener in this piece of code at the bottom is fired, but in my case the problem (to fire a server event on body load) still exists.
    <pre>
    <af:commandButton text="Button" partialSubmit="true" clientComponent="true">
    <af:clientListener method="fireServerListener" type="action" />
    <af:clientAttribute name="serverListenerType" value="serverMethod" />
    <af:serverListener type="serverMethod"
    method="#{myBean.serverMethod}"/>
    </af:commandButton>
    </pre>
    Any suggestions :)
    Best Regards,
    JavaDeVeLoper

Maybe you are looking for