validation of inputtext

Hello world

I have a page that contains an af:showDetailItem (tabs), and in some tabs, there is an elements inputText, some of it is required (mandatory) to insert text on the subject. My problem is when I change from one tab to another raise red error message , telling me that you should enter in the required inputText text, I don't want the message when I navigate between the tabs, I want it to appear only when I press the submit button .

Thank you
Yaser

Set the immediate attribute for your true tabs

Published by: M.Jabr on March 19, 2011 01:06

Tags: Java

Similar Questions

  • If the validation in inputText

    How can I do an 'IF' validation on my inputtext
    where it only allows alphanumeric characters and dash.

    Vince

    Vince,

    A solution would be to use one of the [url http://download.oracle.com/docs/cd/E14571_01/apirefs.1111/e12419/tagdoc/af_validateRegExp.html] these

    You could also do the same type of validation on the model layer.

    John

  • Validation of inputText message position

    Hello

    JDeveloper Version 11.1.2.3.0

    I have a page with:

    < af:messages id = 'm1' partialTriggers = 'clact1 clact2' globalOnly = 'false' inline = "true" message = "" / >

    On this page, I have a popup with some components of entry. How to do the validation and they appear in the pop-up window instead of appear on the page where the af:message component is. I like the posting text appear in the pop-up window is like this below:

    fLKRW[1].jpg

    Kind regards

    Pamela

    Hello

    Try with this:

    globalOnly = "true" = "true" message = inline ' "/ >

    Kind regards

    Ruben.

  • How to change the error icon in the validation error message in inputText

    Hello

    I want to change the error icon in the error message when a validation Rodez inputText.

    I know we need a new skin. Should what changes I make?

    inside in your skin such as changing file

    af|message::error-icon{ 

       content:url(/adf/images/abc.png); 

    }

  • Access Backingbean InputText.Value

    Hello

    I use Jdeveloper 12 c (12.1.3.0.0) and I am new to Java, as well as for the ADF.

    My question is how can I access a form of value of components InputText a bean of support.

    In this case, I have 2 Tabels, which both require to interact with this component.

    The first tabel should fill the ID of the column value in the InputText.Value.

    The second table will be filtered by this value.

    I know how to do these two things separately

    For the filter, I drag the parameter ExecuteWithParams in the Inputfield.

    To fill the value I drag the required column "data controls" on the Inputfield.

    How can I accomplish this with a single field?

    First select a row in the table one-> fill the value in. Value()-> press the search-> filter table two of this value.

    My textfield looks like this:

                                    <af:inputText id="it1" value="#{bindings.SearchID.inputValue}"
                                                  required="#{bindings.SearchID.hints.mandatory}"
                                                  columns="#{bindings.SearchID.hints.displayWidth}"
                                                  maximumLength="#{bindings.SearchID.hints.precision}"
                                                  binding="#{backingBeanScope.DES00010Backing.tippingSearchID}"
                                        <f:validator binding="#{bindings.SearchID.validator}"/>
                                    </af:inputText>
    

    < / af:inputText >

    My select event was carried out as described in Frank Nimphius Code Corner sample 23
    http://www.Oracle.com/technetwork/developer-tools/ADF/learnmore/23-generic-table-selection-listener-169162.PDF

    I hope that I was not missing everything you need to help me.

    Best regards

    Sébastien.

    You can use metod evaluateEl() suffered bellows:

    http://www.adftips.com/2010/10/ADF-UI-adfutil-class-to-evaluate-set.html

    evaluateEl ("#{bindings.") SearchID.inputValue}");

    Alternatively, bind af:inputText to support bean property. Yo uwill get getter/setter pair, something like this:

    getInputText () /setInputText)

    and just use () getInputText () .getValue;

  • AF:inputtext change the color of the text on pressure from button and the position of the caret

    Hi all

    Very green, when it comes to ADF so I hope to give you enough information to get assistance.

    I found a 2008 document that created Frank Nimphius that shows how the JavaScript in the ADF and the manipulation of the inline style property.

    It is titled "ADF Code corner 010. How to create a character counter of entry for text fields.

    While my use case is not the same I feel that I could use for my use case logic.

    My use case is that the user wants a text field to replace the blue color when being typed in so that they know what they changed.

    I'm jusing JDeveloper 12.1.2

    That's what I have my input text looks like:

    <af:column sortProperty="#{bindings.ChiefScaleOrderVO.hints.OrderNo.name}" filterable="true"
                                   sortable="true" headerText="#{bindings.ChiefScaleOrderVO.hints.OrderNo.label}" id="c1"
                                   width="11%" inlineStyle="#{recordManager.columnStyle}">
                          <af:inputText value="#{row.bindings.OrderNo.inputValue}"
                                        label="#{bindings.ChiefScaleOrderVO.hints.OrderNo.label}"
                                        columns="#{bindings.ChiefScaleOrderVO.hints.OrderNo.displayWidth}"
                                        maximumLength="#{bindings.ChiefScaleOrderVO.hints.OrderNo.precision}"
                                        shortDesc="#{bindings.ChiefScaleOrderVO.hints.OrderNo.tooltip}" id="it1"
                                        autoSubmit="true" valueChangeListener="#{recordManager.columnTextModified}"
                                        clientComponent="true">
                            <af:clientListener method="keyInput" type="keyPress"/>
                            <f:validator binding="#{row.bindings.OrderNo.validator}"/>
                          </af:inputText>
                        </af:column>
    

    This is what looks like my javascript:

    <af:resource type="javascript">
           function keyInput(evt){
              //document.getElementById(evt.getSource().getClientId() + '::content').style.color = 'blue';
              textfield = evt.getCurrentTarget();
              textfield.setInlineStyleProperty("color","blue");
           }
    </af:resource>
    
    

    If I do an alert (textfield.getInlineStyleProperty("color")); before and after the the setInlineStyleProperty it does not say it gets the value at the blue, but my text color never changes.

    If I do the document.getElementById (evt.getSource () .getClientId () + ': content ""). style.color = "blue"; It works, but I'm doing things the "right way".

    So is there another way to do this now in 12 JDeveloper?

    Also is there anyway to when you click inside an af:inputText that he will not select all of the text and just position the cursor at the end?

    Thank you

    Derek Hansen

    Well, you try to set the wrong property.

    According to your example of "pure" javascript, you must set contentStyle and not inlineStyle.

    Then try something like: textfield.setContentStyle ("color: Blue");

    Dario

  • Validation before the move to the new Record?

    I think it should be relatively simple, but I had no chance of finding a good example. (I'm very new to ADF, 2nd week of play with him)

    I created a simple form (af: form the tag) and adding a my control of data in as controls inputText field. I need to add more, but right now I would like to see a work.

    Then, I added the operations back and forward my data as command buttons control.

    When the user clicks command buttons, if the page has been changed, I will commit the changes before moving to the new record.

    I think I need to create a bean and call one of its methods to perform these actions, but I have not found a good example to do so. I don't know what is opposed to use to access the functionality needed from the bean.

    Here is my current form:
    <? XML version = "1.0" encoding = "UTF - 8"? >
    <! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional / / IN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
    < f: view xmlns:f = "http://java.sun.com/jsf/core" xmlns:af = "http://xmlns.oracle.com/adf/faces/rich" >
    < af:document title = "description.jsf" id = "d1" > "
    < af:messages id = "m1" / >
    < af:form id = "f1" >
    < table border = "0" style = "padding: 20px;" outline-style: none; margin: 0px; border-width: 0px; do-family: Arial, Helvetica, without serif. font-size: x-large; ">
    Description < tr > < td > < table > < /tr >
    < b >
    < td >
    < af:inputText value = "#{bindings." Simple Desc.inputValue}' = 'true '.
    required = "#{bindings." DESC.hints.Mandatory}.
    columns = "#{bindings." Desc.hints.displayWidth}.
    maximumLength = "#{bindings." DESC.hints.Precision}.
    shortDesc = "#{bindings." DESC.hints.ToolTip}"id ="it1.
    lines = autoSubmit "6" = "true" >
    < f: validator binding = "#{bindings." DESC. Validator} "/ >"
    < / af:inputText >
    < table >
    < /tr >
    < /table >
    < p / >
    < af:commandButton actionListener = "#{bindings." Previous.Execute text}"="previous ".
    Disabled = "#{!}" bindings. PartialSubmit Previous.enabled}"="true"id ="cb1"/ >
    < af:commandButton actionListener = "#{bindings." Next.Execute text}"="next ".
    Disabled = "#{!}" bindings. Next.Enabled}.
    partialSubmit = "true" id = "cb2" / >
    < / af:document >
    < / f: view >

    I would be grateful of any advice or suggestions people have.

    Add a button of validation to your page, then merge operations in a pod of support.
    See: https://blogs.oracle.com/shay/entry/doing_two_declarative_operatio

  • Disable Validation on the Cancel button

    Hi guys,.

    I use jdev version is 11.1.1.5.0.I have done a validation custom for my Palm/editable grid table which i m, saving data on the button, click Save. Validation works perfectly except when I click on the button cancel next to my button 'save' his also validate grid table than i do ' t want to do.
    any suggestion how I can stop posting on the Cancel button.


    < af:table value = "#{bindings.ssku1.collectionModel}" var = 'row' "
    Rows = "#{Bindings.ssku1.rangeSize} '"
    emptyText = "#{bindings.ssku1.viewable?" "{'No data to display.': 'Access Denied.'}".
    fetchSize = "#{bindings.ssku1.rangeSize}" rowBandingInterval = '0' "
    selectionListener = "#{bindings.ssku1.collectionModel.makeCurrent} '"
    rowSelection = "single" id = 't3' columnStretching = 'last '.
    "partialTriggers =": cb20: cb50 "
    styleClass immediate = "AFStretchWidth" = "true" autoHeightRows = "8" >
    < af:column id = rowHeader "c54" = "true" align = "center" width = "100" >
    < af:commandButton text = 'Details' id = "cb10".
    actionListener = "#{jcbwb.jcbOrderRowSelect}" > < / af:commandButton >
    < / af:column >
    < af:column sortProperty = "ssku_size_1" sortable = "false".
    rendered = "#{gridDetailsBN.ssku_grid_col_1} '"
    headerText = "#{gridDetailsBN.ssku_grid_col_1_hdr}" id = "c44" > "
    < af:inputText value = "#{row.bindings.ssku_size_1.inputValue} '"
    label = "#{Bindings.ssku1.hints.ssku_size_1.label} '"
    required = "#{Bindings.ssku1.hints.ssku_size_1.Mandatory} '"
    Columns = "#{Bindings.ssku1.hints.ssku_size_1.DisplayWidth} '"
    maximumLength = "#{bindings.ssku1.hints.ssku_size_1.precision} '"
    shortDesc = "#{bindings.ssku1.hints.ssku_size_1.tooltip} '"
    disabled = "true" id = "nonpopupit61" >
    < f: validator binding="#{row.bindings.ssku_size_1.validator}"/ >
    < / af:inputText >
    < / af:inputText >
    < / af:column >
    < / af:table >

    Hello

    Set in the immediate to true on the Cancel button.

    Zitouni

  • f: Validator question

    I want to customize the validator of inputText all to block user write abusive language

    I know that there is in every inputText a:



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


    Must add an another f: validatior custom or extend a class generic validatior?

    OMG, it won't be long before your message is removed for abusive language usage ;)

    I don't think that this can be done using the validator of the box.
    Create a validator custom like this - http://mjabr.wordpress.com/2011/05/27/how-to-create-a-custom-jsf-validator/

  • Question for adf inputText component when the required value true attribute

    Hello

    The JDev version that I used in 11.1.2.0.0

    I have an ADF form that contains 3 components EmployeeName (inputText), EmployeeAddress (inputText) and EmployeeType (lov selectOneChoice), when I select an lov EmployeeType value, I need the EmployeeAddress to change automatically, this is implemented via the valueChangeListener and autoSubmit attributes in the attribute of component and partialTriggers of selectOneChoice on the employaddress inputText as the code below, when debugging backing bean I saw the logic is complete. But since the EmployeeName has a required attribute is set to true, the page then to issue me an error message that "EmployeeName is required field" and I do not see the employaddress updated correctly. My question is if I can skip the check required for EmployeeName at this time when I just changed selectOneChoice value rather than clicking the button submit on the page?

    < af:panelFormLayout id = "pfl1" >
    < af:inputText value = "#{bindings." EmployeeName.inputValue}.
    label = "#{bindings." EmployeeName.hints.label}.
    required = "#{true}".
    ID = "it2" >
    < f: validator binding = "#{bindings." EmployeeName.validator} "/ >"
    < / af:inputText >
    < af:inputText value = "#{bindings." EmailAddr.inputValue}.
    label = "#{bindings." EmailAddr.hints.label}.
    ID = "it1.
    "partialTriggers =": soc4 ".
    Binding = "#{EmployeeBean.emailAddrBinding}" >
    < f: validator binding = "#{bindings." EmailAddr.validator} "/ >"
    < / af:inputText >
    < af:selectOneChoice value = "#{bindings." EmployeeType.inputValue}.
    label = "#{bindings." EmployeeType.label}.
    ID = "soc4".
    autoSubmit = 'true '.
    valueChangeListener = "#{EmployeeBean.changeEmpTypeListener}" >
    < f: selectItems value = "#{bindings." EmployeeType.items}.
    ID = "si1" / >
    < / af:selectOneChoice >
    < / af:panelFormLayout >

    Try setting immediate = "true" on the selectOneChoice component.

  • Why is not updated when you create or whole part of delete trigger?

    Hey there ' All,.

    I have a Page with links. These bindings are based on components business ADF, pretty standard stuff. On this page, I have an af:panelCollection. It contains buttons to create, remove, commit, and roll back. All those assigned to their respective shares in the ADF business components-based binding. In this collection of Panel there is also an editable table. It was created by dragging the view from business components in the collection of panels. ADF automatically created the iterator in the definition of the page.

    It is the source of the fragment:

    <?xml version='1.0' encoding='UTF-8'?>
    <ui:composition xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
                    xmlns:f="http://java.sun.com/jsf/core">
      <af:panelGridLayout id="pgl1">
        <af:gridRow marginTop="5px" height="100%" marginBottom="5px" id="gr4">
          <af:gridCell marginStart="5px" width="60%" id="gc5" halign="stretch" valign="stretch">
            <af:panelCollection id="pc1" featuresOff="detachMenuItem" partialTriggers="b_new b_delete b_save b_restore">
              <f:facet name="menus"/>
              <f:facet name="toolbar">
                <af:toolbar id="t2">
                  <af:button actionListener="#{bindings.Create.execute}" text="New" disabled="#{!bindings.Create.enabled}"
                             id="b_new"/>
                  <af:button actionListener="#{bindings.Delete.execute}" text="Delete"
                             disabled="#{!bindings.Delete.enabled}" id="b_delete"/>
                </af:toolbar>
                <af:toolbar id="t3">
                  <af:button actionListener="#{bindings.Commit.execute}" text="Save" disabled="#{!bindings.Commit.enabled}"
                             id="b_save"/>
                  <af:button actionListener="#{bindings.Rollback.execute}" text="Restore"
                             disabled="#{!bindings.Rollback.enabled}" immediate="true" id="b_restore">
                    <af:resetActionListener/>
                  </af:button>
                </af:toolbar>
              </f:facet>
              <af:table value="#{bindings.PermissionView1.collectionModel}" var="row"
                        rows="#{bindings.PermissionView1.rangeSize}"
                        emptyText="#{bindings.PermissionView1.viewable ? 'No data to display.' : 'Access Denied.'}"
                        rowBandingInterval="0" selectedRowKeys="#{bindings.PermissionView1.collectionModel.selectedRow}"
                        selectionListener="#{bindings.PermissionView1.collectionModel.makeCurrent}" rowSelection="single"
                        fetchSize="#{bindings.PermissionView1.rangeSize}" id="t1" filterVisible="true" immediate="true"
                        contentDelivery="immediate" summary="Edit available permissions">
                <af:column sortProperty="#{bindings.PermissionView1.hints.IdPermission.name}" sortable="true"
                           headerText="ID" id="c1" width="32" filterable="true" minimumWidth="22">
                  <af:inputText value="#{row.bindings.IdPermission.inputValue}"
                                label="#{bindings.PermissionView1.hints.IdPermission.label}"
                                required="#{bindings.PermissionView1.hints.IdPermission.mandatory}"
                                columns="#{bindings.PermissionView1.hints.IdPermission.displayWidth}"
                                maximumLength="#{bindings.PermissionView1.hints.IdPermission.precision}"
                                shortDesc="#{bindings.PermissionView1.hints.IdPermission.tooltip}" id="it1">
                    <f:validator binding="#{row.bindings.IdPermission.validator}"/>
                    <af:convertNumber groupingUsed="false" pattern="#{bindings.PermissionView1.hints.IdPermission.format}"/>
                  </af:inputText>
                </af:column>
                <af:column sortProperty="#{bindings.PermissionView1.hints.Designation.name}" sortable="true"
                           headerText="Designation" id="c2" width="221" filterable="true">
                  <af:inputText value="#{row.bindings.Designation.inputValue}"
                                label="#{bindings.PermissionView1.hints.Designation.label}"
                                required="#{bindings.PermissionView1.hints.Designation.mandatory}"
                                columns="#{bindings.PermissionView1.hints.Designation.displayWidth}"
                                maximumLength="#{bindings.PermissionView1.hints.Designation.precision}"
                                shortDesc="#{bindings.PermissionView1.hints.Designation.tooltip}" id="it2"
                                attributeChangeListener="#{bindings.Commit.execute}">
                    <f:validator binding="#{row.bindings.Designation.validator}"/>
                  </af:inputText>
                </af:column>
                <af:column sortProperty="#{bindings.PermissionView1.hints.Description.name}" headerText="Description"
                           id="c3" width="432">
                  <af:inputText value="#{row.bindings.Description.inputValue}"
                                label="#{bindings.PermissionView1.hints.Description.label}"
                                required="#{bindings.PermissionView1.hints.Description.mandatory}"
                                columns="#{bindings.PermissionView1.hints.Description.displayWidth}"
                                maximumLength="#{bindings.PermissionView1.hints.Description.precision}"
                                shortDesc="#{bindings.PermissionView1.hints.Description.tooltip}" id="it3" rows="3"
                                attributeChangeListener="#{bindings.Commit.execute}">
                    <f:validator binding="#{row.bindings.Description.validator}"/>
                  </af:inputText>
                </af:column>
              </af:table>
              <f:facet name="statusbar"/>
            </af:panelCollection>
          </af:gridCell>
          <af:gridCell marginStart="5px" width="40%" marginEnd="5px" id="gc6" halign="stretch" valign="stretch">
            <af:panelAccordion discloseMany="false" id="pa1">
              <af:showDetailItem id="pane_roles" text="Users" inlineStyle="overflow:scroll;">
                <af:region value="#{bindings.assignusers1.regionModel}" id="r1"/>
              </af:showDetailItem>
              <af:showDetailItem id="pane_permissions" text="Usergroups" inlineStyle="overflow:scroll;">
                <af:region value="#{bindings.assignusergroups1.regionModel}" id="r2"/>
              </af:showDetailItem>
              <af:showDetailItem id="pane_groups" text="Roles" inlineStyle="overflow:scroll;">
                <af:region value="#{bindings.assignroles1.regionModel}" id="r3"/>
              </af:showDetailItem>
            </af:panelAccordion>
          </af:gridCell>
        </af:gridRow>
      </af:panelGridLayout>
    </ui:composition>
    
    

    It's the source of the definition of the page of the fragment:

    <?xml version="1.0" encoding="UTF-8" ?>
    <pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel" version="12.1.3.10.8" id="PermissionViewEditPageDef"
                    Package="fragments.permission">
      <parameters/>
      <executables>
        <variableIterator id="variables"/>
        <iterator Binds="PermissionView1" RangeSize="25" DataControl="AdminPanelModuleDataControl"
                  id="PermissionView1Iterator" Refresh="default"/>
        <taskFlow id="assignusers1" taskFlowId="/WEB-INF/taskflow/permission/assign-users.xml#assign-users" xmlns="http://xmlns.oracle.com/adf/controller/binding" Refresh="ifNeeded">
          <parameters>
            <parameter id="permissionID" value="#{bindings.IdPermission.inputValue}"/>
          </parameters>
        </taskFlow>
        <taskFlow id="assignusergroups1" taskFlowId="/WEB-INF/taskflow/permission/assign-usergroups.xml#assign-usergroups" xmlns="http://xmlns.oracle.com/adf/controller/binding" Refresh="ifNeeded">
          <parameters>
            <parameter id="permissionID" value="#{bindings.IdPermission.inputValue}"/>
          </parameters>
        </taskFlow>
        <taskFlow id="assignroles1" taskFlowId="/WEB-INF/taskflow/permission/assign-roles.xml#assign-roles" xmlns="http://xmlns.oracle.com/adf/controller/binding" Refresh="ifNeeded">
          <parameters>
            <parameter id="permissionID" value="#{bindings.IdPermission.inputValue}"/>
          </parameters>
        </taskFlow>
      </executables>
      <bindings>
        <action IterBinding="PermissionView1Iterator" id="removeRowWithKey" RequiresUpdateModel="false"
                Action="removeRowWithKey">
          <NamedData NDName="rowKey" NDValue="#{}" NDType="java.lang.String"/>
        </action>
        <action IterBinding="PermissionView1Iterator" id="Delete" RequiresUpdateModel="false" Action="removeCurrentRow"/>
        <tree IterBinding="PermissionView1Iterator" id="PermissionView1">
          <nodeDefinition DefName="de.lkvsh.shirotest.admin.model.ev.PermissionView" Name="PermissionView10">
            <AttrNames>
              <Item Value="IdPermission"/>
              <Item Value="Designation"/>
              <Item Value="Description"/>
            </AttrNames>
          </nodeDefinition>
        </tree>
        <action IterBinding="PermissionView1Iterator" id="Create" RequiresUpdateModel="true" Action="createRow"/>
        <action id="Commit" RequiresUpdateModel="true" Action="commitTransaction"
                DataControl="AdminPanelModuleDataControl"/>
        <action id="Rollback" RequiresUpdateModel="false" Action="rollbackTransaction"
                DataControl="AdminPanelModuleDataControl"/>
        <attributeValues IterBinding="PermissionView1Iterator" id="IdPermission">
          <AttrNames>
            <Item Value="IdPermission"/>
          </AttrNames>
        </attributeValues>
      </bindings>
    </pageDefinition>
    
    

    For the facts so far.

    Now, my experience with it:

    Whenever I click on the 'New' or 'Delete' button, it first calls the partial relaxation and then perform the action assigned to the button I clicked. I thought this because of the following behaviour:

    1. I load the page

    2. I click on the 'New' button - nothing happens

    3. I click on the button "New" once again - a single line appears

    4. I click on the button 'Delete' - nothing happens, still a line it

    5. I click on delete - disappearance of the line

    In order to engage without an error in database fields, that I need:

    1. load the page

    2. click on the button "new".

    3. click again on the button "new".

    4. click on the button Delete

    5. fill the new line

    6 validation

    What I tried:

    1. triggers, of course, I thought that business components and links stuff would be here to refresh everything about an action.

    2. I also tried in the PageDef not caching the results of the underlying iterator from the table. However, this only leads to an exception during step 3 of my 'to be able to commit without a basic error of data fields that I".

    I hope you can tell me what is the problem or you have any suggestions or advice.

    Thanks in advance

    Lukas Wagner

    You should always use CreateInsert operation declaratively add new line to af:table.

    "createInsert" has a problem: he inserts. I know almost no case (at least in a well-designed database location) when possible, insert without data. As it is in my case, so createInsert will not work, I get an exception from the database during insertion.

    It will insert line collection in British Colombia ADF, not in the db table.

    Framework will display data from db only when you call commit operation (or if you call transaction.postChanges ()) programmatically.

    Thus, the workflow must be:

    -Invoke CreateInsert

    -Fill in all the mandatory attributes for this ViewObject

    -Don't commit / rollback

    Dario

  • I create a form based on two tables that have sequences also. When I create insert only row is inserted in the fields in table first and second fields of the table are empty. Why?

    Mr President.

    I create a form based on two tables that have sequences also. When I create insert only row is inserted in the fields in table first and second fields of the table are empty. Why?

    formdoubletables.png

    the page source is

    <?xml version='1.0' encoding='UTF-8'?>
    <ui:composition xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
                    xmlns:f="http://java.sun.com/jsf/core">
      <af:panelFormLayout id="pfl1">
        <af:group id="Group">
          <af:inputText value="#{bindings.VoucherId.inputValue}" label="#{bindings.VoucherId.hints.label}"
                        required="#{bindings.VoucherId.hints.mandatory}" columns="#{bindings.VoucherId.hints.displayWidth}"
                        maximumLength="#{bindings.VoucherId.hints.precision}"
                        shortDesc="#{bindings.VoucherId.hints.tooltip}" id="it1">
            <f:validator binding="#{bindings.VoucherId.validator}"/>
            <af:convertNumber groupingUsed="false" pattern="#{bindings.VoucherId.format}"/>
          </af:inputText>
          <af:inputDate value="#{bindings.VoucherDate.inputValue}" label="#{bindings.VoucherDate.hints.label}"
                        required="#{bindings.VoucherDate.hints.mandatory}"
                        columns="#{bindings.VoucherDate.hints.displayWidth}"
                        shortDesc="#{bindings.VoucherDate.hints.tooltip}" id="id1">
            <f:validator binding="#{bindings.VoucherDate.validator}"/>
            <af:convertDateTime pattern="#{bindings.VoucherDate.format}"/>
          </af:inputDate>
          <af:inputText value="#{bindings.Credit.inputValue}" label="#{bindings.Credit.hints.label}"
                        required="#{bindings.Credit.hints.mandatory}" columns="#{bindings.Credit.hints.displayWidth}"
                        maximumLength="#{bindings.Credit.hints.precision}" shortDesc="#{bindings.Credit.hints.tooltip}"
                        id="it2">
            <f:validator binding="#{bindings.Credit.validator}"/>
          </af:inputText>
        </af:group>
        <af:group id="g1">
          <af:inputText value="#{bindings.Lineitem.inputValue}" label="#{bindings.Lineitem.hints.label}"
                        required="#{bindings.Lineitem.hints.mandatory}" columns="#{bindings.Lineitem.hints.displayWidth}"
                        maximumLength="#{bindings.Lineitem.hints.precision}" shortDesc="#{bindings.Lineitem.hints.tooltip}"
                        id="it3">
            <f:validator binding="#{bindings.Lineitem.validator}"/>
            <af:convertNumber groupingUsed="false" pattern="#{bindings.Lineitem.format}"/>
          </af:inputText>
          <af:inputText value="#{bindings.VoucherId1.inputValue}" label="#{bindings.VoucherId1.hints.label}"
                        required="#{bindings.VoucherId1.hints.mandatory}"
                        columns="#{bindings.VoucherId1.hints.displayWidth}"
                        maximumLength="#{bindings.VoucherId1.hints.precision}"
                        shortDesc="#{bindings.VoucherId1.hints.tooltip}" id="it4">
            <f:validator binding="#{bindings.VoucherId1.validator}"/>
            <af:convertNumber groupingUsed="false" pattern="#{bindings.VoucherId1.format}"/>
          </af:inputText>
          <af:inputText value="#{bindings.Debit.inputValue}" label="#{bindings.Debit.hints.label}"
                        required="#{bindings.Debit.hints.mandatory}" columns="#{bindings.Debit.hints.displayWidth}"
                        maximumLength="#{bindings.Debit.hints.precision}" shortDesc="#{bindings.Debit.hints.tooltip}"
                        id="it5">
            <f:validator binding="#{bindings.Debit.validator}"/>
          </af:inputText>
          <af:inputText value="#{bindings.Credit1.inputValue}" label="#{bindings.Credit1.hints.label}"
                        required="#{bindings.Credit1.hints.mandatory}" columns="#{bindings.Credit1.hints.displayWidth}"
                        maximumLength="#{bindings.Credit1.hints.precision}" shortDesc="#{bindings.Credit1.hints.tooltip}"
                        id="it6">
            <f:validator binding="#{bindings.Credit1.validator}"/>
          </af:inputText>
          <af:inputText value="#{bindings.Particulars.inputValue}" label="#{bindings.Particulars.hints.label}"
                        required="#{bindings.Particulars.hints.mandatory}"
                        columns="#{bindings.Particulars.hints.displayWidth}"
                        maximumLength="#{bindings.Particulars.hints.precision}"
                        shortDesc="#{bindings.Particulars.hints.tooltip}" id="it7">
            <f:validator binding="#{bindings.Particulars.validator}"/>
          </af:inputText>
          <af:inputText value="#{bindings.Amount.inputValue}" label="#{bindings.Amount.hints.label}"
                        required="#{bindings.Amount.hints.mandatory}" columns="#{bindings.Amount.hints.displayWidth}"
                        maximumLength="#{bindings.Amount.hints.precision}" shortDesc="#{bindings.Amount.hints.tooltip}"
                        id="it8">
            <f:validator binding="#{bindings.Amount.validator}"/>
            <af:convertNumber groupingUsed="false" pattern="#{bindings.Amount.format}"/>
          </af:inputText>
        </af:group>
        <f:facet name="footer">
          <af:button text="Submit" id="b1"/>
          <af:button actionListener="#{bindings.CreateInsert.execute}" text="CreateInsert"
                     disabled="#{!bindings.CreateInsert.enabled}" id="b2"/>     
          <af:button actionListener="#{bindings.Commit.execute}" text="Commit" disabled="#{!bindings.Commit.enabled}"
                     id="b3"/>
          <af:button actionListener="#{bindings.Rollback.execute}" text="Rollback" disabled="#{!bindings.Rollback.enabled}"
                     immediate="true" id="b4">
            <af:resetActionListener/>
          </af:button>
        </f:facet>
      </af:panelFormLayout>
    </ui:composition>
    
    
    
    

    Concerning

    Go to your VO Wizard, select the tab of the entity and to check if both the EO is editable or not.

    See you soon

    AJ

  • Fields of ADF will not be marked as required

    Hello, I have two selectonechoice adf list fields that are unable to be verified as required to ensure that the form is sent, the fields are 'PLACE' and 'TYPE of COMMENT'...

    As you can see in the image, even if the LOCATION is marked required it it never says same thing red in case of OBSERVATION

    Here is my code of the jsp page

    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <jsp:directive.page contentType="text/html;charset=UTF-8"/>
      <f:view>
        <af:document id="d1" binding="#{backingBeanScope.backing_Test.d1}">
          <af:messages binding="#{backingBeanScope.backing_Test.m1}" id="m1"/>
          <af:form id="f1" binding="#{backingBeanScope.backing_Test.f1}"
                   usesUpload="true">
            <af:pageTemplate viewId="/oracle/templates/threeColumnTemplate.jspx"
                             id="pt1">
              <f:facet name="center">
                <af:panelFormLayout binding="#{backingBeanScope.backing_Test.pfl1}"
                                    id="pfl1">
                  <af:spacer width="10" height="10"
                             binding="#{backingBeanScope.backing_Test.s2}" id="s2"/>
                  <af:inputDate value="#{bindings.When.inputValue}" label="WHEN"
                                shortDesc="#{bindings.When.hints.tooltip}"                      
                                id="it6" required="true" showRequired="true">
                                <af:convertDateTime pattern="yyyy-MM-dd'T'HH:mm:ss.SSSZ"/> </af:inputDate>
                  <af:spacer width="10" height="10"
                             binding="#{backingBeanScope.backing_Test.s1}" id="s1"/>
                  <af:selectOneChoice value="#{bindings.Location.inputValue}"
                                      label="LOCATION"
                                      shortDesc="What is your location?"
                                      binding="#{backingBeanScope.backing_Test.soc1}"
                                      id="soc1" showRequired="true"
                                      required="true">
                    <f:selectItems value="#{bindings.Location.items}"
                                   binding="#{backingBeanScope.backing_Test.si1}"
                                   id="si1"/>
                  </af:selectOneChoice>
                  <af:spacer width="10" height="10"
                             binding="#{backingBeanScope.backing_Test.s3}" id="s3"/>
                  <af:selectOneChoice value="#{bindings.Category.inputValue}"
                                      label="OBSERVATION TYPE"
                                      shortDesc="Describe the cause of your observation."
                                      binding="#{backingBeanScope.backing_Test.soc2}"
                                      id="soc2" required="true" showRequired="true">
                    <f:selectItems value="#{bindings.Category.items}"
                                   binding="#{backingBeanScope.backing_Test.si2}"
                                   id="si2"/>
                  </af:selectOneChoice>
                  <af:spacer width="10" height="10"
                             binding="#{backingBeanScope.backing_Test.s4}" id="s4"/>
                  <af:inputText value="#{bindings.Details.inputValue}"
                                label="YOUR OBSERVATION"
                                columns="#{bindings.Details.hints.displayWidth}"
                                maximumLength="#{bindings.Details.hints.precision}"
                                shortDesc="#{bindings.Details.hints.tooltip}"
                                binding="#{backingBeanScope.backing_Test.it3}"
                                id="it3" required="true">
                    <f:validator binding="#{bindings.Details.validator}"/>
                  </af:inputText>
                  <af:spacer width="10" height="10"
                             binding="#{backingBeanScope.backing_Test.s5}" id="s5"/>
                  <af:inputText value="#{bindings.Action.inputValue}"
                                label="ACTION TAKEN"
                                columns="#{bindings.Action.hints.displayWidth}"
                                maximumLength="#{bindings.Action.hints.precision}"
                                shortDesc="#{bindings.Action.hints.tooltip}"
                                binding="#{backingBeanScope.backing_Test.it4}"
                                id="it4" showRequired="true" required="true">
                    <f:validator binding="#{bindings.Action.validator}"/>
                  </af:inputText>
                  <af:spacer width="10" height="10"
                             binding="#{backingBeanScope.backing_Test.s6}" id="s6"/>
                  <af:inputFile label="CAPTURE"
                                binding="#{backingBeanScope.backing_Test.if1}"
                                id="if1"
                                value="#{backingBeanScope.backing_Test.file}"
                                required="false" showRequired="false"
                                valueChangeListener="#{backingBeanScope.backing_Test.uploadFileValueChangeEvent}"/>
                  <af:panelLabelAndMessage label="SUBMITTED BY:"
                                           binding="#{backingBeanScope.backing_Test.plam1}"
                                           id="plam1">
                    <af:outputText value="#{securityContext.userName}"
                                   binding="#{backingBeanScope.backing_Test.ot1}"
                                   id="ot1"/>
                  </af:panelLabelAndMessage>
                  <af:inputText value="#{bindings.Userid.inputValue}"
                                label="#{bindings.Userid.hints.label}"
                                required="#{bindings.Userid.hints.mandatory}"
                                columns="#{bindings.Userid.hints.displayWidth}"
                                maximumLength="#{bindings.Userid.hints.precision}"
                                shortDesc="#{bindings.Userid.hints.tooltip}"
                                binding="#{backingBeanScope.backing_Test.it1}"
                                id="it1" rendered="false">
                    <f:validator binding="#{bindings.Userid.validator}"/>
                  </af:inputText>
                  <af:panelGridLayout binding="#{backingBeanScope.backing_Test.pgl1}"
                                      id="pgl1">
                    <af:gridRow marginTop="5px" marginBottom="5px" height="auto"
                                binding="#{backingBeanScope.backing_Test.gr1}"
                                id="gr1">
                      <af:gridCell marginStart="5px" width="auto"
                                   binding="#{backingBeanScope.backing_Test.gc1}"
                                   id="gc1">
                        <af:commandButton
                                          text="Submit"
                                          disabled="#{!bindings.Commit.enabled}"
                                          binding="#{backingBeanScope.backing_Test.cb2}"
                                          id="cb2"
                                          action="#{backingBeanScope.backing_Test.cb2_action}"/>
                      </af:gridCell>
                      <af:gridCell marginStart="1px" width="auto"
                                   binding="#{backingBeanScope.backing_Test.gc2}"
                                   id="gc2">
                        <af:resetButton text="Clear All"
                                        binding="#{backingBeanScope.backing_Test.rb1}"
                                        id="rb1"/>
                      </af:gridCell>
                    </af:gridRow>
                  </af:panelGridLayout>
                  <af:panelGridLayout binding="#{backingBeanScope.backing_Test.pgl2}"
                                      id="pgl2">
                    <af:gridRow marginTop="5px" marginBottom="5px" height="auto"
                                binding="#{backingBeanScope.backing_Test.gr2}"
                                id="gr2">
                      <af:gridCell marginStart="5px" width="auto"
                                   binding="#{backingBeanScope.backing_Test.gc5}"
                                   id="gc5">
                        <af:goLink text="Mail"
                                   binding="#{backingBeanScope.backing_Test.gl2}"
                                   id="gl2"
                                   destination="mailto:noharm@?subject=NOck"/>
                      </af:gridCell>
                      <af:gridCell marginStart="1px" marginEnd="5px" width="auto"
                                   binding="#{backingBeanScope.backing_Test.gc6}"
                                   id="gc6"/>
                    </af:gridRow>
                  </af:panelGridLayout>
                  <f:facet name="footer">
                  </f:facet>
                </af:panelFormLayout>
              </f:facet>
              <f:facet name="header"/>
              <f:facet name="end"/>
              <f:facet name="start">
                <af:group binding="#{backingBeanScope.backing_Test.g1}" id="g1">
                  <af:decorativeBox binding="#{backingBeanScope.backing_Test.db1}"
                                    id="db1" topHeight="180px">
                    <f:facet name="center"/>
                    <f:facet name="top">
                      <af:image source="/rsz_noharm.png" shortDesc="NoHarmLogo"
                                binding="#{backingBeanScope.backing_Test.i1}"
                                id="i1"/>
                    </f:facet>
                  </af:decorativeBox>
                </af:group>
              </f:facet>
              <f:facet name="branding"/>
              <f:facet name="copyright"/>
              <f:facet name="status"/>
            </af:pageTemplate>
          </af:form>
        </af:document>
      </f:view>
      <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_Test-->
    </jsp:root>
    
    

    If you use Jdev 11.1.1.7,

    Uncheck the "Include"No. Selection"Item" in the tab shown in the user interface from the list of values for these attributes.

    See you soon

    AJ

  • Image file in DB entry does not

    I try to have the user select an image file, and then insert into a db however I get this db error "entity line with null key is not found in NblNhIncsubmission."

    If you see my picture below you can see my code is correctly downloaded the file and update the "Attachment" field, but it throws an error inserting the entire form in the db

    Here's the PB I need to insert in (circled is the column I'm inserting the NblNhIncsubmission DB)

    Here is my page jspx code:

    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <jsp:directive.page contentType="text/html;charset=UTF-8"/>
      <f:view>
        <af:document id="d1" binding="#{backingBeanScope.backing_Test.d1}">
          <af:messages binding="#{backingBeanScope.backing_Test.m1}" id="m1"/>
          <af:form id="f1" binding="#{backingBeanScope.backing_Test.f1}"
                   usesUpload="true">
            <af:pageTemplate viewId="/oracle/templates/threeColumnTemplate.jspx"
                             id="pt1">
              <f:facet name="center">
                <af:panelFormLayout binding="#{backingBeanScope.backing_Test.pfl1}"
                                    id="pfl1">
                  <af:spacer width="10" height="10"
                             binding="#{backingBeanScope.backing_Test.s2}" id="s2"/>
                  <af:inputDate value="#{bindings.When.inputValue}" label="WHEN"
                                shortDesc="#{bindings.When.hints.tooltip}"                        
                                id="it6" required="true" showRequired="true"/>
                  <af:spacer width="10" height="10"
                             binding="#{backingBeanScope.backing_Test.s1}" id="s1"/>
                  <af:selectOneChoice value="#{bindings.Location.inputValue}"
                                      label="LOCATION"
                                      shortDesc="What is your location?"
                                      binding="#{backingBeanScope.backing_Test.soc1}"
                                      id="soc1" showRequired="true" required="true">
                    <f:selectItems value="#{bindings.Location.items}"
                                   binding="#{backingBeanScope.backing_Test.si1}"
                                   id="si1"/>
                  </af:selectOneChoice>
                  <af:spacer width="10" height="10"
                             binding="#{backingBeanScope.backing_Test.s3}" id="s3"/>
                  <af:selectOneChoice value="#{bindings.Category.inputValue}"
                                      label="OBSERVATION TYPE"
                                      shortDesc="Describe the cause of your observation."
                                      binding="#{backingBeanScope.backing_Test.soc2}"
                                      id="soc2" required="true" showRequired="true">
                    <f:selectItems value="#{bindings.Category.items}"
                                   binding="#{backingBeanScope.backing_Test.si2}"
                                   id="si2"/>
                  </af:selectOneChoice>
                  <af:spacer width="10" height="10"
                             binding="#{backingBeanScope.backing_Test.s4}" id="s4"/>
                  <af:inputText value="#{bindings.Details.inputValue}"
                                label="YOUR OBSERVATION"
                                columns="#{bindings.Details.hints.displayWidth}"
                                maximumLength="#{bindings.Details.hints.precision}"
                                shortDesc="#{bindings.Details.hints.tooltip}"
                                binding="#{backingBeanScope.backing_Test.it3}"
                                id="it3" required="true">
                    <f:validator binding="#{bindings.Details.validator}"/>
                  </af:inputText>
                  <af:spacer width="10" height="10"
                             binding="#{backingBeanScope.backing_Test.s5}" id="s5"/>
                  <af:inputText value="#{bindings.Action.inputValue}"
                                label="ACTION TAKEN"
                                columns="#{bindings.Action.hints.displayWidth}"
                                maximumLength="#{bindings.Action.hints.precision}"
                                shortDesc="#{bindings.Action.hints.tooltip}"
                                binding="#{backingBeanScope.backing_Test.it4}"
                                id="it4" showRequired="true" required="true">
                    <f:validator binding="#{bindings.Action.validator}"/>
                  </af:inputText>
                  <af:spacer width="10" height="10"
                             binding="#{backingBeanScope.backing_Test.s6}" id="s6"/>
                  <af:inputText value="#{bindings.Attachment.inputValue}"
                                label="#{bindings.Attachment.hints.label}"
                                required="#{bindings.Attachment.hints.mandatory}"
                                columns="#{bindings.Attachment.hints.displayWidth}"
                                maximumLength="#{bindings.Attachment.hints.precision}"
                                shortDesc="#{bindings.Attachment.hints.tooltip}"
                                binding="#{backingBeanScope.backing_Test.it2}"
                                id="it2" rendered="true">
                    <f:validator binding="#{bindings.Attachment.validator}"/>
                  </af:inputText>            
                  <af:spacer width="10" height="10"
                             binding="#{backingBeanScope.backing_Test.s8}" id="s8"/>
                  <af:inputFile label="Upload File"
                                binding="#{backingBeanScope.backing_Test.if1}"
                                id="if1"
                                value="#{backingBeanScope.backing_Test.file}"/>
                  <af:panelLabelAndMessage label="SUBMITTED BY:"
                                           binding="#{backingBeanScope.backing_Test.plam1}"
                                           id="plam1">
                    <af:outputText value="#{securityContext.userName}"
                                   binding="#{backingBeanScope.backing_Test.ot1}"
                                   id="ot1"/>
                  </af:panelLabelAndMessage>
                  <af:inputText value="#{bindings.Userid.inputValue}"
                                label="#{bindings.Userid.hints.label}"
                                required="#{bindings.Userid.hints.mandatory}"
                                columns="#{bindings.Userid.hints.displayWidth}"
                                maximumLength="#{bindings.Userid.hints.precision}"
                                shortDesc="#{bindings.Userid.hints.tooltip}"
                                binding="#{backingBeanScope.backing_Test.it1}"
                                id="it1" rendered="false">
                    <f:validator binding="#{bindings.Userid.validator}"/>
                  </af:inputText>
                  <af:panelGridLayout binding="#{backingBeanScope.backing_Test.pgl1}"
                                      id="pgl1">
                    <af:gridRow marginTop="5px" marginBottom="5px" height="auto"
                                binding="#{backingBeanScope.backing_Test.gr1}"
                                id="gr1">
                      <af:gridCell marginStart="5px" width="auto"
                                   binding="#{backingBeanScope.backing_Test.gc1}"
                                   id="gc1">
                        <af:commandButton
                                          text="Submit"
                                          disabled="#{!bindings.Commit.enabled}"
                                          binding="#{backingBeanScope.backing_Test.cb2}"
                                          id="cb2"
                                          action="#{backingBeanScope.backing_Test.cb2_action}"/>
                      </af:gridCell>
                      <af:gridCell marginStart="1px" width="auto"
                                   binding="#{backingBeanScope.backing_Test.gc2}"
                                   id="gc2">
                        <af:commandButton text="Cancel"
                                          binding="#{backingBeanScope.backing_Test.cb4}"
                                          id="cb4"
                                          partialTriggers="pfl1" disabled="true"/>
                      </af:gridCell>
                    </af:gridRow>
                  </af:panelGridLayout>
                  <af:panelGridLayout binding="#{backingBeanScope.backing_Test.pgl2}"
                                      id="pgl2">
                    <af:gridRow marginTop="5px" marginBottom="5px" height="auto"
                                binding="#{backingBeanScope.backing_Test.gr2}"
                                id="gr2">
                      <af:gridCell marginStart="5px" width="auto"
                                   binding="#{backingBeanScope.backing_Test.gc5}"
                                   id="gc5">
                        <af:resetButton text="Clear All"
                                        binding="#{backingBeanScope.backing_Test.rb1}"
                                        id="rb1"/>
                      </af:gridCell>
                      <af:gridCell marginStart="1px" marginEnd="5px" width="auto"
                                   binding="#{backingBeanScope.backing_Test.gc6}"
                                   id="gc6">
                        <a href="mailto:noharinc.com?subject=NO HARM Observation Feedback">Mail</a>
                      </af:gridCell>
                    </af:gridRow>
                  </af:panelGridLayout>
                  <f:facet name="footer">
                  </f:facet>
                </af:panelFormLayout>
              </f:facet>
              <f:facet name="header"/>
              <f:facet name="end"/>
              <f:facet name="start">
                <af:group binding="#{backingBeanScope.backing_Test.g1}" id="g1">
                  <af:decorativeBox binding="#{backingBeanScope.backing_Test.db1}"
                                    id="db1" topHeight="180px">
                    <f:facet name="center"/>
                    <f:facet name="top">
                      <af:image source="/[email protected]" shortDesc="NoHarmLogo"
                                binding="#{backingBeanScope.backing_Test.i1}"
                                id="i1"/>
                    </f:facet>
                  </af:decorativeBox>
                </af:group>
              </f:facet>
              <f:facet name="branding"/>
              <f:facet name="copyright"/>
              <f:facet name="status"/>
            </af:pageTemplate>
          </af:form>
        </af:document>
      </f:view>
      <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_Test-->
    </jsp:root>
    
    
    
    

    Here is my java code snippet:

    //Method to create blobdomain from selected file
        private BlobDomain createBlobDomain(UploadedFile file) {
            InputStream in = null;
            BlobDomain blobDomain = null;
            OutputStream out = null;
            try {
                in = file.getInputStream();
                blobDomain = new BlobDomain();
                out = blobDomain.getBinaryOutputStream();
                byte[] buffer = new byte[8192];
                int bytesRead = 0;
                while ((bytesRead = in.read(buffer, 0, 8192)) != -1) {
                    out.write(buffer, 0, bytesRead);
                }
                in.close();
            } catch (IOException e) {
                e.printStackTrace();
            } catch (SQLException e) {
                e.fillInStackTrace();
            }
            return blobDomain;
        }
    
    //Action lsitener for submit button
        public String cb2_action() {
            BindingContainer bindings = getBindings();    
            OperationBinding operationBinding = bindings.getOperationBinding("Commit");  
            //Grab the file
            UploadedFile myfile = (UploadedFile)this.getFile();
    
            //Set the Attachment InputText field value to the blob domain generated
            FacesContext facesCtx = FacesContext.getCurrentInstance();
            Application app = facesCtx.getApplication();
            ExpressionFactory elFactory = app.getExpressionFactory();
            ELContext elContext = facesCtx.getELContext();
            ValueExpression ve = elFactory.createValueExpression(elContext, "#{bindings.Attachment.inputValue}",Object.class);
            //set the Attachment value to the blobdomain contents before inserting into db
            ve.setValue(elContext,createBlobDomain(myfile));
          
            //Commit input into Database     
            Object result = operationBinding.execute();     
            if (!operationBinding.getErrors().isEmpty()) {
                return null;
            }
          
            //Display popup message
            FacesContext con = FacesContext.getCurrentInstance();
            FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO,"Thank you for submitting your observation.","");
            con.addMessage("",message);
          
            return null;
        }
    
    
    

    haha OMG finally got it to work thanks @Timo Hahn (idk why didn't you tag) and Cvele_new_account

    After reading comments Timo again and blog and wire with cvele comment

    Solution was to make sure my update of bindings is set correctly, then check the "Insert" for updating the after:

  • SelectOneChoice discount after create insert

    Hello

    I use Oracle JDeveloper 11 g Release 2 (11.1.2.3.0).

    I have a page jspx with a tab with 2 tabs Panel. In the first, I have a select one choice that displays the items available at this time. On the other tab, I have a table (and a form) with all the elements and when I create, insert a new (and commit to databases), when I get back to the first tab, the new added is not show by the choice of a Select.

    What can I do to update the SOC after insert a new row in the table?

    Here is the code of the SOC:

    <af:selectOneChoice
         label="Coche"
         required="#{bindings.CocheIdTemp.hints.mandatory}"
         shortDesc="#{bindings.CocheIdTemp.hints.tooltip}" id="soc2"
         value="#{modeloAStockBean.modeloId}" autoSubmit="true"
         inlineStyle="float:left; margin-left:350px; margin-top:10px;">
         <f:selectItems value="#{bindings.CocheIdTemp.items}" id="si2"/>
    </af:selectOneChoice>
    

    And here is the code for the form:

    <af:panelFormLayout id="pfl2">
         <af:toolbar id="t3">
         <af:commandButton actionListener="#{bindings.CreateInsert.execute}"
              text="Nuevo" id="cb4" />
         <af:commandButton actionListener="#{bindings.Commit.execute}" text="Guardar" id="cb5" />
              </af:toolbar>
              <af:selectOneChoice value="#{bindings.CocModId.inputValue}"
                   label="Modelo"
                   required="#{bindings.CocModId.hints.mandatory}"
                   shortDesc="#{bindings.CocModId.hints.tooltip}" id="soc1">
                   <f:selectItems value="#{bindings.CocModId.items}" id="si1"/>
              </af:selectOneChoice>
         <af:inputText value="#{bindings.CocColor1.inputValue}"
              label="Color"
              required="#{bindings.CocColor1.hints.mandatory}"
              columns="#{bindings.CocColor1.hints.displayWidth}"
              maximumLength="#{bindings.CocColor1.hints.precision}"
              shortDesc="#{bindings.CocColor1.hints.tooltip}" id="it1">
              <f:validator binding="#{bindings.CocColor1.validator}"/>
         </af:inputText>
         <af:inputText value="#{bindings.CocPuertas1.inputValue}"
              label="Puertas"
              required="#{bindings.CocPuertas1.hints.mandatory}"
              columns="#{bindings.CocPuertas1.hints.displayWidth}"
              maximumLength="#{bindings.CocPuertas1.hints.precision}"
              shortDesc="#{bindings.CocPuertas1.hints.tooltip}" id="it2">
              <f:validator binding="#{bindings.CocPuertas1.validator}"/>
              <af:convertNumber groupingUsed="false"
                   pattern="#{bindings.CocPuertas1.format}"/>
         </af:inputText>
         <af:inputText value="#{bindings.CocCombustible1.inputValue}"
              label="Combustible"
              required="#{bindings.CocCombustible1.hints.mandatory}"
              columns="#{bindings.CocCombustible1.hints.displayWidth}"
              maximumLength="#{bindings.CocCombustible1.hints.precision}"
              shortDesc="#{bindings.CocCombustible1.hints.tooltip}" id="it3">
              <f:validator binding="#{bindings.CocCombustible1.validator}"/>
         </af:inputText>
         <af:inputText value="#{bindings.CocPrecio1.inputValue}"
              label="Precio"
              required="#{bindings.CocPrecio1.hints.mandatory}"
              columns="#{bindings.CocPrecio1.hints.displayWidth}"
              maximumLength="#{bindings.CocPrecio1.hints.precision}"
              shortDesc="#{bindings.CocPrecio1.hints.tooltip}" id="it4">
              <f:validator binding="#{bindings.CocPrecio1.validator}"/>
              <af:convertNumber groupingUsed="false"
                   pattern="#{bindings.CocPrecio1.format}"/>
         </af:inputText>
         <af:inputText value="#{bindings.CocImagen1.inputValue}"
              label="Imagen"
              required="#{bindings.CocImagen1.hints.mandatory}"
              columns="#{bindings.CocImagen1.hints.displayWidth}"
              maximumLength="#{bindings.CocImagen1.hints.precision}"
              shortDesc="#{bindings.CocImagen1.hints.tooltip}" id="it5">
              <f:validator binding="#{bindings.CocImagen1.validator}"/>
         </af:inputText>
    </af:panelFormLayout>
    

    Thanks in advance!

    Hi Sheriton,

    Yes. You must create a listener for your action button. This action listener will be written in a java bean. But correct my previous message you run the validation and execution.

    The code will be something like this:

    BindingContainer links = bindingcontext.getcurrent () .getcurrentbindingsentry ();

    OperationBinding cocheExecute = bindings.getOperationBinding ("Execute"); (must match the method name in the links)

    The OperationBinding commit = bindings.getOperationBinding ("Commit");

    commit. Execute();

    cocheExecute.execute ();

    Try this and let me know if this worked for you. In addition, before you implement this, go to your tab where the LOV is after committing and press F5 (just to make sure that what we actually need to do is just to refresh the component). If the new value is there after F5 her you just need to add a part of this component LOV trigger to your validation button.

Maybe you are looking for