Clear the Filter Criteria from java code programmatically

Hi All,
I am using jdev version 11.1.1.6.0.
I do have ADF table for which I have added filter to each column .
I created table using java class data control.
Filter is working Fine .
My use case is-
When I click on search button data is populated in table.
When anybody enters filter value in column suppose product and hit enter ,it filters data.
if he clears and do not hit enter key and search again then it does not show all data it only show filtered data.
So how can I programmatically clear all filters so on click of  search it will show all the values not filtered values.
I have not used default Filter Behavior.
Please check below code for reference
  <af:table value="#{bindings.AfMyAccOrderStatusHistorySearchVO.rangeSet}"
                              var="row"
                              rows="#{bindings.AfMyAccOrderStatusHistorySearchVO.rangeSize}"
                              emptyText="#{bindings.AfMyAccOrderStatusHistorySearchVO.viewable ? 'No data to display.' : 'Access Denied.'}"
                              fetchSize="#{bindings.AfMyAccOrderStatusHistorySearchVO.rangeSize}"
                              rowBandingInterval="0" id="tblStatusHistoryList"
                              autoHeightRows="#{bindings.AfMyAccOrderStatusHistorySearchVO.rangeSize}"
                              rowSelection="single"      
                              width="100%"
                              partialTriggers="::cb5 ::cb8 ::cb1 ::cb2"
                              filterModel="#{bindings.AfMyAccOrderStatusHistorySearchVO1Query.queryDescriptor}"
                              queryListener="#{bindings.AfMyAccOrderStatusHistorySearchVO1Query.processQuery}"
                              filterVisible="true" varStatus="vs"
                              binding="#{AfMyAccOrderStatusHistoryAction.orderStatusHistorySearchList}">
<af:column headerText="#{alfaprojectBundle['ordstatushistory.column.invoiceDate']}"
                                  width="70"
                                  sortProperty="invoiceDate"
                                  sortable="true" filterable="true"
                                  id="c7" filterFeatures="caseInsensitive">
                          <af:outputText value="#{row.invoiceDate}" id="ot16"/>
                        </af:column>                     
                        <af:column headerText="#{alfaprojectBundle['ordstatushistory.column.soldto']}"
                                   width="100"   
                                   sortProperty="soldTo"
                                   sortable="true" filterable="true"
                                   id="c14" filterFeatures="caseInsensitive">
                          <af:outputText value="#{row.soldTo}"
                                         visible="#{row.visibilityIsOrdrFirstItem}"
                                         id="ot23"/>
                        </af:column>
So how to clear all filter values from java code.

I can't get the example "Programmatically Manipulating a Table's QBE Filter Fields"
Where is it ?
https://smuenchadf.samplecode.oracle.com/samples/ClearTableColumnFilterFields.zip
Thks

Similar Messages

  • How to isolate the Sql Statement from Java Code

    Hi
    I Need to know that can we segregate the Sql Statements and convert them to Stored Procedures so as to isolate the Sql statements from Java Code.
    So i have one static web page which uses four select Statements so what i want is to create a stored procedure encapsulating these queries. So that the Java Web Developer will simply call the Stored Procedure instead of using four different SQL Statements.
    Suppose the developer has these four Statements
    Select ename,empno,sal,job from emp;
    select empno,ename,mgr from emp;
    select deptno,dname from dept;
    select emp.ename,emp.empno,emp.deptno,dept,dname fromemp,dept;
    So can i encapsulate these four Sql Statements in one Procedure and the Web developer can call the Store procedure and dont need to write the Sql Statements in his code.
    Can Anybody guide me how to write this Stored type of Store procedure.
    Thanks

    http://www.google.com/search?q=java+windows+registry
    Next time, search yourself. It might be beyond your belief, but you're really, really not the first person to wonder about this.

  • How to pass the parameter values to the stored procedure from java code?

    I have a stored procedure written in sqlplus as below:
    create procedure spInsertCategory (propertyid number, category varchar2, create_user varchar2, create_date date) AS BEGIN Insert into property (propertyid, category,create_user,create_date) values (propertyid , category, create_user, create_date); END spInsertCategory;
    I am trying to insert a new row into the database using the stored procedure.
    I have called the above procedure in my java code as below:
    CallableStatement sp = null;
    sp = conn.prepareCall("{call spInsertCategory(?, ?, ?, ?)}");
    How should I pass the values [propertyid, category, create_user, create_date) from java to the stored procedure?[i.e., parameters]
    Kindly guide me as I am new to java..

    Java-Queries wrote:
    I have a stored procedure written in sqlplus as below:FYI. sqlplus is a tool from Oracle that provides a user interface to the database. Although it has its own syntax what you posted is actually PL/SQL.

  • How can we change the time of the media file from java code ?

    Hi,
    particularly, how can we start the media file from the second 55 and not from the second 0 (beginning) ?
    Thanks.

    I tryed to use such method but an exception was raised:
    javax.media.NotRealizedError: Cannot set media time on a unrealized controller
         at com.sun.media.BasicPlayer.setMediaTime(BasicPlayer.java:427)
         at com.sabily.mualim.main.MediaFileDemo.loadMediaFile(MediaFileDemo.java:72)
         at com.sabily.mualim.main.MediaFileDemo.<init>(MediaFileDemo.java:77)
         at com.sabily.mualim.main.MualimStandalone.main(MualimStandalone.java:12)
    Exception in thread "main" javax.media.NotRealizedError: Cannot set media time on a unrealized controller
         at com.sun.media.BasicPlayer.setMediaTime(BasicPlayer.java:427)
         at com.sabily.mualim.main.MediaFileDemo.loadMediaFile(MediaFileDemo.java:72)
         at com.sabily.mualim.main.MediaFileDemo.<init>(MediaFileDemo.java:77)
         at com.sabily.mualim.main.MualimStandalone.main(MualimStandalone.java:12)
    below is the code related to playing media file:
    package com.sabily.mualim.main;
    import java.awt.BorderLayout;
    import java.awt.Component;
    import java.awt.Container;
    import java.awt.Panel;
    import java.io.IOException;
    import java.net.MalformedURLException;
    import java.net.URL;
    import javax.media.ControllerAdapter;
    import javax.media.ControllerListener;
    import javax.media.Manager;
    import javax.media.NoPlayerException;
    import javax.media.Player;
    import javax.media.RealizeCompleteEvent;
    import javax.media.Time;
    import javax.media.TimeBase;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    public class MediaFileDemo extends JFrame{
         private Player player;
         Component center;
         Component south;
         private void loadMediaFile() {
              final Container contentPane = getContentPane();
              if (player != null) {
                   player.stop();
              try {
    //               player = Manager.createPlayer(new URL("file:C:/Nouveau dossier/e1_intro.wav"));
                   player = Manager.createPlayer(new URL("file:C:/mp3/001.wav"));
                   //player = Manager.createPlayer(new URL("file:D:/Film/Earth_Planet/Planet.Earth.EP08.Jungles/Planet.Earth.EP08.Jungles.avi"));
              } catch (NoPlayerException e) {
                   e.printStackTrace();
              } catch (MalformedURLException e) {
                   e.printStackTrace();
              } catch (IOException e) {
                   e.printStackTrace();
              ControllerListener listener = new ControllerAdapter() {
                   public void realizeComplete(RealizeCompleteEvent event) {
                        Component vc = player.getVisualComponent();
                        if (vc != null) {
                             contentPane.add(vc, BorderLayout.CENTER);
                             center = vc;
                        } else {
                             if (center != null) {
                                  contentPane.remove(center);
                                  contentPane.validate();
                        Component cpc = player.getControlPanelComponent();
                        if (cpc != null) {
                             contentPane.add(cpc, BorderLayout.SOUTH);
                             south = cpc;
                        } else {
                             if (south != null) {
                                  contentPane.remove(south);
                                  contentPane.validate();
                        pack();
                        //setTitle("Lesson 1");
              player.addControllerListener(listener);
              player.setMediaTime(new Time(15));
              player.start();
         public MediaFileDemo() {
              loadMediaFile();
         public Player getPlayer() {
              return player;
         public void setPlayer(Player player) {
              this.player = player;
    Best Regards

  • Running the .class file from java code

    I'm doing a kind of providing service like compiling and running Java code on server side and giving output to the end user.
    Please suggest me an approach with code to run .class file from the Java code.
    import java.io.*;
    public class demo {
    public static void main(String args[]) throws IOException, InterruptedException {
    int result;
    try {
    System.out.println("command output:");
    Process proc = Runtime.getRuntime().exec("java -cp . demoh");
    InputStream in = proc.getInputStream();
    result = proc.waitFor();
    BufferedInputStream buffer = new BufferedInputStream(proc.getInputStream());
    BufferedReader commandOutput = new BufferedReader(new InputStreamReader(buffer));
    String line = null;
    System.out.print(commandOutput);
    try {
    while ((line = commandOutput.readLine()) != null) {
    System.out.print(line);
    System.out.println("command output: " + line);
    }//end while
    commandOutput.close();
    } catch (IOException e) {
    //log and/or handle it
    }//end catc
    } catch (IOException e) {
    System.err.println("IOException raised: " + e.getMessage());
    }

    What happened when you tried what you have there?

  • Cannot call the execute command from java code

    Hello,
    I like to add a new user via a java web service.
    Establishing a connection to the OC4J MBean server is no problem. I also can execute the commands 'listAllCommands' and 'help' on the MBean. But if i try to call the execute command, i always get an NoSuchMethodException. Looking at the MBeanInfos 'execute' is listed there as an operation.
    Can anyone explain this to me?

    Hi,
    I basically used the code described at http://download.oracle.com/docs/cd/B32110_01/web.1013/b28952/mbeans.htm#CIHFDJBJ to connect to the MBeanServer.
    To invoke 'execute' i used
    MBeanServerConnection con= jmxCon.getMBeanServerConnection();
    con.invoke(new ObjectName(MBEAN_NAME), "execute", new Object[] { COMMAND }, new String[] {});
    where MBEAN_NAME is the ObjectName of the CommandService MBean and COMMAND is a String like "identity add ..."

  • Accessing the Binding Layer from Java

    Dear All
    How can i Accessing the Binding Layer from Java code i need details document for it becuase i have complex binding object (object inside object)
    Regards
    Mohd.Weshah

    i know but my case is complicated :
    Dear All
    i have generate a human task based task flow and i create a page with payload object . i have an empiterator whcih include the following attributes :
    - id
    - name
    - telephone
    - department (Complex object) it include another attributes - dept and dept Name
    my question i want to fill the empiterator by java code and fill all attributes including complex object (department ) from java code (my backing bean). \
    you can download a document that describe my problems by images and details :
    [http://www.4shared.com/account/document/fTREP1mv/ADF_Question__2_.html]
    Regards
    Wish79

  • ADF CoreTree API is missing the ability to expand collapse from Java code?

    ADF-faces-10_1_3_0_4 CoreTree API:
    How do I expand and collapse a tree from Java code?
    Thanks,
    --Todd                                                                                                                                                                                                                                   

    You can use the search on the read only (normal mode) of the PL/SQL Editor. Either through menu or using ctrl F.
    The other is still an enhancement and is being tracked.
    Sue.

  • Running sqlplus scripts from Java code?

    hi
    I need to programmatically run sqlplus scripts from Java code on a machine that doesn't have sqlplus installed.
    Is there any Java class library available for doing this?

    The Ant approach could probably work for me, thanks for the tip.
    The setup seems rather complex however, given the simplicity of the task. I would prefer just running a Java based SQL*Plus from in a separate process or doing this via an API that would allow me to run SQL*Plus scripts (parse script, substitute variables, run statements).
    Oracle SQL Developer v1.1 appears to include an API that does exactly this.
    The ScriptParser, Substitution and SQLPLUS classes in the oracle.dbtools.raptor.scriptrunner package (oracle.sqldeveloper.jar) seem to do just what I need based on my tests.
    Can I use these classes for this purpose in my application? Is repackaging allowed?
    Does Oracle have any plans for releasing this sort of functionality separately e.g. as part of the Instant Client?

  • Remote Object - not able to get the returned value from java method

         Hi ,
    I am developing one sample flex aplication that connects to the java code and displays the returned value from the
    java method in flex client. Here I am able to invoke the java method but not able to collect the returned value.
    lastResult is giving null .  I am able to see the sysout messages in server console.
    I am using flex 3.2 and blazeds server  and java 1.5
    Here is the code what I have written.
    <?xml version="1.0" encoding="utf-8"?><mx:WindowedApplication  xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" backgroundColor="#FFFFFF" initialize="initApp()">
     <mx:Script><![CDATA[
    import mx.controls.Alert; 
    import mx.binding.utils.ChangeWatcher; 
    import mx.rpc.events.ResultEvent; 
    import mx.messaging.*; 
    import mx.messaging.channels.* 
    public function initApp():void { 
         var cs:ChannelSet = new ChannelSet(); 
         var customChannel:Channel = new AMFChannel("my-amf", "http://localhost:8400/blazeds/messagebroker/amf");     cs.addChannel(customChannel);
         remoteObj.channelSet = cs;
    public function writeToConsole():void {      remoteObj.writeToConsole(
    "hello from Flash client");
          var returnedVal:String = remoteObj.setName().lastResult;     Alert.show(returnedVal);
    //[Bindable] 
    // private var returnedVal:String; 
    ]]>
    </mx:Script>
    <mx:RemoteObject id="remoteObj" destination="sro" /> 
    <mx:Form width="437" height="281">
     <mx:FormItem>  
    </mx:FormItem>  
    <mx:Button label="Write To Server Console" click="writeToConsole()"/>
     </mx:Form>
     </mx:WindowedApplication>
    Java code
    public  
         public SimpleRemoteObject(){  
              super();     }
      class SimpleRemoteObject { 
         public void writeToConsole(String msg) {          System.out.println("SimpleRemoteObject.write: " + msg);     }
         public String setName(){          System.
    out.println("Name changed in Java"); 
              return "Name changed in Java";
    And I have configured destination in  remote-config.xml
    <destination id="sro">
       <properties>    
        <source>SimpleRemoteObject</source>
        <scope>application</scope>
       </properties>
      </destination>
    Please help me .

    You are not able to get the returned value because if you see the Remote object help you will realise you have to use result="resultfn()" and fault = "faultfn()"
    In this you define what you wish to do.
    More importantly in the remote object you need to define which method you wish to call using the method class like this
    <mx:RemoteObject id="remoteObj" destination="sro" result="r1" fault="f1"  >
         <Method name="javaMethodName" result="r2" fault="f2"/>
    <mx:RemoteObject>
    r2 is the function where you get the result back from java and can use it to send the alert.

  • How to download (export) user master data from java code

    Hi,
          I've an requirment. I need to export the user master through java code from a dual stack system
    The requirment is like an autmated of what we do in indentity management export.
    Thanks in advance
    Regards,
    mcsekar_21

    Solved it..
    Wrote a bean using UME factory, to download, upload and modify.

  • How to call a .bat file from java code?

    How to call a .bat file from java code? and how can i pass parameters to that .bat file?
    Thanks in advance

    thanks for ur reply
    but still i am getting the same error.
    I am trying to run a .bat file of together tool, my code looks like below
    import java.lang.Runtime;
    import java.lang.Process;
    import java.io.File;
    class SysCall{
         public static void main(String args[]){
              String cmd="D://Borland//Together6.2//bin//Together.bat -script:com.togethersoft.modules.qa.QA -metrics out:D://MySamples//Metrics// -fmt:html D://Borland//Together6.2//samples//java//CashSales//CashSales.tpr";
              //String path="D://Borland//Together6.2//bin//Together.bat ";
              Runtime r= Runtime.getRuntime(); //Declare the system call
              try{
                   System.out.println("Before batch is called");
                   Process p=r.exec(cmd);
                   System.out.println(" Exit value =" + p.exitValue());
                   System.out.println("After batch is called");
              /*can produce errors which must be caught*/
              catch(Exception e) {
                   e.printStackTrace();
                   System.out.println (e.toString());
    I am getting the below exception
    Before batch is called
    java.lang.IllegalThreadStateException: process has not exited
    at java.lang.Win32Process.exitValue(Native Method)
    at SysCall.main(SysCall.java:17)
    java.lang.IllegalThreadStateException: process has not exited

  • How to edit the existing data in the XML file from java programming.

    Hi all
    i am able to create XML file with the sample data as below from java programming.
    i need sample code on how to edit the existing data in the XML file?
    for example
    <?xml version="1.0"?>
       <mydata>
               <data1>
                         <key1>467</key1>
                        <name1>Paul</name1>
                        <id1>123</id1>
              </data1>
              <data2>
                         <key2>467</key2>
                        <name2>Paul</name2>
                        <id2>123</id2>
              </data2>
        </mydata>
    i am able to insert the data in the XML.
    now i need sample code on how to modify the data in the above XML file from the java programming for only key2,name2,id2 tags only. the remaining tags data in the XML file i want to keep same data except for key2,name2,id2 which are i want to modify from java code
    Regards
    Sunil
    [points will be always rewardable]

    hi
    u need a parser or validate the xml file for to read the xml file from java coding u need for this
    xml4j.jar u can download this file  from here
    http://www.alphaworks.ibm.com/tech/xml4j
    or we can use the SAX(simple API for XML)
    some sample applications for this
    http://www.java-tips.org/java-se-tips/javax.xml.parsers/how-to-read-xml-file-in-java.html
    http://www.developertutorials.com/tutorials/java/read-xml-file-in-java-050611/page1.html
    http://www.xml-training-guide.com/e-xml44.html
    let me know u need any other info
    bvr

  • How to pass arguments to a batch file from java code

    Hi
    I have a batch file (marcxml.bat) which has the following excerpt :
    @echo off
    if x==%1x goto howto
    java -cp C:\Downloads\Marcxml\marc4j.jar; C:\Downloads\Marcxml\marcxml.jar; %1 %2 %3
    goto end
    I'm calling this batch file from a java code with the following line of code:
    Process p = Runtime.getRuntime().exec("cmd /c start C:/Downloads/Marcxml/marcxml.bat");
    so ,that invokes the batch file.Till that point its ok.
    since the batch file accpets arguments(%1 %2 %3) how do i pass those arguments to the batch file from my code ...???
    %1 is a classname : for ex: gov.loc.marcxml.MARC21slim2MARC
    %2 is the name of the input file for ex : C:/Downloads/Marcxml/source.xml
    %3 is the name of the output file for ex: C:/Downloads/Marcxml/target.mrc
    could someone help me...
    if i include these parameters too along with the above line of code i.e
    Process p = Runtime.getRuntime().exec("cmd /c start C:/Downloads/Marcxml/marcxml.bat gov.loc.marcxml.MARC21slim2MARC C:\\Downloads\\Marcxml\\source.xml C:\\Downloads\\Marcxml\\target.mrc") ;
    I get the following error :
    Exception in thread main java.lang.Noclassdef foundError: c:Downloads\marcxml\source/xml
    could some one tell me if i'm doing the right way in passing the arguments to the batch file if not what is the right way??
    Message was edited by:
    justunme1

    1 - create a java class (Executer.java) for example:
    import java.lang.reflect.InvocationTargetException;
    import java.lang.reflect.Method;
    public class Executer {
         public static void main(String[] args) {
              try {
                   for (int i = 0; i < args.length; i++) {
                        System.out.println(args);
                   Class<?> c = Class.forName(args[0]);
                   Class[] argTypes = new Class[] { String[].class };
                   Method main = c.getDeclaredMethod("main", argTypes);
                   // String[] mainArgs = Arrays.copyOfRange(args, 1, args.length); //JDK 6
                   //jdk <6
                   String[] mainArgs = new String[args.length - 1];
                   for (int i = 0; i < mainArgs.length; i++) {
                        mainArgs[i] = args[i + 1];
                   main.invoke(null, (Object) mainArgs);
                   // production code should handle these exceptions more gracefully
              } catch (ClassNotFoundException x) {
                   x.printStackTrace();
              } catch (NoSuchMethodException x) {
                   x.printStackTrace();
              } catch (IllegalAccessException x) {
                   x.printStackTrace();
              } catch (InvocationTargetException x) {
                   x.printStackTrace();
              } catch (Exception e) {
                   e.printStackTrace();
    2 - create a .bat file:
    @echo off
    java -cp C:\Downloads\Marcxml\marc4j.jar; C:\Downloads\Marcxml\marcxml.jar; Executer %TARGET_CLASS% %IN_FILE% %OUT_FILE%3 - use set command to pass variable:
    Open MS-DOS, and type the following:
    set TARGET_CLASS=MyTargetClass
    set IN_FILE=in.txt
    set OUT_FILE=out.txt
    Then run your .bat file (in the same ms dos window)
    Hope that Helps

  • Starting exetutable java file from java code

    Hi I was wondering how I can start a executable java file from java code?
    thanks

    Hi Mkaveli,
    Yes, it's possible. If you have a JAR executable, you've just to call the main method of its starter class. For a simple executable class, just call its main method.
    This way :
    SomeStarter.main(null); // if there's no argumentSmall precision : the executable JAR or class must be specified in the classpath of your application.

Maybe you are looking for