Displaying Last Items in HorizontalList

I have a HorizontalList with a columnCount of 5 and I am trying to set horizontalScrollPosition so the last five items are displayed in the list.
The following should wor, but it does not:
imagesTL.horizontalScrollPosition =
   imagesTL.dataProvider.length-imagesTL.columnCount+1;
This does work, but I don't understand why the extra line to increment one more is necessary.
imagesTL.horizontalScrollPosition =
   imagesTL.dataProvider.length-imagesTL.columnCount+1;
imagesTL.horizontalScrollPosition++;
Any ideas?

0 1 2 3 4 5 6 7 8 9 10
dp.length == 11
maxHorizontalScrollPosition = 6
Alex Harui
Flex SDK Developer
Adobe Systems Inc.
Blog: http://blogs.adobe.com/aharui

Similar Messages

  • Displaying Last Items Sold

    Is there a way of displaying the most recent items sold on a site?

    0 1 2 3 4 5 6 7 8 9 10
    dp.length == 11
    maxHorizontalScrollPosition = 6
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • How can I display de last items of a region from other page in Portal?

    I want to display de last five items (f.e.) included in a region (with attributes created) from other page. I've tried using custom search, but it also shows the attribute names, and I want show the attribute values (I don´t know how can I format these attributes).
    Thanks a lot.

    How can I display the last items of a region from other Oracle Portal page?

  • Display the last item in Content Query web part

    Edited my post
    I was trying to create a CQWP that will display 5 blog posts in the following format:
    Name of the blog                | Previous blog posts:    |
     Post 5                               |  Post 4                     
    |
     Description                        |  Post 3                     
    |
                                             |  Post
    2                      |
                                             |  Post
    1                      |
    --------------------------------------------------------- |
    This was my first time using CQWP and XSLT. So the guys in this forum helped me with the code that finds the last item and splits it from the rest of the posts.
    But when I try to create a format like the table above, is not possible, because <xsl:Template keeps repeating the layout. It seems that CQWP is not made for fanncy layouts. I think it functions in a top-to-bottom fashion.
    If anyone knows how to create the format above, I will be very greatful.
    First post in this threat:
    Can anyone tell me how can I display the last item added using CQWP and XSLT?
    The code below displays all titles. I don't know how can I get the last item. The xslt template below works like a repeater control.
    Any help will be very much appreciated.
         <xsl:template name="abc" match="Row[@Style='abc']" mode="itemstyle">
             <xsl:value-of select="@title"/>
         </xsl:template>
    thank you.

    Try this (you'll need to modify the widths according to your requirements, and sort you're list so that most recent items is returned first)
    <xsl:template name="TestCount" match="Row[@Style='TestCount']" mode="itemstyle">
    <xsl:variable name="DisplayTitle">
    <xsl:call-template name="OuterTemplate.GetTitle">
    <xsl:with-param name="Title" select="@Title"/>
    <xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
    </xsl:call-template>
    </xsl:variable>
    <xsl:variable name="ItemNumber">
    <xsl:number></xsl:number>
    </xsl:variable>
    <xsl:choose>
    <xsl:when test="$ItemNumber = '1'">
    <div style="float:left;width:100px;margin:5px;display:block;">First Item: <xsl:value-of select="$ItemNumber"/> (<xsl:value-of select="$DisplayTitle"/>)</div>
    </xsl:when>
    <xsl:when test="$ItemNumber = '2'">
    <div style="float:left;width:100px;margin:5px;display:block;">Last Item: <xsl:value-of select="$ItemNumber"/> (<xsl:value-of select="$DisplayTitle"/>)</div>
    </xsl:when>
    <xsl:when test="$ItemNumber = $ItemCount">
    <div style="clear:both;float:left;width:100px;margin:5px;left:105px;display:block;">Last Item: <xsl:value-of select="$ItemNumber"/> (<xsl:value-of select="$DisplayTitle"/>)</div>
    </xsl:when>
    <xsl:otherwise>
    <div style="clear:both;float:left;width:100px;margin:5px;left:105px;display:block;">Item Number: <xsl:value-of select="$ItemNumber"/> (<xsl:value-of select="$DisplayTitle"/>)</div>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:template>
    Regards, Matthew
    My Blog
    Please remember to click "Mark As Answer" if a post solves your problem or "Vote As Helpful" if it was useful.

  • Displaying diff dates using PL/SQL expression for 'display only' item ?

    Hi ,
    I am having a display only item -- :P2_FROM_Date . If its Thu,Fri,Sat or Sun I want to set the date as the last Monday's date . If its Mon,Tue or Wed then it should be the present Monday's date .
    E.g: Today is Friday and the last Monday was on 18th .
    So for yesterday , today,tomorrow and Sunday , the date should be displayed as 18-JUN-2012.
    From the coming Monday to Wednesday , the date should of be the coming Monday i.e , 24-JUN-2012
    I tried it doing under 'Source ' of item using PL/SQL expression and PL/SQL function body. Not working
    Can someone help ?
    Thanks & Regards
    Umer

    Nice1 wrote:
    declare
    lv_date number;
    begin
    select to_char(sysdate,'D') into lv_date from dual;
    if lv_date=2 then
    :P2_FROM_DATE := to_char(sysdate-1);
    end if;
    end;I tried this under " PL/SQL function body " in "Source " tab of the item P2_FROM_DATE
    When I run this , nothing is displayed corresponding to the item P2_FROM_DATEExactly as expected. This code will only set a value for <tt>P2_FROM_DATE</tt> when run on Mondays in territories where the first day of the week is Sunday, and when run on Tuesdays where Monday is the first day of of the week:
    SQL> var P2_FROM_DATE varchar2(30)
    SQL> alter session set nls_date_format='Dy DD-MON-YYYY';
    Session altered.
    SQL> select sysdate from dual
    SYSDATE
    Mon 25-JUN-2012
    SQL> alter session set nls_territory='AMERICA';
    Session altered.
    SQL> declare
      2  lv_date number;
      3  begin
      4  select to_char(sysdate,'D') into lv_date from dual;
      5  if lv_date=2 then
      6  :P2_FROM_DATE := to_char(sysdate-1);
      7  end if;
      8  end;
      9  /
    PL/SQL procedure successfully completed.
    SQL> print p2_from_date
    P2_FROM_DATE
    Sun 24-JUN-2012
    SQL> alter session set nls_territory='UNITED KINGDOM';
    Session altered.
    SQL> exec :p2_from_date := null
    SQL> declare
      2  lv_date number;
      3  begin
      4  select to_char(sysdate,'D') into lv_date from dual;
      5  if lv_date=2 then
      6  :P2_FROM_DATE := to_char(sysdate-1);
      7  end if;
      8  end;
      9  /
    PL/SQL procedure successfully completed.
    SQL> print p2_from_date
    P2_FROM_DATE
    SQL>Hence the questions about language above.
    >
    I am having a display only item -- :P2_FROM_Date . If its Thu,Fri,Sat or Sun I want to set the date as the last Monday's date . If its Mon,Tue or Wed then it should be the present Monday's date .
    E.g: Today is Friday and the last Monday was on 18th .
    So for yesterday , today,tomorrow and Sunday , the date should be displayed as 18-JUN-2012.
    From the coming Monday to Wednesday , the date should of be the coming Monday i.e , 24-JUN-2012
    >
    The coming Monday is 25-JUN-2012.
    Aren't these rules equivalent to "Monday this week, where Monday is the first day of the week"? In which case the PL/SQL Expression you require is:
    trunc(sysdate, 'iw')For example:
    SQL> with t as (
      2    select date '2012-06-21' + level d from dual connect by level <= 17)
      3  select
      4            d
      5          , trunc(d, 'iw')  monday
      6  from
      7            t;
    D               MONDAY
    Fri 22-JUN-2012 Mon 18-JUN-2012
    Sat 23-JUN-2012 Mon 18-JUN-2012
    Sun 24-JUN-2012 Mon 18-JUN-2012
    Mon 25-JUN-2012 Mon 25-JUN-2012
    Tue 26-JUN-2012 Mon 25-JUN-2012
    Wed 27-JUN-2012 Mon 25-JUN-2012
    Thu 28-JUN-2012 Mon 25-JUN-2012
    Fri 29-JUN-2012 Mon 25-JUN-2012
    Sat 30-JUN-2012 Mon 25-JUN-2012
    Sun 01-JUL-2012 Mon 25-JUN-2012
    Mon 02-JUL-2012 Mon 02-JUL-2012
    Tue 03-JUL-2012 Mon 02-JUL-2012
    Wed 04-JUL-2012 Mon 02-JUL-2012
    Thu 05-JUL-2012 Mon 02-JUL-2012
    Fri 06-JUL-2012 Mon 02-JUL-2012
    Sat 07-JUL-2012 Mon 02-JUL-2012
    Sun 08-JUL-2012 Mon 02-JUL-2012
    17 rows selected.
    SQL> alter session set nls_territory='AMERICA';
    Session altered.
    SQL> alter session set nls_date_format='Dy DD-MON-YYYY';
    Session altered.
    SQL> with t as (
      2    select date '2012-06-21' + level d from dual connect by level &lt;= 17)
      3  select
      4            d
      5          , trunc(d, 'iw')  monday
      6  from
      7            t;
    D               MONDAY
    Fri 22-JUN-2012 Mon 18-JUN-2012
    Sat 23-JUN-2012 Mon 18-JUN-2012
    Sun 24-JUN-2012 Mon 18-JUN-2012
    Mon 25-JUN-2012 Mon 25-JUN-2012
    Tue 26-JUN-2012 Mon 25-JUN-2012
    Wed 27-JUN-2012 Mon 25-JUN-2012
    Thu 28-JUN-2012 Mon 25-JUN-2012
    Fri 29-JUN-2012 Mon 25-JUN-2012
    Sat 30-JUN-2012 Mon 25-JUN-2012
    Sun 01-JUL-2012 Mon 25-JUN-2012
    Mon 02-JUL-2012 Mon 02-JUL-2012
    Tue 03-JUL-2012 Mon 02-JUL-2012
    Wed 04-JUL-2012 Mon 02-JUL-2012
    Thu 05-JUL-2012 Mon 02-JUL-2012
    Fri 06-JUL-2012 Mon 02-JUL-2012
    Sat 07-JUL-2012 Mon 02-JUL-2012
    Sun 08-JUL-2012 Mon 02-JUL-2012
    17 rows selected.Also note that using the item source properties will only set the <tt>P2_FROM_DATE</tt> in the rendered page, not in session state.

  • List box is not scrolling to the last item

    Hello all,
    I am developing a Windows Phone 8 application, in that I am using List box to display the data. I have requirement like once the page is launched user should navigate to the last item of the list box. For this requirement used scroolintoview method like LsbSample.ScrollIntoView(LsbSample.LastOrDefault).
    It is moving to the last item but not fully. It is showing last item around 60% but for remaining 40% I need to manually scroll the list box.
    Can any one help me to resolve this issue.
    Thanks in advance.
    Santosh Kumar Kotta

    It's likely a small bug. Can you try scrolling to the bottom of the scrollviewer's height instead?
    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.
    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined
    objects and unknown namespaces.

  • USF on iTunes U collections such as Sustainability and iteach Initiative are not displaying new items even days after they are uploaded to the collections. The items show in the Preview of the collections but not Live view. not displaying

    USF on iTunes U collections such as Sustainability and iteach Initiative are not displaying new items even days after they are uploaded to the collections. The items show in the Preview of the collections but not Live view. not displaying

    Greetings;
    This seems to an ongoing issue (see related discussion link).  We've been experiencing the same update lag since last Friday.  The new additions to the Collection appear and are accessible in both the iPad and iPhone applications, but even though they additions appear in "Quick View", the material doesn't appear in the Collection itself.  Apple is aware of the issue and is investigating.  All the best...
    Syd Rodocker
    Tennessee State Department of Education
    https://discussions.apple.com/message/15461971#15461971

  • Display Open Items in Foreign Currency (LC3) during Clearing

    Hi all.
    Please advice, how can we display LC3 in open item clearing transactions (like F-03)?
    Our problem is that we need to clear accounts which have amounts only in LC3 (other amounts = 0) and users can't select proper document to clear.

    Hi Philip,
    During the clearing is not posible to display open items in foreign currency LC3.
    As workaround you can do the following:
    You can display with FBL*N the open items to be cleared by choosing in the layout "Amt in loc.curr. 3", and then when using the clearing transaction (F-53 for example) through additional selections insert the document numbers noted before from the FBL*N.
    Hope this workaround helps.
    Regards

  • How to display line items twice in a single page in sap script

    HI,
      I am working on check printing. I copied the standard driver program and form to Zprogram and ZForm. Which are RFFOUS_C(print program) and F110_PRENUM_CHECK(Form Name).
    I want to display the line items twice in the same page and sub sequent pages.
    Currently I am able to display line items only once.
    Example:
    PAGE1.
    line item1
    line item2
    line item3
    line item4
    line item5
    line item1
    line item2
    line item3
    line item4
    line item5
    line items 1 to 5 which are in main window.
    How to achive this problem.
    Regards,
    vinod

    Hi
    I had the same request for a check form in Canada. I solved it by writing the line item output into variables and print these variables in a second window. It was ~10 hours of effort, not a real nice technical solution but it worked.
    If you require I can send you a PDF of the sap script form definition. You can contact me at [email protected] Answers can take 1 week or more. 
    Best regards
    JD

  • Bug (possibly?): SelectManyShuttle fails to display selected items

    Bug (possibly?): SelectManyShuttle fails to display selected items when valuePassThru="true" in ADF 10g
    Hello all,
    When run, the example below shows a Select Many Shuttle with four choices in the leading list. When items are shuttled to the training list and the page is submitted the trailing list is rendered with no items selected. Is this a bug?
    Configuration
    This example was constructed using jDeveloper 10.1.3.5.0.
    A new application was created using the Web Application [JSF, ADF BC] template although no business components are used.
    Steps to Reproduce
    1. Create the following backing bean class.
    package com.fmcna.adf.test.view;
    import java.util.ArrayList;
    import java.util.List;
    import javax.faces.model.SelectItem;
    public class ShuttleBean {
        public ShuttleBean() {
        private List availableItems;
        private List selectedItems;
        public void setAvailableItems(List availableItems) {
            this.availableItems = availableItems;
        public List getAvailableItems() {
            //populate with a List of SelectItem instances on the inital call to this method
            if(this.availableItems==null) {
                this.availableItems=generateSelectItemsList();
            return availableItems;
        public void setSelectedItems(List selectedItems) {
            this.selectedItems = selectedItems;
        public List getSelectedItems() {
            return selectedItems;
         * Build a List of SelectItem instances to be used by an af:selectManyShuttle
         * @return A List containing SelectItems instances
        private List generateSelectItemsList() {
            List initialItems = new ArrayList();
            initialItems.add(new SelectItem(new Integer(11),"First Choice"));
            initialItems.add(new SelectItem(new Integer(22),"Second Choice"));
            initialItems.add(new SelectItem(new Integer(33),"Third Choice"));
            initialItems.add(new SelectItem(new Integer(44),"Fourth Choice"));
            return initialItems;
    }2. Configure the ShuttleBean class as a session scoped managed bean as in the following faces-config.xml file.
    <?xml version="1.0" encoding="windows-1252"?>
    <!DOCTYPE faces-config PUBLIC
      "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
      "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
    <faces-config xmlns="http://java.sun.com/JSF/Configuration">
      <managed-bean>
        <managed-bean-name>ShuttleBean</managed-bean-name>
        <managed-bean-class>com.fmcna.adf.test.view.ShuttleBean</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
      </managed-bean>
      <application>
        <default-render-kit-id>oracle.adf.core</default-render-kit-id>
      </application>
    </faces-config>3. Create a JSP page containing an af:selectManyShuttle with a nested f:selectItems component. Wire the values for these components to the properties in the managed bean.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces" prefix="af"%>
    <f:view>
      <html>
        <head>
          <meta http-equiv="Content-Type"
                content="text/html; charset=windows-1252"/>
          <title>testShuttle</title>
        </head>
        <body><h:form>
            <af:selectManyShuttle value="#{ShuttleBean.selectedItems}" valuePassThru="true">
                <f:selectItems value="#{ShuttleBean.availableItems}"/>
            </af:selectManyShuttle>
            <af:commandLink text="Postback"/>
        </h:form></body>
      </html>
    </f:view>4. Run the JSP. Validate that the trailing list is initially empty.
    5. Shuttle one or more items to the trailing list and click the Postback button. Validate that when the page refreshes the trailing list is again empty.
    Thanks for any input you might be able to provide.
    Chris Mihalcik
    Edited by: user5384858 on Jun 14, 2010 1:06 PM

    I'm holding my Nano in my hot little hands with ALL of the things you listed, but here's the sad, simple truth: you CAN'T use iTunes to sync everything. It works well for:
    1) Music
    2) Videos (except sometimes in Vista)
    3) Photos (as long as they're not too large)
    but is terrible for:
    1) calendar
    2) contacts
    3) To-Do lists
    For the latter use something like "iGadget" (www.ipodsoft.com). I also edit/store notes w/iGadget plus it allows you to export files, etc.
    I gave up on syncing iTunes w/Outlook long ago. Good luck.

  • ICal does not display all items in month view

    Hi,
    in month view, iCal displays ... to show that some items are not displayed. However, this happens many times when there is ample space to display the item, and even happens when there is only one item!
    Does anybody know how to force iCal to show as many as possible items?
    Thanks...

    Hey, thank you.
    But how do I change the font and its size?
    I tried....
    Thanks,
    Janos

  • Display last month revenue

    Hi All,
    I have below requirement.
    i have data in my table as below.
    Month Name
    Revenue
    Jan-2013
    500
    Feb-2013
    300
    Mar-2013
    null
    April-2013
    null
    May-2013
    900
    Jun-2013
    null
    Jul-2013
    450
    Aug-2013
    null
    requirement is to display last month revenue where ever revenue is null
    ex: For march revenue should be displayed as 300 and April too 300, for Jun 900 and july 450 should be displayed.
    how can i achieve this.

    Question: Revenue is number type right? how come you are getting NULL it suppose to be 0.
    use ifnull and set to 0 just in case your data is right, and then try the below
    case when Revenue=0 then MSUM (Revenue, 2) else Revenue end
    I'm not sure how it works when 2 NULLs like march and april, to test this I dont have similar data.
    give me updates

  • How to display total "items" and "amount " in header.jsp in CRM ISA B2B

    Hi,
    I am modifying “header.jsp” in standard CRM ISA B2B application.  Here we have summary of total number of items and total amount but it is coming in to button and for that below code is there in “header.jsp” and it display it as button text.
    if (!ui.homActivated) { %>
    !!" alt="" border="0" height="16" width="20">
    </td>
    <td class="vertical-align-middle" name="miniBasket" value="<isa:translate key="b2b.header.minibasket.default"/>" >
            <form name="basketForm" action="javascript:show_basket();">
         <input class="green" name="miniBasket" type="button" value="<isa:translate key="b2b.header.minibasket.default"/>"/>   
        </form>
    </td>   
    <% } else { %>
    <!-- HOM scenario - minibasket displays collective order -->
    <td  class="vertical-align-middle" align="right">
    !!" alt="" border="0" height="16" width="20">
    </td>
    <td  class="vertical-align-middle" name="miniBasket" value="<isa:translate key="b2b.header.collorder.default"/>">
    <form name="basketForm" action="javascript:show_collective_order();">
        <input class="green" name="miniBasket" type="button" value="<isa:translate key="b2b.header.collorder.default"/>"/>   
    </form>
    </td>
    <% } %>
    Now I want to display total number of items and total amount separately in two different <td> element.
    How I can get total number of items and total amount in “header.jsp” I tried below code but did not get any success.
    Insert below line in “header.jsp” with respective page import statement for class or let me know which class I have to import.
    <%
         HeaderSalesDocument  hdr =
                (HeaderSalesDocument) request.getAttribute(MaintainBasketBaseAction.RK_HEADER);
        ItemList items =
                (ItemList) request.getAttribute(MaintainBasketBaseAction.RK_ITEMS);
    %>
    And then I use
    <td><%= hdr.getNetValue() %></td>
    <td><%= items.size() %></td>
    But it is not printing any thing and header page not display at all.
    Pl. tell me how to get total amount and number of items in header area. Which class or object I have to use here.
    I really appreciated any help from any one.
    Thanks and regards.
    Ashish Patel.

    Hi, I tried another logic. I took value from  Standard button, in which B2B application display total items and amount and I hide this field, to another text element.
    Now I Am breaking that value in words and stored them in array  and then trying to display that array with particular number which contains total item and amount through Java Script on Focus.
    But problem here is, It is not getting updated automatically I have to click on new text files to trigger Onfocus event. How I can achieve effect like as soon as Standard button changes it's value which is now hidden filed my new text box should update automatically.
    Thanks.
    Ashish

  • I downloaded Mountain Lion in my  i have macbook pro retina display last month.  but I don't get airplay the option on my macbook.  I went to display preferences, but the airplay is not available.  What is the next step?

    I downloaded Mountain Lion in my  i have macbook pro retina display last month.  but I don't get airplay the option on my macbook.  I went to display preferences, but the airplay is not available.  What is the next step?

    You also need:
    Apple TV (2nd or 3rd generation) with software update v5.0 or later.

  • Displaying line items, although not activated in FS00

    Hi everyone!
    I've got a question about line items.
    I had created a GL account, and in it's master record I didn't activated Display line item. But, when I call transaction for displaying GL account's line items (FAGLL03), I can see line items?
    How is that possible?
    I know that there are some special cases, for example expense accounts: for every expense account there is a cost element in CO, and no matter settings in FS00, for expense account there is always line item display. Similary, reconciliation accounts always have open items management, irrespective of settings in FS00.
    But this is just regular account, with very few settings in master record: its balance sheet account, the account currency is local currency, sort key 001 and field status group G001. And that's all.
    Can somebody explaine this?

    Guys. In addition to above my problem.  I was facing this problem due to some graphics issue on my laptop. I was not able to see most of the fields because of Graphics Driver installed on my laptop. ( Later on I got this solution. ).
    This seems very unrealistic to hear but my experience is true.
    I hope in future if some one will have this issue please check out driver compatibility specially Graphics. This problem may suppose to encounter with Dell. 
    Anyways Z layout also worked fine as suggested by Guest FICO.
    Thank you all.
    Regards,
    Sharvari Joshi.

Maybe you are looking for

  • OSX - Acrobat 9.5.4 update won't install

    I've tried several times to install the latest update for Adobe Acrobat (to 9.5.4) and it starts out just fine.  Then it stays on the following screen for days at a time: The option to quit the application is greyed out; I have to restart the compute

  • Payment method  and report

    Hi My requirement is like after running the payment run(F110) for certain company code(for only  one company code) it should trigger Z program which will fulfil my requirement.How to configure Z report . Any suggestions appreciated. Thanks Raj

  • Pictures dont show up anymore

    When i connect my ipod to the Usb port it says "the file or directory\iPod\_Control\artwork\ArtworkDBis corrupt and unreadable.Please run Chkdsk utiltiy" does anyone know how to fix it?or what wrong with it. the only pictures on my nano are the ones

  • Apple script to select all, joint tracks, then Import CD

    Anyone know of a script that will do that? Thanks Alfredo

  • Frame size doesn't match

    I'm working on an animated project...doing the animation in Flash and then doing various effects and editing in Premiere Pro CS3.  I've been rendering my scenes out of flash as PNG sequences, and then bringing them into Premiere...and so far it seems