How to refresh data in backing bean-based component SelectOneChoice

Hello.

I use JD Studio Edition Version 11.1.1.5.0 on Weblogic 11.1.1.5

I have the resulting page with SelectOneCoice fragment of the backing bean (used as filter)

< af:selectOneChoice label = "#{projectBundle ['label.toolbar.spinbox.period']}" "

valueChangeListener = "#{backingBeanScope.backing_jsf_fragments_project_ContentMainView.onPeriodValueChangeListener} '"

Binding = "#{backingBeanScope.backing_jsf_fragments_project_ContentMainView.SOC2} '"

ID = value = "#{pageFlowScope.ContentMainView.period"soc2"} ' autoSubmit ="true">"

< f: selectItems value = "#{pageFlowScope.YearsListBean.yearItems} '"

Binding = "#{backingBeanScope.backing_jsf_fragments_project_ContentMainView.SI2}" id = "si2" / > "

< / af:selectOneChoice >

It supports bean which reads the data from the database and creates the list + adds value null

package sk.web.view.bean;

import java.util.ArrayList;

import java.util.List;

Import javax.faces.model.SelectItem;

Import oracle.adf.model.binding.DCIteratorBinding;

Import oracle.adf.share.logging.ADFLogger;

Import oracle.jbo.Row;

Import sk.web.view.common.utils.ADFUtils;

/**

* Class is supposed to provide a list of the years for the af:SelectOneChoice component.

*/

public class YearsListBean {}

private static final String PERIOD_ITERATOR_NAME = "PeriodView1Iterator"; Auto generated id

private list < SelectItem > yearItems;

public YearsListBean() {}

Super();

yearItems = new ArrayList < SelectItem > ();

addYearsToList();

}

public void addYearsToList() {}

DCIteratorBinding iter = null;

ITER = ADFUtils.findIterator (PERIOD_ITERATOR_NAME);

Rank [] rows = iter.getAllRowsInRange ();

addYearItemToList ("", "");

for (int i = 0; i < rows.length; i ++) {}

Line = lines [i];

log.info ("row [" + Integer.toString (i) + "]:" + rows [i].getAttribute("Year").toString ());

addYearItemToList (rows [i].getAttribute("Year").toString (), rows [i].getAttribute("Year").toString ());

}

}

public void clearYears() {}

log.info ("called.");

getYearItems () .clear ();

}

' private void addYearItemToList (String strInYearLabel, String strInYearValue) {}

SelectItem tObjItem = new SelectItem();

Configuration object

tObjItem.setLabel (strInYearLabel);

tObjItem.setValue (strInYearValue);

Add list ro

yearItems.add (tObjItem);

}

public list < SelectItem > getYearItems() {}

Get an output

Return yearItems;

}

}

When I insert the new record in the DB table, I want to see the new value in the filter. How to get there?

I tryied to get the current instance of YearsListBean

YearsListBean yearsList = (YearsListBean) FacesUtils.getManagedBean ("pageFlowScope.YearsListBean");

Clear and then refill

yearsList.clearYears ();

yearsList.addYearsToList ();

at the end I refresh view Add partial target

AdfFacesContext.getCurrentInstance () .addPartialTarget (getSoc1 ());

But this procedure does not work. Please help me find the working method.

Thanks in advance.

I found the bug in my code. I added partial target the wrong component. Now, refresh works fine.

Tags: Java

Similar Questions

  • How to call popup of backing bean

    Hello

    I have a request under jdev 11.1.1.1.0
    I use the model of Solution Explorer.
    I have my popups on a page and another page, I need to call these pop-up windows.
    I can't use the < af:showPopupBehavior > because I use the < af:setActionListener > on my command button.
    Then, in the action attribute, I called my grain of support
     public String showDelBoxPopup() {
       FacesContext context = FacesContext.getCurrentInstance();
       ExtendedRenderKitService extRenderKitSrvc = 
         Service.getRenderKitService(context,ExtendedRenderKitService.class);
       extRenderKitSrvc.addScript(context,"AdfPage.PAGE.findComponent('delBoxPopup').show()");
       return null;
    }
    But I always get an error NULL.
    How can I call a popup in a page in another page using backing bean.

    Thank you in advance.
    Emile BITAR

    Hello

    If you set triggerType = 'click' on the showPopupBehavior and contentDelivery = "lazyUncached" on the popup to ensure the popup will be triggered after setActionListener you can use with .
    I don't understand what you mean by calling the context menu from another page (this page is included as a region is?), but if you say that it works, then your other option would be to link the popup to support bean and use popup.getClientId () in your javascript.

    String script = "var popup = AdfPage.PAGE.findComponent(\"" + popup.getClientId(fc) +  "\"); popup.show();";
    

    Pedja

  • How to set the default value of the component selectOneChoice in the table to the ADF

    Hi all

    I use jdev 11.1.1.6.0 version.

    I used an adf table in which an attribute is selectOnceChoice.

    To create the table and selectOneChoice I used the data control java bean.

    and drag and drop a table and after that I have drag and drop one of the attributes as selectonechoice and linked with the return of the method list as < key, value > pair.

    I want the default value to select only one option in each attribute rows.

    I checked with simillar issue on post next, but not yet resolved.

    
    
    
    
    

    My jspx code is

    
    <af:column id="c11"
                                             headerText="Invoice To" >
                                        <af:outputText value="#{row.invoiceTo}" id="ot19"/>
    <af:selectOneChoice value="#{bindings.invoiceTo.inputValue}"
                                                        label="#{bindings.invoiceTo.label}"
                                                        required="#{bindings.invoiceTo.hints.mandatory}"
                                                        shortDesc="#{bindings.invoiceTo.hints.tooltip}"
                                                        id="soc3"
                                                        autoSubmit="true"
                                                        valuePassThru="true">
                                      <f:selectItems value="#{bindings.invoiceTo.items}"
                                                     id="si4"/>
                                    </af:selectOneChoice>
    </af:column>
    
    
    

    where invoiceTo is the table attribute and the invoiceTo attribute is dragged and dropped as a SOC function list Source data mapped data value with the List attribute

    and the display attribute

    Data value = invoiceTo List = lovMasterKey attribute

    Display attribute = lovMasterValue

    that list is maintained at < lovMasterKey, lovMasterValue >

    According to the value of invoiceTo line, it should show as default value is selectOneChoice, but its showing no not as a default value.

    Please, help me how set the default value of selectOneChoice in the table according to each value line invoiceTo.

    Thank you all for the help on this issue.

    Problem has been resolved.

    Reason for this was used

    It is solved using code used for the list built for selectoneChoice more

      List lovMasterList = new ArrayList();
    
    SelectItem siItem = new SelectItem();                      
    
    siItem.setLabel(objAfCmnLovMasterListVO1.getLovMasterValue());
    
    siItem.setValue(objAfCmnLovMasterListVO1.getLovMasterKey());
    
      lovMasterList.add(siItem);
    

    Now, I used the code where the line below. InvoiceTo is the key and row.invoiceToItems are the list of articles for selectOneChoice.

    
    
    
      
    
    

    Thank you very much...

  • HOW TO FILTER DATA IN MICROSOFT ACCESS

    HOW TO FILTER DATA IN MICROSOFT ACCESS BASED ON THE DATE AND TIME AND GIVE THE RESULT IN A TABLE?

    I need a few examples of files, can someone help me please?

    Fix your keyboard. If it has not been broken, be a little more polite and stop screaming.

    Research, are thousands of examples on the web related to the jet and sql database. This is a very basic select statement. Access to a query wizard that can then show the sql code. If you don't know how to design a query in access, you need a Basic for this tutorial. No question of LabVIEW here.

  • How to set the initial value programmatically in af:selectOneChoice

    Hi all

    How to set the initial value programmatically in af:selectOneChoice

    filled with view object instance, but I want to show the value initial programmactically

    This can help you: Re: how to set the default value of the component selectOneChoice in ADF

    and the default af:selectOneChoice programmatically from backing bean

  • I lost all my data after restoring to the failing machine, how do I get it back

    I have restored my matchbook pro to factory setting... I did not save my file to any drive hard or on my machine. I lost all data / files etc how do I get it back

    What operating system are you using on your MacBook Pro?

  • the toolbar that has the go back button, refresh button, etc. disappeared. How can I get that back?

    The toolbar that is the url of the page I'm on, back button, refresh button, etc. went. How can I get that back?

    This has happened

    Just once or twice

    Is a few weeks ago.

    Don't see the menu bar not (File, Edit, View, history, Favorites, tools, help)?
    Turn on/off the menu bar is a new feature in version 3.6.
    (Linux and OSX see: what happened to the file, edit and view menus? )
    Windows Method 1. Press and hold the key and press the letters of the following in this exact order: V T M
    Windows method 2 Press and release the button. The Menu bar is displayed; then choose ~ ~ red: V ~ ~ iew > ~ ~ red: T ~ ~ oolbars and click on ~ ~ Red: M ~ ~ enu Bar.
    The menu bar should now be displayed permanently, unless you turn it off again using view > toolbars. Check = not displayed, NO check mark is not displayed.
    See: http://support.mozilla.com/en-US/kb/Menu+bar+is+missing

    Navigation, bar toolbar bookmarks and other toolbars under view > toolbars. By clicking on one of them will place a check mark (display) or remove the check mark (not shown).

    To display the status bar, view, and then click status bar to place a check mark (display) or remove the check mark (not shown).

    Mode full screen
    http://KB.mozillazine.org/netbooks#Full_screen

    See also:
    Back and front toolbar buttons or others are missing
    Customize controls, buttons, and Firefox toolbars

  • I accidentally uninstalled Data Execution Prevention. How can I get that back?

    While in the Add / Remove Programs, I accidentally uninstalled 'Data Execution Prevention '. How can I get that back?

    Hello

    Please follow the links below for re - enable Data Execution Prevention.

    To turn on DEP for all applications

    a. click Startand then click Control Panel.
    b. under pick a category, click on performance and Maintenance.
    c. under or a Control Panel icon, click on System.
    d. click on the Advanced tab.
    e. in the Performance area, click settings.
    f. click the Data Execution Prevention tab
    g. Select turn on DEP for all programs and services except those that I select
    h. click on applyand then click OK. A dialog box appears and informs you that you must restart your computer for the setting to take effect. Click on OK.

    See this link for the screenshots,

    http://TechNet.Microsoft.com/en-us/library/cc700810.aspx

    The link below contains a brief description of the DEP and its configuration settings.

    A detailed description of the feature Data Execution Prevention (DEP) in Windows XP Service Pack 2, Microsoft Windows XP Tablet PC Edition 2005, and Windows Server 2003

    http://support.Microsoft.com/kb/875352

    I hope this helps.

  • How to place data files in two places during duplication of database or refresh via RMAN test

    Hi all

    can you please find the solution and help me on this point

    How to place data files in two places during duplication of database or refresh via RMAN test

    Thank you

    Ran

    Hi all

    Please send me as soon as possible if you have a solution.

    Thank you.

    Ran

  • ADF: How to restrict data based on responsibilities using the JAAS implementation?

    Hello

    I have a requirement to limit the data of a user based on the responsibility that is assigned to.

    Let me explain my requirement in short.

    I am trying to create an EXCEL spreadsheet based for a creation of invoice using the ADF DI.

    Now when the user navigates the U.S. responsibility., then it should be able to view/Create invoice only for operational unit of the United States.

    whereas that, another user browsing responsibility UK should be able to see/create invoices for UK unit of operation only.

    Is this possible?

    I read a few posts on how the data can be filtered by using roles. However, since it is instance EBS R12, responsibilities allows instead of roles.

    The customer may not agree to create custom for each responsibility roles.

    Please help.

    Jdev version: 11.1.1.6.0

    Thank you

    AG

    Thanks Timo.

    The doc has been useful. However, as the customer is not eager to create roles for responsibilities, we would try to reach the requirement through session Management.

    In this way, the responsibility and the function details can be extracted from the EBS.

  • How to refresh 'Web service data control'

    Hi experts,

    I use Jdev 11.1.1.5, and I would like to know how to refresh a Web Service data control, when changes are made to the web service (that is, add a new method, change the settings,...)

    Thanks in advance,
    Jose.

    Hi Jose,

    Check this https://blogs.oracle.com/shay/entry/updating_adf_web_service_data

    How to change or update the control of data is created once WebService?

    Nitesh

  • How can I take one allows so-called data entry I ask is how much you have and back up this data in some way, and then the system will offer you different options

    How can I take one allows so-called data entry I ask is how much you have and back up this data in some way, and then the system will offer you different options

    Not with ordinary Muse. These things requires a dynamic backend with a connection database and in your case quite likely some substantial customization and programming.

    Mylenium

  • How to refresh a single chart based on the time of day

    This site advanced of Muse, HOME | Great American Car Wash, traffic light is programmed to change to red when the business is closed and green when it opens. The code I wrote back the following meta tag:

    < meta http-equiv = "refresh" content = "5" / >

    It refreshes the whole page every 5 seconds. Page Flash as it refreshes is not desirable. My best temporary solution is to change the frequency to 2 minutes. I fixed provisionally for 5 seconds for troubleshooting. It will have the value 30 seconds when it's time to publish the site.

    I used the command "INSERT HTML code" in Muse to add the code. It works as expected, with the exception of the blink of an annoying page to update the traffic lights. Business owner could easily tolerate a traffic light flashing when updating.

    Is there a way to only update the graphics only? Or is there a better way to "automatically update" status of light?

    Thank you.

    "Cincinnati."

    You can try the suggestions mentioned here:

    http://StackOverflow.com/questions/17886578/refresh-part-of-page-div

    http://crunchify.com/how-to-refresh-div-content-without-reloading-page-using-jQuery-and-AJ ax.

    Thank you

    Sanjit

  • How to get the current value of db in backing bean

    Hello

    I use jdeveloper 11.1.2.3.0

    I would like to know how I could access the old value of an attribute in backing bean.
    I know I can get it in terms of EntityImpl with the getPostedAttribute function,
    but as I see that I'm not allowed to access this function in the ViewImpl.
    I get this error:
    Error (151,33): getPostedAttribute (int) has protected access to oracle.jbo.server.EntityImpl.

    Could you help her?
    What is the right way to get the current value on db in backing bean?

    Thank you very much!

    You can add a transitional attribute to the entity object to hold the old value of the desired attribute, then you can add this attribute to the view object.
    Check [url http://www.youtube.com/watch?v=iKVIiK0FBXI] retrieve the previous value of an attribute ADF BC

  • [Beginner] Best practices for Backing Bean, data binding

    Hello world


    I followed a course of oracle in November ' Oracle Fusion Middleware 11g: Creating Applications with ADF I '

    Awesome, now I know what are the different parts of the framework.

    But now, I would go a little in depth.

    Here's a simple example

    Login page
    Backing Bean
    Session Bean
    Read only the View (the view selection) object
    Application module

    We have a user name and password in a table, but the password is encrypted in the column, in fact, is the checksum of the password.

    Here's what should be done.

    Login (username, password) Page-> proceed button-> to get the data of VO-> compare usernames-> transform password from the login page (MD5)-> compare him the password of database->
    assignment of params session bean-> redirect to Connexion2 page.

    Here's what I actually

    I have an AM listening with a java class having a doLogin (String username, String password) method with a return value of string.

    This method is exposed to the UI via a client interface.

    Here are my questions.

    Where can I check and turn all these params. In playback only VO via a class Java tuned, which extends ViewRowImpl or listening AM class java?

    And now for the session bean where I have to instantiate. I guess the Backing Bean.

    Wouldn't be better to call the client interface of the bean to support, then instantiate the session bean, with params from AOS, in this BackBean.

    I so much question that I don't know where to start. :-(

    Sincerely for your help.

    Senecaux Davis

    Hello

    If you want to keep the information for the duration of session, create a managed bean and configure it to session scope. If you need to access you can use EL directly or from Java in another managed bean (or bean backing) whereby the bean is instantiated. You can also use managed properties to pass the reference of a bean to support session bean.

    As for the location of the method, you must use a View object to query the user table just the user name. You read the encrypted password (assuming a single user entry is found) and compare it with the provided password. You return true/false value and use an OperationBinding in a bean managed to access the customer interface method through the ADF (action method) link layer

    OperationBinding operation = bindings.get ("login") (OperationBinding);
    operation.getParamsMap () .put ("username", username);
    operation.getParamsMap () .put ("passwd", pw);

    Boolean result = operation.execute ();

    ...

    Frank

Maybe you are looking for

  • Where is the second slot of RAM on Satellite M100-165?

    Hello Sorry in advance for my English :) I have Toshiba M100-165 (PSMA1E-01W00PG3) and you want to upgrade memory RAM. But I see just a free memory slot on the bottom of my laptop. According to the manual and specifications of the laptop, there shoul

  • delete the data using the slider to tape

    Hello I have some log files that I need to deal with. For some of these files, I'll have to remove the beginning and the end of them. For this I intend to draw the newspaper and set of 2 sliders, and then the user move the sliders in a way that he wo

  • DEP keep advising that it has closed a program, but it is unclear what program

    Original title: DEP DEP keeps advising me that it has closed a program, but it is unclear what program. How to identify the involved program?

  • How do I unlock the efax account

    After various attempts my efax account has been locked to whom should I contact

  • Scratch brush Photoshop CS6 problem

    As you can see in the video above, I have a problem where the brush streaks all the way through to my document when I used the Brush tool. This only happens if I drag the brush. I can click and make the fixed lines, but when I drag the brush the stre