Valuechangelistener and autosubmit

Why do we need to put the autosubmit = true when we want a valuechangeEvent to run?

Kind regards

Priya

Because of, otherwise/normally, the listening port are called only when you submit your page.

Tags: Java

Similar Questions

  • Is there a problem with ValueChangeListener and af: table?

    Hello...

    I use JDeveloper 11.1.2.0.0

    Is there a problem with ValueChangeListener and af: table.

    Here my problem...

    I have two inputtext in af:table and I want to change the value of inputtext2 when I change the value of inputtext1
    so I put the autosubmit = "true" to inputtext1 and set the valuechangelistener method that is in the page bean
    and I put the partial inputtext2 trigger = "inputtext1 id".

    but when I run the page and change the value of inputtext1 that nothing happens.

    But if I have the previous scenario in af:panelFormLayout instead of af: table its work and the value of inputtext2 is changed to the user.

    any ideas...

    Thans.

    Sorry for the delay... :(

    And why if I use page JSF is the binding property disappears
    in the tab advanced in the property inspector.

    If you cannot power discovered the binding property in the palette of the means, your jsff page is automatically linked.
    If only the problem.

    try to create the new page jsff, while creating jsff, finally there is radio box something like
    do not expose the UI components automatically. check and create.

    and create a java file. Then you can bind components with the java file as you wish.

    to check your jsff page is autobinded are no means?
    Open your jsff page.

    Menu's that are on it - in this section. You can see the design menu that struck. If you hit it means you see Wizard property page go to the tab component binding
    There is a check box available

    If the box is ticked means that you page are automatically linked. If this isn't the case, you must link.

    -edited lately.

  • PartialTrigger and autoSubmit works in a pop-up dialog box

    Hello

    I have a dialog box pop-up and within a SelectOneChoice which should PPR 2 input text. The rendered property is dynamic.

    The corresponding code:

    < af:selectOneChoice autoSubmit = "true" >

    < af:inputText partialTriggers = "customer id generated by JDev when the choice of the selectOneChoice" / >

    In theory, it should work. I already did it with success outside of a popup.

    I do not understand why, if the code is inside a pop-up window / dialog box, the inputText are not updated. If so I click on the button of the dialog OK, I see the refreshed inputText.

    Is there something special to do when working with autoSubmit, PPR inside a box of dialogue/poupup?

    Thank you

    JDev 11.1.2.4

    I managed to solve the problem. If I use rendered on the inputText, when updated it does not work (the component is always rendered on the screen while it should disappear). If I switch to visible, it works as expected. In any case I don't understand why it's not working but using visible works for what I want to do, so that's fine.

  • AF:inputComboboxListOfValues selected value indicates the previous value when read

    Hello

    I have a LOV as below.

    SELECT DISTINCT filter_prod_id, cis_cluster_config_hdr_dtl_vw WHERE cluster_type_id = prod_name: p_cluster_type_id
    AND type_criteria_id =: p_type_criteria_id order of prod_name

    Here prod_name is indicated in the attribute list and based on the selection, corresponding filter_prod_id is filled. I use af:inputComboboxListOfValues in the JSPX page. By default the the LOV is filled on the loading of the page. I have a valueChangeListener and AutoSubmit is set to true.

    Use case: tell the current selection in the drop-down list box is 'CHAIN '. Change the selection in the drop-down list of "3rd PARTY GIFT CARD" area. I have a productNodeSelectionChangeListener() method and here's the code.

    BindingContext bctx = BindingContext.getCurrent ();
    BindingContainer links = bctx.getCurrentBindingsEntry ();
    List JUCtrlListBinding = bindings.get ("ProdName") (JUCtrlListBinding);
    String prodName = (String) list.getAttributeValue ();
    System.out.println ("ProdName:" + prodName);
    FacesCtrlAttrsBinding list1 = bindings.get("FilterProdId") (FacesCtrlAttrsBinding);
    Number of filterProdId = (Number) list1.getAttributeValue ();
    System.out.println ("filterProdId:" + filterProdId);

    The code prints

    IN productNodeSelectionChangeListener CARD PART 3
    ProdName: STRING
    FilterProdId: 79

    Help, please.

    ValueChangeListener is _before shot phase UpdateModel.
    However, you can force the update of model the value change listener:

     public void your_VCL(ValueChangeEvent event)   {
            UIComponent c = event.getComponent();  
    
          //force update model phase for this component
          c.processUpdates(FacesContext.getCurrentInstance());
         // what happen when you try to get attribute value in this point ?
    
      }  
    
  • 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.

  • 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

  • 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

  • ValueChangeListener SelectOneChoice does not work well

    11.1.2.1 JDev

    I have a page with a selectOneChoice, called plnChoice. plnChoice was born to a ViewObject that queries data in the table of pln.

    The page also contains a selectManyListBox.

    The page contains a button named GetRecords.

    The user selects a plnChoice PLN, on GetRecords. GetRecords calls a function that perform a database query and generates the selectManyListBox.
    It works very well. The problem is that I don't want the GetRecords button. I want the user to select a PLN plnChoice, have executed automatically GetRecords function. To do this, I updated the plnChoice valueChageListener the GetRecords function. I also put the autoSubmit plnChoice to true.

    It works... but not very well. Lets say that there are two PLN in plnChoice: AAA and BBB. When the page is displayed AAA is common in the list and the selectManyListBox is properly completed with a query in the managed bean pageFlow for the workflow.

    When the user selects BBB in plnChoice the GetRecords function is executed. It uses:

    ViewObject vo = appModule.findViewObject("PlnView");
    Line rw = vo.getCurrentRow ();
    BigDecimal SelectedPlnId = (BigDecimal) rw.getAttribute ("PlnId");

    The problem is that the PlnId that is found in SelectedPlnId isn't the BBB record selected in plnChoice. It is rather the plnId based on the record of the AAA. The selectManyLilstBox is now populated based on the poster of plnId but plnChoice AAA BBB. If I then select AAA in plnChoice the GetRecord retrieves the BBB record. The selectManyListBox now displays the query based on BBB and AAA plnChoice. And so on.

    This all works fine if I use the button rather than the valueChangeListener GetRecords / autoSubmit.

    It would be much cleaner that I do not have the GetRecords button.

    Thank you, Steve

    Is this a valueChangeEvent.getComponent () .processUpdates (FacesContext.getCurrentInstance ()) at the beginning of the ValueChangeListener correction this problem?
    http://www.adftips.com/2010/11/ADF-UI-getting-updated-values-in.html

  • valueChangeListener not refreshing Popup correctly

    I use JDeveloper 11.1.1.6

    My use case has a screen with a table of the ADF. In this table, the user clicks a button to add a row to the table. A pop-up form is presented. The primary key of the new line is a field that is formatted based on certain attributes selected by the user. The user will choose a value from a menu of selectOneChoice. The intention is to application to generate, and then display the value of the primary key from the context menu. The user will continue to enter the rest of their shareholdings in the popup and then submit the context menu to add the line to the DB. The selectOneChoice of the screen field is as follows. Note it does not value change listener and autosubmit:


    < af:selectOneChoice value = "#{bindings." Field1.inputValue}.
    label = "#{bindings." Field1.label}.
    required = "#{bindings." Field1.hints.mandatory}.
    shortDesc = "#{bindings." Field1.hints.ToolTip}.
    Binding = "#{backingBeanScope.backing_ui_pages_MyPage_updateDatabase.soc9} '"
    ID = "soc9" autoSubmit = 'true '.
    valueChangeListener = "#{backingBeanScope.backing_ui_pages_MyPage_updateDatabase.onField1Change} '"
    valuePassThru = "true" >
    < f: selectItems value = "#{bindings." Field1.items}.
    Binding = "#{backingBeanScope.backing_ui_pages_MyPage_updateDatabase.si9} '"
    ID = "si9" / >
    < / af:selectOneChoice >



    The primary key field is updated via a partial trigger. It is defined in the following form:


    < af:inputText value = "#{bindings." PrimaryKeyField.inputValue}.
    label = "#{bindings." PrimaryKeyField.hints.label}.
    required = "#{bindings." PrimaryKeyField.hints.mandatory}.
    columns = "#{bindings." PrimaryKeyField.hints.displayWidth}.
    maximumLength = "#{bindings." PrimaryKeyField.hints.precision}.
    shortDesc = "#{bindings." PrimaryKeyField.hints.tooltip}.
    Binding = "#{backingBeanScope.backing_ui_pages_MyPage_updateDatabase.IT4} '"
    ID = "it4" partialTriggers = "soc9" readOnly = "true" >
    < f: validator binding = "#{bindings." PrimaryKeyField.validator} "/ >"
    < / af:inputText >



    The code in my grain of the value change listener support is as follows:


    public void onField1Change (ValueChangeEvent valueChangeEvent) {}

    BindingContainer links = getBindings();

    DCIteratorBinding = dciter
    (DCIteratorBinding) bindings.get ("Container1Iterator");

    ContainerVORowImpl = containerDispatchRow
    (ContainerVORowImpl) dciter.getCurrentRow ();

    ........................................................


    Integer =
    ValueChangeEvent.getNewValue (integer) ();

    Number of field1Number =
    new Number (number.intValue ()); * /

    String primaryKey1Number = calculated value of another method

    containerDispatchRow.setPrimaryKeyField (primaryKey1Number);


    System.out.println ("onField1Change () - reservation number: '+")
    containerDispatchRow.getPrimaryKeyField ());
    }



    I have 2 problems with the above mentioned components.

    First of all the 'valueChangeEvent.getNewValue ()' returns the index number of the selected record in the selectOneChoice as opposed to the actual value of the line. The selectOneChoice contains a drop down of numbers (which may or may not start at 1).

    The second question I have, is that the primaryKeyField not display properly when updating from the pop-up window. My method calculates the correct value and the System.out.println correctly displays my value. For some reason when the popup is updated rather than show my newly calculated primaryKeyField, it displays the primaryKeyField associated with the first record in the binding of Interator (dciter)

    Instead of setting the value of the line, you can set the value in the attribute "PrimaryKeyField" binding as

    String primaryKey1Number = computed value from another method
    ...
    // get the binding container
    BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
    // get an ADF attributevalue from the ADF page definitions
    AttributeBinding attr = (AttributeBinding)bindings.getControlBinding("PrimaryKeyField");
    attr.setInputValue(primaryKey1Number);
    AdfFacesContext.getCurrentInstance().addPartialTarget(this.it4);
    ...
    

    Then you should see the value in the user interface.

    Timo

  • [11.1.1.1.0] question valueChangeListener

    Hello

    In a page jspx, I had three components SelectOneChoice. The first will determine which one will be visible between the last 2. If the first item is selected, then number 2 soc is visible (#3 isn't), and if the second item is selected then soc number 3 is visible (#2 is not).

    If the first is a static, having two items coded hard and method valuechangelistener and auto submit to true:
    < af:selectOneChoice label = "Client or group.
    ID = "socRadioClientOuGroupe".
    value = "#{backingBeanScope.backing_statistiques.radioClientOuGroupe} '"
    valueChangeListener = "#{backingBeanScope.backing_statistiques.changeListenerClientGroupe} '"
    autoSubmit = "true" >
    < af:selectItem label = 'Standard customer' value = 'standard '.
    ID = "si8" / >
    < af:selectItem label = "Client group" value = "group".
    ID = "si9" / >
    < / af:selectOneChoice >

    The two other soc, I'll play with visible attributes and the partialtriggers will do the job.

    < af:selectOneChoice value = "#{bindings." ClientFiltreEmetteur.inputValue}.
    label = "name of the customer.
    required = "#{bindings." ClientFiltreEmetteur.hints.mandatory}.
    shortDesc = "#{bindings." ClientFiltreEmetteur.hints.tooltip}.
    ID = "socClientDetailConsoClient".
    Binding = "#{backingBeanScope.backing_statistiques.socClientDetailConsoClient} '"
    visible = "#{backingBeanScope.backing_statistiques.visibleClient} '"
    partialTriggers = "socRadioClientOuGroupe" >
    < f: selectItems value = "#{bindings." ClientFiltreEmetteur.items}.
    ID = "si4" / >
    < / af:selectOneChoice >
    < af:selectOneChoice value = "#{bindings." GrpClientsFacturation.inputValue}.
    required = "#{bindings." GrpClientsFacturation.hints.mandatory}.
    shortDesc = "#{bindings." GrpClientsFacturation.hints.tooltip}.
    ID = "socGroupeDetailConsoClient" label = "Client Group"
    visible = "#{backingBeanScope.backing_statistiques.visibleGroupe} '"
    partialTriggers = "socRadioClientOuGroupe" >
    < f: selectItems value = "#{bindings." GrpClientsFacturation.items}.
    ID = "i5" / >
    < / af:selectOneChoice >


    This is method changelistener my backing bean where I change the visible attribute of honey:

    {} public void changeListenerClientGroupe (ValueChangeEvent valueChangeEvent)
    If (valueChangeEvent.getNewValue () .equals ("standard")) {}
    setVisibleClient (true);
    setVisibleGroupe (false);
    }
    else {}
    setVisibleClient (false);
    setVisibleGroupe (true);
    }
    }

    The first CTP is initialized to the first value. When I change the choice to the second value, it works fine, the second disappears soc and the 3rd is displayed. So for so good, but when I went back to the first, the change event is not raised, the listener method is not executed and the visible properties of my CPS are not changed which is not good.

    It seems that the event is raised only when the value is changed compared to the original, not the other. Is this a bug or is this a normal behavior?
    Workaround that I found which confirm this, is to not initialize the component, so that each change is always different initial value and the event is always thrown. But I have an uninitialized element that is not perfect for me.

    Thanks for any info on this or any better solution.

    Concerning

    The following thread might give you a hint: Re: ADF Faces/RC: issue PPR unchecked selectBooleanCheckbox

    CM.

  • SelectOneChoice and read-only Table

    Hi Experts,

    I am very new in ADF and try to put up a form that contains a component of SelectOneChoice based on a display object.
    I have a table with a variable binding and try to run the Object(underlying read-only table) view with the value that is selected in SelectOneChoice read-only. I added a managed method bean on valueChangeListener control SelectOneChoice and successfully getting the selected value.
    Now I'm getting a reference to the ViewObject and layout NamedParameter and then running it. Here is my code:

    {} public void ChangeValue has only (ValueChangeEvent valueChangeEvent)
    int s = ((Integer) valueChangeEvent.getNewValue ()) .intValue ();
    BindingContainer links is BindingContext.getCurrent () .getCurrentBindingsEntry ();.
    JUCtrlListBinding listBinding = (JUCtrlListBinding) bindings.get ("SanLovVO1");
    listBinding.setSelectedIndex (s);
    currVal int = Integer.parseInt (listBinding.getSelectedValue () m:System.NET.SocketAddress.ToString ());
    System.out.println ("selected value:" + currVal);

    DCBindingContainer bc = (DCBindingContainer) (BindingContext.getCurrent () .getCurrentBindingsEntry ());
    ApplicationModule am = bc.getDataControl () .getApplicationModule ();
    ViewObject vo = am.findViewObject ("SR1");
    vo.setNamedWhereClauseParam ("p_san_header_id", currVal);
    vo.executeQuery ();
    }

    I defined a variable binding (p_san_header_id) in the object View (SR-1), then using this variable of liaison with the query of the view object. I also give a default value to the variable binding.
    Now the problem is: when page gets loaded, I can only read table has records but when I select a value in SelectOneChoice, I am not able to see changed in the table read-only if get running code managedBean and autoSubmit is true for SelectOneChoice.

    Pls help me. This is my first attempt in ADF with Jdev 11.1.1.2

    Thank you
    Sumit

    I put the default value based on the value returned by the database for selectOneChoice on the loading of the page. I just determine the index value of the corresponding value coming from the db and put it in the page scope of stream.
    Then, I put it in the value of the selectOneChoice attribute.

  • ADF Table and select one choice

    Hai everybody, please help.

    I have a page that contains the table and select a choice where the table record displays the current month and the choice of a select contain only months. When I select the month from the list, save the table will change based on the months that I have chosen. I have really no idea on how to perform this task.

    123.png

    With the help of jdev version 11.1.1.7.0

    Thanks for your help.

    El

    Try to follow the following:

    1 - in the ViewObject (to which redirect the table) define the bind variable, this variable binding will filter the query (for example variable binding name is selectedMonth).

    2 - from the page, select the selectOneChoice and of the Inspector properties set value change listener method in backbean and autoSubmit = true.

    
       .
       .
    
    

    Method of earphone 3 months value change will be:

      public void monthValueChangeListener(ValueChangeEvent valueChangeEvent)
      {
        BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
        DCIteratorBinding iter = (DCIteratorBinding) bindings.get("TableIteratorName");//you can get iterator name from pageDef.
        ViewObject vo = iter.getViewObject();
        vo.setNamedWhereClauseParam("selectedMonth", valueChangeEvent.getNewValue());
        vo.executeQuery();
      }
    

    3. set table by selectOneChoice id partialTrigger

    
        .
        .
        .
    
    
  • How to make calculations on the grid... salary total and so on?

    Hi Experts,

    I use the Employee table and I it shows as a grid in the jspx page.

    When I add or change the value of the SALARY column, the total salary of the employees in the grid should be updated in the State of the panelcollection...

    I just tried to use ValueChangeListener and I am an iteration values and adding the wage and doing other things...

    Is it an effective way to do this...?


    Please suggest some ideas...


    Kind regards
    GOPs

    Hello

    I guess you can also use groovy

    See page 12 of this link. Might be useful
    http://www.Oracle.com/technetwork/developer-tools/jdev/introduction-to-Groovy-128837.PDF

    Kind regards
    Briant

  • [ADF, JDev12.1.3] SelectOneChoiche created from VO instance with 3 fields: how to retrieve the value of all the fields of the selected element?

    Hallo,

    I defined a VO with 3 fields (A, B and C) and I would like to create a SelectOneChoiche that shows only the field as options from this instance of VO.

    In a managed bean, I need to retrieve the values for all areas (A, B and C) of the item selected by the user.

    I started dragging the entire VO instance to UI to create a SelectOneChoiche (in which I have chosen to show only the to field).

    Then, I created a for the SOC ValueChangeListener read the values A, B and C of the selected element, but the only thing I've done is to get the displayed value:

    System.out.println((String) ((RichSelectOneChoice) FacesUtils.findComponent("MySoc")).getValue());
    

    You kindly help me?

    Thank you

    Federico

    Federico, sorry I didn't see your answer.

    As you use 12.1.3 you can do this more easily than the code that I posted before. You can use

    {} public void onCountrySelection (ValueChangeEvent valueChangeEvent)

    FacesContext will involve = FacesContext.getCurrentInstance ();

    Make sure that the selection change is processed and the current link lov line has the new selected line

    valueChangeEvent.getComponent () .processUpdates (contxt);

    BindingContext lBindingContext = BindingContext.getCurrent ();

    BindingContainer lBindingContainer = lBindingContext.getCurrentBindingsEntry ();

    List JUCtrlListBinding = lBindingContainer.get ("CountryId") (JUCtrlListBinding);

    the newindex in not necessary, but ok let's get it (must be equal to the CountryId, the pharmacokinetics of the binding of the lov

    String newindex = (String) valueChangeEvent.getNewValue ();

    get the selected value in the list that is the selected line of the binding of the lov

    Line lFromList = list.getSelectedValue () (line);

    now, we can get the attributes of the line of lov

    String s = (String) lFromList.getAttribute ("CountryId");

    System.out.println ("CountryId:" + s);

    String s2 = (String) lFromList.getAttribute ("CountryName");

    System.out.println ("CountryName:" + s2);

    BigDecimal s3 = lFromList.getAttribute("RegionId") (BigDecimal);

    System.out.println ("RegionId:" + s3.toString ());

    }

    The form that I use is based on the location of the HR DB schema table. The CountryId is configured in the view object to display a lov based on the campagneVoir. This view contains thre CountryId, CountryName and RegionId attributes.

    If you want to get to the attributes of an action listener you can use this code

    {} public void onGetSelectedCountryLov (ActionEvent actionEvent)

    BindingContext lBindingContext = BindingContext.getCurrent ();

    BindingContainer lBindingContainer = lBindingContext.getCurrentBindingsEntry ();

    List JUCtrlListBinding = lBindingContainer.get ("CountryId") (JUCtrlListBinding);

    get the selected value in the list that is the selected line of the binding of the lov

    Line lFromList = list.getSelectedValue () (line);

    now, we can get the attributes of the line of lov

    String s = (String) lFromList.getAttribute ("CountryId");

    System.out.println ("CountryId:" + s);

    String s2 = (String) lFromList.getAttribute ("CountryName");

    System.out.println ("CountryName:" + s2);

    BigDecimal s3 = lFromList.getAttribute("RegionId") (BigDecimal);

    System.out.println ("RegionId:" + s3.toString ());

    }

    You must add the valueChangeListener and at least add the lines

    FacesContext will involve = FacesContext.getCurrentInstance ();

    Make sure that the selection change is processed and the current link lov line has the new selected line

    valueChangeEvent.getComponent () .processUpdates (contxt);

    to ensure that the selected line is available when you click the button.

    And set autosubmit'= true for the field in the UI that displays the LOV.

    Timo

  • convert oracle.jbo.domain.number of positive value to a negative value in EL Expression

    Hi all

    jdev: 11.1.1.4

    My use case is to try to convert positive user input negative number, once the user presses the tab key

    I use the Employee in the HR schema table and when any kind of user + ve value in the salary column, then be converted into value - EV.

    < af:inputText value = "#{bindings." Salary.inputValue.value > 0? 0 - links. Salary.inputValue.value: links. Salary.inputValue}.

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

    autoSubmit = "true" >

    < af:convertNumber type = "currency".

    currencySymbol = "$" integerOnly = "true".

    minFractionDigits = '0' maxFractionDigits = "0".

    groupingUsed = 'false' local = "en-US" / >

    < / af:inputText >

    It's work the converted number in ve - but it makes the readonly entry text box. If the user was not able to change the value.

    Kind regards

    Krishan

    I don't think it can be done in EL only. the problem is that you change the location of storage. I suggest that you use a value valueChangeListener and climatiqueLes in there as

    {} public void numberChangeListener (ValueChangeEvent valueChangeEvent)

    Integer i = valueChangeEvent.getNewValue ((Integer));

    If (i > 0) {}

    get the link container

    BindingContainer links is BindingContext.getCurrent () .getCurrentBindingsEntry ();.

    updates to process

    FacesContext will involve = FacesContext.getCurrentInstance ();

    valueChangeEvent.getComponent () .processUpdates (contxt);

    get a definitions page ADF ADF attributevalue

    AttributeBinding attr = (AttributeBinding) bindings.getControlBinding ("Salary").

    attr.setInputValue(i*-1);

    PPR refresh a component jsf

    AdfFacesContext.getCurrentInstance () .addPartialTarget (valueChangeEvent.getComponent ());

    }

    Timo

Maybe you are looking for