Datatable column rows

Hi,
In my application I need to display a list of images from a database table. Now if I do as:
<h:datatable value="#{myBean.x}" var="item">
<h:column>
<h:graphicimage url="{#item.pic}"/>
</h:column>
I end with a narrow one column table like.
x
x
x
x
x
while I want to get
x x x x
x x x x
x x x x
How can I achieve this?
thanks

You can use myfaces implementation of dataList
<t:dataList var="imgList" value="#{list.imageList}" layout="simple" dir="ltr">
    <h:graphicImage url="#{imgList.getImagePath}" />     
</t:dataList>dataList is similar to the dataTable only diffrence is you can render the table value in single row

Similar Messages

  • DataTable single row coloumn display as two rows..

    I need to display dataTable single Row columns in 2 rows.
    For Eg :
    dataTable each rows has 4 columns...
    by defalut it displays col1 Col2 Col3 Col4.
    But i need to displays
    row1 : Col1 Col2
    Col3 Col4
    row2 : Col1 Col2
    Col3 Col4
    I tried with inner and outer table combination but still having problems.
    Does anyone has any code or sample code for this..
    Thanks in Advance.

    It is hard to follow what you are asking. Do you mean that you want col3 and col4 to show up below col1 and col2 (new row?).
    I am going to assume that you want to "split" or "wrap" your columns. To do this you need to provide the dataTable the proper datamodel.
    <h:dataTable var="foo" model="bar">
    <h:column>
    <h:panelGrid columns="1">
    <h:outputText value="col1">
    <h:outputText value="col3"
    </h:panelGrid>
    </h:column>
    <h:column>
    <h:panelGrid columns="1">
    <h:outputText value="col2">
    <h:outputText value="col4"
    </h:panelGrid>
    </h:column>
    <h:dataTable

  • DataTable - Read Rows Dynamically

    Hi ,
    Does anyone knows how to read rows from Datatable dynamically ?
    What I'm looking for is: a private function which a collection column names and datatable with rows and that function will return me back  the values of those functions with column names
    Bhupinder Singh

    Try something like this
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Data;
    namespace ConsoleApplication1
    class Program
    static void Main(string[] args)
    DataTable table = new DataTable();
    table.Columns.Add("a", typeof(int));
    table.Columns.Add("b", typeof(int));
    table.Columns.Add("c", typeof(int));
    table.Rows.Add(new object[] { 1, 2, 3 });
    table.Rows.Add(new object[] { 4, 5, 6 });
    table.Rows.Add(new object[] { 7, 8, 9 });
    int numCols = table.Columns.Count;
    List<string> colNames = new List<string>();
    foreach (DataColumn col in table.Columns)
    colNames.Add(col.ColumnName);
    foreach (DataRow row in table.AsEnumerable())
    foreach (string colName in colNames)
    int cell = row.Field<int>(colName);
    jdweng

  • Datatable column add

    Hi All ,, I am writing the following
    $Datatable.Columns.Add("Servername")
    $row=$datatable.Rows
    $row.count
    $row[1].Servername=$SQLServer
    for($loopid=0;$loopid -le $row.count-1;$loopid++)
       $row[$loopid].servername=$Sqlserver
    $Data.table.columns.add  will the new column to the last column of the whole table, are there anyway I can add a new column at the beginning ?

    Hi sakurai_db,
    you can do that by using the functionality of SetOrdinal, like this:
    $Datatable.Columns.Add("ServerName").SetOrdinal(0)
    (0) is the first position, if you want the second u use (1), etc.

  • How do I locate column/row (number) selected in applescript

    I require a simple script to adjust the column widths of the current selected column only. I want to base it on a script below which I found on the internet. This script adjusts multiple column widths to the value input and adjusts the stub column to the remaining space. I would like to know how easy it is to create a script with a similar input window that adjusts the column/row selected leaving the others in tact.
    tell application "Adobe InDesign CS4"
        activate
        if class of parent of selection is not cell then
            display dialog " Do not highlight any cells " buttons " OK " default button 1 with icon caution
        else
            set monTableau to parent of parent of selection
            set NbColonnes to count columns of monTableau
            set monBlocTexte to parent text frames of selection
            set maBoiteTexte to item 1 of monBlocTexte
            set {y, x, h, l} to geometric bounds of maBoiteTexte
            set largeurBloc to (l - x)
            tell text frame preferences of maBoiteTexte
                set NumColTexte to text column count
                set largGout to text column gutter
            end tell
            display dialog "Width of columns (mm) " default answer 20
            set largeurTexte to text returned of the result
            set largcol2 to (largeurTexte as integer)
            set largcol1 to ((largeurBloc - (NumColTexte - 1) * largGout) / NumColTexte - (NbColonnes - 1) * largcol2)
            if largcol1 < 2 then
                set largcol1 to ((largeurBloc - (NumColTexte - 1) * largGout) / NumColTexte) / NbColonnes
                set largcol2 to ((largeurBloc - (NumColTexte - 1) * largGout) / NumColTexte) / NbColonnes
            end if
            set width of column (1) of monTableau to largcol1
            repeat with counter from 2 to NbColonnes
                set width of column (counter) of monTableau to largcol2
            end repeat
        end if
    end tell
    Your help will be greatly appreciated
    Thanks
    Dave Williams

    Perhaps like this:
    tell application "Microsoft Excel"
        set i to first row index of active cell
    end
    log i
    Regards,
    H

  • Uneven columns/rows

    Does anyone know how to create uneven columns/rows in a table? I'm trying to design the attached table
    When i do they all come out even.
    here is my code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    <body>
    <table border="1">
      <tr>
        <td rowspan="2">logo</td>
        <td bgcolor="#0d4881">Weekly newsletter</td>
      </tr>
      <tr>
        <td>Wednesday, July 15</td>
      </tr>
      <tr>
        <td rowspan="2">handshake photo</td>
        <td height="70"bgcolor="#0d4881">In the News</td>
      </tr>
      <tr>
        <td rowspan="3">lkajsfkljasfsaflsafjsajljsajlkajslfjalsjflkjsalfkdj df laks fjalskdfj ;akslfd lkajsfkljasfsaflsafjsajljsajlkajslfjalsjflkjsalfkdj alskfjdalksjfdl ksaalksjdf laks fjalskdfj ;akslfd lkajsfkljasfaflsafsjsajljsajlkajslfjalsjalskfjdalk  sjfdl ksaalksjdf laks fjalskdfj ;akslfd lkajsfkljasfsaflsafjsajljsajlkajslfja  lsjflkjsalfkdj alskfjdalksjfdl ksaalksjdf   laks fjalskdfj ;akslfd lkajsfkljasfsaflsafjsajljsajlk  ajslfjalsj</td>
      </tr>
      <tr>
        <td>current</td>
      </tr>
      <tr>
        <td rowspan="3">lkajsfkljasfsaflsafjsajljsajlkajslfjalsjflkjsalfkdj alskfjdalksjfdl ksaalksjdf laks fjalskdfj ;akslfd lkajsfkljasfsaflsafjsajljsajlkajslfjalsjflkjsalfkdj alskfjdalksjfdl ksaalksjdf laks fjalskdfj ;akslfd lkajsfkljasfsaflsafjsajljsajlkajslfjalsjflkjsalfkdj alskfjdalksjfdl ksaalksjdf laks fjalskdfj ;akslfd lkajsfkljasfsaflsafjsajljsajlkajslfjalsjflkjsalfkdj alskfjdalksjfdl ksaalksjdf laks fjalskdfj ;akslfd</td>
      </tr>
      <tr>
        <td height="30"bgcolor="#0d4881">Contact us</td>
      </tr>
      <tr>
        <td rowspan="3">lkajsfkljasfsaflsafjsajljsajlkajslfjalsjfl afjsajljsajlkajslfjalsjflafjsajljsajlkajslfjalfjsajljsajlkajslfjalsjfl</td>
      </tr>
      <tr>
        <td bgcolor="#0d4881">keep in touch</td>
      </tr>
      <tr>
        <td>twitter fabkjls</td>
      </tr>
    </table>
    </body>
    </html>
    Thank you in advance

    Copy & paste this code into a new, blank document.  Save as test.html.  Adjust CSS borders, colors and background styles as desired.
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>HTML5 Document</title>
    <!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
    <style>
    margin: 0;
    padding: 0;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    body {
    width: 1000px;
    margin: 0 auto;
    background: #CFC;
    font-family: Cambria, "Hoefler Text", "Liberation Serif", Times, "Times New Roman", serif;
    font-size: 100%;
    div {
    width: 49%;
    border: 2px solid #999;
    float: left;
    background: #FFF;
    color: #000;
    font-size: 16px;
    div h2 {
    background: #09C;
    color: #FFF;
    padding: 12px;
    border-bottom: 3px solid #999;
    div p { padding: 12px }
    div li {
    margin-left: 45px;
    padding-left: 12px
    footer {
    clear: left;
    background: #999;
    padding: 12px;
    color: #FFF;
    width: 100%
    </style>
    </head>
    <body>
    <!--left column-->
    <div>
    <h2>Heading 2</h2>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.
    Mauris vitae libero lacus, vel hendrerit nisi!
    Maecenas quis velit nisl, volutpat viverra felis. </p>
    <h2>Heading 2 </h2>
    <ul>
    <li>List item</li>
    <li>List item</li>
    <li>List item</li>
    <li>List item</li>
    </ul>
    <!--end left column--></div>
    <!--right column-->
    <div>
    <h2>Heading 2</h2>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.
    Mauris vitae libero lacus, vel hendrerit nisi!
    Maecenas quis velit nisl, volutpat viverra felis.
    Vestibulum luctus mauris sed sem dapibus luctus.
    Pellentesque aliquet aliquet ligula, et sagittis justo auctor varius.
    Quisque varius scelerisque nunc eget rhoncus.
    Aenean tristique enim ut ante dignissim.</p>
    <h2>Heading 2</h2>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.
    Mauris vitae libero lacus, vel hendrerit nisi!
    Maecenas quis velit nisl, volutpat viverra felis.
    Vestibulum luctus mauris sed sem dapibus luctus.
    Pellentesque aliquet aliquet ligula, et sagittis justo auctor varius.
    Quisque varius scelerisque nunc eget rhoncus.
    Aenean tristique enim ut ante dignissim.</p>
    <!--end right column--></div>
    <footer> <small>© 2013 Your Company Name.  All rights reserved.</small> </footer>
    </body>
    </html>
    Nancy O.

  • Column / Row Spanning in UIX table

    Hi There,
    Anybody know how to achieve column/row spanning when using the uix databound table?
    For example, i would like a table which looked similar to the following:
         | Cell1  | Cell2 | Cell3 |
         | A spanned cell         |
         --------------------------Is it also possible to combine this with row spanning in a UIX table and then further combine it with the single-selection bean, producing an output similar to the below (how complex can i make this :)) :
         | Select | Column 1 | Column 2 | Column 3 |
         |        |  Cell 1  |  Cell 2  |  Cell 3  |
         |   o    |---------------------------------
         |        |  A spanned cell                |
         |        |  Cell 1  |  Cell 2  |  Cell 3  |
         |   o    |---------------------------------
         |        |  A spanned cell                |
         -------------------------------------------I guess I should add that both rows on the same select line would come from the same row of the data source.
    I get the impression that spanning can be done from looking through the BLAF standards at http://www.oracle.com/technology/tech/blaf/specs/tables.html#banding_group_colrow, although maybe this just related to the table layouts (where spanning of this type is easy enough) and isn't applicable/implemented for the databound table itself?
    Anyway, thanks in advance for any help :)
    Cheers,
    Lee

    Hi ,
    I have updated the function and its working fine.
    alter
    FUNCTION [dbo].[fnGetFirstOcurrences]
    (@Text nvarchar(max),
    @Delimiter
    char(1),
    @StopAt
    smallint)
    RETURNS
    nvarchar(max)
    BEGIN
    DECLARE @Return
    nvarchar(max),
    @Final
    int = 0,
    @Times
    smallint = 1,
    @Delimiters
    smallint
    SELECT  @Delimiters
    = LEN(@Text)
    - LEN(replace(REPLACE(@text,'
    ','#'), @Delimiter,
    IF
    (@Delimiters
    >= @StopAt)
    BEGIN
    WHILE @Times
    <= @StopAt
    BEGIN
    SET @Final
    = CHARINDEX(@Delimiter, @Text
    + @Delimiter, @Final
    + 1)
    SET @Times
    = @Times + 1
    END
    SET @Final
    = @Final - 1
    SELECT  @Return
    = LEFT(@Text, @Final);
    END
    ELSE
    BEGIN
    SELECT @Return
    = @Text +
    REPLICATE('  '
    + @Delimiter,
    (@StopAt - @Delimiters)
    - 1)
    END
    RETURN
    ISNULL(@Return, @Text)
    END
    Thanks
    Thankx &amp; regards, Vipin jha MCP

  • How to avoid column/row nesting in crosstab

    Hi,
    I am using Cross Tab to get out put in following format. But every time i insert new column/row in cross tab it gets nested. I am trying to get following format. Could you please help or any pointer
                               Total          Col1+Col2 Col1          Col2          Col3+Col4     Col3          Col4     
    Group          Total                  0.00          0.00          0.00          0.00          0.00          0.00          0.00     
              Sub Group1          0.00          0.00          0.00          0.00          0.00          0.00          0.00     
              Sub Group 2          0.00          0.00          0.00          0.00          0.00          0.00          0.00     
    Regards,
    Kuldeep
    Edited by: Kuldeep Chitrakar on Apr 9, 2009 7:24 AM
    Edited by: Kuldeep Chitrakar on Apr 9, 2009 7:31 AM

    Hi Kuldeep,
    Condition 1:
    If you try to take one Dimension and one measure like Year and sales revenue using e-fashion demo universe then new column inserted will be nested when using cross tab where the measure values will be spread across multiple columns.
    In this case you have to use condition to refer individual column names like
    =[Sales revenue] Where([Year]="2001" )+ [Sales revenue] Where([Year]="2002")
    and calculate the sum.
    Select the measure column in the cross tab then click  the u201CInsert Sumu201D button it will display the sum in the last column of the cross tab then you can modify the formula generated to specify the condition which columnu2019s sum you want o display in that column.
    Ex:  Use e-Fashion universe and take Year and sales Revenue turn it to cross tab and follow the process I mentioned.
    Condition 2:
    However if you use one dimension and multiple measure like the one you are using where you are trying to calculate sum of col1+col2 and so on. In this case you can directly insert the column and calculate the sum of column referring their names.
    Ex: Use e-Fashion universe and take objects Year, Sales revenue. Quantity sold, Discount, margin here you can directly sum individual column values like sales revenue, quantity sold and discount +margin by inserting the column in between the columns using u201Cinsert Columnu201D
    I  Hope this helpsu2026
    Thanksu2026
    Pratik

  • Appraisal: Setting Column/ Row Access for substatus

    Dear All,
    I was setting column & row access for the Appraisal template.
    I have already set it for the three main status i.e. "In Planning", "In Review" & "In Process".
    But i am unable to set it for different substatuses i.e. substatus of status "In Process". Actually i want to give different access for different substatus of the main status.
    Looking for your valuable advice.Please consider this matter as urget.
    Thanks & regards,
    Tarun

    Hi Tarun
    How did u do it thru ABAP? Could you kindly explain me in detail? Have u changed any standard FM? Please explain
    Thank you in advance

  • Report painter - eliminate zero columns/rows

    Dear Experts,
    Can anyone tell me how to hide (or) remove the columns and rows contains zero values, in a report which is developed by report painter.
    Thanks
    Balu
    Edited by: balu 18 on Feb 20, 2010 11:05 AM

    Hi
    It is available to control the display treatment for column/row item with zero amount by Standard Layout.
    1. From report
    If you change this behavior online during checking report such as cost center report: S_ALR_87013611, go to menu -> Settings -> Report Layout.
    You can hide/unhide the column/rows with zero value in Tab Rows and Columns.
    2. Default setting for report execution
    As described above, this setting comes from Standard Layout.
    You can change it by transaction code GR12.
    Best regards, Takashi

  • We used to be able to sort by multiple columns/rows at once by right clicking on the header and choosing show more options-how do we do that in the new Numbers?

    We used to be able to sort by multiple columns/rows at once by right clicking on the header and choosing show more options-how do we do that in the new Numbers?  It doesn't appear anywhere.  Do I now have to sort massive tables by each column one at a time now?  Also there used to be an easier way to merge/unmerge cells without me having to go to the table menu each time.  Am I missing something?

    Multiple column sort is a missing feature in the new version.  Hopefully soon to return. You can do a multicolumn sort by sorting one at a time in reverse order of importance.
    For merging and unmerging cells, I select the cells and right click to bring up the contextual menu. Merge and unmerge are on the menu.  You could also create keyboard shortcuts for Merge Cells and Unmerge Cells in the Table menu.

  • Emailing datatable with rows determined by sessionbean properties

    Is it possible to email a datable (a link for the datatable) with rows determined by sessionbean parameters? Even after the session expires the link should work. (That means the session properties should be embeded in the link)
    Thank you very much.

    I want to email search results from a database. The search is carried out by supplying some session properties. The search results are displayed in a datatable.
    The contents of the email can be the datatable itself or a link to the datatable.
    It should be assumed when the recipient see the email the session(used to do the search and send the email) will have expired. Bu till the recipient should be able to load the datatable by clicking the link.

  • DataTable column Type

    Hi,
    I have a problem with a datatable object. The column "Qty" must have the precision that I had configured en General settigns, decimal placed, in the column "quantities", in this case 2. Its seams that I add a column to the datatable with Float type, internally takes Amounts precision, in this case 0. So I cant manage the 2 decimal in this datatable column.
    Code:
    Dim oDT As SAPbouiCOM.DataTable
    oDT.Columns.Add("Qty", SAPbobsCOM.BoFieldTypes.db_Float)
    Any Solution for this issue???
    Thanks in advance.
    Lucas

    My name is Guillermo, I'm currently working with Lucas on the same project and the problem is that based on customer requirements, "quantites" must display 2 decimal places and, "prices" and "ammounts" 0 decimal places. Having set up these values in SAP BO (through General Settings form), we use the next code to create a datatable with a column to store "quantities":
    Dim oDT As SAPbouiCOM.DataTable
    oDT.Columns.Add("Quantity", SAPbobsCOM.BoFieldTypes.db_Float)
    When using the type SAPbobsCOM.BoFieldTypes.db_Float, the values stored by the newly created column, display 0 decimal places taking, as I can only asume, the decimal places set for "ammounts" (0) not the ones set for "quantities" (2).
    We have tried the code as Daniel indicated in the response above (changing SAPbobsCOM.BoFieldTypes to SAPbouiCOM.BoFieldsType), and got the same results, data is still displayed with 0 decimals.
    Any other ideas?
    Thanks ins advance for your help.

  • How to create a datatable with row headers and column headers

    Hi,
    I am trying to create a two dimensional datatable which has both column headers and row headers. using <h:datatable> i could create a datatable with only column headers.
    Thanks in advance

    Are you saying that you want a column with only th's? You could also just apply some CSS on that specific column that its rows look like headers.

  • How to Position image in h:dataTable in Row and Column ?

    I have a code that loops from array and populate images, here is the code below
    <h:dataTable border="0" id="dataTable" columnClasses="onleft adjustImage, ontop albumDescription adjustImage" rows="0" value="#{album.allImageInAlbum}" var="name" style="height: 64px">
    <h:column>
    <h:graphicImage value="getimage?file=#{name.imageId}&email=#{name.usEmail}&albumId=#{name.id}"
    style="border: 6px"/>
    </h:column>               
    </h:dataTable>
    this code easily show me my images in one straight column, I actually want to do like 3 x 2 or 4 x 3.
    Is there anyone who can show me in a short code example?
    Thank you in advance.

    Thank you again BalusC. I used Tomahawk as you suggested and it works great
    for the future users who has the same question:
    1) put tomahawk.xxx.jar in to your WEB-INF/lib folder
    2) configure you web.xml
    3) put in your jsp <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t" %>
    this was my code:
                   <t:dataList id="dataTable" value="#{album.allImageInAlbum}" var="name">
                   <t:column>
                   <h:graphicImage value="getimage?file=#{name.imageId}&email=#{name.usEmail}&albumId=#{name.id}"
    style="border: 6px"/>
                   </t:column>
                   </t:dataList>
    Thank you again BalusC. :)
    Edited by: harddisk on Aug 15, 2008 9:16 PM

Maybe you are looking for

  • User Profile Incremental Sync does not views changes in profiles.

    User Profile Incremental Sync does not views changes in profiles. I make full sync - all ok. then I change the phone number for example, and then start incremental sync and nothing moves to AD.  All the stages of FIM sync just state 0 records to proc

  • Reading output of a system call

    Hi, It appears that java system call does not return a value in Netware OS. The same code functions flawlessly on other OS'es, eg. linux and windows. If the following code is run on a Netware (6.5), the following error is returned: External App Retur

  • NEW TLD's NOT RECOGNISED

    Hi, I have a new TLD domain name which does not contain the traditional /com extension. In fact my extension is just .media When attempting to put this into a form widget for example so that it links it appears that Adobe Muse does not recognise it a

  • Lenovo x220 Wifi stops with external monitor

    Hi. When I plug an external monitor into my X220 the WIFI seems to cease. As soon as I unplug the monitor all is fine. Any ideas? Thank you.

  • Integration with Third party Help Desk

    Hello, We need to integrate SAp solution Manager 3.2 with third party Help Desk software Like REMEDY .... So that messages updated in Remedy are updated with Solution manager and vice versa. Can we have some soltuion on that ? Deepti