Caching using - Value List Handler

Hi All,
Iam new to Value List Framework.I had a doubt regarding the caching in Value List Handler.Suppose there are 1000 records in DB.I querying the DB using Value List Handler.I want to display the paging functionality in JSP.That is i want to display 50 recodrs each in the jsp.Then if have to provide the Link for another set of records.I had donr this functinality.What is the problem is if i click the hyperlink which is provided for PAgination Functionality now it is hiting the DB and fetching the recodrs and iam showing in JSP.I don't know how to do the Caching functionality using Value List Handler.so that i can avoid each time DB hit.First time i will hit the DB fetch all the records and store it in the Cache.Can anyone help me regarding this issue.

hi [email protected]
can you plz provide me some stuff for pagination using toplink. I am new to toplink and need to use pagination.

Similar Messages

  • Transfer Objects in Value List Handler

    Do we need really the EJB for Caching the data using Value List Handler.If EJB is not required then how can we cache the data using Value List Handler

    Sorry for disturbing u again.Actually my requirments
    is , In the Jsp page i have to display 1000You are referring to java server pages and not java script correct?
    records(example) provided with pagination option ie
    each page should display 50 records and options will
    be given to user to see another 50 records by
    clicking the pagination hyper link.This time it
    should pick up from Cache memory not form DB.I came
    to know thru documentation posted in website that
    ValueList Handler provides the Caching Facility.Can i
    achieve this by using ValueList Handler.You can achieve it in any number of ways.
    Nothing in your description suggests that Value List Handler is going to help you in any substantial way.
    Another
    restrictions is not to use EJB.You have to get the data from somewhere.

  • Want detailed sample code(value list handler pattern) for my case

    I am trying to write a Session Facade Bean with getAllUsers() method which get Collection pased from my UserBean(entity), to get all my users info.and I have a helper class called UserInfo
    public class UserInfo implements java.io.Serializable
    public String userid;
    public String username;
    public String password;
         public UserInfo()
         public void setUserInfo(String userid,String username,String password)
              this.userid=userid;
              this.username=username;
              this.password=password;
    I dont' know How my ejb client(jsp maybe) to use value list handler pattern to implement getting all users shown.
    I found http://java.sun.com/blueprints/corej2eepatterns/Patterns/ValueListHandler.html the sample code is to complex.
    any one could help me figure out ...
    what helper class do i need .or maybe interface
    what is the best practice?
    thanks in advanced.

    Hi,
    For a J2EE system with session facades, I've implemented that pattern based on the DTO pattern.
    The idea is based on Sun's blueprint Pet Store implementation.
    For that' I've created a DTO called "ListChunk", which holds a chunk of the complete list. In the Pet Store
    application v1.3.2 it's called "Page".
    So, those facade methods that would possibly return a huge list (such as getAllXXX and findXXX)
    return a ListChunk. As arguments, those methods take start index and the maximum size.
    If you want a value-list handler to control the iteration on your client side, you code such a class that
    uses the facade method.
    Here's some code:
    public class ListChunk implements Serializable {
         private List list;
         private int startIndex;     // starts on '0'
         private int totalSize;
         public ListChunk(List list, int startIndex, int totalSize)  {
              this.list = list;
              this.startIndex = startIndex;
              this.totalSize = totalSize;
         public List getList()  {
              return list;
         public int size()  {
              return list.size();
         public boolean hasNext()  {
              return totalSize > (startIndex + list.size());
         public boolean hasPrevious()  {
              return startIndex > 0;
         public int getTotalSize()  {
              return totalSize;
    }And a method in the facade could look like this:
         public ListChunk getAllCoWorkers(int startIndex, int maxSize, CoWorkerSortBy sortBy) {...}

  • Value-list handler, value-list iterator and session-facade strategy

    Hello all,
    Further to an earlier post, I rewrote my post trying to me more accurate in my question.
    Here is my problem:
    I am trying to implement the value-list handler design pattern using the session facade strategy. In the pattern as it is described here
    (http://java.sun.com/blueprints/corej2eepatterns/Patterns/ValueListHandler.html) the client accesses the value-list handler AND the iterator directly.
    As I chose the session-facade strategy having my value-list handler as a stateful session ejb, I don't know how the client is going to access the iterator. I see only one option: Having the client access the iterator through the ejb value-list handler. This requires adding new methods to the ejb.
    Is this the correct way of doing it? Is there another way of doing this?
    Thanks in advance,
    Julien Martin.

    u can use project list handler as ur session facade.
    regarding ur second question ..session facade and value list handler session bean which is also a session facade( but there is difference between first and second) so u can use session facade and value listhandler

  • Connecting To Same Value List Handler

    I have a question about using the Value List Handler pattern. Right now I am just working on the design of my application (class diagrams, scenario diagrams, etc).
    I have a VLH that will retrieve data from the DB (via a DAO) and will return data to the caller. The VLH basically fronts the DAO. The caller in this case will be a Business Delegate. So the call sequence is:
    client (JSP) --> Business Delegate --> Value List Handler --> DAO
    Now the VLH is a stateless EJB. But the Business Delegate is just a plain Java class that will get instantiated on every call to the server. My hope is that it will connect to the same VLH instance (I use a ServiceLocator). But I'm not sure this will happen.
    According to what I read about Stateless Session EJBs, they are dedicated to a single client. But what is the "client" in my scenario? Is it the browser session? Or is it the Business Delegate? If its the latter, then will new instances of the Business Delegate be able to connect to the same VLH?

    Use a stateful session bean! Says so on the Sun Blueprints site for this pattern.

  • Value List- EHP4

    Hi,
    We are working on PMR-ehp4. We have some ratings for the appraisals EX: 1- 5 Scale but when we see the same scales on portal as a standard SAP EHP4 fucntionality the blank fields against the ratings are showing "No value" Text on the portal.
    Could any one please share your inputs how to bring the "blank field" instead of "No Value" text.
    Thanks in advance
    VK

    u can use project list handler as ur session facade.
    regarding ur second question ..session facade and value list handler session bean which is also a session facade( but there is difference between first and second) so u can use session facade and value listhandler

  • How can we use C# to read dynamic parameter's value list from .rpt?

    I'm using Cystal Report 2008. We know starting from CR XI we can create dynamic parameters, the list of items of this kind of parameter are fetching from database. So in general the SQLs to get the list of values for dynamic parameters are stored in the .rpt.
    In Crystal Report Designer, if I preview a report with dynamic parameters, it will first query the database and then show the input dialog with list of values from database for user to choose. My question is can we implement the same thing by our C# code? I'm planning to use C# code to read this dynamic parameter's value list from .rpt and render them on the web page. Then pass back the user selected values to the .rpt to run the report after user make the choice. I didn't find any APIs can do this. Is it possible?
    Thanks in advance!!

    Hi,
    Can you explain a bit in detail, I have similar scenario. I am using the following code but not getting the Column name for dynamic parameter list.
    foreach (ParameterFieldDefinition prm
                              in reportDocument.DataDefinition.ParameterFields)
                    try
                        string vParameterFieldName;                   
                        *vParameterFieldName = prm.ParameterFieldName.ToString();*
    Shakeel

  • Using a List as the value class of a Map - How?

    Hello,
    I have a managed-property of the following type
    Map<String, List<String>> myMap;How can I set the values for the List in the faces-config.xml?
    I tried sth like this, but this is no valid XML according to the schema.
    Any ideas?
    Regards,
    Jan
    <managed-property>
    <property-name>myMap</property-name>
      <property-class>java.util.TreeMap</property-class>
      <map-entries>
      <key-class>java.lang.String</key-class>
      <value-class>java.lang.ArrayList</value-class>
        <map-entry>
          <key>key1</key>
          <value>
          <list-entries>
            <value>value1</value>
            <value>value2</value>
          </list-entries>
          </value>
        </map-entry>
      </map-entries>
    </managed-property>

    You don't need a cfloop. Try an IN(...) clause instead.
    Obviously you have to validate that the #riderlist# is not empty
    first or the query will error.
    SELECT riderId,
    SUM(IIf(month(rideDate)=1, rideDistance, 0)) AS janSum,
    SUM(IIf(month(rideDate)=2, rideDistance, 0)) AS febSum,
    SUM(IIf(month(rideDate)=3, rideDistance, 0)) AS marSum,
    SUM(IIf(month(rideDate)=4, rideDistance, 0)) AS aprSum,
    SUM(IIf(month(rideDate)=5, rideDistance, 0)) AS maySum,
    SUM(IIf(month(rideDate)=6, rideDistance, 0)) AS junSum,
    SUM(IIf(month(rideDate)=7, rideDistance, 0)) AS julSum,
    SUM(IIf(month(rideDate)=8, rideDistance, 0)) AS augSum,
    SUM(IIf(month(rideDate)=9, rideDistance, 0)) AS sepSum,
    SUM(IIf(month(rideDate)=10, rideDistance, 0)) AS octSum,
    SUM(IIf(month(rideDate)=11, rideDistance, 0)) AS novSum,
    SUM(IIf(month(rideDate)=12, rideDistance, 0)) AS decSum
    FROM mileageLog
    WHERE riderId IN (<cfqueryparam value="#riderList#"
    cfsqltype="the column type here" list="true"> )
    AND Year(rideDate)=#useYear#
    GROUP BY riderId
    ORDER BY riderId

  • How to use array list with fixed values to insert record in trigger

    I have a list  of number 1,30,40,45,60 . These numbers are not being changed so I  don't need to keep in a table. So have to create a  after insert trigger   for 
    As
    Begin
    @list =  1,30,40,45,60 // Array value 
    for i=1 to @list.count
    Insert into mappingtable(arrayvalue,itemcode) values (list[i],Inserted.Itemcode)
    Next
    End
    Please can you help with a code 
    Regards
    Pol
    polachan

    Be careful what you assume - rarely are lists of values like this truly static.  One thing to keep in mind that arrays in sql server are tables.  So, one example is:
    set nocount on;
    /* represents the virtual inserted table in your trigger */
    declare @inserted table (itemcode char(4));
    insert @inserted (itemcode) values ('ABCD'), ('JJKL');
    select * from @inserted;
    select * from @inserted cross join (values (1), (30), (40), (45), (60)) as arrayx(value);

  • Cache - LookUp values

    Hi,
    Is there any possibility to cache the values when we used Lookup's in XI. So that we can not poll the database everytime in production environment.
    Can anybody share their valueable experiences with me.
    -Esha

    Hi,
    See the below links
    /people/sravya.talanki2/blog/2005/12/02/sxicache--ripped-off - SXI_CACHE - Ripped Off
    http://searchsap.techtarget.com/ sDefinition/0,,sid21_gci852485,00.html - 45k - Cached - Similar pages
    XI Runtime cache error: Cache contents are obsolete
    Cache Refresh - SAI_CACHE_REFRESH
    /people/sravya.talanki2/blog/2005/11/03/cache-refresh-errors--new-phenomena
    How To… Handle XPI Caches in SAP NetWeaver
    2004s https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c0332b2a-eb97-2910-b6ba-dbe52a01be34
    also look at this forum link
    XI lookups - Cache - Performance Issues
    Please reward points if it helps
    Thanks
    Vikranth
    Edited by: Khimavath Vikranth on Jun 6, 2008 3:19 AM

  • How to fill or bind data using Value Node in Tree Node

    Hi Gurus,
    Can anybody help me on how to fill data or bind data using Value Node in Tree Node View. I know how to create Tree Node but not able to show value on the UI in Tree View.
    Can u please let if anybody has done it?
    Thanks in advance.
    Madhusudan

    continued...
    TRY.
              lv_child = me->node_factory->get_proxy(
                        iv_bo = lv_value_node
                        iv_parent_proxy = me
                        iv_proxy_type = 'ZL_CLASS_CN02' ).
              lv_child->is_leaf = 'X'.
              APPEND lv_child TO rt_children.
            CATCH cx_sy_move_cast_error cx_sy_ref_is_initial.
          ENDTRY.
      In the above code iv_bo , lv_value_node will be the actual object of the second node or leaf node here, which will have the same structure of parent node along with data. After/before this, you would need to build table and refresh in do-prepare_output of IMPL class.In the above code iv_bo , lv_value_node will be the actual object of the second node or leaf node here, which will have the same structure of parent node along with data. After/before this, you would need to buid table and refresh in do-prepare_output of IMPL class.
    ztyped_context->resultlist->build_table( ).
      IF ztyped_context->resultlist->node_tab IS INITIAL.
        ztyped_context->resultlist->refresh( ).
      ENDIF.
    Also the EH_ONEXPAND has to be implemented and event handled in DO_HANDLE_EVENT. But this expand event has to be delegated to context node directly as CL_BSP_WD_CONTEXT_NODE_TREE will already have the implementation.
    ztyped_context->resultlist->expand_node( lv_event->row_key ).
    Where in result list is the node ZL_CLASS_CN00.
    After typing the whole content , i found this blog :). There are few things i have written more that in the blog.  /people/poonam.assudani/blog/2009/06/24/create-a-tree-view-display-in-crm-web-ui
    Regards,
    Karthik

  • Report using Shuttle List

    Greetings
    I am using Apex Version 4.2
    At first, I had created an item P31_JOB_CATEGORY that was a radio button. Upon selecting a value for the radio button, a report was generated. The query is as follows
    select a, b, c
    from Table A
    where A.Job_Category = :P31_JOB_CATEGORYThis gave me the desired report. Now I want to change the radio button to a shuttle list so multiple values can be selected for the job category and generate a the report accordingly. Instead of one value, I can have 2, 3, or all. How would I alter my query to change this? would I have to use an array. I was thinking some type of "Where....In.." clause.
    Thanks in advance!

    Hi,
    Do not create duplicate posts
    Query Report Using Shuttle List
    Regards,
    Jari
    My Blog: http://dbswh.webhop.net/htmldb/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai

  • Select-options - select multiple values from personal value list

    Hi experts,
    In my application, I am using select-options. I select the values required from the search help into the personal value list . I want to copy these values from the personal value list into my ranges table. Do I have to copy them one row at a time. Is there any way to select the values directly into the ranges table of the select-options field?
    Regards,
    Abdullah.

    Boy, this is something we're struggling with too. So we'd like to hear others' ideas on this also.
    thank you,
    iggy

  • Error at transport in select option   is not followed by itab or value list

    Hi All,
    I have an issue with the following inner join. when i check with code inspector it is not showing any errors but i get the following error while transport.
    "The In operator with SO_MATKL is followed neither by an Internal table nor by a value list".
    This error appears after the system is unicode enabled is that it have any unicode significance please advice on this.
    The following is the code snippet.
    SELECT amatnr amtart aextwg amatkl bwerks bdispo b~ekgrp
        INTO TABLE tb_mara
        FROM mara AS a
       INNER JOIN marc AS b ON amatnr = bmatnr
       WHERE a~matnr IN so_matnr
         AND a~mtart IN so_mtart
         AND a~extwg IN so_extwg
         AND a~matkl IN so_matkl
         AND b~werks IN so_werks
         AND b~dispo IN so_dispo
         AND b~ekgrp IN so_ekgrp.

    Hi Gopal
    Am on UNICODE Enabled system and i dont have problem with below code. Please check, if you have used similar to this???
    tables: mara, marc.
    select-options: so_matnr for mara-matnr,
                    so_mtart for mara-mtart,
                    so_extwg for mara-extwg,
                    so_matkl for mara-matkl,
                    so_werks for marc-werks,
                    so_dispo for marc-dispo,
                    so_ekgrp for marc-ekgrp.
    types: begin of t_mara,
             matnr type matnr,
             mtart type mtart,
             extwg type extwg,
             matkl type matkl,
             werks type werks_d,
             dispo type dispo,
             ekgrp type ekgrp,
           end of t_mara.
    data: tb_mara type table of t_mara.
    SELECT a~matnr a~mtart a~extwg a~matkl b~werks b~dispo b~ekgrp
           INTO TABLE tb_mara
           FROM mara AS a
           INNER JOIN marc AS b ON a~matnr = b~matnr
           WHERE a~matnr IN so_matnr
           AND   a~mtart IN so_mtart
           AND   a~extwg IN so_extwg
           AND   a~matkl IN so_matkl
           AND   b~werks IN so_werks
           AND   b~dispo IN so_dispo
           AND   b~ekgrp IN so_ekgrp.
    Kind Regards
    Eswar

  • How create animated power view reports using sharepoint list as a data source in sharepoint 2010?

    Hi All,
    I got a client requirement to create reports using SharePoint List as data source. The report should show reflection depends on values changed (I mean animation).
    I have heard about the power view/power pivot which does this kind of animations in reports.
    Can someone please guide me on creating reports which shows animations
    In power view/power pivot using SharePoint List as data source in SharePoint 2010.
    Thanks in advance.
    MercuryMan

    Hi MercuryMan,
    Yes, Power View, a feature of SQL Server 2012 Reporting Services Add-in for Microsoft SharePoint Server 2010 or SharePoint 2013 Enterprise Edition, is an interactive data exploration, visualization, and presentation experience.
    It provides multiple views featuring tiles, slicers, a chart filter, and a number of visualizations, including cards, small multiples, and a bubble chart. So, we can use Power View to do intuitive ad-hoc reporting for business users such as data analysts, business
    decision makers, and information workers.
    Currently, Power View report only supports two types of data models: PowerPivot Worksheet, and data models based on Analysis Services Tabular Model or Multidimensional Cube.
    In your scenario, you can create PowerPivot worksheets using SharePoint List as data source, deploy the PowerPivot worksheet to a SharePoint Library or PowerPivot Gallery, and then generate Power View reports based on the PowerPivot worksheets on the SharePoint
    site.
    To use SharePoint List as data source in Excel PowerPivot, you can refer to the following resource:
    http://blogs.technet.com/b/excel_services__powerpivot_for_sharepoint_support_blog/archive/2013/07/11/excel-services-using-a-sharepoint-list-as-a-data-source.aspx 
    http://technet.microsoft.com/en-us/library/hh230322.aspx 
    To create a Power View report based on PowerPivot model, you can refer to the following links:
    http://technet.microsoft.com/en-us/library/hh231522.aspx 
    http://technet.microsoft.com/en-us/library/hh759325.aspx 
    Regards,
    Mike Yin
    If you have any feedback on our support, please click
    here
    Mike Yin
    TechNet Community Support

Maybe you are looking for