This discussion is archived
1 2 Previous Next 16 Replies Latest reply: Mar 14, 2013 9:14 AM by user346369 RSS

when-mouse-leave

newbi_egy Explorer
Currently Being Moderated
db and dev 10g rel2 ,
hi all ,
i am trying to use when-mouse-leave for the first time , and i know that it fires when the mouse cursor leaves an item , and that is the functionality i want ,
i am trying to make an item invisible when i leave another one , so i did that ,

- two text items (t1, t2,t3) ;
using this trigger on a text item (t1) to make t2 invisible , when i leave t1 to go to (t3) ;

in the code i've written :

set_item_property('t2',visible,property_false) ;

it did not work , without any errors or messages ?. , -- this problem also happens with when-mouse-enter trigger ?

thanks
  • 1. Re: when-mouse-leave
    tony.g Journeyer
    Currently Being Moderated
    Semsem,

    If you look up the when-mouse-leave trigger in the Forms 10g online help it will tell you precisely why it does not work in web based Oracle Forms.

    Tony
  • 2. Re: when-mouse-leave
    newbi_egy Explorer
    Currently Being Moderated
    i did before i posted the thread ,

    and it says that :

    fires when the mouse leaves any item in the block if attached to an item, when the mouse leaves the item ,
    and the usage notes say :

    Usage Notes Use a When-Mouse-Leave trigger to perform an action every time the mouse leaves an item and/or canvas.

    nothing about why not to work .

    thanks
  • 3. Re: when-mouse-leave
    CraigB Guru
    Currently Being Moderated
    Perhaps you missed the second bullet point:
    >
    Usage Notes
    * Use a When-Mouse-Leave trigger to perform an action every time the mouse leaves an item and/or canvas.
    * This trigger causes excessive network traffic when deployed on the web, so it is ignored when used with Web Forms.>
    This trigger is a hold-over from Forms 6i and has been deprecated in all versions of Web Forms. If you need this functionality, you will have develop your own (or find someone who already has) Java Bean.

    Craig...
  • 4. Re: when-mouse-leave
    newbi_egy Explorer
    Currently Being Moderated
    This trigger causes excessive network traffic when deployed on the web, so it is ignored when used with Web Forms.
    this line is not in my online help .
    you will have develop your own (or find someone who already has) Java Bean.
    do you mean develop my own trigger ? if yes how to get this functionality ?


    3- i think this trigger is the same as post-text-item ? , but i am trying to use it with list-item , so this is the solution i had .
    thanks man
  • 5. Re: when-mouse-leave
    user346369 Expert
    Currently Being Moderated
    Post-text-item runs when cursor (focus) leaves the field. It runs when you click into another field, or use Tab or Enter to leave the field. I believe it also runs during query processing when data in the row is being populated by the fetch process.

    When-mouse-leave in Client/Server Forms ran each time the mouse pointer rolled OUT of the field's perimeter. As you rolled the mouse pointer across the screen, LOTS of when-mouse-enter and when-mouse-leave triggers would run, if they were defined on all the fields, or at the block or form-level. We used it to pop-up a balloon-help display on items, if the user rolled the mouse into a field and waited ~half a second. When-mouse-enter / leave triggers do not run in web forms, so it will not cause excessive network traffic.

    I cannot believe Oracle is so lazy that they haven't updated the online help.
  • 6. Re: when-mouse-leave
    newbi_egy Explorer
    Currently Being Moderated
    it's not just about updating the online help , it is about , why they still in the forms builder's triggers list ? if i can not use them .

    and please if you could tell me about :
    you will have develop your own (or find someone who already has) Java Bean.
    do you mean develop my own trigger ? if yes how to get this functionality ?
    3- i think this trigger is the same as post-text-item ? , but i am trying to use it with list-item , so this is the solution i had .
    thanks man
  • 7. Re: when-mouse-leave
    user346369 Expert
    Currently Being Moderated
    Please explain this more:
    i think this trigger is the same as post-text-item ? , but i am trying to use it with list-item
    What do you want your form to do on that list-item???
  • 8. Re: when-mouse-leave
    newbi_egy Explorer
    Currently Being Moderated
    my form has a text item ,combo box and t-list ,
    what i want is to hide the t-list after i move away from the combo box going to the text item .

    if you could answer me previously mentioned questions .

    thanks
  • 9. Re: when-mouse-leave
    user346369 Expert
    Currently Being Moderated
    Create a post-text-item trigger on whichever item you want. It runs when you leave the field.

    Code: Set_item_property('BLOCK_1.ITEM_X',Displayed, Property_False);


    You will need a When-new-item-instance trigger to make the hidden item re-appear.
  • 10. Re: when-mouse-leave
    newbi_egy Explorer
    Currently Being Moderated
    there is no post-text-item trigger can be created on a list item .
  • 11. Re: when-mouse-leave
    user346369 Expert
    Currently Being Moderated
    Well, that's lame. So this might work: Create a package specification, perhaps name it P1. Within it, create a variable: Previous_Item Varchar2(60); This variable, P1.Previous_Item, is accessible from any procedure or trigger.

    Create a form-level when-new-item-instance trigger. It runs when you tab or click into any field, including a List Item. In the WNII trigger, check the value of Previous_Item. If it is the name of the List Item, hide the item you need to hide.

    Use the same trigger to determine when to re-display the hidden item. (also set enabled and Navigable True as required)

    At the end of the WNII trigger, store the value of :System.Trigger_Item in P1.Previous_Item.
  • 12. Re: when-mouse-leave
    newbi_egy Explorer
    Currently Being Moderated
    Well, that's lame.
    but when i enter the list item , the :system.trigger_item will pass the name of the list item to the previous ,
    so the previous item variable is not holding the previous item name , so i think it will not work .

    ??
  • 13. Re: when-mouse-leave
    HamidHelal Guru
    Currently Being Moderated
    did you try ?
    WHEN-MOUSE-UP
  • 14. Re: when-mouse-leave
    user346369 Expert
    Currently Being Moderated
    but when i enter the list item , the :system.trigger_item will pass the name of the list item to the previous, so the previous item variable is not holding the previous item name , so i think it will not work .
    I wrote: At the end of_ the WNII trigger, store the value of :System.Trigger_Item in P1.Previous_Item

    Before you store the new trigger_item value in P1.Previous_Item, your code can see the old value of P1.Previous_Item is, and what the current Trigger_item is.


    HamidHelal: The When-Mouse- (UP, DOWN, MOVE, ENTER, LEAVE) triggers do not work in web forms.
1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points