Dynamic Table with two columns

Hi!
i have to create a Dynamic Table with two columns having 5-5 links each with some text...... three links r based on certain conditions....they r visible only if condition is true...
if the links r not visible in this case another links take it's place & fill the cell.
links/text is coming from database.
i am using Struts with JSP IDE netbeans
Please help me
BuntyIndia

i wanna do something like this
<div class="box_d box_margin_right">
          <ul class="anchor-bullet">
          <c:forEach items="${data.faqList}" var="item" varStatus="status"
                    begin="0" end="${data.faqListSize/2-1}">
                    <li>${item}</li>
               </c:forEach>
          </ul>
          </div>
          <div class="box_d">
          <ul class="anchor-bullet">
          <c:forEach items="${data.faqList}" var="item" varStatus="status"
                    begin="${data.faqListSize/2}" end="${data.faqListSize}">
                    <li>${item}</li>
               </c:forEach>
          </ul>
          </div>
wanna divide table in two columns....if one link got off due to condition other one take it's position...
I have created a textorderedlist
Bunty

Similar Messages

  • Populating a table with two columns using a custom bean

    hello,
    Can someone provide me or give me a link to an example of populating a table (with two columns) with a custom bean?
    thank you
    fwu

    1)create a java class
    2)have a list as a class variable
    3) populate the list in the constructor..
    4) map the values in the af:table
    //Employee pojo
    public class Employee {
        public Employee() {
            super();
        private String empName;
        private String empManager;
        private String job;
        public void setEmpName(String empName) {
            this.empName = empName;
        public String getEmpName() {
            return empName;
        public void setEmpManager(String empManager) {
            this.empManager = empManager;
        public String getEmpManager() {
            return empManager;
        public void setJob(String job) {
            this.job = job;
        public String getJob() {
            return job;
    //maanged bean
    public class Bean {
    private List<Employee> employee;
        public Bean() {
            super();
            employee = new ArrayList<Employee>();
          Employee e1 = new Employee();
          e1.setEmpName("xxxxx");
          e1.setEmpManager("xxxxxxxx");
          e1.setJob("xxxxxxx");
          Employee e2 = new Employee();
          e2.setEmpName("yyyyyyy");
          e2.setEmpManager("yyyyyyy");
          e2.setJob("yyyyyyt");
          Employee e3 = new Employee();
          e3.setEmpName("zzzzzz");
          e3.setEmpManager("zzzzzzz");
          e3.setJob("zzzzzzzz");
          employee.add(e1);
          employee.add(e2);
          employee.add(e3);
          employee.add(e4);
        public void setEmployee(List<Employee> employee) {
            this.employee = employee;
        public List<Employee> getEmployee() {
            return employee;
        }in the table map like
    <af:table value="#{Bean.employee}" var="row" rowBandingInterval="0"
                        id="t1">
    <af:column headerText="Employee Name" id="c1">
                  <af:inputText value="#{row.empName}" id="it5"/>
                </af:column>
                <af:column headerText="Employee Manager" id="c2">
                  <af:inputText value="#{row.empManager}" id="it2"/>
                </af:column>
    </af:table>

  • How to define form within a table with two columns?

    Hallo,
    i want to design a form with two columns side by side.
    My way is to define a table within the form:
    <af:panelForm>
    <afh:tableLayout width="100%">
    <afh:rowLayout halign="left">
    <af:inputText value="#{bindings.StsNr.inputValue}"
    label="#{bindings.StsNr.label}"
    required="#{bindings.StsNr.mandatory}"
    columns="#{bindings.StsNr.displayWidth}"
    readOnly="true">
    <af:validator binding="#{bindings.StsNr.validator}"/>
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.StsNr.format}"/>
    </af:inputText>
    <af:selectOneChoice value="#{bindings.StammsaetzeStsEmpfangsart.inputValue}"
    label="#{bindings.StammsaetzeStsEmpfangsart.label}"
    tip="Brief, Fax, Mail">
    <f:selectItems value="#{bindings.StammsaetzeStsEmpfangsart.items}"/>
    </af:selectOneChoice>
    </afh:rowLayout>
    </afh:tableLayout>
    </af:panelForm>
    Is there a better way to do it?

    Hi reiasmus ,
    Try <af:panelForm row="X">, that specifies the number of fields by columns. If you have ten fields and you fix row="5", you will obtain two columns with 5 rows on each.
    Regards,
    Tif

  • Sort a table with two columns based on the first

    I have a powershell table with the columns 'Used Perc' and 'ID'.
    This was formed from the following 
    $a = @{Expression={[System.Math]::Round(($_.nUsed_Avg/$_.nSize)*100,1)};Label="Used Perc";width=25}, @{Expression={$_.nStatisticalDiskIdentificationID};Label="ID";width=15}
    $GLOBAL:CSV2 = Import-CSV $STATDISKOUT | Format-Table $a
    Before this, the file $STATDISKOUT had the columns 'nUsed_Avg', 'nSize', and 'nStatisticalIdentificationID'.
    My question is, how would I sort the new table based on 'Used Perc' but keeping the corresponding 'ID' column lined up to the right value?

    We use a select statement to reorder columns and recalculate,  The formatters just go at the end to adjust the display.
    Import-Csv <file> | select <column order format> | Format-Table
    or you can do it in the table:
    Import-Csv <file | Format-Table -Properties ,f1.,f2.,,f3....Here is how to inset a sort inline:
    $a=@{
    L='ID';
    E={$_.nStatisticalDiskIdentificationID};
    L='Used Perc';
    E={[System.Math]::Round(($_.nUsed_Avg/$_.nSize)*100,1)}
    Import-CSV $STATDISKOUT | Select $a | Sort 'Used Perc' | Format-Table -Auto
    ¯\_(ツ)_/¯

  • Dynamic table  with  multilevel  column header

    Hi all ,
    Can u please tell me how to create dynamic internal table and display which has two level column header using alv.
    For example : |  amount   | year | Month     |
    in $
    in #
    oct
    nov
    Thanks in advance ,
    SA

    Hi SA,
    For your first question - Creating dynamic table refer code below...
    PARAMETERS: p_input TYPE i OBLIGATORY.
    START-OF-SELECTION.
    DATA: v_fieldname TYPE char30.
    DATA: v_char TYPE numc4.
    DATA: it_fldcat TYPE lvc_t_fcat.
    DATA: wa_it_fldcat LIKE LINE OF it_fldcat.
    DATA: gp_table TYPE REF TO data.
    FIELD-SYMBOLS: <gt_table> TYPE table.
    DO p_input TIMES.
    v_fieldname = 'COL'.
    v_char = sy-index.
    CONCATENATE v_fieldname v_char INTO v_fieldname.
    CONDENSE v_fieldname.
    CLEAR wa_it_fldcat.
    wa_it_fldcat-fieldname = v_fieldname.
    wa_it_fldcat-datatype = 'CHAR'.
    wa_it_fldcat-outputlen = 5.
    wa_it_fldcat-intlen = 5.
    APPEND wa_it_fldcat TO it_fldcat .
    ENDDO.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
    EXPORTING it_fieldcatalog = it_fldcat
    IMPORTING ep_table = gp_table.
    ASSIGN gp_table->* TO <gt_table>.
    Now you can use <gt_table> ..
    2. It is not possible to have multiple format column for ALV..
    Hope this solves ur prob..
    Enjoy SAP.
    Pankaj Singh.

  • Dynamic table with dynamic drop-down list values

    Hi,
    I need to display a dynamic table with 2 columns on an interactive form.
    My Context is defined as below:
    Root
    StudentData     0..n
    StudentName
    StudentCourses     0..n
    Text
    Value
    The 1st column should display student name, 2nd column should display student courses. The courses will be different for each student. I populated the context properly. I checked it by printing them. My DDL is bound to "Student Courses".
    When there is one row -> The DDL is populated with the courses of student 1 (as there is only one).
    When there are more rows -> The DDLs for all the students are populated with all the courses of all the students.
    I want to see the data populated like:
    TEXTFIELD    DROP-DOWN LIST
    Student 1------Student1-Course1
    Student1-Course2
    Student1-Course3
    Student 2------Student2-Course1
    Student2-Course2
    Student2-Course3
    I tried to do this in plain web dynpro using SVS.. it is also working similarly.
    I have set the singleton property of nodes "StudentData" and "StudentCourses" to false.
    Could any one tell me where I am going wrong?
    Thanks
    Ram

    Ram,
    I'm not sure how much this will help, but I know I had the same problem as you when I tried to get a similar thing working, but I can't remember which of the many changes I made fixed the problem, so I'll just show you my code and perhaps you can see if anything is different than yours.
    Here's where I'm creating my dropdown - in my case EastNew_RegOut is the same as your StudentData, and RateTypeDropValues is the same as your StudentCourses (the comments in the code are not meant to sound bossy to you, this is actually an example piece of code that other developers in my company "steal", so I have to put very specific instructions in there!):
    int nodeSize = wdContext.nodeEastNew_RegOut().size();
    for (int i = 0; i < nodeSize; i++) {
         //create an element called "table", that's the element at i.  So, basically it's a row.  Maybe I should have
         //called it "row" instead of table.
         IPublicDeviceExchange.IEastNew_RegOutElement table = (IPublicDeviceExchange.IEastNew_RegOutElement)wdContext.nodeEastNew_RegOut().getElementAt(i);
         //this line of code just executes an rfc that finds out what rates need to be in the dropdown for this particular row
         executeRateTypeDropdown(rateCategory, table.getNum(), wdContext.currentEastNew_MeterOutElement().getReggrp());
         //clear out what's already in there before we re-populate it.
         table.nodeRateTypeDropValues().invalidate();
         //now, I'm looping through all the values in the *actual* rate type dropdown (the one that's an RFC, populated by the above "execute" method)
         for (int j = 0; j < wdContext.nodeEastRatetype_DropdownOut().size(); j++) {
              //for each element in the *actual* Rate type dropdown, I'm going to create an element in my node that I created
              //and set the values from the *actual* one as the values in my node.
                        IPublicDeviceExchange.IRateTypeDropValuesElement element = wdContext.createRateTypeDropValuesElement();
              IPublicDeviceExchange.IEastRatetype_DropdownOutElement rateTypeOut = (IPublicDeviceExchange.IEastRatetype_DropdownOutElement)wdContext.nodeEastRatetype_DropdownOut().getElementAt(j);
              element.setText(rateTypeOut.getText());
              element.setValue(rateTypeOut.getRatetype());
              //here's another key - notice how I don't say wdContext.nodeRateTypeDropValues() - it's the one that's
              //directly off that table I created earlier - the thing that's essentially a row in my newReg table.
              //So, what I'm doing here is adding that new element I created to the dropdown FOR THAT ROW!               
              //(btw, if you're trying to duplicate this, and this method does not exist for your "table" object, it's
              //probably because you didn't listen to me above and you didn't create your node with the singleton property
              //set to false.)
              table.nodeRateTypeDropValues().addElement(element);
    As for my layout... my table is bound to the EastNew_RegOut node, and the column with the dropdown is bound to RateTypeDropValues.Value  (that's probably obvious, but there you have it anyway)
    Finally, in my context, EastNew_RegOut is singleton = true (I was surprised about this, actually, I would have assumed it was false) with a selection of 0..1 and RateTypeDropValues has singleton set to false with a selection of 0..1
    I hope that helps to some degree!
    Jennifer

  • Dynamic Table with Random Records

    What I am trying to do is select random records from a table
    and display them in a dynamic table with max columns set to 3 and
    the 4th record to be on a new row. Below is what I have right now
    and it works to randomly pick records but has no function to set
    columns in a table. If there is an easier way feel free to let me
    know. I have tried various ways to do this but none seem to work.
    <CFQUERY NAME="getItems" DATASOURCE="absi">
    SELECT catfit.*, modcats.*, prodmat.*, prod.* FROM catfit,
    modcats,
    prodmat, prod WHERE prodmat.prodid=catfit.prodid And
    catfit.catid=modcats.catid
    ORDER BY modl ASC </cfquery>
    <cfif getItems.recordCount>
    <cfset showNum = 3>
    <cfif showNum gt getItems.recordCount>
    <cfset showNum = getItems.recordCount>
    </cfif>
    <cfset itemList = "">
    <cfloop from="1" to="#getItems.recordCount#"
    index="i">
    <cfset itemList = ListAppend(itemList, i)>
    </cfloop>
    <cfset randomItems = "">
    <cfset itemCount = ListLen(itemList)>
    <cfloop from="1" to="#itemCount#" index="i">
    <cfset random = ListGetAt(itemList, RandRange(1,
    itemCount))>
    <cfset randomItems = ListAppend(randomItems, random)>
    <cfset itemList = ListDeleteAt(itemList,
    ListFind(itemList, random))>
    <cfset itemCount = ListLen(itemList)>
    </cfloop>
    <cfloop from="1" to="#showNum#" index="i">
    <cfoutput>
    <table width="205" border="0" align="left"
    cellpadding="0" cellspacing="0">
    <tr>
    <td width="235" height="116"> <div
    align="center"><img
    src="../Products/ProductPictures/#getitems.pic[ListGetAt(randomItems,
    i)]#" width="100"></div></td>
    </tr>
    <tr>
    <td
    class="ProdTitle">#getitems.brand[ListGetAt(randomItems,
    i)]# #getitems.modl[ListGetAt(randomItems, i)]#</td>
    </tr>
    <tr>
    <td
    class="paragraph">$#getitems.prc[ListGetAt(randomItems,
    i)]#</td>
    </tr>
    <tr>
    <td><A
    href="../Products/details.cfm?prodid=#getItems.prodid[ListGetAt(randomItems,
    i)]#" class="linkcontact">more
    info</a></td>
    </tr>
    <tr>
    <td> </td>
    </tr>
    </table>
    </cfoutput>
    </cfloop>
    </cfif>

    To start a new row after 3 records, do something like this.
    <table>
    <tr>
    <cfoutput query="something">
    <td>#data#<td>
    <cfif currentrow mod 3 is 0>
    </tr><tr>
    </cfoutput>
    </tr>
    </table>
    You should also know that your approach is very inefficient
    in that you are bringing in to cold fusion more data than you need.
    First of all you are selecting every field from 3 tables when you
    don't appear to be using all of them. Second, you are selecting
    every record and you only want to use 3. There are better ways out
    there, but they are db specific and you did not say what you are
    using.

  • How can i build table with two user name columne  ?

    How can I build view with two columns for user name ( one create and the other
    Can change also ) 
    And to display full name ( the user name is the key but not display  ) ?

    Hi,
    Creating View
    •     From initial screen of data dictionary(T.Code: SE11), enter the name of object i.e. view.
    •     Select view radio button and click on the push button.
    •     Dialog box is displayed for types of views.
    •     Select the view type.
    •     On the next screen, you have to pass following parameters.
    •     Short text
    •     In the table box you need to enter the table names, which are to be related.
    •     In join table box you need to join the two tables.
    •     Click on the TABFIELD. System displays the dialog box for all the table fields and user can select the fields from this screen. These fields are displayed in the view fields box.
    •     Save and Activate: When the view is activated, view is automatically created in the underlying database system. As long as the table exists in the database, the view also exists (Unless you delete it).
    Regards,
    Bhaskar

  • Pivot table with variables columns

    I need a helo to pivot table with variable columns,
    I have a pivot table :
    SELECT a.*
    FROM (SELECT codigo_aluno,nome_aluno , id_curso,dia FROM c_frequencia where dia like '201308%') PIVOT (sum(null)   FOR dia IN ('20130805' ,'20130812','20130819','20130826')) a
    but I need to run the select with values for dia , getting from a other table :
    SELECT a.*
    FROM (SELECT codigo_aluno,nome_aluno , id_curso,dia FROM c_frequencia where dia like '201308%') PIVOT (sum(null)   FOR dia IN (
    select dia from v_dia_mes )) a
    thank you

    The correct answer should be "Use the Pivoted Report Region Plugin".
    But, as far as I know, nobody has created/posted that type of APEX plugin.
    You may have to use a Basic Report (not an IR) so that you can use "Function returning SELECT" for your Source.
    You would need two functions:
    One that dynamically generates the Column Names
    One that dynamically generates the SELECT statement
    These should be in a PL/SQL Package so that the later can call the former to ensure that the column data matches the column names.
    i.e. -- no 'SELECT *'
    MK

  • How to center title text and table across two columns

    Hello,
    I want to be able to center a table and its title across a two column page. The pages where I want to do this contain text in both columns or text in the left column and graphics in the right. On the same pages as the text and graphics, I'd like to center, across both columns, a table with a title. What is the best way to do this?
    If I insert the table in the left column, I can size it to fit over both columns but I can't type directly into the cells that cover the right column (I can type in the cells covering the right column if I Tab to them but it's tedious and doesn't seem right). With the table's title, I've tried using the Across All Columns paragraph setting, but the text stays in the column the paragraph marker is in.
    We are using Frame 8 on Windows XP Professional. The Master pages are Right and Left pages that are set up with two columns, both tagged as A with the Autoconnect feature on so that the text flows from the bottom of the left column to the top of the right.
    Please let me know what you think.
    Thanks,
    Tim

    Yes, equal-sized columns. No, they're always equal. And that answers
    David's question: you're using two frames because you want unequal columns.
    Frame's paragraph-level column controls only work on columns made by
    dividing a single frame into two or more columns. So you're back to
    square one: you need two frames because your columns are unequal; you
    need one frame so you can span columns.
    Another possibility is that you might set up your document with a
    sidehead column, but I hesitate to recommend this because I still can't
    quite envision what your layout looks like. Any chance you can post a
    PDF somewhere?
    Kenneth Benson
    Pegasus Type, Inc.
    www.pegtype.com

  • Dynamic table with drop down lists

    I have a Dynamic table with a header row, Section and footer row.
    Section has the following cells(columns): Cell1 (drop down with locations), button (to remove row), CCode (Color Code RAL), CName (color name).
    I'm starting with 1 row.
    now what I want to do is, when they select in CCode e.g. RAL 1003 (rawValue "1") then in CName the name "signal yellow" (rawValue "1") should appear.
    I'm using javascript
    My first problem is how do I know which value is chosen, because this isn't working:
    if  (this.rawValue == 1)
    xfa.host.messageBox('Today')
    and second how do I set the value in CName
    because this only sets it in the first CName cell:
    xfa.form.DataSheet.TechnicalInformation.Markings.THatchPatterns.Section.CName.rawValue = '1';
    Please help me, I'm totally lost

    solved the problem, instead on change event put script on exit event.
    and the following line does the trick:
    xfa.resolveNode("THatchPatterns.Section[" + this.parent.index + "]").CCode.rawValue = this.rawValue

  • Table with frozen columns

    In a recent project I've had the need of a Java Swing table with frozen columns.
    After a long research at the Swing forum at java.sun.org and google I found out that
    1. Currently there is no proper Open Source solution
    2. All the postings at sun are good concepts, but far away from solutions
    3. The only (for me )acceptable commercial solution is the JCTable from Quest (formerly KGroup)
    Since I want to have full control over the source code of the table, I decided to collect all the tips from this forums and write my own table.
    Here is the my first result:
    http://jroller.com/resources/kriede/CoolTable.java
    The main idea is to have two tables, one for the locked columns (=fixed columns = frozen columns) and one for the scrollable columns. With all the tips from this forum it was more or less a puzzle to make it work pretty. The next task will be to provide a JTable-like interface, meaning to write delegate/adapter methods to the API of the two nested JTable instances.

    The FixedColumnExample from the link that you provided doesn't work with JDK 1.3 or higher.
    Anyway, putting a seperate table for the fixed columns into the row header is the first step to solve the problem of fixed columns.
    The next problem is to synchonize the scrolling behaviour of the two tables. The FixedColumnExample tries to do it by overwriting the valueChange method (maybe this was working with JDK 1.8), but with JDK 1.2 or higher it is recommended to use ChangeListeners. That's what I am doing, as also described here: http://www.chka.de/swing/components/JScrollPane-bugfix.html.
    Another problem is navigation with the tab or arrow keys: The default actions for those events move the selection only within one JTable. It would be nicer, if e.g. the tab key moves the selection within one row across both, the fixed and the scrollable columns.
    Those problems and some more are solved in the CoolTable sample:
    http://jroller.com/resources/kriede/CoolTable.java
    Please try it out and send comments.

  • Exporting Table with CLOB Columns

    Hello All,
    I am trying to export table with clob columns with no luck. It errors saying EXP-00011TABLE do not exist.
    I can query the table and the owner is same as what i am exporting it from.
    Please let me know.

    An 8.0.6 client definitely changes things. Other posters have already posted links to information on what versions of exp and imp can be used to move data between versions.
    I will just add that if you were using a client to do the export then if the client version is less than the target database version you can upgrade the client or better yet if possilbe use the target database export utility to perform the export.
    I will not criticize the existance of an 8.0.6 system as we had a parent company dump a brand new 8.0.3 application on us less than two years ago. We have since been allowed to update the database and pro*c modules to 9.2.0.6.
    If the target database is really 8.0.3 then I suggest you consider using dbms_metadata to generate the DDL, if needed, and SQLPlus to extact the data into delimited files that you can then reload via sqlldr. This would allow you to move the data with some potential adjustments for any 10g only features in the code.
    HTH -- Mark D Powell --

  • Dynamic Table with repeating Subform

    Hello,
    I am maiking a form which has a Dynamic Table with a repeating Subform.  The repeating subform has a dropdown list field which has three options for the user to pic.  "LABOR", "EQUIPT.", & "MATL."
    The way I want the form to work is the user will choose which item they want to add to the form with the dropdown list.  Whatever amount they put into the "Amount" column will go to the corresponding total "LABORTotal", "EQUIPTTotal", & "MATLTotal"
    The repeating Subform is basically the Row1, but I have the table split up into subforms because of issues I had eariler with the form.  The repeating subform title is "detail". 
    I cannot get the sums for the 3 items to go into the corresponding totals field.  This is the script that I have for the labor total field:
    form1.total.LABORTotal::calculate - (JavaScript, client)
    var nAmount = xfa.resolveNodes("detail[*].Table1.Row1.AMOUNT");
    var nItem = xfa.resolveNodes("detail[*].Table1.Row1.ITEM");
    var nSum = 0;
    for (var i=0; i<nAmount.length; i++)
        if (nItem.item[i].rawValue == "LABOR")
        nSum = nSum + nAmount.item(i).rawValue;
    This.rawValue = nSum;
    I am not familiar with loop scripting or var scripting so I know I am getting it wrong somewhere. 
    I would greatly appreciate any help!
    Thanks

    Okay,
    Here is your form back to you: https://acrobat.com/#d=IA67zcTBrWlnpcYS234*XQ.
    The issue wasn't the script. If you select the dropdown and go to the Object > Binding palette, you will see you had ticked "Specify values" and these were set to 1, 2 and 3.
    This meant that if the user selected LABOR, the value of the dropdown was "1" and NOT "LABOR". This was throwing the if statement.
    I deselected the specify values and it worked as expected.
    Hope that helps,
    Niall

  • Dynamic Table with references

    Hello everybody,
    im tried to create a dynamic table with cl_alv_table_create=>create_dynamic_table, but that doesnt work for the table i need. I need a table with a changing number of columns of type "type ref to CL_DD_INPUT_ELEMENT", but the fieldcat only takes normal Data-Types.
    So my question is, is there any way to create a dynamic table or structure with components of type ref to CL_DD_INPUT_ELEMENT?
    Thank you very much for any help.
    Cheers

    I generally use Factory methods of RTTS classes to create dynamic tables. Check my reply (Step 1) in this thread getting column headers dynamically from input parameters in alv..

Maybe you are looking for

  • Saving date & time in DataBase

    Hi All, I want to save Date & Time in Database. But only Date is saving in Database but time is not saving in Databse. In my entity i am mapping my databse date column as, @Column(name = "LAST_UPDATE_DATE") @Temporal(TemporalType.DATE) private Date l

  • Condition Pricing Date is Diff. from PO Creation date

    Hi, We have created a PO 1100041212 on dtd. 05.05.2011. In PO Conditions tab, i have a field in the detail view ' Condition Pricing Date'. For Condition type P001, it is not showing the PO date. (mostly cases has the same date of PO Creation date) Co

  • Where can i buy replacement parts?

    hello, i lost the battery cover of my msi megastick 128mb. where can i buy a new battery cover? thank you!

  • How to terminate the running query for a report?

    Hi, When I run a report, the SQL query takes too long. This causes an overload on database. How do I stop query from running after some time?

  • Issue while saving Purchase Order

    Dear all I am trying to save a Purchase order, the taxes in Purchase order -> Invoice -> Taxes are not getting populated corectly. Is there any user exit/Badi to populate the same. Thanks in advance. Regards Dinesh