Displaying Horizontal Scrollbar in h:SelectOneListbox

I am using myfaces1.1.4.
I have a popup which will search for branches based on selected countries.So basically it will show branch name and adress in a h:selectOneListbox.I have vertical scroll bar with this, but i am trying to generate the horizontal scroll bar which is not a default with this component, i think i need to customize that component.I tried to play around with style attribute.But it is not working.
This is the following code i am using:
<h:selectOneListbox value="#{backingBean.branchID}"
id="branchResults" size="5" required="false"
style="WIDTH: 510px; HEIGHT: 80px; FONT-FAMILY: Courier New;">
<f:selectItems id="branchNames"
value="#{backingBean.branchMatches}" />
I appreciate if you can look in to this.
Thanks.

Horizontal scrollbars are not attached to a block but to a canvas.
if you need some spreadtable requierement, add a stacked canvas to your content canvas, and set the CANVAS item property of these items to this canvas.
If the size of the stacked canvas is smaller to fit every items (and it probably should), you will see a horizontal scrollbar displayed at runtime.
Francois

Similar Messages

  • Horizontal Scrollbar for af:selectOneListBox

    Hi
    Is there a way to fix the width of af:selectOneListbox such that for list values that are longer than stipulated width, a horizontal scrollbar can also be introduced to browse these values?
    I cannot pre-determine the longest item as values within af:selectOneListbox is loaded dynamically.
    Thanks a lot in advance!

    Hi,
    you can try CSS overflow:scroll to get a scrollbar. However, the width might be easier to set using CSS and can also be computed by a managed bean property
    http://www.w3schools.com/cssref/pr_pos_overflow.asp
    Frank

  • Display a horizontal scrollbar in a JTable as to fit column width

    hi all,
    I am using JTable to display records.I've set a horizontal scrollbar by using 'table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);',but although i got a horizontal scrol bar the column width is constant for all the columns and not getting adjusted according to the lenght of the column names. As the column names and the records are of different size in the database i want the column widht to be adjusted according to the length of column names and record length.so please tell me how to do it?
    regards...

    .I've set a horizontal scrollbar by using 'table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);You are welcome.
    i want the column widht to be adjusted according to the length of column names and record length.so please tell me how to do it?Search the forum. This question has been asked and answered before.

  • To disable the horizontal scrollbar and to create a next button to navigate

    To disable the horizontal scrollbar and to create a next button to navigate through the records. At present I create a JSF page and drag and drop my table view and then using the Tuning property I have limited the number of records to be shown. But I need to add a button and then code it to display the next few records. Can someone kindly suggest a suitable mechanism to get this accomplished.
    Edited by: 888970 on Oct 2, 2011 10:15 PM

    Hi Erp,
    At present these are the entries that I have in my JSPX page.
    I have a Table, Iterator and a Input List of Values. As per the scenario, I want a few rows to appear on the table for which I wanted to disable the horizontal scroll bar and then once I click on the list of values it must prompt me with the remaining page numbers.
    Earlier there are about 150 records in the table. I want to show them as 15 per page.
    For which I have added the Iterator and a LOV component code in my JSPX page.
    <af:iterator id="i1"
    value="#{bindings.NsEventDetailsView1.collectionModel}"
    var="row"
    binding="#{pageFlowScope.testPageBean.myIterator}"/>
    <af:inputListOfValues label="Label 1"
    popupTitle="Search and Result Dialog" id="ilov1"/>
    Then I created the bean class as per the example.
    Below is the bean class:
    import javax.faces.event.ValueChangeEvent;
    import oracle.adf.view.rich.context.AdfFacesContext;
    import org.apache.myfaces.trinidad.component.UIXIterator;
    import org.apache.myfaces.trinidad.event.AttributeChangeEvent;
    public class TestPagebean {
    public TestPagebean() {
    public void i1ov1_valueChangeListener(ValueChangeEvent valueChangeEvent) {
    // Add event code here...
    private UIXIterator myiter;
    public void setI1(UIXIterator myiter) {
    this.myiter=myiter;
    public UIXIterator getmyiter() {
    this.myiter=myiter;
    public UIXIterator setmyiter() {
    return myiter;
    UIXIterator valueIterator = getmyiter();
    if (!valueChangeEvent.getNewValue().equals(valueChangeEvent.getOldValue())) {
    int newPage =
    Integer.parseInt(valueChangeEvent.getNewValue().toString());
    int pageStart = (newPage) * valueIterator.getRows();
    valueIterator.setFirst(pageStart);
    AdfFacesContext.getCurrentInstance().addPartialTarget(valueIterator);
    But i am getting errors in the bean class.
    1. Block expecting }
    2. public UIXIterator getmyiter() {
    this.myiter=myiter;
    Return Statement missing
    3. Block expecting {
    4. Type or variable 'valueChangeEvent' not found
    5. Method 'getNewValue' not found
    6. Method 'getOldValue' not found
    7. Method 'toString' not found
    Can you suggest a possible solution?

  • Forms 5 Tab Canvas & Horizontal Scrollbar

    We are trying to implement a tab canvas which will hold a multi-record data block. The difficulty is that we would like to display a lot of fields and there is no Horizontal Scrollbar easily available for the Tab Canvas.
    We are thinking about "simulating" a tab canvas by using stacked canvases. The stacked canvas allows us to have the scrollbar, but looses some of the look & feel of a tab canvas.
    Anyone try to do this in Forms 5? How about anyone try to place a stacked canvas on top of a tab canvas?

    We're using forms 6.0.8.8. Our standard practice is to never put items on a tab canvas, instead we put stacked canvas' on the tab canvas. Besides having canvas scroll bars, it also provides a basis to work around documented bugs for refreshing/resizing windows when returning from other forms/windows of different sizes etc.
    null

  • Horizontal Scrollbar in Datablock

    Hello guys and good morning,
    I would like to ask you for a problem i have in displaying a horizontal scrollbar across a datablock. I have a datablock with 40 columns, from which the 9 are unabled because they are not changed or edited, so i want to scroll across the rest 31 columns. Any idea?
    Thanx a lot in advance,
    Best Regards,
    Bill Kepaptsoglou.

    Horizontal scrollbars are not attached to a block but to a canvas.
    if you need some spreadtable requierement, add a stacked canvas to your content canvas, and set the CANVAS item property of these items to this canvas.
    If the size of the stacked canvas is smaller to fit every items (and it probably should), you will see a horizontal scrollbar displayed at runtime.
    Francois

  • Horizontal scrollbar for plot legend

    Hello,
    The plots in my plot legend for a graph can have quite long names so it would be great having a horizontal scrollbar.
    Quote from here
    >>To add a scroll bar to a plot legend, right-click the plot legend and select Visible Items»Horizontal Scrollbar or Visible Items»Vertical Scrollbar from the shortcut menu.
    I can see the entry horizontal scrollbar, but it is always grayed out, what's wrong?
    Thanks a lot for your help!
    Cheers,
    Rico

    I think you are misinterpreting the use of the scrollbar.  If you have a lot of plots on your graph, then you can use the scrollabr to not show all the plots at once and this allows you to scroll through the list.  It does not allow you to make the plot legend smaller to hide long names and scoll across.
    So, if you resize the plot to be horizontal, then you can display the horizontal scrollbar:
    If you resize it vertically, then you can display the vertical scrollbar:
    Message Edited by Matthew Kelton on 05-09-2008 12:09 PM
    Attachments:
    Plot legend horizontal.png ‏2 KB
    Plot legend vertical.png ‏2 KB

  • Combo box menu calculation of popup size ignores horizontal scrollbar

    I have a JComboBox that I've setMaximumRowCount(20). However, sometimes the combo box has as few as 2 or 3 items in it. In those cases as you probably know, Swing automatically calculates how tall the popup should be, in this case 2 rows tall.
    However, this calculation ignores the horizontal scrollbar, which basically occupies a "row" itself. This means that if I have combo box with 2 items, the displayed popup will contain the first item, a horizontal scrollbar, and a vertical scrollbar (for scrolling down to the item that the horizontal scrollbar hides) . Is this a bug in Java? If so, are there any workarounds to this?
    I've looked in the bug report section using the terms "combobox horizontal scrollbar popup" and couldn't find anything
    thanks

    the very simple strategy to do is to call removeAllItems() method for the 2nd combox box and then insert the contents. this is because the validate() method is not repeatedly called and so the contents are not updated immediately.

  • Horizontal scrollbars behaving oddly

    This is not a complete show-stopping bug but Logic Express (9) recently started having issues with horizontal scrollbars -- they center themselves. Occasionally they work as they are supposed to, but most of the time they immediately return to the center, which is really irritating after a while. I'll be scrolled all the way to the end of the timeline for example, and I decide I want to scroll back left slightly; I click on the scrollbar and any kind of drag makes it jump back to the center. It acts like the mouse cursor was there, too.
    Reinstallation and trashing preferences did not fix the problem.

    Same problem here, but it seems also related to the screen in use, at least in my setup. I'm running Logic on my MacBook with a native screen resolution of 1200x800. I have a second screen attached above it with a resolution of 1920x1080 which I use for the main Arranger screen, the MacBook screen itself is mainly used for displaying the mixer and AU's.
    When the arranger screen is on my larger display the horizontal scrollbar is flying all over the place when I try to move it, but when I have the arranger window on my MacBook's screen it behaves normally. Seems like if Logic gets confused by the different widths of the screens, like if it is behaving to have 1200 pixels to scroll on while there are 1920.
    Whatever happens, it's kind of annoying...

  • Horizontal scrollbar on tab page

    Hi,
    I'd like to use Designer for a multi-record block on a tab page with a horizontal scrollbar . How should I do this ? It is alright for a vertical scrollbar but what about an horizontal one ? Since I have too many columns to display on one tabbed page.
    Thank you,
    Denise

    If you have many items that they cannot fit into a tab page, I think you have to put them into a Stacked Canvas. This can be done by changing Overflow Style to "Spread table" option in The Module Component containing these items.
    Also, you can set WINHSB Module Generator Preference to 'Y' value to add horizontal scrollbar to module Window.
    I hope you found solution for your problem.

  • Css: background image that doesn't force a horizontal scrollbar

    I am looking to create a small pattern (an image) that will
    always align to the left and right of my content. All of my content
    is situated in a 760px wide div that is centered with margin:0px
    auto. My problem is that if I create another div to hold the
    additional image, that any browser would probably display a
    horizontal scrollbar if the image and the content together exceed
    the width of the users viewport.
    I thought about doing it this way, but I am not sure if this
    will work... My content div is wrapped inside another div called
    with class whitediv. This whitediv is 100% of the users viewport
    wide. Could I assign a background image to this div, which will
    center, and therefore lurk behind my content div?
    Any suggestions?
    Thanks, dl33

    Bernd,
    It worked perfectly--thank you VERY much for your help!

  • Can i add a horizontal scrollbar?

    Hi,
    I have a datablock , Employees , having the fields
    SQL> desc employees
    Name                            Null?    Type
    EMPLOYEE_ID                     NOT NULL NUMBER(6)
    FIRST_NAME                               VARCHAR2(20)
    LAST_NAME                       NOT NULL VARCHAR2(25)
    EMAIL                           NOT NULL VARCHAR2(25)
    PHONE_NUMBER                             VARCHAR2(20)
    HIRE_DATE                       NOT NULL DATE
    JOB_ID                          NOT NULL VARCHAR2(10)
    SALARY                                   NUMBER(8,2)
    COMMISSION_PCT                           NUMBER(2,2)
    MANAGER_ID                               NUMBER(6)
    DEPARTMENT_ID                            NUMBER(4)I created a layout, using layout editor to display all the fields in tabular format. I could create a vertical scrollbar.
    but I also want a horizontal scrollbar.
    How can i create one?
    Thanks
    Edited by: user12984479 on Apr 17, 2010 1:26 AM
    Edited by: user12984479 on Apr 17, 2010 1:27 AM

    After creating the contant and stacked canvas as you said.
    a). Just open the department (contant) canvas and select from the menu View>Stacked Views.... It will show you that employee (stacked) canvas just choose that canvas and press ok. It will be on your main department canvas. Then adjust that canvas by keyboard/mouse upon your requirement where you want to place.
    b). And for the tab key as you said. For this you will have to create one trigger called KEY-NEXT-ITEM. This trigger you will create from where you want to go to the employee canvas. Let say you want that after department name cursor should go to the employee canvan's any field. Then create trigger on department name field called KEY-NEXT-ITEM and in this trigger just write like this...
    GO_ITEM('<EMPLOYEE_BLOCK.FIELD_NAME>');  -- Change the name upon your block and field name in formHope this will work.
    -Ammad
    Edited by: Ammad Ahmed on Apr 18, 2010 8:22 AM

  • JTable -  Horizontal Scrollbar - Column Width

    I wish to add a horizontal scrollbar(which for some stupid reason Java has not included) to my JTable which is inside a JScrollPane and also make sure that the width of the fourth column is longer and can fit the String that i wish to display. Now, i have searched the forum for solutions but none of them seem to work. The setting of the column width with the help of TableColumnModel does not seem to work and not to mention the fact that when i turn auto rezise off for the JTable, the JTable does give me a horizontal scrollbar but then it makes the columns so less in width that i have gray area left on the right hand side and the setColumnsToFit method does not work. I have five columns and here is the code, any help would be greatly appreciated Thanks:
    excepTable = new JTable(excepTableModel);
    excepTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    int width = 100;
    TableColumnModel tcm;
    TableColumn tc;
    for(int i = excepTable.getColumnCount(); i > 0; i--)
    tcm = (TableColumnModel)excepTable.getColumnModel();
    tc = tcm.getColumn(i);
    if(i == 3)
    width = 400;
    tc.setWidth(width);
    tc.setMinWidth(width);
    tc.setMaxWidth(width);
    tc.setPreferredWidth(width);
    width = 100;
    exScroller = new JScrollPane(excepTable);

    .I've set a horizontal scrollbar by using 'table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);You are welcome.
    i want the column widht to be adjusted according to the length of column names and record length.so please tell me how to do it?Search the forum. This question has been asked and answered before.

  • Need horizontal scrollbar for af:selectManyChoice

    Hi,
    I use JDeveloper Studio Edition Version 11.1.1.7.0
    There is a field for which we use af:selectManyChoice ADF component.
    The component is displaying the vertical scrollbar to show all the values automatically.
    And width wise the component is expanded to show values. But, its not expanded to show the value which has maximum value.
    Can we add a property to instruct the component to take the maximum width of the values in the list?
    Or can we add a horizontal scrollbar to the component?
    Attached the screenshot.
    Regards,
    Tamil

    Hi,
    you can try CSS overflow:scroll to get a scrollbar. However, the width might be easier to set using CSS and can also be computed by a managed bean property
    http://www.w3schools.com/cssref/pr_pos_overflow.asp
    Frank

  • How to display horizontal line in top-of-page by using object oriented ALV?

    How to display horizontal line in top-of-page by using object oriented ALV.
    I am created top-of-page in object oriented alv.
    But not be successes in showing horizontal line in it.
    Can any one pls give solution for this..
    Thanks and regards..

    Hi
    Try like this
    data: gt_list_top_of_page type slis_t_listheader. " Top of page text. 
    Initialization. 
    perform comment_build using gt_list_top_of_page[]. 
    form top_of_page. 
    * Note to self: the gif must be loaded into transaction OAOR with 
    * classname 'PICTURES' AND TYPE 'OT' to work with ALV GRID Functions. 
    * I Loaded NOVALOGO2 into system. 
    call function 'REUSE_ALV_COMMENTARY_WRITE' 
         exporting 
    * I_LOGO = 'NOVALOGO2' 
    * i_logo = 'ENJOYSAP_LOGO' 
             it_list_commentary = gt_list_top_of_page. 
    endform. " TOP_OF_PAGE 
    form comment_build using e04_lt_top_of_page type slis_t_listheader. 
    data: ls_line type slis_listheader. 
          clear ls_line. 
          ls_line-typ = 'A'. 
          ls_line-info = 'Special'(001). 
          fgrant = xgrant. 
          concatenate ls_line-info fgrant 
          'Stock Option Report to the board'(002) 
                 into ls_line-info separated by space. 
                        condense ls_line-info. 
          append ls_line to e04_lt_top_of_page. 
    endform. " COMMENT_BUILD
    Use following syntex for footer print in alv:
    * For End of Page
    form END_OF_PAGE.
      data: listwidth type i,
            ld_pagepos(10) type c,
            ld_page(10)    type c.
      write: sy-uline(50).
      skip.
      write:/40 'Page:', sy-pagno .
    endform.
    *  For End of Report
    form END_OF_LIST.
      data: listwidth type i,
            ld_pagepos(10) type c,
            ld_page(10)    type c.
      skip.
      write:/40 'Page:', sy-pagno .
    endform.
    check this link
    http://abapprogramming.blogspot.com/
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5dc3e690-0201-0010-1ebf-b85b3bed962d
    Changing width of a custom container dynamically
    Display Page numbers in ALV
    Insert picture in selection screen.
    Logo in OO ALV Grid
    Reward all helpfull answers
    Regards
    Pavan

Maybe you are looking for

  • Problem displaying data in Crystal Viewer

    Hi, First time posting on here, so apologies if I've got the wrong thread.... Currently developing an application that uses ASP, via a COM+ object to connect to SQL Server 2005 Db.  My problem is that since the users default printer might not be visi

  • Referencing a column of a materialized view

    Hi, I have a master table in a database A CREATE TABLE formations ( nom_formation VARCHAR2(30) CONSTRAINT formations_nom_pk PRIMARY KEY I have made a materialized view of that table in a remote database B CREATE MATERIALIZED VIEW formations_mv In the

  • Set default "from" field in Mail per account?

    Is there any way I can set the default "from" field in Mail based on the account I'm sending from? I have two accounts defined: work and personal. Each account has 2 email addresses associated with it (as a comma-separated list in the "Email Address"

  • Address Book - Synch to Gmail

    the option to synchronise google mail in the preference pain of my address book does not exist....all i have is the option to synch with yahoo....how do i add google mail...anyone...

  • Who locks row in IOT?

    Hi, I have an index organized table (IOT) where I need to find the locking session for as certain row. I found usefull information on this website: http://www.orafaq.com/node/854 But for some reason I annot use <tt>DBMS_ROWID.rowid_create</tt> to cal