Skip to Content
avatar image
Former Member

change updateevent

Hi

Is it possible to change the UpdateEvent that runs on an applet?

My problem is that there are about 20 applets on my page, and I think it's causing issues, especially with older machines.

So I want to do something like this

document.genericApplet.setQueryTemplate("q1")

document.genericApplet.setDisplayTemplate("d1")

document.genericApplet.setUpdateEvent("u1")

document.genericApplet.updateGrid(true)

Is there a way to do this?

I am using 12.0.2b88. On my PC I have JRE 1.6.0_02, many users have 1.4.2_12 or 1.5.11

Thanks

Nick

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • avatar image
    Former Member
    Sep 04, 2008 at 01:43 PM

    You can disable/enable an event but I did not understand "change".

    Change to what?

    Please explain.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Jeremy Good

      The only problem with using multiple IFRAMEs is that they can be a real P.I.T.A to get the browser to layout properly (e.g. IFRAMES nested inside tables).

  • avatar image
    Former Member
    Sep 05, 2008 at 11:28 AM

    Hi, Nick. I would suspect that officially the answer is no, but technically, the answer is yes. You can use setSelectionEvent, setUpdateEvent, and setCreationEvent to do what you want to do. Those are the only three that can be set dynamically, AFAIK.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi, Nick.

      It works similarly to what you had in your initial posting. Simply pass the name of the Javascript function that you want invoked when the event is fired as the parameter to the setXXX method, as in:

      myApplet.getHelper().setSelectionEvent("MySelectionHandler");

      The key is the hidden AppletHelper object which sits behind each MII applet and does a lot of the script-related tasks.

      Use at your own risk!

      Rick

  • avatar image
    Former Member
    Sep 08, 2008 at 01:18 PM

    If you aren't using any charts, I would recomend using AJAX techniques or the iCommand and build your HTML dynamically. It may take a little longer to build, but In my opinion you will get a much better user experience.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 09, 2008 at 03:38 PM

    Hi Nick,

    In XMII 12.1 thee applets were completely rewritten to add new functionality and to convert them all to Swing. Unpublished methods like getHelper() will no longer work since they are now protected and the general eventing model is handled completely differently though all published and documented methods will still work.

    Fran Simon

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      There you have it, right from the source! Thanks, Fran. As I said, "use at your own risk...", 'cuz things will change over time.

      Fran/John, will there be 100% forward compatibility for scripting and properties with the new applets or will people need to rework any of the pages? Or will the old applets keep working "as is" and be shipped alongside the new ones?

      See ya in Nashville.

  • avatar image
    Former Member
    Sep 10, 2008 at 07:26 AM

    Hi Nick,

    Even I faced same problem, I was using more than 8 applets.

    I hope below solution could help you.

    we know there are 4 events for applets like

    1.Creation Event, (Creation of applet and initialization is done here)

    2.First Update Event,(whenever Query runs First Update event happens,this is the guarentee that applet is fully loaded)

    3.Update Event,(this is for every next auto refresh,it executes query again)

    4.selection Event.(everyone knows no need to explain)

    Best practise to avoid applet loading problem is call function in First update event.

    call same Function name in all Applets, Keep one global variable with initial value 0 , once applet loaded increment the counter value.

    Example:

    <Applet1>

    <PARAM NAME="QueryTemplate" VALUE="query name">

    <PARAM NAME="FirstUpdateEvent" VALUE="Function1">

    </applet1>

    <Applet2>

    <PARAM NAME="QueryTemplate" VALUE="query name">

    <PARAM NAME="FirstUpdateEvent" VALUE="Function1">

    </applet2>

    function Function1()

    {

    counter=counter+1;

    }

    then write your actual function to do what has to happen after the corresponding applet has loaded checking counter.

    function perform()

    {

    if(counter==2)//that means do this only after second applet loaded

    {

    ---

    ---

    } }

    Dont know how far this helps you, but I have tried to explain what I know.

    Thanks,

    Rao

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 10, 2008 at 03:18 PM

    Yes. The existing published/documented interfaces will continue to work for backward compatability, in the new 12.1 version of the applets. Obviously new javascript functions are also available for the new enhanced functionality.

    Fran

    Add comment
    10|10000 characters needed characters exceeded