This discussion is archived
1 2 Previous Next 28 Replies Latest reply: Nov 4, 2013 4:35 AM by newbi_egy Go to original post RSS
  • 15. Re: detail tabular form
    Nicolette Expert
    Currently Being Moderated

    Newbi_egy

     

    Did you have a look at what I had changed in the application on apex.oracle.com?

    If you had, you would have noticed that I didn't change the dynamic action.

    Instead I added usefull code to the ondemand process.

    So yes you need the ondemand process because that is actually calculating the price.

     

    Nicolette

  • 16. Re: detail tabular form
    newbi_egy Explorer
    Currently Being Moderated

    sorry nicolette , but you said this :

    >

    The get price is no changed to:

    1. declare 
    2. cursor c_test(b_test_no in number) 
    3. is 
    4. select price 
    5. from   tests 
    6. where  test_no = b_test_no 
    7.   ; 
    8.   v_test_no number; 
    9.   v_price   number; 
    10. begin 
    11.    v_test_no := to_number(apex_application.g_x01); 
    12. open c_test(v_test_no); 
    13. fetch c_test 
    14. into  v_price; 
    15. close c_test; 
    16.    sys.htp.prn(to_char(v_price,'L999G990D00')); 
    17. end; 

    and the get price is the dynamic action ! ?

  • 17. Re: detail tabular form
    Nicolette Expert
    Currently Being Moderated

    Newbi_egy

     

    The ondemand process is also called get price.

     

    Why would I first tell you that you need all that javascript and then change to that for pl/sql. That just doesn't make sense.

     

    In my post explaining all the steps I told you that I couldn't complete step 3 because the price was missing.

    After you added the price all I did was completing step 3.

     

    Nicolette

  • 18. Re: detail tabular form
    newbi_egy Explorer
    Currently Being Moderated

    oh, i am so sorry , i did not know that the two have the same name ( process and dynamic action) ,

    it works now , but i want to understand the steps now :

     

    what is :

    apex_application.g_x01 ? -- in the cursor

    and what is

      sys.htp.prn(to_char(v_price,'L999G990D00')); 

    is sys.htp.prn the same as htp.p ? and what about the 'L999G990D00' ?


    thanks a lot nicolette

  • 19. Re: detail tabular form
    Nicolette Expert
    Currently Being Moderated

    Newbi_egy

     

    For sys.htp.p see  The htp and htf Packages .

    'L999G990D00'  is a formatmask. I'm using an  explicit conversion from number to varchar so I control how the conversion is done. And because we are talking a price hire using a currency.

     

    apex_application.g_x01 Is used to submit a value to be used in the ondemand process without the need to create a page item for it.

    See also the javascript code.

     

    Nicolette

  • 20. Re: detail tabular form
    newbi_egy Explorer
    Currently Being Moderated

    1- where to read about "apex_application.g_x01" in the documentation or anywhere ?

    2- there is a bad news , all you said worked on apex.oracle.com , even in the other same page , but in my real application it did not work although i did all you said :

    i have these processes :

     

    Processes

    Edit AllCopyCreate
    After Submit
    5Get PKPL/SQL anonymous blockConditional
    10Process Row of PATIENTSAutomatic Row Processing (DML)Unconditional
    15setfkPL/SQL anonymous blockConditional
    20ApplyMRUMulti Row UpdateConditional
    30ApplyMRDMulti Row DeleteConditional
    40reset pageClear Cache for all Items on Pages (PageID,PageID,PageID)Conditional
    AJAX Callbacks
    35get pricePL/SQL anonymous block

    Unconditional

  • 21. Re: detail tabular form
    newbi_egy Explorer
    Currently Being Moderated

    3- when should "on-demand" process fire ?

    4- what is the meaning of "when requested by ajax" , when does ajax request the process ?

  • 22. Re: detail tabular form
    newbi_egy Explorer
    Currently Being Moderated

    nicolette , please look at the page (master detail) in the application (another of patients) and test it . i did what you said and it works but not correctly .

    when i choose one test , the price is shown , but when i add another row and choose another test , the price of it is not shown ?

  • 23. Re: detail tabular form
    Nicolette Expert
    Currently Being Moderated

    Newbi_egy

     

    newbi_egy wrote:

     

    nicolette , please look at the page (master detail) in the application (another of patients) and test it . i did what you said and it works but not correctly .

    when i choose one test , the price is shown , but when i add another row and choose another test , the price of it is not shown ?

     

    That is a setting I always forget because it isn't in the wizard.

    By the dynamic action action under Advanced set event scope to Dynamic.

    It could be that in apex 4.0 the setting is called Live. I don't have a apex 4.0 at hand to check that.

    Basicly what happens now is that the dynamic action is only bound to the html items that are there when the page is rendered.

    With changing the event scope it will also be bound to html elements that are created after the page is rendered, Which is happening when you add a row.

     

    Nicolette

  • 24. Re: detail tabular form
    Nicolette Expert
    Currently Being Moderated

    Newbi_egy

    newbi_egy wrote:

     

    1- where to read about "apex_application.g_x01" in the documentation or anywhere ?

    Most of my knowledge about apex_application.g_x01 is from this forum. And from blogs I'm following.

     

    2- there is a bad news , all you said worked on apex.oracle.com , even in the other same page , but in my real application it did not work although i did all you said

    Well it is time to start debugging then.

    Start with debugging the javascript and use you're browsers webdeveloper tools to do that.

    Changes are high that the javascript isn't running because your popup item doesn't have the name f04 any more but an other one.

    Just change the jQuery selector accordingly.

     

    Another point to check is that the spelling of the ondemand process must be the same as in the javascript call. Notice that the name is case sensitive.

     

    Nicolette

  • 25. Re: detail tabular form
    newbi_egy Explorer
    Currently Being Moderated

    3- when should "on-demand" process fire ?

    4- what is the meaning of "when requested by ajax" , when does ajax request the process ?

    5- i want to learn about debugging my application not the java script , and there is nothing in the documentation ,

    where to learn about it ?

  • 26. Re: detail tabular form
    Nicolette Expert
    Currently Being Moderated

    Newbi_egy

    newbi_egy wrote:

     

    3- when should "on-demand" process fire ?

    When it is called from javascript.

    4- what is the meaning of "when requested by ajax" , when does ajax request the process ?

    For more information on AJAX start with wikipedia

     

    5- i want to learn about debugging my application not the java script , and there is nothing in the documentation ,

    where to learn about it ?

    That is because you debug javascript with the tools your browser provide you with. Or any plugins you have added to your browser for this purpose.

    So look at the documentation of Internet explorer, Firefox, Chrome or what ever browser you are using.

     

    Nicolette

  • 27. Re: detail tabular form
    newbi_egy Explorer
    Currently Being Moderated

    > When it is called from javascript.

    from javascript or from ajax ?

    > about debugging

    i've meant debugging with the debug button in the application , not debugging javascript , where to learn about it ?

  • 28. Re: detail tabular form
    Nicolette Expert
    Currently Being Moderated

    Newbi_egy

     

    AJAX is acronym for Asynchronous JavaScript and XML

    So AJAX is javascript.

     

    And on the debug message you learn them by doing it there is no documentation saying this message means this.

    But I find the messages self-explanatory.


    Nicolette

1 2 Previous Next