1 2 Previous Next 16 Replies Latest reply: May 11, 2012 4:20 AM by 684380 RSS

    Have to prevent navigation to another stacked canvas.

    684380
      Dear all,
      I am developing an application using forms 6i with oracle 10g.i have many stacked canvas in this application.where in one particular canvas i have a button namely 'SUBMIT' in which i have a trigger when-button-pressed
      with following code.
      go_block('to_sanct');
      declare
      g char(1);
      
      
      begin
                message('value is '||:gd_ind);
           
           if :gd_ind is not null then
      
           
           if :gd_ind = 'Y' then
                G:='Y';
                
           ELSE
                G:='N';
           end if;
                MESSAGE('IN');
                MESSAGE('TRANS ID'||:c_trans);
                MESSAGE('head '||:c_head);--navigation occurs after this message.***
                MESSAGE('gd value '||G);
      Leave_application.grant_or_deny_leave(:c_trans,:c_head,G);
      COMMIT_form;
          MESSAGE('OUT');
                MESSAGE('TRANS ID'||:c_trans);
                MESSAGE('head '||:c_head);
                MESSAGE('gd value '||G);
      
      
      end if;
      
      if form_success then
           message('You have granted the above request');
      else
           message('failed');
      end if;
      end;
      That is if i click this submit button the packaged procedure should be invoked and the values passed thru the form should be committed.in order to know the values passed i have given several messages before and after invoking the package.my problem is after this message
      MESSAGE('head '||:c_head);  --navigation occurs after this message.*** 
      navigation moves from the current canvas to another canvas.i don have any clue why its happening like this and i want to stop this navigation from current canvas to another one.all canvases in this form are stacked canvas.pls suggest me what i have to do?.
        • 1. Re: Have to prevent navigation to another stacked canvas.
          HamidHelal
          Hello, vidusnat
          go_block('to_sanct');
          When you press the button it's send the focus to to_sanct block. Check this is it your problem ?
          navigation moves from the current canvas to another canvas.
          Is this from your above code ?

          If not need more information or you can write code to back to previous block.

          Hope this helps
          • 2. Re: Have to prevent navigation to another stacked canvas.
            684380
            Hi hamid,

            The problem is not with the following code.
             go_block('to_sanct');
            cos even if i comment it i have the same navigation problem.what information u need further.pls tel me i ll come clear.


            Thanku.
            • 3. Re: Have to prevent navigation to another stacked canvas.
              684380
              Even if I comment all the messages if i click the SUBMIT button automatically the control is navigated to another canvas name 'application'.I suspect it is some other problem apart from the code.but couldn't identify what it is.kindly help me with suitable suggestions.thanku.
              • 4. Re: Have to prevent navigation to another stacked canvas.
                HamidHelal
                Few assumption... check this...
                1. If the button is the last item of the block and the block behaviour set to Change Data Block.. this can happen.
                2.Make all the code in the button as comment by /*-----*/ then write
                null;
                Press the button and see what happen ?

                If then it's change the block means canvas we have to look for others.. if not check your code..

                Hope this helps

                Hamid

                Edited by: HamidHelal on May 5, 2012 1:25 PM
                • 5. Re: Have to prevent navigation to another stacked canvas.
                  684380
                  Sorry for such a late reply Hamid.I have tried commenting all code and putting the button only with
                   null; 
                  In such case navigation doesn't occur.then again i tried commenting each set code and i suspect that navigation occurs only in the presence of "COMMIT" statement.
                  declare
                  g char(1);
                  
                  
                  begin
                       --     message('value is '||:gd_ind);
                       
                  /*     if :gd_ind is not null then
                  
                       
                       if :gd_ind = 'Y' then
                            G:='Y';
                            
                       ELSE
                            G:='N';
                       end if;
                       --     MESSAGE('IN');
                       --     MESSAGE('TRANS ID'||:c_trans);
                       --     MESSAGE('head '||:c_head);
                            --MESSAGE('gd value '||G);
                  Leave_application.grant_or_deny_leave(:c_trans,:c_head,G);*/
                  COMMIT;
                  /*   -- MESSAGE('OUT');
                       --     MESSAGE('TRANS ID'||:c_trans);
                       --     MESSAGE('head '||:c_head);
                       --     MESSAGE('gd value '||G);
                  
                  
                  --end if;*/
                  
                  end;
                  Does this COMMIT statement have any impact on the navigation?.Do u have any idea Hamid.
                  • 6. Re: Have to prevent navigation to another stacked canvas.
                    684380
                    Also the SUBMIT button is not the last button and the block behaviour is also not 'change datablock' but 'same record'.
                    so hope this wont any relation with navigation to another block.


                    Thanks
                    Hamid
                    • 7. Re: Have to prevent navigation to another stacked canvas.
                      Amatu Allah Neveen Ebrahim
                      Hi
                      Does this COMMIT statement have any impact on the navigation?.Do u have any idea Hamid.
                      Not at all...

                      Pls check the order of blocks in ur Object Navigator it might be changed by mistack...
                      Rearrange it the way they appear in the Layout

                      If this doesn't work pls check the the order of the Stacked canvases pls use
                      Go_bock();
                      Go_item ();
                      in Displaying and hiding the stacked canvases u r navigating through...

                      Pls note the item must be navigable and visible in canvas layout...

                      One last try pls look for the BUILT-IN
                      GO_BLOCK('block _problem');
                      select Edit menu form design time > select Find > Then write name of the block causing the problem
                      and > Search

                      It must Reside in ur Package during navigating between canvas by mistake...

                      Or u have a KEY-COMMIT or any related form level commit triggers regarding the navigating after commit.

                      Hope this helps...

                      Regards,

                      Amatu Allah.

                      Edited by: Amatu Allah on May 7, 2012 12:24 AM
                      • 8. Re: Have to prevent navigation to another stacked canvas.
                        HamidHelal
                        So, it's clear to you that, COMMIT/COMMIT_FORM in the button caused the problem. right ?
                        Now, need investigation ,

                        Do you have any trigger named key-commit or on-commit or post-query ?

                        If yes.. check the code that any code move the cursor to the navigated block.
                        And change the property of the button , Keyboard Navigation to NO.
                        and the block behaviour is also not 'change datablock' but 'same record'.
                        @Dear Amatu
                        Pls check the order of blocks in ur Object Navigator it might be changed by mistack...
                        As navigation property is 'same record' the order of blocks is not the problem.


                        Hope this helps
                        • 9. Re: Have to prevent navigation to another stacked canvas.
                          Amatu Allah Neveen Ebrahim
                          Asalamu Alikum Ya Hamid

                          Yes u r right but if u look at the time between her explanation and my assumbtion u will find out the answer by urself :)

                          Thanks & Happy for ur science honesty & interest :)

                          i recommand u Vidusnat to Recompile & Regenerate ur forms then Save & Run to make changes take place...

                          u should also make sure that the creation of the button actually existed in the same datablock which is supposed to be ; u may create it in design time on the layout but it is created in the object navigator in another block so pls check the object navigator

                          Regards,

                          Amatu Allah.

                          Edited by: Amatu Allah on May 7, 2012 1:15 AM
                          • 10. Re: Have to prevent navigation to another stacked canvas.
                            HamidHelal
                            Walikum Al salam, Amatu Allah.
                            >
                            Yes u r right but if u look at the time between her explanation and my assumbtion u will find out the answer by urself :)
                            :)
                            • 11. Re: Have to prevent navigation to another stacked canvas.
                              684380
                              k Hamid n Amatu i ll check n ll do all the validations as u mentioned above.i think once for all i have to check all the data blocks used in this application.Thanku so much for ur timely replies.ll come to u again after testing everything.Good Luck!. :)
                              • 12. Re: Have to prevent navigation to another stacked canvas.
                                684380
                                Hi Amatu & Hamid,
                                I have no KEY-COMMIT trigger.I used only commit_form in my code.and I checked all the possibilities mentioned by u both.but couldn't find out the actual reason for the navigation at the time of commit.so i deleted the block and the canvas and recreated it newly and tested it.Glad!..now its working fine without navigating to other canvases.Thanku so much for ur timely suggestions.



                                Reg
                                vids
                                • 13. Re: Have to prevent navigation to another stacked canvas.
                                  Amatu Allah Neveen Ebrahim
                                  Hi

                                  in this case the problem existed in un-necessary triggers of navigation type may be that might cause the problem u think u don't want it and it'snot affecting ur forms functionality but i stress it does.

                                  Happy u colud solve it :)

                                  Regards,

                                  Amatu Allah.
                                  • 14. Re: Have to prevent navigation to another stacked canvas.
                                    684380
                                    But what i thought is some unwanted property has been set in the blocks i used previously.i did changed only the block and canvas.so i thought it might be due to some change in the property.
                                    1 2 Previous Next