JHeadstart Recipe - JHeadstart recipe - non-databound search-criteria

From today’s customer assignment I extract the following recipe – for BC4J, JSP and Struts:
Suppose that on the FindPage of our JHeadstart generated JSP application we would like to add one or more search-criteria that are not directly bound to ViewObject attributes. For example in the context of the ALS application: the FindBookPage contains a field labeled AuthorFirstName. Here, the user may enter the firstname of an author. The application should now only return books in the result set that have at least one contributing author whose firstname matches the one entered by the end-user. The ViewObject underlying the Bookpages does not contains Authorships and Author information. A direct query on this ViewObject can not make use of the AuthorFirstName property. Of course, when no value is entered in this field, the query should not look for authors at all!
When a value for AuthorFirstName is provided, an additional piece of where-clause should be activated that looks from the ALS_BOOKS table via the ALS_AUTHORSHIPS table in the ALS_AUTHORS table. Now how are we going to do that?
The recipe for this can be found at: http://technology.amis.nl/blog/index.php?p=230.
best regards,
Lucas

Similar Messages

  • 'Strange' naming restrictions none databound items in search

    I have a none databound item, which I want to use for an advanced search
    I want this to map to a variable in the ViewObject. I provided the query bind parameters for this in the JHS group under bindparameters.
    The attribute on the ViewObject is called ‘weekNummer’.
    Now what I did was create a group in JHS which is called ‘Weekoverzicht’
    I added a new item on the JHS group (WeekNr), since the attribute is not databound I don’t fill the attribute name. The attribute is a choice populated by a domain.
    Now when I first tried this page it failed, claiming the attrribute ‘WeekoverzichtWeekNr’ Does not exist.
    Which is true ofcourse, I was looking for a way to point the none databound item to the attribute weekNummer. I could not find this option, so I decided to run it and see what happend.
    What I did next is rename the attribute on the ViewObject to ‘WeekoverzichtWeekNr’ and reflect this in the query and bind parameters.
    Now it works fine but the naming convention is a bit weird, It has to be named <groupname><itemname> which is a form of tight coupling I’m not really happy with.
    Basically an option to ‘bind’ none databound items to an attribute directly would be very nice.
    Was this intended or do I just fail at using JHS?
    Anton

    The generated jspx is the following:
    Note that I added the binding post gen for supplying a dynamic default search value which I mentioned in another thread on this forum.
    <af:selectOneChoice id="SearchWeekoverzichtNummer" value="#{searchWeekoverzicht.criteria.WeekoverzichtNummer}" binding="#{WeekoverzichtBacking.currentWeekYear}">
    <af:forEach var="row2"  items="#{bindings.WeekData.rangeSet}" >
      <af:selectItem id="SiAsWeekoverzichtNummer" label="#{row2.Weekstring}" value="#{row2.Weeknummer}"/>
    </af:forEach>
    </af:selectOneChoice>  The corresponding generated bean code is the following.
    <managed-bean>
      <managed-bean-name>searchWeekoverzicht</managed-bean-name>
      <managed-bean-class>oracle.jheadstart.controller.jsf.bean.JhsSearchBean</managed-bean-class>
      <managed-bean-scope>session</managed-bean-scope>
      <managed-property>
        <property-name>bindings</property-name>
        <value>#{data.WeekoverzichtPageDef}</value>
      </managed-property>
      <managed-property>
        <property-name>searchBinding</property-name>
        <value>#{data.WeekoverzichtPageDef.advancedSearchWeekoverzicht}</value>
      </managed-property>
      <managed-property>
        <property-name>searchItem</property-name>
        <value>WeekoverzichtNummer</value>
      </managed-property>
      <managed-property>
        <property-name>dataCollection</property-name>
        <value>CasWeekOverzicht</value>
      </managed-property>
      <managed-property>
        <property-name>autoquery</property-name>
        <value>false</value>
      </managed-property>
        <managed-property>
        <property-name>findModeIters</property-name>
          <list-entries>
            <value>#{data.WeekoverzichtPageDef.WeekoverzichtIterator}</value>
                </list-entries>
      </managed-property>
          <managed-property>
        <property-name>operators</property-name>
          <map-entries>
         </map-entries>
        </managed-property>
    </managed-bean>Where the searchItem tag holds the value which I need to name my bind variable on the view object.
    I think I called it attribute on the ViewObject earlier which is wrong ofcourse, its bind variable.
    I know where to find them, but I always forget the names...
    I can live with it, although its not 'pretty'

  • ESS Who is Who - Add search criteria

    Hi all,
    I have tried searching the forums, but can't find an answer for my problem. I want to add an additional field to the search criteria for the who is who iview.
    I am able to change the advanced search, but I want to add a search criteria on the first screen. Changing the service for the adress book (Employee Self-Service -> Service-Specific Settings -> Address Book -> Who's Who -> Who's Who (ESS): Selection and Output) does not change this first screen.
    Anyone know how I can make this change?
    Thanks in advance.
    Kind regards,
    Marlies

    If by selecting fields you mean in the Who's Who (ESS): Selection and Output, then yes.
    I have there available 3 tabs, none have the default settings.
    First tab I can set the selectionfields, but when changing/adding a field here, my "simple search" does not change. The changes here are reflected under the advanced search, which is nice, but not what I want.
    I simply want to add 1 additional field to the first search screen, so the user does not have to always use the advanced search option.

  • Has anyone else noticed that iBooks search does not find all information that should be located for a specific search criteria?

    I am converting a novel to ePub format.  I am currently in the process of adding "end notes" to the book.  Each will have a flag embedded at the proper spot in the various chapters that is coded as "[See End Note xx]" where xx is a one or two digit number.  Each of the flags has those words surrounded by the HTML that links the flag to the proper end note at the back of the book.
    To verify that I have indeed inserted correctly each end note, I copy the book's epub file from my desktop PC to the iPad.  I then do a search in iBooks to locate each occurance of "[See End Note" or just "End Note".  I should see each of these flags listed.  Last night it would list all of them except "[See End Note 28]"!   If I did a search for "28", it would appear.
    I then copied just the flag itself ("[See End Note 28]") without the associated linkage HTML to the back of the document, and placed the copy just in front of the paragraph that contains it. Neither of the two flags were found.
    I then duplicated just the flags for end notes 27 and 29 which the search function had located.  I placed the copies surrounding the copied flag for 29.  The result was as follows in the text of the book:
    [See End Note 27]
    [See End Note 28]
    [See End Note 29]
    Although 27 and 29 were still being shown in their normal places, none of the above three inserted (test) flags was displayed by the search!
    It seemed that the iBooks search goes through part of the book, but cannot take the whole book in one piece.  It then continues, but leaves a gap that is not scanned per the search criteria.  To test that theory, I removed the entire text of several chapters that did not contain any end notes.  I then loaded this modified copy of the book into the iPad.  When I ran a search using "End Note", all of the flags (including the special test flags) were displayed.  The list included the "missing" "[See End Note 28]" that cannot be found if the all of the chapters have their text!
    I shall be calling Apple in a few minutes to again attempt to get the apparent "bug" (aka design or coding flaw) removed such that it does not
    impact the ability of the iPad to be a useful tool.

    Not all movie studio signed up to the agreement with Apple to allow redownloading of movies, only those that did will have their movies available in the purchased section of iTunes.

  • Boolean Search Criteria in Smart Folder

    I noticed that the smart folders that come with OS X 10.5 include "Today" "Yesterday" and so on. Examining the search criteria I saw that there is a boolean line "Any/None/All of the following are true". I cannot find how to add this line to my searches. Does anyone know how to do this?

    Opt-click on the Add criteria ( + ) button.

  • How to implement "Date searching criteria"

    I have a block contains some textboxes such as project_no, project_name, startdate.
    I would like to search by startdate.
    For example, I have 2 other text items for searching only. the first item is "DATE1" the second item is "DATE2". I want a user to enter a date into the first text item "DATE1" and enter another date into the second text item "DATE2". then click on execute button to get the result.
    The result is supposed to be all StartDates that match the criteria.
    How can i implement this in forms6i???
    Thank you in advance for your help.

    ok, i will explain more in details,
    I have a data block contains some text boxes (sno, empno, projectno, startdate), currently, users can click the "Execute" button and return all records or users can go to Enter query mode and insert a value (search criteria) into any of these textboxes, and then they will get the required record after clicking the "Execute" button.
    I added 2 non database text boxes(date1,date2) for searching purpose, it will return all startdates located between these 2 dates. I used the following code for that and its working fine but "IT DISABLED THE OTHER SEARCHING CRITERIA (sno, empno...)" which is not good because i want a suer to have a choice.
    Declare
    where_dt varchar2(150);
    Begin
         IF :System.Mode = 'NORMAL' THEN
         set_block_property('blk_name', default_where,'');
         Else
    where_dt:='startdate between :blk_name.date1 and :blk_name.date2';
    set_block_property('blk_name', default_where,where_dt);
         End if;
    Execute_query;
    End;
    So, i edited the code to include the other criteria, users can search by one criteria only.
    Declare
    where_dt varchar2(150);
    Begin
    IF :System.Mode = 'NORMAL' THEN
    set_block_property('blk_name', default_where,'');
    Else if :System.Mode = 'Query' Then
    if :blk_name.Date1 and :blk_name.Date2 is not null then
    where_dt:='startdate between :blk_name.date1 and :blk_name.date2';
    end if;
    if :blk_name.sno is not null then
    where_dt:='sno = :blk_name.sno';
    end if;
    if :blk_name.empno is not null then
    where_dt:='empno = :blk_name.empno';
    end if;
    set_block_property('blk_name', default_where,where_dt);
    End if;
    Execute_query;
    End;
    Unfortunately, this code is not working, i am getting error.
    It points to the last "END;" and returns error: "Encountered the symbol ";" when expecting one of the following IF "
    Any help please??

  • ITunes (11 I think) in smart playlists and folders won't apply the "Last Played" search criteria in real time.  Please fix!!!

    The major iTunes recent makeover, generally *****. 
    It's ugly to look at; it's grey and blue-grey and more grey.  god, how drab can you get.  You know how in the Finder we can assign colors to files, folders & applications.  It would be fantastic to be able to do that to playlists and the folders of playlists within iTunes.  Please add some color!  And/Or let us choose the color format for our personal copy of iTunes, like some browsers do.
    But more importantly I have some rather sophisticated smart playlists; many of which source other (smart) playlists & folders of playlists in my collection.  With this current iTunes makeover (iTunes version 11 I think), they screwed something up.  None of my smart playlists will apply in real time the "Last Played" search criteria.  This is very annoying.  Please, please fix it.
    And how about the ability to duplicate a playlist, to make new playlist.  Not to have two of the same playlists, but so the second one can then be edited to something similar to the first (as opposed to having to build a new similar sophisticated playlist from scratch).  This would save a lot of time in some cases.

    The major iTunes recent makeover, generally *****. 
    It's ugly to look at; it's grey and blue-grey and more grey.  god, how drab can you get.  You know how in the Finder we can assign colors to files, folders & applications.  It would be fantastic to be able to do that to playlists and the folders of playlists within iTunes.  Please add some color!  And/Or let us choose the color format for our personal copy of iTunes, like some browsers do.
    But more importantly I have some rather sophisticated smart playlists; many of which source other (smart) playlists & folders of playlists in my collection.  With this current iTunes makeover (iTunes version 11 I think), they screwed something up.  None of my smart playlists will apply in real time the "Last Played" search criteria.  This is very annoying.  Please, please fix it.
    And how about the ability to duplicate a playlist, to make new playlist.  Not to have two of the same playlists, but so the second one can then be edited to something similar to the first (as opposed to having to build a new similar sophisticated playlist from scratch).  This would save a lot of time in some cases.

  • DFF in search criteria

    Hi All,
    I have a DFF and i want that DFF to be a searcheble field in the search criteria of the advanced search in the standard OAF page Contracts of the Sales Contracts Workbench User Responsibility , could u please explian how can i add that
    in the page ?
    Thanks
    kk

    Hi
    Its resolved now. We found that it was an issue with a non-numeric value populated in one of the user extensible lookup, where system was looking for a numeric value. It is resoved now.
    Thanks

  • SRM-MDM Dynamic catalog call structure and implicit search criteria

    Hi experts,
    We need to define the catalog call criteria for the SRM-MDM.
    Our client requires content visualitzation restrictions but there is not any logic indentified to determine the records that must be viewed for every user.
    Now, in their Non-SAP catalog, they are using users lists to which they assign the catalog records.
    There are more than 150 users lists and is posible too to assign some catalog records to only 1 or 2 users, by user id.
    We want to reproduce this scenario in SRM-MDM.
    We are analysing two alternatives:
    First alternative: badi BBP_CAT_CALL_ENRICH implementation for mask dynamic determination and custom z.
    We've though in creating one mask for every user list.
    Then, in SRM create a custom table with the userid and the user list id (mask equivalent). A user can belong to more than one user list.
    Finally implement the BBP_CAT_CALL_ENRICH, searching in the z table the users id and obtaining the specific masks for this users and pass these masks as catalog call parameters dynamicly.
    Is posible to use the BBP_CAT_CALL_ENRICH badi to pass dynamic parameters?
    (in this case, maybe we could use a new org.est. attibute to assign user id and mask, instead of the custom table).
    Second aternative: implicit search criteria based on a new org. est. atribute for mask
    Is posible to create new implicit search criteria for org. est. atributes?
    We could assign to every user the masks in the org. est. and then, create a new parameter which could look for the mask value in the org.est.
    Thanks in advance

    Hi Silvia,
    I am not sure of the answer to the second part of the query but as for the usage of the BBP_CAT_CALL_ENRICH catalog in combination with various masks for the users to access catalog subsets, this should work quite well, best to try it out in a DEV environment and see how it goes.
    Regards,
    Jason

  • Enhance Search Criteria in bt111s_oppt

    I need to enhance a search criteria as follows:
    The opportunities in the result list have to be shown only in case the user searching for them is a Sales team member on the opportunity in the result list.
    In case of BP search there is a nice class which can be used for the purpose of enhancing of the search criteria. How about opportunity. IS there a class or a BADI?

    Hi Max,
    Just to add to what Ajay has said, Please try below code:
    DATA: lr_query TYPE REF TO cl_crm_bol_dquery_service.
    lr_query ?= me->typed_context->search->collection_wrapper->get_current( ).
    lr_query->add_selection_param( EXPORTING iv_attr_name = 'SALES_TEAM_MEMBER '
                                                                                    iv_sign = 'I'
                                                                                    iv_option = 'EQ'
                                                                                    iv_low = sy-uname ).
    Regards,
    Bhushan

  • Search criteria is not working in Responsible Group field in sap crm could you please help me this how to achieve.

    search criteria is not working in Responsible Group field in sap crm could you please help me this how to achieve.I have writen code on EH_ONSEARCH .as per below...what changess i need to do..and through partner function and adding the selection params please send the sample .
    code. partner funtction - ZRG DATA :
    DATA : lv_partner_fct type .
    types: begin of ty_resp,
           partner    type but000-partner,
           name_last  type but000-name_last,
           name_first type but000-name_first,
           mc_name1   type but000-mc_name1,
           mc_name2   type but000-mc_name2,
           end of ty_resp.
    DATA: lv_resp_bp type STANDARD TABLE OF ty_resp INITIAL SIZE 0,
           lw_resp_bp type ty_resp.
    IF lv_attr_name = 'Rgroup'.
    lr_entity->get_property_as_value( EXPORTING iv_attr_name = if_crm_srqm_uiu_const=>gc_attr_low
                                       IMPORTING ev_result = lv_low ).
    IF lv_low IS INITIAL.
    SELECT partner
           name_last
           name_first
           mc_name1
          mc_name2
    FROM but000 INTO table lv_resp_bp
    WHERE mc_name2 = lv_low and bu_group = '0010'.
    loop at lv_resp_bp into lw_resp_bp.
        lv_low = lw_resp_bp-mc_name2.
      lr_query_service2->add_selection_param( iv_attr_name = 'Rgroup'
                                                iv_sign = lv_sign
                                                iv_option = lv_option
                                                iv_low = lv_low
                                                iv_high = lv_high ).
      ENDLOOP.
    if lv_partner_fct = 'ZRG'.
      lr_entity = lr_iterator->get_next( ).
    CONTINUE.
    ENDIF.
    lv_attr_name = 'BU_PARTNER'.
    ENDIF.

    <b>You can acheive   this .... first by creating the search help exit    ... by  creating the maintaince  view   then   using it in the   Creation of the search help </b> ...
    see the link for attaching the view   to the serach help .
    <a href="http://">http://www.sapdevelopment.co.uk/dictionary/shelp/shelp_elementary.htm</a>
    reward  points if it is usefull...
    Girish

  • I have set up two users, one for myself and one for children.  The computer automatically logs in for the children with no password required.  When the children go to spotlight and type in a search criteria all of my files show up.  How do I prevent this?

    I have set up two users, one for myself and one for children.  The computer automatically logs in for the children with no password required.  When the children go to spotlight and type in a search criteria all of my files show and open up.  How do I prevent this?

    Log in to your account, and move all your files to your home folder. No other users should be able to access them there and they won't show up with a Spotlight search.
    Make sure your kids' account(s) do not have admin privileges.

  • How to add a new  search criteria in Advance Search Page in OAF

    HI,
    In my application (R12) we can access customer related information from 2 places (2 different responsibilities as mentioned below), both are OAF pages.
    1. AX receivables
    2. Sales online
    From both the responsibilities we can perform search for customer related information as well (Simple as well as Advance Search).
    But Advance Search screen from 'Sales online' allows user to perform search, based on few additional fields as well such as 'Classification' (it's an lov based field).
    Now, User is asking to add that field on search page of AX receivables as well.
    So, how to add one more field (as search criteria), on an standard 'Customer' screen?
    Additional Info :
    1. LOV is based on HzPuiClassificationFilterVO
    2. And this VO is available on both pages. (oracle.apps.ar.hz.components.search.server.HzPuiClassificationFilterVO)
    So can we achieve this by Personalization only ? if yes plz share the steps as well.
    Regards,
    Adi

    Yes. It is possible through personalization.
    1. Create a criteria row under Advance Search
    2. Create a Result Item under advance table columns
    3. Create a Query Criteria Map based on the criteria and result item above.
    Please note the newly added criteria field should be in the Searchresults VO attributes list.
    Otherwise you need to extend the VO as well.
    Hope this helps.
    Regards,
    -Mukesh.

  • Adding a Field in  search Criteria in Web UI

    Hello All ,
       I am working on SAP CRM 7.0 Webui Marketing module (Business Role : Marketingpro) . Here when I select the "Account&Product" Work Center and go to search Contact . Here we will move to the Search Contact View here we will get a list box where we can select any search criteria to search a Contanct . Here in this  List box in need to add a new Field Called "Archiving Flag" . The component of the Search Contact is :: "BP_CONT_SEARCH" And the View is "BP_CONT_SEARCH/Search " Here in the View Structure Tab under Context->Context Node ->Search i just needd to a new Field called "Archiving Flag" in this context node "Search".  Can any Tell me the procedure to add a field to the lsit box of Search Criteria.
       Thanks in Advace
    Regards,
    Kiran Posanapalli.

    Hi Vinutha,
    U can add fields in the search view using AET in one way.
    The other way is identify the component for that search.Press F2 on the web ui screen of ur account search page and see the component name as well the view name for the search fields.
    Go to that search view in the component identified.
    In case of sales pro role,  account search component is  BP_CONT_SEARCH ,go to the view search and in that if we go to context node search an attribute named 'telephone' is present already.We can add that to visible fields in configuration tab.
    If not found under that context node then right click on context node and create a context node.Before that go to genil_model_browser and observe the relation level in which the field(mobile number) we need to add is present and copy the dependent object name.
    For example for phone number the dependent object is BuilAdressPhone. Now pass this value in create context node. Make the adjustments in configuration tab.
    *Give points if found useful.
    Regards
    HCL SPARKS

  • Error while trying to add a new field in search criteria by VO extension

    Hi,
    I am trying to add a new field by using the VO extension to a seeded OAF page used to search Repository contracts.
    I get the following error on opening the page after I have compiled my code on server and bounced apache.
    Message not found. Application: FND, Message Name: FND_VIEWOBJECT_NOT_FOUND. Tokens: VONAME =SSPN_AdvancedSearchAttributesPVO; APPLICATION_MODULE = oracle.apps.okc.repository.search.server.ContractsAdvSearchAM;
    I extended the AM also after this to include the extended VO but still the error comes.
    This page is a dynamic search page where the results change based on the different search criteria.
    Cheers
    Swati

    Hi,
    I extended the AM also after this to include the extended VO but still the error comes.There is no need to extend the AM for extending a VO. Hopefully the VO which u extending already attached to the AM oracle.apps.okc.repository.search.server.ContractsAdvSearchAM.
    Regards,
    Gyan

Maybe you are looking for

  • No support for RS480M2

    I have the above MB in an Emachine.  Called there tech support because I want to upgrade to Win 7.  Answer "we dont support that" .  I have looked on MII's site and cant find any chip set drivers for my MB for Win 7.  I have Win 7 installed but do no

  • Run two X servers simultaneously with remote access.

    I have a htpc running a xbmc frontend. I would like to have it run a second X environment that I can access via vnc (or VNC like protocol) only. Does anyone have any recommendations or a better solution? I would like to have whatever application I am

  • Where can I get epson scan setting for a TX700W

    I need to get an 10.10 version of the epson scan setting to connect to a epson TX700W scanner. I have downloaded the latest print drivers and printing is all ok. But I cannot remotely scan from the printer. The Printer is on the network and is not co

  • IPhone 6+ Controls Itself..?

    Hi! In December, I received and iPhone 6+ for Christmas. It was a really expensive gift, and it's frustrating that I'm already having a major problem with it. Everything that I try to do on my phone is interrupted! It operates on iOS 8.1.2, which I'v

  • Partial Payments report in BW

    Hello Gurus, I have a requirement for Partial items Report. How do I achieve it in BW. Thanks Suman