Search Method

Dear all,
I am working in ADF 10g (I have a problem when I am creating Search method).
I need to make search by using LOV (create 2 LOV list one for month and one for Year)
In my DB I have the the date in one column (19-Feb-2009)
I make two view object one for month and I use this statement:
SELECT Distinct TO_CHAR(A_DATE,'Month'),EXTRACT(Month from A_DATE)
from Attendances
order by EXTRACT(Month from A_DATE) ASC
Because I need to extract the month from the date column(EXTRACT(Month from A_DATE) as a text(TO_CHAR(A_DATE,'Month') and distinct( Distinct TO_CHAR(A_DATE,'Month').
for the year I used this statement:
Select Distinct EXTRACT(YEAR from A_DATE)
from Attendances
order by EXTRACT(YEAR from A_DATE) ASC
in the Application Data Module I got this:
In the Date:
TOCharADateMonth
ExtractMonthfromDate
In the year
ExtractYearfromDate
The Method I used:
public void SearchYear(String Year, String Month) {
ArchiveVOImpl view = getArchiveVO1(); // To get Archive view
ViewCriteria vc = view.createViewCriteria(); //
ViewCriteriaRow vcr = vc.createViewCriteriaRow();
ViewCriteriaRow mon = vc.createViewCriteriaRow();
if (Year != null || Month != null) {
vcr.setAttribute("ADate", Year);
mon.setAttribute("ADate", Month);
vcr.setUpperColumns(true);
mon.setUpperColumns(true);
vc.add(vcr);
vc.add(mon);
view.applyViewCriteria(vc);
view.executeQuery();
I have the error from Date format
I need the help in this, cause this is first time to me to use ADF.

Where should I use this
view.setWhereClause("WHERE TO_CHAR(ADATE,'YYYY') = '" + Year + "'");
could you explain to me?
Did I need to change any statements?
Edited by: user807547 on Aug 31, 2009 1:35 AM
Edited by: user807547 on Aug 31, 2009 1:36 AM

Similar Messages

  • How do i get a list of all Roles defubed under a particular OrganizationalUnit? How can i use LDAPConnection.search method for this?

     

    Sorry for the typographical mistake.
    Please read the question as:"How do i get a list of all Roles defined under a particular OrganizationalUnit? How can i use LDAPConnection.search method for this?"

  • Problem with search method in AM called from JSP

    Hi, im trying to get the real value from an foreign key of a view, and i have been created a custom search method in the AM, but i got a problem, the search only get results the first time that is called, the next times gets null result :
    public String getValorReal(Long identificador, String vista,
    String campoFiltro, String campoValor)
    where identificador is the foreign key, vista is the name of the view that contains the real value of the foreign key, campoFiltro is the field name of the view that will match the foreign key, and campoValor is the field name of the view that the search method will return as the real value.
    I created this class that call the search method :
    public class CuentasContablesOrgLOV {
    private BindingContainer bindings;
    public Map CuentaContable= new HashMap(){
    public Object get(Object key){
    Map parametros;
    BindingContainer bindings = getBindings();
    String result = null;
    OperationBinding operationBinding = bindings.
    getOperationBinding("getValorReal");
    if (operationBinding != null){
    parametros = operationBinding.getParamsMap();
    parametros.put("identificador",new Long(key.toString()));
    parametros.put("vista","CcCuentasContablesView4");
    parametros.put("campoFiltro","identificador");
    parametros.put("campoValor","CuentaContable");
    result = (String)operationBinding.execute();
    return result;
    public Map getCuentaContable() {
    return CuentaContable;
    I invoke this class from the JSP with EL:
    <af:outputText value='#{CuentasContablesOrgLOV.cuentaContable[row.CcCucoIdentificador]}'/>
    In the AM method obtains all the parameters correct, but the search only works the first time!
    Do you have an idea whats been happened?
    thanks a lot for your help

    There is no <%@ method %> tag for a JSP.
    http://java.sun.com/products/jsp/syntax/1.2/syntaxref12.html
    It looks like you are trying to write a JSP that only accepts post requests - not get?
    I'm not sure if you can accomplish that in a JSP directly.
    You can with an HttpServlet (which is where the doGet/doPost methods are defined) but HttpJspPage doesn't extend that class necessarily.
    Best you could probably do is put in a test of request.getMethod() to see if it is get/post.

  • TREX search methods

    Does anybody know the exact differences between the full text search methods in CV04N (or CDESK) ?
    DDIC has domane SDOK_TRMAC with following (german) elements:
    E     exakte Suche
    L     linguistische Suche
    F     fuzzy Suche
    N     Natürlichsprachliche Suche
    W     Wortsuche
    S     Soundex
    G     Class Features
    C     Class
    Type E is quite simple, o.k. ....
    What ist the difference ? I can't find any information in manuals. Which one are supported with
    SAP R3 4.6c and TREX 6.1
    Greetings from germany ...
    Markus

    Hi!
    I have the same questions!
    Did I miss any important SDN / wiki posts?
    Thanks.

  • Best native search method

    What is the Best native search method in Java? Is it Merge Sort implemented in Collections.sort()?

    > Okay. So just list all the methods that ARE in the
    Java API and only look for those methods in the
    documents that were linked to.
    Thanks, Paul. I guess I assumed that was blazingly obvious. I appreciate the clarification... :o)
    ~

  • Search method problem

    Hi again,
    I have problems about my search method at the below. It always create ArrayIndexOutOfBounds Exception. According to this error, the index(38) equals to the size of my arraylist. So how can I fix it ??
    import java.util.*;
    * ...Listdescription...
    * @author  ...yourname...
    * @version 1.00, 2006/05/19
    public class List
         // properties
         ArrayList store;
         int index = 0;
         // constructors
         public List(){
              store = new ArrayList();
         // methods
         public void add(Object e,int node){
              store.add(node, e);
         public void addHead(Object e){
              store.add(0, e);
         public void addTail(Object e){
              store.add(e);
         // recursive method     
         public void toString(int a){
              if(store.size() == a )
                   System.out.println( "");
              else{
                   System.out.println(store.get(a));
                   toString(a + 1);
         // recursive method
         public int search(Object e){
    //          if(index == store.size())
    //               return -1;
              if(e == store.get(index)){
                   return store.indexOf(e);
              else{
                   index++;               
                   return search(e);               
         public static void main( String[] args)
                 List myList = new List();
                 for(int a = 0; a < 35; a++ )
                      myList.add(a,new Integer(a));
                 myList.add(35,new Integer(35));
                 myList.addHead(new Integer(36));
                 myList.addTail(new Integer(39));
                 myList.toString(0);
                 System.out.println(myList.search(new Integer(3)));
    } // end of class List

    Do you think that the following can run for all object types ?
         public int search(Object e){
              if(index == store.size())
                   return -1;
              if(e.equals(store.get(index))){
                   return store.indexOf(e);
              else{
                   index++;               
                   return search(e);               
         }

  • *Security Error Issue while accessing youtube search method.

    Hello All,
    I am creating a flex aplication which has youtube videos search control. it works fine on local , but when I am trying to access this from any server its getting security error "[RPC Fault faultString="Security error accessing url" faultCode="Channel.Security.Error" faultDetail="Destination: DefaultHTTP"] " while  accessing the search method url using httpservice. Can any one help me.
    Thanks.

    You may need to add the -use-network=true compiler argument. When in Flex Builder this does not matter as much:
    From Flex Builder main menubar,   Project - Properties - Flex Compiler - Additional compiler arguments:  -use-network=true
    If this post answers your question or helps, please mark it as such.

  • Search Method by more one parameter

    Hi All,
    I am trying to use search method (LOV) which has three parameters..
    How can let the user search by one parameter or two or all..

    Are you asking how to write the SQL for the VO for this?
    How about:
    Where field1=nvl(:p1,field1)
    and field2=nvl(:p2,field2)....

  • Search method with Custom Bind

    Hi,
    I´m using the Custom Bind in may aplication, when I need find some entity by an specific attribute (not by the key attribute) I need get all register of some database and stop the iteration when the find parameter is equals the atribute at entity. There are a better method than this?

    Hi Mircea,
    I know that Berkeley DB does not have a query
    language, such as SQL. Would it be difficult for
    someone to add a subset of SQL on top of
    BDB-JavaEdition(mainly SELECTS and JOINS, without any
    SQL index definition) and have BDB integrated with
    SQL-based reporting tools?This is certainly possible and I think it would be quite useful. We have discussed this but it is not in our immediate plans. I don't know exactly how difficult it would be, but by reducing the scope to a limited form of SELECT, just enough to support the reporting tools, it seems like a manageable project.
    Of course, you would need an SQL processor that could be adapted -- one that is implemented in Java. I have not searched, but I assume there are such open-source components available.
    The SQL processor must be able to map table names to JE databases. To access columns it must be able to un-marshal the data in BDB records, i.e., understand the data format. Some thoughts on this:
    - SQL Table names could be mapped to database names, or with the DPL, to Java class names.
    - SQL Column names could be mapped to Javabean properties (getters) or fields, and the properties or fields would be accessed after converting a JE record to a Java object.
    - Not all data stored in a JE record can be mapped to SQL columns, since any data type may be stored in a JE record. The SQL query would be limited to querying those fields with SQL-compatible data types.
    - If not using the DPL, the SQL query processor must know how to obtain bindings for each database, and use them to convert JE records to Java objects. Perhaps the class name of the bindings could be configured in advance. Or, if using the DPL, then the use of bindings is automatic.
    - In general, requiring use of the DPL would simplify the project. But ideally, it would work with the DPL or without it.
    If you are serious about implementing something like this, we would be happy to support you.
    Mark

  • 2nd try - DPS: need to have multitple certificate mappings/search methods

    My 6.3 DPS is configured to authentificate end-users through SASL binds and to request a client certificate.
    I need to use 4 user attributes (cn,sn,givenname,ou) defined in the backend LDAP directory to map certificates to LDAP entries.
    The problem is that some servers are also connecting through DPS but their certificate doesn't contain any givenname attribute.
    So, they can not be authenticated by DPS which rejects their connections.
    I wish we could define multiple certificate mapping strategies in DPS (or at least a prefered and a default strategy) in order to have
    a workaround in such a situation.
    Any plan to implement that feature or any suggested workaround (other than creating new server certificates and entries with a givenname) ?

    Here's what I see in the access and error log:
    Access log:
    [07/Jan/2010:15:48:35 +0100] - CONNECT - INFO - conn=309 client=217.108.164.186:47961 server=rct-31.gipc.hst.fluxus.net:1636 protocol=LDAPS
    [07/Jan/2010:15:48:35 +0100] - PROFILE - INFO - conn=309 assigned to connection handler cn=Gestionnaire de connexion ultime,cn=connection handlers,cn=config
    [07/Jan/2010:15:48:35 +0100] - OPERATION - INFO - conn=309 op=0 BIND dn="" method="SIMPLE" version=3
    [07/Jan/2010:15:48:35 +0100] - OPERATION - INFO - conn=309 op=0 BIND RESPONSE err=0 msg="" etime=0
    Error log:
    [07/Jan/2010:15:48:01 +0100] - EXCEPTION - DEBUG - Exception thrown from thread Connection Handler 1 for Listener Thread 0.0.0.0:1389
    javax.net.ssl.SSLException: Inbound closed before receiving peer's close_notify: possible truncation attack?
    com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:166)
    com.sun.net.ssl.internal.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1356)
    com.sun.net.ssl.internal.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1324)
    com.sun.net.ssl.internal.ssl.SSLEngineImpl.closeInbound(SSLEngineImpl.java:1263)
    com.sun.directory.proxy.extensions.LDAPClientConnection.disconnect(LDAPClientConnection.java:1541)
    com.sun.directory.proxy.extensions.LDAPClientConnection.disconnect(LDAPClientConnection.java:1482)
    com.sun.directory.proxy.extensions.LDAPConnectionHandler.runThread(LDAPConnectionHandler.java:457)
    com.sun.directory.proxy.util.DistributionThread.run(DistributionThread.java:225)
    [07/Jan/2010:15:48:36 +0100] - EXCEPTION - DEBUG - Exception thrown from thread Connection Handler 1 for Listener Thread 0.0.0.0:1636
    java.io.IOException: Received CLOSED during initial handshaking
    com.sun.directory.proxy.extensions.LDAPClientConnection.doHandshake(LDAPClientConnection.java:398)
    com.sun.directory.proxy.extensions.LDAPClientConnection.read(LDAPClientConnection.java:1229)
    com.sun.directory.proxy.extensions.LDAPConnectionHandler.runThread(LDAPConnectionHandler.java:346)
    com.sun.directory.proxy.util.DistributionThread.run(DistributionThread.java:225)
    [07/Jan/2010:15:48:36 +0100] - EXCEPTION - DEBUG - Exception thrown from thread Connection Handler 1 for Listener Thread 0.0.0.0:1636
    java.io.IOException: Received CLOSED during initial handshaking
    com.sun.directory.proxy.extensions.LDAPClientConnection.doHandshake(LDAPClientConnection.java:398)
    com.sun.directory.proxy.extensions.LDAPClientConnection.disconnect(LDAPClientConnection.java:1547)
    com.sun.directory.proxy.extensions.LDAPClientConnection.disconnect(LDAPClientConnection.java:1482)
    com.sun.directory.proxy.extensions.LDAPConnectionHandler.runThread(LDAPConnectionHandler.java:457)
    com.sun.directory.proxy.util.DistributionThread.run(DistributionThread.java:225)
    Unfortunately, since I don't have access to the back-end DS access log, should I see more details (of interest !) on the DPS side
    with a higher log level ?
    From my understanding and with my DPS config, when DPS chooses the "Gestionnaire de connexion ultime" connection handler, it means
    it hadn't been able to map the certificate's owner to an LDAP entry. (This connection handler has the lowest priority in my DPS configuration).
    I've to check (with my customer), but it could be that with the existing back-end DS content, the problem is that when DPS searches for the certificate's owner LDAP entry with only 3 attributes, it's returned more than a single entry.
    Actually, otherwise, since I don't see any obvious problem in the error log, and thanks to your feedback, I can't see any other possible problem,
    provided that the customer is confident in the fact that there's an entry with the right certificate in the DS back-end .

  • Java JNDI Search method performance

    Hi,
    My requirement is i have more than 10 unique values for single a attribute. i need to retrieve all 10 records mathing it from LDAP using Java JNDI. But in LDAP there are more than 100 unique record in LDAP i need only 10 record that mathes my values.
    For example the attribute ou in LDAP has 10 unique values. the values could be retrieved in two ways
    Method one: Single Search
    I could use a single search to LDAP with all the 10 values in filters
    and retrieve all the value
    Ex:
    String filter = "(|(ou=1)(ou=2)(ou=3)(ou=4)(ou=5)(ou=6)(ou=7)(ou=8)(ou=9)(ou=10))";
    NamingEnumeration answer = ctx.search(BASE_SEARCH, filter, ctls);
    Method Two: Multiple Search
    I could use a multiple search to LDAP for each value of ou
    Ex:
    String[] inputou ={"ou=1","ou=2","ou=3","ou=4","ou=5","ou=6","ou=7","ou=8","ou=9","ou=10"};
    int inputSize=inputou.length;
    for (int j=0;j<inputSize;j++){
    Attributes matchattribs = new BasicAttributes(true);
    matchattribs.put(new BasicAttribute("ou", inputou[j]));
    NamingEnumeration answer2 = ctx.search(BASE_SEARCH,
                   matchattribs, returnAttrs);
    Query:
    which method is more efficient single search or multiple search.
    is it efficient to have mutiple search based on one specific ou or it is efficient to have single search with multiple ou using OR clause.
    is it less efficient when executing an OR clause and searching with multiple ou.
    Thanks

    Hi,
    They are equivalent becuase second method does not use a filter and for each iteration it creates new mathcing attributtes and executed the search to LDAP. My query is in method one the number of hit to LDAP is one in second method the number of hit to LDAP is 10 based on the number of ou.
    I have checked this program and tracked through System.currentTimeMillis() using more than 1000 ou's. the time taken for method one is 3.2306666 mins and the time taken for method two is 4.61735. so it is clear that method one is more efficient in terms of time but still i need more detail answer because some say using OR clause in filter is less efficient than using ou=1.
    Thanks

  • Best forum search method

    I am brand new to this forum, and tried to search for information on "show or hide a field with a check box" which returned 0 responses.
    I changed my criteria to "show or hide a field" which returned 69 responses -- none of which answered my question.
    My question to the Adobe people. What is the best method / terminology to use to get the appropriate responses back?

    I don't remember of any topics that address your needs. That is likely why you did not get a response. In such a case, it is then appropriate to ask a question in a topic. There are a few folks that might know the answer to this one off the top and hopefully they will drop by in a bit.
    Be aware that the topic list does not include a full history, but only a history back through a few thousand. I don't know the criteria for dropping things off the forum, but it does happen eventually.

  • Search method in SAP help.

    hello expert:
             I am looking for "0EC_PCA_3" datasource in SAP help,  in the advanced search,  select "SAP Enterprise Resource Planning ", no result for this earching,  am I wrong for setting this search?
    Many thanks.

    Hi,
    DataSource 0EC_PCA_3 documentation can be found at:
      http://help.sap.com/saphelp_nw04/helpdata/en/5d/ac7d8082a27b438b026495593821b1/content.htm
    In SAP help search, you should use the following options:
      Product type: SAP NetWeaver
      Area: SAP NetWeaver
      Application: BI Content
    Please, do not forget to give feedback about the answer.
    Regards,
    Maximiliano

  • Keyword Search in Bug Toolkit - How effective is this search method for you?

    When searching by keyword(s) in Bug Toolkit, do you receive relevant results or do you often have to redo your search?  Any specifics you can provide would be helpful!

    When searching by keyword(s) in Bug Toolkit, do you receive relevant
    results or do you often have to redo your search?  Any specifics you
    can provide would be helpful!
    Hi,
    With my experience i need to redo the search and very rarely i get in first attempt.But onething sure with previous experience bug tool kit search is good now at least it provides results with asked key word and search results are fast also.
    Ganesh.H

  • Best search method

    Hi people,
    If am using the java editor kit to parse HTML code and then storing it in a Document object, and I want to provide a means of searching the pages that have been parsed, what is the best way of doing this?
    Thanks,
    Faraz

    Add another voice to yours.
    I am having more or less the same problem. Here's What I am trying to
    do:
    I have been searching all over internet trying to find an intelligent agent(preferrably in java) that is able to extract data from different a web pages(HTML), the same data can be displayed in different ways varying from on page to another. For example if I am looking for houses I would need the agent to access different mortgage sites and out of each site extract the following data: house address, price, size, city, assuming this is the data required for all houses and I have the pages for the mortgage sites, how can I extract the data out of pages.
    I have had many suggestions, some said use HTML parsers, and I dont think does any good since they're dummy, others suggested to use neural networks, others said use Java Rule Engine API, JavaCC, I'm pretty much confused and dont know from where to start.
    So Faraz how about trying to work on this together...I you dont mind my email is below.
    Regards,
    Hussam Galal
    [email protected]

Maybe you are looking for

  • Problem with css reload (custom adf skin)

    I have defined a custom skin but changes in the css does not immediately show in the page. I have not figured out what triggers a rreload of the css. When I delete the generated css from the embedded OC4J a new one i immediately created but with the

  • Storage location quantity ABAP report question

    hi experts, i want to write a report which can show all the quantitiy base on storage location and i have four questions .... 1 . has somebody can tell me where i can find the confirmed qty ? is it in VBEP-BMENG ? 2 . how to know one material in one

  • Windows 7 and PS Elements 4.0

    is there a fix for the compatibility issue between windows 7 and photoshop elements 4.0 , OTHER THAN uprgrading?

  • Contacts show up as "1" in address book

    So this is such a messed up problem that the Apple Store, Zimbra Mail, & Microsoft Exchange support teams couldn't answer, nor find any other cases of it happening. I'll explain it as clearly as I can and then get into soft/hardware specs. I have two

  • Which battery model should I buy?

    I have a 2007 17-inch macbook pro which the battery just died. The model number is A1189 and I would like to know which battery model is compatible that can replace it. Thanks!