This discussion is archived
9 Replies Latest reply: Oct 9, 2012 5:00 AM by gobinkl RSS

Issue while reflecting the data to ADF form from ADF Table

gobinkl Newbie
Currently Being Moderated
Hi All,

I have one scenario as follows:

I have to open a form in entry mode. So I have used a Method Call activity in task flow to call "Create" in method call activity.
Then form opens in a entry mode. I have a adf table in the page showing the entered data.
When form opens in entry mode, instead of entering the values in the field User selects a record in ADF table, but due to the create mode of the form it will through me a error to fill mandatory fields.
Please tell me the way so that if user selects the record(in adf table) instead of entering new record, the value would reflect in the Adf form.

If I use a roll back on selecting the row of ADF table, then it is showing me this error "Row currency has changed since the user interface was rendered. The expected row key was oracle.jbo.Key[null ]" because there will be no row key in the cache when form opens.

Please suggest me the way to complete the task.

I am using jdeveloper 11.1.2.1.0

Thanks,
Gobi

Edited by: gobinkl on Oct 3, 2012 2:06 AM
  • 1. Re: Issue while reflecting the data to ADF form from ADF Table
    Frank Nimphius Employee ACE
    Currently Being Moderated
    Hi,

    you can try a custom table selection listener that accesses the form iterator (DCIteratorBinding), gets the current row and if it is new, deletes it

    Frank
  • 2. Re: Issue while reflecting the data to ADF form from ADF Table
    gobinkl Newbie
    Currently Being Moderated
    Thanks frank for your suggestion.

    But I am facing one more issue related to it, that is, when I am customizing the selection listener, I have to put "immediate=true" (for adf table), for bypassing the validation phase, as a result when I select the row of the table, mandatory fields are not reflecting but some optional fields are reflecting. What is the issue with it.

    When I tried using command button to delete the row(when it is new) instead of using Table selection listener, putting "immediate=true" (for command button) and "immediate=false" (for adf table), it worked fine for me.

    Can you tell me what is the issue with table selection listener when using immediate property of table as true.
    How do I overcome this problem?

    Thanks,
    Gobi
  • 3. Re: Issue while reflecting the data to ADF form from ADF Table
    gobinkl Newbie
    Currently Being Moderated
    please help in the above mentioned issue.
  • 4. Re: Issue while reflecting the data to ADF form from ADF Table
    codigoadf Oracle ACE
    Currently Being Moderated
    Hi.
    Is important that you understand the lifecycle and immediate property

    check out this:http://docs.oracle.com/cd/E15523_01/web.1111/b31973/af_lifecycle.htm
  • 5. Re: Issue while reflecting the data to ADF form from ADF Table
    Subramanian Meyyappan Expert
    Currently Being Moderated
    no no your are complicating yourself. :) better your should provide your usecase.
    first thing: go through the books & also adf blogs learn and understand the framework. as above person said.


    i hope that you had method call create as activity as default while page rendering it make your af: form empty(that is ready fir insertion format).
    so if your are doing like that.am sure it will throw some mandatory errors.
    error will not resolve unless without entering any data's.

    coming af:table why are using af:table - immediate = true / false(switching).

    immediate = true - skip over validation or by pass some validation in some phase - based on the component which you are using. (say as if you are using editable value holder,af:coomand button).

    grab the information here in an more legible manner.
    http://adfpractice-fedor.blogspot.in/2012/02/understanding-immediate-attribute.html

    let me know your usecase.

    this will assist you
    https://blogs.oracle.com/shay/entry/executing_an_action_on_jsf_pag
    http://tanveeroracle.blogspot.in/2009/09/adf-11g-createinsert-to-display-blank.html

    Edited by: user707 on Oct 5, 2012 9:02 AM
  • 6. Re: Issue while reflecting the data to ADF form from ADF Table
    gobinkl Newbie
    Currently Being Moderated
    Sorry for replying late - user707

    I am using dynamic region in my application.

    Basically I want to open a form in create mode, (so I have used method call activity for this)

    I have a adf table in my form.

    Instead of entering the new record in the form, if user selects one of the row in the adf table, the data should reflect in the form.

    If use use roll back before selection it will show me errors, due to no row in the cache

    So as frank has suggested I have customized the selection listener,

    "Hi,

    you can try a custom table selection listener that accesses the form iterator (DCIteratorBinding), gets the current row and if it is new, deletes it

    Frank"

    But entry form has some mandatory field which restricts me to invoke selection listener without entering the field.

    So I have used adf table immediate=true for invoking customized selection listener. But its not reflecting mandatory fields.

    You check my above post also.

    Thanks,
    Gobi.
  • 7. Re: Issue while reflecting the data to ADF form from ADF Table
    gobinkl Newbie
    Currently Being Moderated
    Thanks frank for your suggestion.
    when I am customizing the selection listener, I have to put "immediate=true" (for adf table) to invoke selection listener, as a result when I select the row of the table, mandatory fields are not reflecting but some optional fields are reflecting. What is the issue with it.

    When I tried using command button to delete the row(when it is new) instead of using Table selection listener, putting "immediate=true" (for command button) and "immediate=false" (for adf table), it worked fine for me.

    How do I overcome this problem?

    Thanks,
    Gobi
  • 8. Re: Issue while reflecting the data to ADF form from ADF Table
    Subramanian Meyyappan Expert
    Currently Being Moderated
    these post from Baig one of the following thread.
    Set ADF form in insert mode go through this thread.
    Download the examples
     
    Input form http://orclsamples.googlecode.com/files/InputForm.zip (Run the main page it is calling a bounded task flow)
     
    Create Edit form http://orclsamples.googlecode.com/files/CreateEditRecord.zip
     
    you can see and easily identify the purpose of the flow in TF diagrams.
     
    -Baig
    http://baigsorcl.blogspot.com/
    however it will satisfy your requirement.
  • 9. Re: Issue while reflecting the data to ADF form from ADF Table
    gobinkl Newbie
    Currently Being Moderated
    Thanks-user707

    I have checked both the samples, same as the samples I have also used Method Call Activity and that is working.

    But my issue is that in create mode of form which having some mandatory fields, instead of entering new values user selects a record in adf table, for reflecting row in the adf form which throws error for filling mandatory fields, how can I fire my table selection listener.



    Thanks,
    Gobi

Legend

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