AutoSubmit and CRUD

Hello.

JDeveloper 11.1.1.2, jsff, bc4j

I want to do a SELECT a field with Autosubmit and a valueChangeListener and according to the result maybe an UPDATE. This is why I need a database connection.

QUESTION:

What is the best way to access the database in the above scenario:

one)
by writing the code in the ApplicationModuleImpl and run this code.

(b)
by writing a bean managed which do create / is an ApplicationModuleImpl and get out in turn the dbConnection from there.

Best regards
Erik

To any code base to your model layer, therefore, in this regard, option A.

Then, expose the service method in your AM to the customer interface and create a binding method for this in your definition of the page and name it through the link layer.

In general, if you use a binding of the ADF, never deal with AMs directly in your view layer.

John

Tags: Java

Similar Questions

  • autoSubmit and validation

    Hello

    I have a selectOneChoice with autoSubmit set to true. I also have an inputText with a partialTrigger that refers to the selectOneChoice. So changing the value of the selectOneChoice should PPR the inputText.

    The necessary inputText attribute depends on the value of selectOneChoice, then I put the required attribute of the imputText to "#{eq 'OTH' bindings.soc.inputValue} '.

    When I select the selectOneChoice OTH, the inputText is PPR and becomes necessary. I do not fill in the inputText and change the value of the selectOneChoice to a value that makes the inputText not required. The problem is that the inputText is marked as an error, because it is necessary.

    Why the inputText is validated using the old selectOneChoice OTH value and not the new?

    Thank you

    JDev 11.1.2.4

    Given that the text refer SOC through partial triggers. When the value of the COS is changed SOC and input text is submitted. Because in your case, the input text is marked as an error, on changing the SOC input value is not getting updated.

    You can try an option:

    Part 1) remove triggers property on the input text.

    (2) of the value to change the listening port of the COS, refresh the input text programmatically.

  • Validate the components even with autosubmit and immediate

    Greetings:

    I work in an application using ADF 11 g. In my page, I have a < af:selectOneRadio > with two options (selectItem). These selectItem have both immediate and autoSubmit attribute equal to true. Then, there is a < af:panelGroupLayout > what prior partialTriggers for selectOneRadio attribute points. Inside the panelGroupLayout, there are a few < af:inputText > ' s. All are necessary. Depending on the value of selectOneRadio, some entries will have their label has changed, while others will be (or not) renderized. After this panelGroupLayout, I have a < af:commandButton >, where there will be the actual presentation.
    What I was expecting, it was, when I changed the select value, a partial presentation would be done without validation and changed the labels or the rederization of the components inside panelGroupLayout. However, the components are being validated. The error messages are displayed and the chagings components do not move.
    Googling for a solution (https://www.google.com.br/search?q=adf+not+validate+at+partial+submit), I found some suggestions that either didn't work or thought too complicated (for example, to use a subform and set the page definition XML (http://www.oracle.com/technetwork/developer-tools/adf/learnmore/40-ppr-subform-169182.pdf)). I think there is a simpler solution, but I couldn't find it.
    Below is my code JSF:
       <af:form id="formCadastroUsuarioLicitacoes" usesUpload="true">
           <af:panelGroupLayout halign="end" id="pnGL1">
                <af:selectOneRadio id="radioType" value="#{viewScope.myManagedBean.type}" immediate="true" required="true"
                                        styleClass="radioType" autoSubmit="true">
                   <f:selectItem itemLabel="Type A" itemValue="a" id="itemA"/>
                   <f:selectItem itemLabel="Type B" itemValue="b" id="itemB"/>
                </af:selectOneRadio>
                 
                   <af:panelGroupLayout id="panelGroupForm" partialTriggers="radioType" styleClass="AFStretchWidth">
                     <af:inputText id="txfDoc" value="#{viewScope.myManagedBean.document}"
                                       label="#{(viewScope.myManagedBean.type == 'b')? 'Doc B': 'Doc A'}" required="true" 
                                       />
                     <af:inputText id="txfcompany" value="#{viewScope.myManagedBean.company}" label="company"
                                       rendered="#{(viewScope.myManagedBean.type == 'b')}" required="true" />
                     <af:inputText id="txfName" value="#{viewScope.myManagedBean.name}"
                                       label="#{(viewScope.myManagedBean.type == 'b')? 'Your Name': 'Name'}" required="true" />
                     <af:inputText id="txfEmail" value="#{viewScope.myManagedBean.email}" label="Email" required="true" />
                     <af:inputText id="txfEmailConfirm" value="#{viewScope.myManagedBean.emailConfirm}" label="Confirm your Email"
                                       required="true" />
                     <af:inputText id="txfphine" value="#{viewScope.myManagedBean.phine}" label="phine"
                                       rendered="#{(viewScope.myManagedBean.type == 'b')}" required="true" />
                     <af:inputText id="txfFax" value="#{viewScope.myManagedBean.fax}" label="Fax"
                                       rendered="#{(viewScope.myManagedBean.type == 'b')}" required="true" />
                   </af:panelGroupLayout>
                 
                <af:commandButton text="Submit" id="btnsubmit" action="#{viewScope.myManagedBean.save}"/>
           </af:panelGroupLayout>
      </af:form>
    Thank you

    Rafael Afonso

    Edited by: 993323 04/04/2013 13:50

    Hey,.

    I hate to be the one to bind the docs of Oracle. Did you read this part though? http://docs.Oracle.com/CD/E23549_01/Web.1111/b31973/af_lifecycle.htm#CIAIDFGC

    I also know that among the people Oracle Ace wrote a blog on this. I think it's Timo, but I couldn't find him. It's been a while since I read it.

    In any case, my suggestion would be to examine the life cycle methods that get ignored when the immediate value is set and see if this makes your problem more clear for you.

    I'm sorry I couldn't be of more help, I only looked a bit in the field validation and the immediate field.

    Good luck
    Dustin

  • Point of difference between AutoSubmit and the lifecycle of ADF PartialSubmit

    I understand the part where automatic transmission is used to traverse the lifecycle for the specific element, on which it is used and all other components that use the partial trigger on it

    How the partial submits components custom work? What is their relationship with partial triggers? How it work with ADF life cycle optimization?

    Yes, part delivery set to a control element submits the entire form (then, as you say, all text fields are submitted () and leaves of developer to decide what UI component is updated in response.

    https://blogs.Oracle.com/jdevotnharvest/entry/partial_submit_vs_auto_submit

  • You enter a value and tab out of af:inputListOfValues displays an incorrect value

    Hello. I have a problem with the autosubmit and tab off af:inputListOfValues in my code.

    Problem: When I type in a valid value and tab out of the field, it ignores the value, I entered and displays everything the first list in the result of the query instead regardless of the value that I typed.

    My code snippet. What it does is simply a search for employee LoV unattached to an attribute of the entity, and depending on selection, it displays the name of the employee within the page. (it also retrieves a table view what employee number came into office)

    < af:inputListOfValues id = "empNoId".

    popupTitle = "search and select: #{bindings." EmpNo.hints.label}.

    value = "#{bindings." EmpNo.inputValue}.

    label = "#{bindings." EmpNo.hints.label}.

    model = ' #{bindings. " EmpNo.listOfValuesModel}.

    required = "#{bindings." EmpNo.hints.mandatory}.

    columns = "#{bindings." EmpNo.hints.displayWidth}.

    shortDesc = "#{bindings." EmpNo.hints.tooltip}.

    Binding = "#{workLocationBean.txtEmpNo} '"

    partialTriggers = "id1".

    valueChangeListener = "{bean.onEmpNoChange}" "

    autoSubmit = "true" >

    < f: validator binding = "#{bindings." EmpNo.validator} "/ >"

    < / af:inputListOfValues >

    Other things to note:

    When I enter a valid employee number and click anywhere on the page (not TAB), it behaves properly.

    I tried to figure this out for days. Even my valueChangeListener Gets an incorrect value (when I do System.out) when I tab out, so I do not know where to catch them and replace it with the correct value.

    Thank you.

    This happens usually when the primary key is not defined in the view object used by LOV.

    Dario

  • Multiplication of the columns in the table and displays the result

    Hello Experts!
    With the help of Jdeveloper 11 g Release 1:
    I have a situation where I have a two tables showing the relationship of the master / detail. Now the main table shows the available quantity and the unit price and will then multiply to show the total price.
    The Details table does the same thing but has an additional column (added manually) with another text entry that requires the 'quantity' and then I need the total price with this value as well. So overall, the user has the option to select a quantity that is less than or equal to the quantity available (from the main table) and then to calculate the new total price based on user input.
    How can I go about it?
    All of the suggestions! ?
    s =

    I apologize in advance if this does not work for you, but here's my point of view.

    (1) add QtyDesired as a transitional editable column with a set of expressions Qty.
    (2) make your transitional column TOTALCOST an expression of QtyDesired * UNITPRICE.
    (3) according to how your page is set up, your QtyDesired may need to raise a contextual event. Otherwise, it might be enough to assign partial release of your TotalCost your column QtyDesired column to allow a partial page refresh. I do something similar by editing the line of my table in a popup, and then when the dialog box closes, it refreshes the table with the new values.

    Hope that helps. Just throwing some ideas out there. AutoSubmit and partial triggers seem to trouble many of my problems of refresh.

  • table autosubmit commit.enabled

    Jdev 11.1.1.0.1

    Hello
    I'm trying to update a row in an af:table. I have a table and a button that is disabled when "bindings.Commit.enabled" is false.

    What should I put "autosubmit = true" on all of the columns in my table and add PPR too? If I didn't, my commit.enabled is always wrong!
    Is there another solution?

    My usecase:


    < af:commandButton text = 'Save' actionListener = "#{bindings.Commit.execute} '"
    partialTriggers = "pc1:table1:abre pc1:table1:libl".
    Disabled="#{!bindings.commit.enabled}"/ >


    < af:table value = "#{bindings." Var CiviView.collectionModel}"="row ".
    lines = ' #{bindings. " CiviView.rangeSize}.
    emptyText = "#{bindings." CiviView.viewable? "{'No record.': 'Access denied.'}".
    fetchSize = "#{bindings." CiviView.rangeSize}.
    filterModel = "#{bindings." CiviViewQuery.queryDescriptor}.
    queryListener = ' #{bindings. " CiviViewQuery.processQuery}.
    filterVisible = "true" varStatus = "vs."
    selectedRowKeys = ' #{bindings. " CiviView.collectionModel.selectedRow}.
    selectionListener = "#{bindings." CiviView.collectionModel.makeCurrent}.
    rowSelection = "single" id = "table1";
    inlineStyle = "width: 100%;" >
    < af:column sortProperty = "Tree" filterable = 'true '.
    sortable = "false" headerText = "Abbreviation" minimumWidth = "12".
    showRequired = "true" >
    < af:inputText value = "#{row.bindings.Abre.inputValue} '"
    label = "#{bindings." CiviView.hints.Abre.label}.
    columns = "#{bindings." CiviView.hints.Abre.displayWidth}.
    maximumLength = "#{bindings." CiviView.hints.Abre.precision}.
    shortDesc = "#{bindings." CiviView.hints.Abre.tooltip}.
    showRequired = "true" id = "tree".
    autoSubmit = "true" required = "true" / >
    < / af:column >
    < af:column sortProperty = "Libe" filterable = 'true '.
    sortable = "true" headerText = "Label" width = "210".
    displayIndex = minimumWidth '-1' = '12 '.
    showRequired = "true" >
    < af:inputText value = "#{row.bindings.Libe.inputValue} '"
    label = "#{bindings." CiviView.hints.Libe.label}.
    columns = "#{bindings." CiviView.hints.Libe.displayWidth}.
    maximumLength = "#{bindings." CiviView.hints.Libe.precision}.
    shortDesc = "#{bindings." CiviView.hints.Libe.tooltip}.
    ID = "libl' autoSubmit = 'true '.
    showRequired = "true" required = "true" / >
    < / af:column >
    < / af:table >

    Thank you
    Clément

    Clément - you do not want to display the results on the server in order to update the model so that the button of validation to become activated. If you want the behavior (the button is disabled unless there are changes to save), then Yes, you need to add autosubmit and PPR.

    I just activate the validation button always (set disabled = false).

    John

  • New installation of Windows 7?

    Good, everyone. For the past little while, I was in need to wipe and reinstall my Windows 7 after tons of viruses and crud that makes my computer unusable.

    I deleted the partition Windows 7 original, as well as all the documen ts, files, etc., not to mention the recovery Partition that had only Windows Vista.

    I have a Windows 7 Home Premium install disk which unfortunately repeatedly got stuck at 0% on "expanding Windows files. I don't know tons of details on my profile, but I have a HP p6157c with 7 GB of pre-installed RAM.

    I tried wrote the entire drive on a USB key, which did not allow the BIOS it gave me an error saying that "do Pen Drve subscription contains no BONE." I left it at 'Files expand Windows' more than an hour yesterday, which only left at 0% on my return.

    I unplugged all the media outside keyboard/mouse, I went into the BIOS settings and turned usb storage devices, deleted 5 GB or RAM, IDE RAID spending... and a little more.

    Is there any solution for this?

    Hello

    1. make sure that you have downloaded the entire ISO file. Some people have reported getting only 2 GB of download/3 GB.

    2. If it's OK, try to install the ISO via USB key file (need for 4 GB or more).

    Here's how...

    Download the MS of W7 USB installation tool and read the instructions on the page to use.

    http://www.microsoftstore.com/store/msstore/HTML/pbPage.Help_Win7_usbdvd_dwnTool

    You may also make this mod as I did if the flash tool-error.

    Download the bootsect file form http://www.everettsporting.com/bootsect.zip

    You will need to go into Control Panel, select display large icons, go to the icon of folder options, view tab, and select the hidden files and folders option.

    Once downloaded, copy the BootSect.exe file in the same folder that contains the file of Windows7-USB-DVD-Download - Tool.exe installed. This file in Windows 7's default installation directory is C:\Users\USERNAME\AppData\Local\Apps\Windows 7 USB DVD Download Tool\

    Run the application from the Windows 7 USB/DVD download tool as described on the Microsoft Store website. The end result will give you a boot USB flash drive that contains everything you need to install the 64 bit version of Windows 7.

    Paul

  • By assigning attributes dependency parameter Notify

    Hello!

    I use Jdeveloper 12.1.3 and try to understand what the option "change: notify" tab, on the dependencies, either on the attributes view tab or the entity Option "Reset Null" works fine, but the other is my head spin. I can't find a good documentation about this.

    Does anyone have examples of practices or any other information on how to use this option?

    See you soon

    Kristjan

    I think that this will not work for persistent attribute

    You can use a transitional attribute for this and then set a persistent transient attribute on an action

    When using ADF Faces option AutoSubmit and trigger partial refresh or update the value of a component, but if you use ADF DI then we have then no option in this case Dependencies tab helps you

    check - https://blogs.oracle.com/adf/entry/refreshing_one_column_based_on

    Ashish

  • ChangeEventPolicy none

    Why, when I have an iterator of my table with ChangeEventPolicy: no delete work-in-progress, do not work?

    To delete the current line, I have this code:

    public String deleteCurrentRow() {}

    System.out.println ("Remove!");

    DCIteratorBinding dciter = (DCIteratorBinding) evaluteEL ("#{bindings.") PackOriginDtl1Iterator}");

    ViewObject vo = dciter.getViewObject ();

    Line r = vo.getCurrentRow ();

    r.Remove ();

    Returns a null value.

    }

    My button is immediate autosubmit and one true.

    My table properties are: content delivery: immediate

    immediate: true

    My version of jdev is 11.2.4.0

    Thank you!

    Hello

    Why you didn't call the pageDef delete operation. ?

    Button has the property of autosubmit there partialSubmit, if you set partialSubmit = true, then you need to add id button in the partialTriggers table.

    If it is not working try to immediately remove = true and see.

  • dependent lov must be in a specific container to work?

    I've implemented a dependent list of values in the past. It was contained in a table and each list was in a separate column. Now, I try to apply it again, but not in a table. The dependence is working on the app module but not in the draft opinion. I put the required properties to make it work (I.e AutoSubmit and PartialTriggers). I tried to insert the lists on a table again and it works, but when I remove the table, then it's not. So my question is: do I have to put the lists within a specific container in order to get their work?

    Thanks in advance.

    Ok. We found the problem. I had the configuration of erroneous data on the object of the entity types. I have Verdampfergeblase the type of the attribute Id on PaisListView with the type of the reference attribute on Persona and I did the same with the region. Then it worked.

    Thanks again for your help.

  • How to set dependent lov in adf

    I'm developing an application that uses of dependent lov. I created dependent lov I m getting the correct result when I run appmodule, but when I use the same jsf page result does not come, I'm confused by defining prperties autosubmit and partialtrigger.

    I have 4 choice field if I automatically selects the 1st then 2nd can show rlated to this value after the 3 and 4

    Please can someone help me.

    do autosubmit selct 1 and set relaxing partial select 2 as the id select 1st...

    see this

    https://blogs.Oracle.com/aramamoo/entry/how_to_create_multi_level

    Dependent list of values - YouTube

  • Delete several Messages in 11.1.1.7


    11.1.1.5 this code has worked to clear several messages when a single field has been updated.

    In 11.1.1.7 that the clearAllMessages method is protected so I can no longer use this code, how do I do something similar to the 11.1.1.7?

    Thank you

    John

    < af:resource type = "javascript" >
    function clearMessagesForComponent (evt) {}
    AdfPage.PAGE.clearAllMessages ();
    evt. Cancel();
    }
    < / af:resource >

    < af:inputText label = "#{resBundle.ZIP1} '"
    ID = "it2.
    Binding = "#{myBB.zip1} '"
    value = "#{myBB.myDTO.zip1} '"
    required = "true" >
    < af:clientListener method = "clearMessagesForComponent".
    Type = "valueChange" / >
    < / af:inputText >
    < af:inputText label = "#{resBundle.ZIP2} '"
    ID = "it3" required = "true".
    Binding = "#{myBB.Zip2} '"
    value = "#{myBB.myDTO.Zip2} '"
    >
    < af:clientListener method = "clearMessagesForComponent".
    Type = "valueChange" / >
    < / af:inputText >

    set to true for inputText autoSubmit. Hope it works. If that does not work, try to set true autoSubmit and write valueChangeListener to this input text and remove clientListener. ValueChangeListener, do the following code according to your requirements. This erases all messages.

    Iterator = FacesContext.getCurrentInstance () .getMessages () itMessages;

    {while (itMessages.hasNext ())}

    itMessages.next ();

    itMessages.remove ();

    }

  • AF:selectManyListbox displays do not all values...

    I have an af:selectManyListbox that is bound to a value only read objects and which depends on two parameters, on the Page, the parameters are passed by autosubmit and the af: selectManyListbox refreshes properly.

    Everything works when the number of values in several select are rare (10) when the object of value returns some 50... the electronic box that shows 20...

    Please suggest

    User, please always mention your jdev version.

    -1 three value size of the beach of the iterator. This will load all the records at a time.

    Timo

  • number, inherited from the other component format

    Hey guys,.


    I have a box of text ADF, where a user can enter a daily amount (decimal number). Then I get an output text, below, where I want to show a quantity time avarage. I put the value of the output with EL expression area {bindings.dailyValue.inputValue / 24}. Daily value text box has activated AutoSubmit and box of output a partial text defined as trigger area.
    I put convertNumber to each of these components with reason #. #, located some fraction max figures, and I am sure that only Integer property is set to false.

    When the user enters 123, the outputText should show 5.125 (123/24), however, it shows 5 only. When the user enters 123,01, the outputText should show 5.1254166666, but watch 5.13. It seems that the real format, the number of decimal digits, is somehow inherited the textInput.
    You have an idea on how is this possible and how to prevent?
    I use JDeveloper 11.1.1.3.

    Thank you very much!

    I suspect that the data type of your 'dailyValue' attribute is BigDecimal and this is the origin of the problem. When you perform an operation in division EL on a BigDecimal value, then the scale of the result depends on the scale of the operands (e.g. the value of the BigDecimal 123 on a scale 0, so the scale of the result is 0, the scale of the BigDecimal 123,01 value is 2, so the scale of the result is 2, etc.). This is how the BigDecimal objects perform a division (look at the Javadoc of the BigDecimal class for details). If you change the data type of the attribute 'dailyValue' duplicate, you should not have this problem.

    A better way is to perform the calculation in a managed bean (where you can control the precision of the result) instead of making the division directly in the EL expression.

    Dimitar

Maybe you are looking for