UIX Search Form "difficult" question

OK,
Say you dragged and dropped UIX search form onto the page. When you start the page it will render the result table without specific where criteria set, ie SELECT * FROM TABLE;
Questions:
1) How to add default WHERE clause for the first time when the page opens ie I want to have result page something like SELECT * FROM TABLE WHERE PARAM='bla';
2) Similar question but this time how to pass PARAM from some previous page?
Please help

1. Try setting an initial where clause on the viewObject that you used to construct the search form. You can do this in the BC4J editor (wizard) for your viewObject.
2. you would have to write an event handler and programmatically set the where clause on your viewObject.

Similar Messages

  • ADF UIX Search Form - Is this a bug?

    I created a JDev 9.0.5.2 ADF UIX Search form from the component palette. I ran the page without making any changes. I chose the Find button which displayed the search criteria. I selected the delete button and then the create button, which created 2 blank records (possible bug?) in the search criteria table at the top. I selected one of the blank records and entered search criteria. I chose the submit button which changed the data in the search criteria table as it is supposed to do. I selected the other blank record, entered search criteria and submitted it. Again the data in the search criteria table was changed appropriately. I selected the delete button and the wrong record was deleted (bug?).
    Are these bugs?

    Hello,
    a similar sort of situation is created if you have a Read-only table on a page which drills down to an edit/create input form page. If you enable a create functionality you need to enable some way for the user to back out of the created record and clean up the newly created row. On the detail page (JobsEdit.do) i created a link to a custom event on the master page action (JobsView.do) like this:
    <button text="Cancel" destination="JobsView.do?event=cancelinput"/> In the Data Action class for the JobsView page i have a method defined as follows:
    public void onCancelinput(DataActionContext ctx)
        Row row = ctx.getBindingContainer().getApplicationModule().findViewObject("JobsView1").getCurrentRow();
        row.refresh(row.REFRESH_REMOVE_NEW_ROWS );
    }as a workaround, it sounds like you may need put some manual controls in place to tightly control any newly created rows which have/will not been used. I don't know if this will resolve the deleting wrong record problem...
    regards,
    Brenden

  • How To Build a Simple UIX Search Form

    Hi
    I am starting with ADF BC
    "I tried to run "How To Build a Simple UIX Search Form" sample but the error
    "query not found on action:/dataPage1" Could any one tell me where the problem is?

    I got the error when I press Query submit button, the application is running from page.uix as the sample

  • Shay Shmeltzer : How To Build a Simple UIX Search Form

    Shay, I need your help here. I need to filter MessageChoice entries by doing setWhereClauseParam on the appropriate VO (The one that acts as a source for the LOV mode for MessageChoice). Say, this VO is in the 'root' level of AM_A.
    Everything from here (all VOs) are in AM_B.
    Say I am on page1.uix which has a readonly table and submit button. Let's say one of the table COLUMNS contains strings that I need to pass to the AM custom method (The one that will set where clause).
    So user selects the ROW and clicks submit. Somehow (how exactly?) string gets passed to data action (that I guess uses custom method, like the one in your example in AM_B). The page forwards to ANOTHER page2.uix. This page is input form with one field as MessageChoice. Now this is IMPORTANT. This message choice has a source driven by the VO that I wanted to set WHERE clause.
    I have been trying to do this for a week, tried all kinds of stuff but am never getting it to work.
    Please help.
    Rade

    ok, a little sample with the HR Schema.
    You are going to display the departments in the first screen, select a department and then use the row that you selected to set the where clause for a new view item that is based on EMP.
    So create a new view (call it queryEmp) that looks like this:
    SELECT Employees.FIRST_NAME,
    Employees.EMPLOYEE_ID,
    Employees.LAST_NAME,
    Employees.DEPARTMENT_ID
    FROM EMPLOYEES Employees
    WHERE DEPARTMENT_ID=:1
    Then add a method to your applciation module as follow:
      public void setMyWhere()
        ViewObject vo = this.findViewObject("queryEmp1");
        ViewObject vo_master = this.findViewObject("DepartmentsView1");
        System.out.println("valus is "+vo_master.getCurrentRow().getAttribute("DepartmentId"));
        vo.setWhereClauseParam(0,vo_master.getCurrentRow().getAttribute("DepartmentId"));
        vo.executeQuery();
      }Then the struts flow is from the first page that just shows the Departments and allows you to choose one (the radio button in the multi-row table does this for you).
    Then add a button that sends you to a dataaction. on this dataaction drag and drop the method you have defined (and made it a client method - setMyWhere)
    Then this method goes to a second UIX that shows the information from the Empquery view.
    Works for me.

  • BETWEEN ? AND ? for datefields in uix Search Form

    I tried to Search for a date Range using:
    between 'onedate' and 'anotherdate'
    but this doesn't really work. i always get all dates as a result!
    does anybody know how to work around?
    did anybody run into the same problem?

    I'd just like to mention, that the mentioned approach is vulnerable to SQL-Injection attacks, which can be quite harmful on oracle databases!
    You should add some validation logic to the setCondition method to filter out special characters, especially "'"

  • Passing param from UIX Master-Deatil to Search form

    OK This seems to be little bit advanced question (at least for me).
    Say I have two UIX pages
    1. The first page (P1) contains Master Detail view of some table T1(ID1, ID2, ID3).
    2. The second page (P2) is UIX search phase created from from the view of T2(ID4,ID5,ID1)
    NOTE that ID1 is FK in T2 and is also PK in T1.
    Let's say that user picks some record in P1. Then the user clicks some submit button that should open P2. Now when the P2 renders it starts with 'Results' table (I hope everyone is familiar with UIX search pages).
    What I WANT is this:
    a) When P2 renders it should show only records where ID1 matches the one selected in P1, ie
    SELECT T2.ID4, T2.ID5, T2.ID1 FROM T2
    WHERE T2.ID1=T1.ID1 <-- this one is chosen from P1 and T1.
    b) When user now wants to create a search critera it has to have ID1 set to the one chosen from P1 T1.
    Hope the question is clear
    Please help!
    Rade

    This is how we recommend doing this:
    Create your data model so that the Detail is a child of Master. You might not have this set up correctly currently.
    Next, on the struts-config.xml diagram, create a Data Page and call it the MasterDataPage. Open the page and make sure to name it with the .uix extension. Select the Master Data Control and drag a read-only table onto the MasterDataPage. Drag and drop a uix submitButton component in the tableActions named child of your table.Set the event attribute on the submit button to "search". (don't create an event handler in the uix page yourself since this happens in struts).
    Draw your forward line from MasterDataPage to Search DataAction and call it "search". Create a DetailDataPage that comes off of SearchDataAction via "success", the default. Select the Detail model and drag it as a Read-only table onto that page.
    Now run the MasterDataPage. Select a row from the master table. Click the Submit button. This will take you to the Detail page and you will see the details for the row on the master that you selected.
    I hope this helps,
    Jeanne

  • Search Form with UIX

    Hi all, is it possible in a search form with uix shows always the edit criteria with execute button and not when I click the find button?
    Please help!!!
    Matteo.

    I want show the edit criteria with results. Is it possible? How can I do this?
    Any suggestion will be appreciated.
    Thanks, matteo.

  • How can I show Search Form parameter values in URI of Results page?

    I have searched through these pages for posts relating to caching but haven't seen any that relate to my issue.
    We run a website that accesses data through search forms and returns matching data to the requester in a results page. The search criteria are entered in a form and the results page is generated by a servlet that gets the search parameter values that the user entered using the GET method.
    I would like rewrite this Search page using JDeveloper to bring our old code up to date and take advantage of new features that should help performance. In particular, I want to utilise the WebCache.
    To use the WebCache effectively, the cache needs to know what the search criteria were when it delivers a page so that repeated requests using the same criteria can be served directly from the cache.
    The data retrieved by a query may change from one search to to the next so I can't use time-based caching. But, I can use the WebCache Invalidation interface from the back-end DB server to flush old data out of the WebCache when it is changed, but to flush out the correct pages I need to know the parameter values passed.
    If I just follow the demos, it seems like the search parameters are all hidden in beans or something which means that the Web Cache can't be used for what I want. The parameter values are important.
    So my question is: is there a way of showing the search parameters used in the URI to the Results page? Can the old GET method of parameter passing be used (or can I somehow just put the old style parameters onto the URI?)
    Alternatively, is there a simple How To or Demo on how to use the Web Caching facility with JSF?
    (ADF Caching and Java Object caching do not seem appropriate for my needs. ADF caching seems to be limited to having fragments cached for fixed periods of time and Java Object caching is orders of magnitude slower and involves the Application Server.)
    Thanks for any advice,
    Andy

    Sorry - should have said I'm using JDev 10.1.3.0.4 with JSF & ADF BC.

  • Need to attach my custom search form to the tourch in the application

    Hi all ,
    plz will you guide me in the case i've customized search form & i need to attach it to the search torch found in the application ,
    where when the user press this tourch my search form appears

    yes in the application for example
    human resources vision operations -------> people------> enter & maintain
    it shows find screen then when i finish the find screen it send me to the main form , then while i'm in the main form there is torch found in the application under the menu word on the upper left where it brings the find screen again
    wht i want that i need to attach my custom find screen to this torch
    will you tell me is wht i need related to here or else where can i post my question ???

  • Case-insensitive Search with Search Form

    I am using a Search Form with a UIX Page. One of the issue that need to be resolved is to be able to do case-insensitive search for text information stored in some database columns. Please advise me how to implement case_insensitive search with JDeveloper's Search Form.
    Thanks in advance,

    Hi Qian,
    This article (below) by Steve Muench explains how you can customize Query by example behaviour of ADF BCs and if you really want, how to create your own ViewCriteriaAdapter (but you don't have to go quite that far - luckily :) ).
    http://radio.weblogs.com/0118231/2005/02/10.html#a492
    Here is what I did. I implemented the following method in my base view object class (MyBaseViewObject). Note that this code is based on a piece of code that Steve posted on his blog (http://radio.weblogs.com/0118231/stories/2003/07/11/implementingAViewCriteriaAdapterToCustomizeQueryByExampleFunctionality.html); originally an example about creating your own ViewCriteriaAdapter.
    Since applyViewCriteria(oracle.jbo.ViewCriteria) is used by the query-by-example mechanism you're able to "intercept" the ViewCriteria on "it's way in". After that the standard ViewCriteria does it's job as ususal and generated the where clause when required.
    public void applyViewCriteria(ViewCriteria vc)
         if( null == vc || vc.size() == 0 ) super.applyViewCriteria(vc);
         ViewCriteriaRow criteriaRow = (ViewCriteriaRow)vc.first();
         StructureDef def = criteriaRow.getStructureDef();
         AttributeDef[] attrs = def.getAttributeDefs();
         System.out.println(getClass().getName() + ": applyViewCriteria()");
         boolean bFirst = true;
         do{
           if(vc.hasNext() && !bFirst) criteriaRow = (ViewCriteriaRow)vc.next();
           criteriaRow.setUpperColumns(true);
           for (int j = 0, attrCt = attrs.length; j < attrCt; j++)
             String criteriaAttrVal = ((String)criteriaRow.getAttribute(j));
             if (criteriaAttrVal != null && !criteriaAttrVal.equals("") && !JboTypeMap.isNumericType(attrs[j].getSQLType()))
              criteriaRow.setAttribute(j,criteriaAttrVal.toUpperCase());
           bFirst=false;
         }while(vc.hasNext());
         super.applyViewCriteria(vc);
    NOTE that doing this makes all your views case insensitive (to vc search) you may want to implement more functionality in your base view object to set whether a view is in case insensitive mode or not.
    ALSO that flag will not be passivated (if I remember correctly - someone correct me if I'm wrong) so you'll have to add that flag to the passivated data.
    Cheers!
    Sacha

  • Search "as you type" search form

    Is there a way to implement a search "as you type" search form? I know how to implement a standard seach form but am not sure how you would do a "as you type" search form.
    Any help would be appreciated.
    Marty

    Hi Marty,
    I'm not sure to well understand the question, but if i do this link could probably help you:
    http://my.opera.com/dominionspy/blog/2007/02/26/an-advanced-custom-search-form-for-adf
    Good luck,
    Tif

  • General search form with JQuery not working

    Hi,
    I tried to use jquery to submit a search form because I need some checking before submit. However,  it did not go to search results page, but went to home page instead.
    Here is my html:
    <form name="catsearchform96767" id="generalSearchForm" method="post">
        <p><label style="opacity: 1;" for="f-search">Search</label> <input type="text" name="CAT_Search" id="f-search" /> <button type="submit">GO</button></p>
    </form>
    Javascript:
    $('#generalSearchForm').submit(function(){
         $(this).attr('action', '/Default.aspx?SiteSearchID=1060&amp;ID=/search-results');
         $(this).unbind().submit();
         return false;                                         
    It does not work with JQuery. But when I moved form action url from jquery to html, it worked. Any ideas? Cheers.

    Hi David,
    Below is the complete code I have used to load the current user to the people picker in SharePoint 2013.
    $(document).ready(function(){
    SP.SOD.executeFunc('sp.js', 'SP.ClientContext', LoadCurrentUser);
    function LoadCurrentUser() {
    var context = SP.ClientContext.get_current();
    var siteColl = context.get_site();
    var web = siteColl.get_rootWeb();
    this._currentUser = web.get_currentUser();
    context.load(this._currentUser);
    context.executeQueryAsync(Function.createDelegate(this, SetPickersToCurrentUser), Function.createDelegate(this, LoadUserfailed));
    function LoadUserfailed() {
    alert('failed');
    function SetPickersToCurrentUser()
    var loginName = this._currentUser.get_title();
    SetPeoplePicker('Order Team', loginName);
    function SetPeoplePicker(fieldName, userAccountName) {
    var peoplePickerDiv = $("[id$='ClientPeoplePicker'][title='" + fieldName + "']");
    var peoplePickerEditor = peoplePickerDiv.find("[title='" + fieldName + "']");
    var spPeoplePicker = SPClientPeoplePicker.SPClientPeoplePickerDict[peoplePickerDiv[0].id];
    peoplePickerEditor.val(userAccountName);
    spPeoplePicker.AddUnresolvedUserFromEditor(true);
    Let me know if you have any questions. I will help you out!
    -Praveen.
    ASP.NET and SharePoint developer
    Blog: http://praveenbattula.blogspot.com
    Please click "Propose As Answer" if a post solves your problem or "Vote As Helpful" if a post has been useful to you.

  • Re-initializing search form

    I have a page that consists of several regions. One region is a form that is used as a search form. You can type in an order number, hit submit, and it takes you to a new page displaying the details for that order. When the back button is pressed, the user wants that search form cleared out, but I can't seem to get it to work. Can someone help me figure out how to clear out the search form when returning from another page.
    Thanks much in advance.

    This question should be posted on the Products > Portal > Search forum.
    When you say hit the back button, do you mean the back button on your browser? If so, its the browser that causes this behaviour not the search form in particular.

  • Managing Blank Fields in Search Form

    I am trying to create an advanced search form to filter a recordset of events, so that I can search through these events based on parameters such as category, time, date, place, etc. Right now, because I'm new at this, I have been trying to create a filter with only two parameters, category and price. 'Category' is the first field in the form and 'price' is the second field in the form, followed by fields for time and location. When I search by category, the search works fine. When I search by category and price, only the category parameter works, and it doesn't filter by price. When I search only by price, the recordset comes up as blank. Does this have something to do with fields in the form being left empty or do empty fields have no effect on the search. When I test my query statement on my SQL query browser, it works fine, so I don't think that's the problem. Any help would be appreciated.

    Not an ADDT-specific question so I never responded. However the OP re-posted here in the Dreamweaver Application Development forum which produced a very interesting thread.

  • Search Form dude... Many Result For a Same Query

    I 'm using ADF UIX ...
    I need view the result of diferents tables but, only for a one query... All the tables are relationated...
    The structure of the Search Form is :
    - Search Criteria
    - Edit Criteria
    - Results
    Then I need that in the field of "Results" appear results but not only of a one table.. I need that appear many result of many tables..
    Thanks..

    I 'm using ADF UIX ...
    I need view the result of diferents tables but, only for a one query... All the tables are relationated...
    The structure of the Search Form is :
    - Search Criteria
    - Edit Criteria
    - Results
    Then I need that in the field of "Results" appear results but not only of a one table.. I need that appear many result of many tables..
    Thanks..

Maybe you are looking for