ADF Iterator bindings in the page

Hi,
I am having the two selectone choice boxes in the same page which are binded to different iterator instances(iterators are binded same View Object). I want show different data list based on parameter from particular selectone choice box. But when I set the value to second iterator(second list box),first iterator also sets to same value and shows same list.Any Idea how to achive this? or I am doing wrong?
I am using the JDeveloper version 10.1.3.0.4
Thanks,
-

My friend,
I suggest you to use two view objects (one for each drop down list) because even if you have two iterators there is only one query with a single parameter value (I suppose you do different filtering for each drop down list based in some parameter value). So if the iterator gets refreshed (a requery) it will allways use the actual parameter value.
You must remember that, in the background, an iterator is a special kind of Result Set and in most cases gets its contents from a query.
Greetings,
AG

Similar Messages

  • ADF application randomly refreshes the page and url gets new _afrLoop id.

    I have an ADF application on 11.1.1.6.0 environment. Randomly it refreshes itself on a random event. It is very hard to reproduce as it is not so frequent, however it is critical as users are continuously working on this revenue critical application. When the refresh occurs _afrLoop id changes in the url.
    It seems that when users press the link/button(most of them are partial submit) the browser session is trying to communicate with the server, but the server has lost the track of the session and gives new _afrLoop id causing it to reload the page.
    ADF logs does not show any indication this this issue. Did some research online and found following threads similar to it.
    Re: _afrLoop causing endless loop in my login.jspx in ADF Security
    However, in my case it just refreshes once and does not get into infinite loop. Also it does not happen on login but it is happening randomly when user is working on it.
    The application is deployed on the cluster, we have tried running just one node but the issue is still there.
    Our next steps is to remove the Trinidad filter as suggested by the above thread however it seems this could be risky as mentioned here(Remove trinidad filter from web.xml impact in adf
    Any help or pointer in the direction to solve this is greatly appreciated.
    Thanks,
    Amit
    Edited by: Amit Patel on Jan 7, 2013 1:07 PM
    Edited by: Amit Patel on Jan 8, 2013 8:29 AM

    Dear All,
    I faced the same issue.
    1. Happens only in IE, when you navigate from one application (say A with web server as HTTP OHS) to another application (say B with web server as HTTPS apache). Both being webcenter applictaion
    2. If i hit the URL of application B web server directly this does not happen
    3. If I hit the weblogic managed server instead of the ws for application A and navigate to application B there is no _afrloop
    4. When i access application A and navigate to application B through the WS _afrloop goes infinite
    As solution I added the below parameters in my OHS http.conf file, and issue got resolved.
    Yet there is one more issue where the IDM cookies are getting cleared, this will help if you are not using IDM in the OHS web servers for authentication.
    Please provide inputs.
    Header unset Cookie
    Header unset Set-Cookie
    Venkat

  • Is there a way to force adf to not refresh the page after a certain action?

    Hi Adf'rs
    Another question for ya.
    I'm not sure how possible this is? But I have piece of javascript code that runs after the adf page is loaded. I then execute something in my javascript when the user cliciks a NON ADF button (just an html button). At that point, adf is refreshing the entire page even though I don't want it to. Is there a way to tell adf not to do this?

    Hi Puthanampatt,
    Thank you soooo much!! That did the trick!! Now, when I submit my javascript, it only refreshes the components that my javascript manipulates, and that container does not reload!!!
    Thanks again!!!

  • How can create one iterator binding to the page

    i like fill one table in a page with the result for the store procedure my code is:
    public void callStoredProcedure2(String message) {
    java.sql.CallableStatement cstmtObject = null;
    java.sql.ResultSet rulesObject = null;
    String rulename=null;
    try{
    String conStr = "jdbc:oracle:thin:@10.2.2.111:1521:ora920";
    String user = "ora1";
    String pass = "oracle";
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    java.sql.Connection conn = (java.sql.Connection)DriverManager.getConnection(conStr,user,pass);
    System.out.println("connected");
    String sqlquery = "{call prc_miguel(?,?)}";
    cstmtObject = conn.prepareCall(sqlquery,ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
    cstmtObject.setString(1,message);
    cstmtObject.registerOutParameter(2,OracleTypes.CURSOR);
    cstmtObject.execute();
    rulesObject = (java.sql.ResultSet)cstmtObject.getObject(2);
    System.out.println("resultset type="+rulesObject.getType());
    ViewObject vo = getDeptView1();
    while(rulesObject.next())
    Row fila=vo.createRow();
    rulename = rulesObject.getString("ename");
    System.out.println(rulename);
    fila.setAttribute(1,rulename);
    vo.insertRow(fila);
    conn.close();
    }catch(SQLException e){System.out.println(e);}
    this is one find and this method is the client interface in a MyAppModule, i want to return the rows in a page, somebody helpme please.

    You should be able to just drag the method from the data control onto the adfc-config.xml. This should insert the necessary elements.
    Timo

  • Execute java code before rendering the page

    Hi,
    In a task flow, can I execute some java code before the page/view is rendered (i.e. some preprocessing). I would need to be able to have access to the bindings on the page.
    Thanks!

    Can you try doing as specified below:
    If it is simple JSPX, you could use the phase listener as follows:
    JSPX Code:
    <f:view beforePhase="#{SamplePageBean.phaseListener}">
    <af:document id="d1">
    <af:form id="f1">
    <af:panelFormLayout id="pfl1">
    <f:facet name="footer"/>
    </af:panelFormLayout>
    </af:form>
    </af:document>
    </f:view>
    Bean Code:
    public class SamplePageBean {
    public SamplePageBean() {
    public void phaseListener(PhaseEvent phaseEvent) {
    if (phaseEvent.getPhaseId().equals(phaseEvent.getPhaseId().RENDER_RESPONSE)) {
    // DO NECESSARY INITIALIZATION
    Thanks,
    Navaneeth

  • ADF Faces  IF statement available within the  page?

    I am making a page using ADF Faces.
    I want to create an IF statement in a page that will display some markup on one condition and on another display some other markup.
    For example, I am using an iterator to build a table. I would like to have the background color of the row alternate based on the iterator count % 2 ( also how can I get the count of the iterator).
    Also, I would want to make the text color highlight based on some condition such as is foo==bar make the text red etc.
    Anyone know how to do this simple simple task in ADF Faces?
    **Note the if from JSF core is not available in Jdeveloper for whatever reason. Any help would be appreciated.
    Also, I don't want to just set some property of some element based on a condition with EL.
    Lets say there is a whole section of the page that I only want to show is a condition is true. Is this impossible in ADF Faces? Is there something fundamental I am missing about this framework?
    Edited by: user2809800 on Dec 6, 2010 12:49 PM

    For conditional rendering of group of fragments, you can use switcher component.
    See the sample for switcher here: http://jdevadf.oracle.com/adf-richclient-demo/faces/components/switcher.jspx
    Code:
    <af:switcher id="s1" defaultFacet="#{<CONDITION> == 'true' ? 'two' : 'three'}">
    <f:facet name="two">
    <af:outputText id="ot2" value="Two"/>
    </f:facet>
    <f:facet name="three">
    <af:outputText id="ot3" value="Three"/>
    </f:facet>
    </af:switcher>
    For changing the text color based on the condition, you could use the EL expression in InlineStyle (it is a simple case) Otherwise, you can use skinning to change the same.
    Sample:
    <af:outputText id="ot4" value="#{bindings.FirstName.inputValue}"
    inlineStyle="#{bindings.FirstName.inputValue == 'Steven' ? 'color:red' : null}"/>
    Thanks,
    Navaneeth

  • Change the current row in an iterator and reflect the change on page

    Hi there,
    I have a jspx with a creation form created as usual draging and droping the data control. In same page, I inserted a commandButton which ActionListener executes a method in a managed bean called validate(). Through such a method what Im trying to do is to fill the form with data from specified entry of the database if certain condition is true. I know it is kinda twisted but unfortunately is the requirement for the page.
    So basically in "validate" method, if the condition I mentioned is reached, I do the following:
    // execute a Rollback (included in Page Definition) in order to cancel the previous auto-invoked "Create".
    FacesContext context = FacesContext.getCurrentInstance();
    Application app = context.getApplication();
    BindingContainer bindings =(BindingContainer)app.getVariableResolver().resolveVariable(context,"bindings");
    OperationBinding opBinding = bindings.getOperationBinding("Rollback");
    opBinding .execute();
    //get the iterator and asociated VO from the binding container
    ValueBinding vb = app.createValueBinding("#{bindings.AccountsVOIterator}");
    DCIteratorBinding dciter = (DCIteratorBinding) vb.getValue(FacesContext.getCurrentInstance());
    ViewObject view = dciter.getViewObject();
    //and set the current row with the specified entry I have mentioned above.
    Object keyValues[] = new Object[2];
    keyValues[0] = "1"; keyValues[1] = "98543";
    Row[] row = view.findByKey(new Key(keyValues),1);
    AccountsVpnVORowImpl client = (AccountsVpnVORowImpl)row[0];
    view.setCurrentRow(client);
    view.executeQuery();
    dciter.setCurrentRowWithKey(client.getKey().toStringFormat(true));
    dciter.executeQuery();
    opBinding = bindings.getOperationBinding("Execute");
    opBinding.execute();
    All this works perfectly when I debbug it but I cannot see the changes in the page(even refreshing browser). I need that when such a condition is met, the creation form turns into a modify-specific entry form, filling all fields with the specific data in order user can modify it, and all in the same page.
    Any clue?
    Thanks so much in advance for your time.

    Hi,
    I could see the problem with call to executeQuery and execute methods at the end of your method which re-sets the current row.
    Once you set the current row you should not call execute or executequery methods. Try removing those calls and also make sure that you have added partialTriggers property on the table is set to commandbutton id and partialSubmit property is set to true on commandButton to refresh the table partially on click of a button
    Sireesha

  • Get bindings of a region in the page

    Hi folks,
    I am using Jdev 11.1.1.4.0
    I have a page fragment which has a region inside it and other components too. The components (not part of the region) are bound to a view object. I get the bindings of this page using
    FacesContext fc = FacesContext.getCurrentInstance();
    fc.getApplication().evaluateExpressionGet(fc, "#{bindings}", oracle.binding.BindingContainer.class);
    Now I iterate over the executable bindings to get the JUIteratorBinding inside the region (taskflow). But the VO iterator for this gives me null values for its attributes even though the screen has values displayed inside the components.
    The VO for the components not part of the region above displays the correct values. Its just the problem with the iterator in the taskflow. What might be the issue here?
    Thanks
    Vishal

    Here is a simple explanation of my use case. I have a page with a region, and below it, there is a form to display/accept some fields. When I click on save button on the page, I need to capture the values inside the region as well as the form below it. So I need to access the view object inside the region.
    Thanks
    Vishal

  • ADF how can i execute a query with parameters when the page renders

    hi
    i am using ADF web 11g
    i need to execute a query with parameters when the page renders
    thanks

    hello,
    I'm a fan of Java code, I really am.
    But when you use ADF, you decided to move to a more declarative environment.
    So why not do it declarative, the adf way?
    In your pagedef insert a action binding.
    This can be anything, a call to the application module, a call on the iterator(Like executeWithparams, etc.)
    Create an invokeAction in your pagedef and set the condition.
    This example refreshes(Action 2 is execute query) the data.
    First the method binding:
        <action IterBinding="PersoonIterator" id="Execute" InstanceName="LSAppModuleDataControl.Persoon"
                DataControl="LSAppModuleDataControl" RequiresUpdateModel="true" Action="2"/>And the invoke action
        <invokeAction Binds="Execute" id="refreshData"/>This always refreshes the data on page entry, but anything is possible, you can set condictions for the invokeAction.
    -Anton
    PS Yes I know that pagedefs become backing beans in the end and yes that is Java code, but if you wanna play the ADF way, the goal is the reduction of Java code and the increased performance of declarative programming.

  • 2 Create bindings in 1 page, second Create event does not fire (ADF)

    I have an ADF, Struts, JSP master detail page and within that page there is a Create binding on the master view and this works fine.
    I added the detail list to the page and added a Create binding for this view underneath the list.
    The second create event does not seem to fire at all, when the button is clicked the page gets submitted and the request forwards to the correct page to display the input form but the contents of this form is the current selected detail row in the view and not a new row.
    I have created 2 new pages to test the detail view... I put a link in the original page to a test list page that displays the detail list and included a Create binding in this page which links to a test create page and this works fine.
    Has anyone else had this problem?
    Can there be only 1 Create event binding in a single page?
    Is there a way round this other than having to have my detail page on a seperate page?
    The Jdeveloper version I am using is as follows...
    JDeveloper Version 10.1.2.0.0 (Build 1811)
    Oracle IDE     10.1.2.17.84
    Business Components Version     10.1.2.17.96
    UML Modelers Version     10.1.2.16.71
    Versioning Support     10.1.2.16.71
    WebDAV Support Version     10.1.2.16.71
    Struts Modeler Version     10.1.2.6.15
    Designer Generators Framework     10.1.2.7.56
    ADF UIX     2.2.16
    java.version     1.4.2_04
    Thanks
    Al

    Can you do something like this?
    1. Look at the uimodel for your page and find the Create that is the action binding for the detail. Name it something like: CreateDetail
    2. Change the button on the page to create a detail to be named: event_CreateDetail.
    3. Change the forward from Master/Detail browser page to: CreateDetail
    Can you provide more details on:
    1. What are the names of the create bindings for master, then detail?
    2. What is the name of the forwards, that is the struts-config.xml action definition for this page?
    I hope this helps!

  • The Executables are not pointing to the DataControl in the Page bindings.

    Hi all
    I am working in the Jdev 11.1.2.1 and weblogic 10.3.5.
    I would like to inform you that,in my page bindings,the executables are not pointing to the Datacontrol and hence when i debug my page i am geting an empty page.
    This is happening many times.
    Inorder to solve this,i am adding one more executable to my executables and then when i c the executable pointing to the required datacontrol i delete the added executable.Then i am rebuilding the project and then i am running the page.Then i can see the page with the data.
    This is happening many time and many times i did the same.
    I want solution for this kind of problem.Why is this happening and whats the solution for this issue.
    Please help me in this issue.

    Hi,
    I am not sure what causes this issue.
    1. Are you using ADF Libraries (model projects are deployed and used). If yes, does it work fine if you refresh the whole application (in the application navigator) and then run the page to see if it resolves?
    2. When you open up the pagedef in overview mode, do you see the Datacontrol? If not, try refreshing the datacontrol palette and see if it works fine after that?
    3. What happens if you do a build->clean all and then run the page? Does it work fine then?
    -Arun

  • ADF UIX Struts and the BajaContext, Page, and PageEvent

    Hi,
    I'm hoping someone can point me to the right piece of documentation, but I can't seem to figure out how to build the link between 1) the new ADF bindings and the UIX controller event handler objects such as the BajaContext and 2) a UIX event handler and the ADF bindings.
    We used the ServletBindingUtils object to gain a handle on BC4J objects within UIX event handlers. To get the application module, we'd use getApplicationModule and pass in the BajaContext object. Or, the BindingContext, but this context is the oracle.cabo.data.jbo.bind.BindingContext, not oracle.adf.model.BindingContext.
    Also, the opposite question remains on how does one obtain a handle the Page, PageEvent, and BajaContext from the struts side, from say the DataActionContext?
    If there is no link (or not one easily obtained) are there plans to provide one, or are these two controller mechanisms to remain separate?
    Thanks much,

    I don't know if this will help:
    http://helponline.oracle.com/jdeveloper/help/state/content/navSetId.jdeveloper/navId.4/vtAnchor.handlingEvents/vtTopicFile.jdeveloper%7Cuixhelp%7Cuixdevguide%7Cintroducingbaja%7Ehtml/
    There is a snippet to finding the BajaContext off of the rendering context:
    BajaContext bajaContext = BajaRenderingContext.getBajaContext(context);
    I'm not sure if something similar can be done with the ActionContext or not.
    Brad

  • Is possible to send the Iterator content to XSQL page ?

    Hi all,
    I have a requirement to create a Search Form (using ADF Search Form) , display the "search result" on the page, then by pressing a button, the "search result" is converted to XSQL page.
    I create a Custom XSQL Action Handler (ADFViewObject.java) like in Steve Muench's ADFToyStore to handle this.
    The problem is : When I run it and press the button I get this error :
    Oracle XML Developers Kit 10.1.3.1.0 - Production
    XML-25014: Resulting page is an empty document or had multiple document elements.
    Below is my code :
    CashInView1ResultIterator is the iterator used by search result.
    cashin.xsql :
    <?xml version="1.0" encoding='windows-1252'?>
    <!--
    | Uncomment the following processing instruction and replace
    | the stylesheet name to transform output of your XSQL Page using XSLT
    -->
    <?xml-stylesheet type="text/xsl" href="pdf.xsl" serializer="FOP"?>
    <xsql:action xmlns:xsql="urn:oracle-xsql" handler="itt.general.util.ADFViewObject"
    iterator="CashInView1ResultIterator">
    </xsql:action>
    On the button's backing bean :
    public String pdf_action() throws IOException {
    ExternalContext ectx = FacesContext.getCurrentInstance().getExternalContext();
    HttpServletResponse response = (HttpServletResponse)ectx.getResponse();
    //HttpSession session = (HttpSession)ectx.getSession(false);
    //session.invalidate();
    System.out.println("xsql");
    response.sendRedirect("../cashin.xsql");
    return null;
    What is wrong here ?
    Thank you very much,
    xtanto

    Hi Steve,
    I have not tried the ADFToyStore demo. and I think the context is rather different, ADFToyStore use Struts data page to call the xsql page, while in my application I use ADF Faces.
    And I dont know how to integrate XSQL with adf faces.
    Could this be the problem ???
    I call the XSQL page from backing beans :
    public String pdf_action() throws IOException {
    ExternalContext ectx = FacesContext.getCurrentInstance().getExternalContext();
    HttpServletResponse response = (HttpServletResponse)ectx.getResponse();
    response.sendRedirect("../cashin.xsql");
    return null;
    Thank you,
    xtanto

  • License of data controls, data bindings without the ADF framework

    I am just wondering. If i create a Java EE web application in Jdeveloper and use datacontrols and data bindings for my JSF pages. I don't use the ADF rich faces but the basic JSF components. Does that require a license for ADF? Can that be easily deployed on a tomcat server?
    As far as i understand are the bindings and data controls part of JSF 227 which is created by oracle. If i want to use it outside of oracle products, do i need to create my own implementation of that standard or how does it work? If i use Jdeveloper, i can easily create datacontrols and use the drag & drop method to create JSF tables and so on. But does that require a license for ADF or can i use it for free?
    Just to be sure... I am not using ADF BC but i am using hibernate as data access layer. From their i create a class that i convert to data control.
    Edited by: Yannick Ongena on Nov 1, 2010 12:02 PM

    The section Licensing of the JDeveloper FAQ page ( says:
    Q: How do I know if I need a TopLink and ADF runtime license?A: You will need to be licensed for a production deployment of ADF if you are using any of the following features:
    Oracle TopLink
    ADF Controller / ADF Task Flows
    ADF Business Components
    ADF Model layer databinding
    ADF Faces Component
    ADF Swing
    ADF UIX User interface components
    ADF Actions / Datapages for Struts>
    DataControls and ADF Bindings are part of the ADF Model layer databinding, so they require runtime licenses if not used on Oracle WebLogic Server or Oracle iAS.http://www.oracle.com/technetwork/developer-tools/jdev/jdeveloper11gfaq-085697.html#L0<a/> says:
    Q: How do I know if I need a TopLink and ADF runtime license?A: You will need to be licensed for a production deployment of ADF if you are using any of the following features:
    Oracle TopLink
    ADF Controller / ADF Task Flows
    ADF Business Components
    ADF Model layer databinding
    ADF Faces Component
    ADF Swing
    ADF UIX User interface components
    ADF Actions / Datapages for Struts>
    DataControls and ADF Bindings are part of the ADF Model layer databinding, so they require runtime licenses if not used on Oracle WebLogic Server or Oracle iAS.

  • 11G ADF BC: First time loading the page, how to disable some components?

    Hi,
    I have a fusion web application created using Jdev 11G ADF BC. I am working on a search/results page that has a panel split. In the left panel, there is a list of nevigation links. The data shows in the right panel.
    What I want to achieve here is to enable only one link on the left when the page is first loaded and it is a search/result page. Disable all the rest of it because other links are related to more info about the search results. When the page is first loaded, there is no data on the right, so that there is no more other data to look at. Ideally, all the rest of the links should be disabled and only the "Query" link should be active and selected.
    Is there a way to do this with 11G? Thank you very much for your help.
    Regards,
    Annie

    initially, what ever the components you want to disable set the disabled="true" in the jspx. Once you fetch the query results and in that action enable the componens like commandButton1.setDisabled(Boolean.FALSE);. that's how I am doing. You can dynamically enable/disable by having a boolean variable in the backing bean and set the disable property of component lke disabled="#{backingBeanScope.yourbean.blnAddBtn}".

Maybe you are looking for

  • Time to upgrade processor?

    Upgraded HD to 250 GB, added DVD read write now I need to upgrade processor. Help. Have had G4 since late 2001. Absolutly no problems. Have kept software updated also. Would like to upgrade to new OS Leopard but processor speed only 800mhz, need more

  • Screen resolution in webdynpro

    Hi everyone; I create a webdynpro with 2 transparent container in rootuielementcontainer. In rootuielementcontainer I validate stretchedHorizontally's flag and stretchedVertically's flag; so when user explode the browser,the window is adapted to the

  • File output?

    I am trying to write a program that takes a variable, places its value in a (text) file, adds 1 to the variable, and writes the new value behind the old one in the text file (a loop that write variable number to file ... to, for example, make a list

  • How to use SQLExec without the ODBC error

    When I execute the query using SQLExec it gives alarm on Excel ODBC driver.Please provide detailed instructions on how to use this object.

  • Safari 3 lagging something horrible

    Safari 3 (Version 3.0.4 (523.12)) does one very weird thing on my computer (10.4.11 / 12" Powerbook). It has frequent "micro lags" where the entire app will lag for about .33 to .5 seconds in the middle of something. It might be typing (the subject l