8 Replies Latest reply: Oct 4, 2013 6:50 AM by salute-Salem RSS

    Understanding default behavior of branching ?

    salute-Salem

      db 11gxe and apex 4.x

       

      i created a master detail page , there are buttons on it by default , like (cancel,delete,apply changes) and two buttons for getting the next order and the previous one --there a master table for orders .

      there are also branches created by default for the button getting the next order and the button getting the previous one (the branch is conditional ofcourse) -- the condition is when-button-clicked .

       

      these branches are created automatically because the buttons are exist , and there are conditions which are "when-button-clicked" --just this condition .

       

      -- what i do not understand is that there are other buttons like "delete , cancel , apply changes" , and there were no branches created for them like the other buttons which i mentioned above ,

      although they also navigate like the other buttons , and the condition is when-button-clicked as well ?

       

      why in the first situation there are branches created automatically , and in the last situation there are not ??

       

      thanks in advance

        • 1. Re: Understanding default behavior of branching ?
          Jeff E

          When you created your master detail page you used a wizard.  That wizard is what created all the objects on the page, including the buttons and branches.

           

          Branches are not created automatically just because a button is there.  Add a button to your page; no branch will be created.

           

          A button can submit the page or include a redirect to a page (bypassing a branch in a sense).  Check the button action.  Most "cancel" buttons will redirect to another page instead of submitting the page.

           

          If the engine can't find a branch to execute it will (now days) direct back to the same page.  If you see a "delete" and "apply changes" button, and they both submit the page on button action, but you don't see a branch for them the engine is using this default behavior.

           

          Did I miss anything? Confuse you more?

          • 2. Re: Understanding default behavior of branching ?
            salute-Salem

            did you confuse me more ?

            yeah , sure you did .

             

            the question simply is :

            there are a lot of buttons created by default , all of them have the same condition which is "when-button-clicked" ,

            some of them had branches created automatically , and the others had not ?? why ?

            is it the default behavior of apex to create branches for some buttons and does not for others , even if they have the same condition and navigation rules ??

             

            -- another question please ,

            why to create branches for buttons if i can create the same condition in the buttons attributes ?

            thanks

            • 3. Re: Understanding default behavior of branching ?
              salute-Salem

              any response ?

               

              another question please ,

              Is it normal to wait for a day in order to get an answer in this forum ? because i am concerning of the support issue for my apex questions .

              and i asked a question about this thread before here in the forum , i think i have to wait a long time to get an answer for any question i post ,

              and that is because there are not a lot of users in the forum , or because of other reasons ?

               

              thanks

              • 4. Re: Understanding default behavior of branching ?
                Jeff E
                why to create branches for buttons if i can create the same condition in the buttons attributes ?

                You will want a branch for a button if you want the button to submit the page and do the computations, validations, and processing.  If you don't need to do computations, validations, and processing you can just have the button go to another page.

                 

                A good example is a "cancel" button.  The cancel button is usually set up to go to another page directly.  If the user entered data into the page and clicked the cancel button the data will not be saved.

                • 5. Re: Understanding default behavior of branching ?
                  salute-Salem

                  You will want a branch for a button if you want the button to submit the page

                  I am sorry , but it is also not so clear , because i have the "Apply Changes" button by default when i created the page , and it submits the page , but

                  i do not have a branch to it ?? how ? according to your words , it can not be ?

                   

                  -- could you please send me your facebook account or any e-mail account to ask you directly through chatting ?

                  thanks

                  • 6. Re: Understanding default behavior of branching ?
                    Jeff E

                    I am sorry , but it is also not so clear , because i have the "Apply Changes" button by default when i created the page , and it submits the page , but

                    i do not have a branch to it ?? how ? according to your words , it can not be ?

                     

                    I also said in my first reply, "If the engine can't find a branch to execute it will (now days) direct back to the same page".

                     

                    You have no branch with the "When Button Pressed" set to "Apply Changes". No problem, the default action will be to branch back to the same page.  In older versions of APEX you had to create a catch-all (unconditional) branch or you would get an error.  If it helps, imagine there is a branch at the end of every page back to the same page.  Branches are evaluated sequentially based on the sequence number. Once a branch is evaluated to true it will use it and not look at the others after it.

                     

                    8.6 Working with Branches

                    • 7. Re: Understanding default behavior of branching ?
                      salute-Salem

                      still confused ,

                      i can create a button with the condition when-button-pressed , and navigate to the same page or another page , and i can

                      create a branch with the same condition w-b-p , and navigate to the same page or another page ??

                      what is the difference ???

                       

                      2- the link demonstrates the branch points and conditions not the use of it .

                       

                      3- you did not answer this :

                      -- could you please send me your facebook account or any e-mail account to ask you directly through chatting ?