7 Replies Latest reply: May 3, 2013 10:30 AM by Andreas Weiden RSS

    when-mouse-doubleclick and LOV

    user650888
      I have two text items

      text_item1, text_item2.

      On when-mouse-doubleclick trigger of text item 1, I mentioned the following:

      list_values;
      :block.text_item2 := :block.text_item1

      Meaning, as soon as we double click on text_item1, the text in text_item1 gets copied to text_item2

      Problem:

      There is an LOV on text_item1, So after applying the when-mouse-doubleclick....

      If text_item1 and text_item2 are not the same, If I double click on text_item1, lov appers, I press cancel because I dont want to change anything, but now the text in

      text_item2 changes because of when-mouse-doubleclick on text_item1 (Gets copied)

      Question:

      How can I make it possible that if I press cancel on LOV of text_item1, the text in text_item2 does not get copied from text_item1 ?
        • 1. Re: when-mouse-doubleclick and LOV
          HamidHelal
          user650888 wrote:
          I have two text items

          text_item1, text_item2.

          On when-mouse-doubleclick trigger of text item 1, I mentioned the following:

          list_values;
          :block.text_item2 := :block.text_item1

          Meaning, as soon as we double click on text_item1, the text in text_item1 gets copied to text_item2

          Problem:

          There is an LOV on text_item1, So after applying the when-mouse-doubleclick....

          If text_item1 and text_item2 are not the same, If I double click on text_item1, lov appers, I press cancel because I dont want to change anything, but now the text in

          text_item2 changes because of when-mouse-doubleclick on text_item1 (Gets copied)

          Question:

          How can I make it possible that if I press cancel on LOV of text_item1, the text in text_item2 does not get copied from text_item1 ?
          Try this on your trigger,
          declare
           v_value varchar2(500);
          begin
          v_value:=:block.text_item1;
          list_values;
          if v_value <>:block.text_item1 then
          :block.text_item2 := :block.text_item1;
          end if;
          end;
          Hope this works..

          Hamid
          • 2. Re: when-mouse-doubleclick and LOV
            Amatu Allah Neveen Ebrahim
            Hi
            Just want to clarify the if condition in Hamid's solution..
            if v_value < .> :block.text_item1 then ....
            The inequality is unclear o_O i have just put a point to be displayed in forum

            Amatu Allah
            • 3. Re: when-mouse-doubleclick and LOV
              Andreas Weiden
              You can use SHOW_LOV instead of LIST_VALUES. this returns TRUE if the user chose a record and FALSE if the lov was cancelled.
              • 4. Re: when-mouse-doubleclick and LOV
                user650888
                show_lov does not work




                DECLARE
                     V_LOV BOOLEAN;
                BEGIN
                          V_LOV := SHOW_LOV('my_LOV');
                     
                END;     


                I used the above, it did not work
                • 5. Re: when-mouse-doubleclick and LOV
                  Bhushan53
                  you can create a parameter. In the when-new-item-instance of text_item1 assign it's value as -

                  :parameter.param1 := :block.text_item1;

                  then, at your double click.. compare the value

                  IF :parameter.param1 = :block.text_item1
                  THEN
                  don't change value for text_item2
                  ELSE
                  copy(:block.text_item1, 'block.text_item2');
                  END IF;


                  Bhushan

                  Edited by: 987583 on May 3, 2013 4:38 AM
                  • 6. Re: when-mouse-doubleclick and LOV
                    teefu.orasoft
                    dear friend try this

                    when-validate-trigger on : :text_item1

                    if :text_item1 is null then
                    :text_item2 :='';
                    elsif :text_item1 is not null then
                    :text_item2 := :text_item1;
                    end if;



                    teefu.
                    • 7. Re: when-mouse-doubleclick and LOV
                      Andreas Weiden
                      What does "it did not work" mean? is the lov not shown? Is the return not ok for you?