List within a List

What is the most efficient way of constructing a dataTable that has a List? For Example I need to construct this table (Order List):
Order #   Products   Quantity  Status
12321     prod1         10     open
          prod2         5        
          prod3         1          
45681     prodA         7       closed
          prodB         11 Basically the orderList returns a List of Orders. Each Order has a List of Products that has to be shown. I could use a dataTable for each Products and Quantity column but I would would like to know a much cleaner/faster way
Thank you
Steve

You can just nest datatables.
Also see http://balusc.xs4all.nl/srv/dev-jep-dat.html � http://balusc.xs4all.nl/srv/dev-jep-dat.html#NestingDatatables
Basic example:
Order.javapublic class Order {
    private Long id;
    private List<Product> products;
    private String status;
    // + getters + setters
}Product.javapublic class Product {
    private String name;
    private Integer quantity;
    // + getters + setters
}JSF<h:dataTable value="#{myBean.orders}" var="order">
    <h:column><h:outputText value="#{order.id}" /></h:column>
    <h:column>
        <h:dataTable value="#{order.products}" var="product">
            <h:column><h:outputText value="#{product.name}" /></h:column>
            <h:column><h:outputText value="#{product.quantity}" /></h:column>
        </h:dataTable>
    </h:column>
    <h:column><h:outputText value="#{order.status}" /></h:column>
</h:dataTable>

Similar Messages

  • MIDlet List within a list?

    How do you make a list within a list? Can anyone give me an example on how to do it?

    cherie wrote:
    How do you make a list within a list? Can anyone give me an example on how to do it?are you trying to create a tree ?
    _list 1
    | |_list1_1
    | |_list1_2
    |_list2
    |_list3
    something like this?

  • Accesing a List within A List Using JSTL

    Hi,
    I am trying to access a property of an object within a List Object which again is in a List object using JSTL.
    List----List----Obj1----Property1 <--( I want to print this in a Table on a JSP)
    I am unable to figure out how to do it using the <c:forEach> tag.
    Thanks in advance,
    Shardul.
    Message was edited by:
    shardul.bhatt

    Hi,
    Thanks for your response. Actually I wanted a single statement to do this. Its my mistake I should have put the question in a different manner.
    Something like
    <c:out value="${requestScope.OUTER_LIST.[FIRST_INSTANCE_OF_INNER_LIST].[OBJECT].[PROPERTY]}" ></c:out>The OuterList has many InnerLists and each InnerList has many Objects. The Property of the first Object in the InnerList is what I want to print as a 'Title' of a table.
    For example: The Objects in the Inner List are UserObjects, where all the Users of a particular type are put together in an InnerList. I want to display the users of different types grouped together and the Table should have the 'User Type' as its title.
    I could do it like this
    <tr border="2" class="selectedrow">
    <td><B><font color="#2d5c3d">User Type</font></B></td>
    <td><strong><font color="#2d5c3d">
    <!---I want to remove this with a single line of code-->
    <c:forEach items="${usersByType}"   var="user" begin="0" end="0">
          <c:out value="${user.userType}"></c:out>
    </c:forEach>
    <!---I want to remove this with a single line of code-->
    </font></strong></td>But I think there has to be a better way to do it.
    BR,
    Shardul

  • How to process list within list in jsp

    Hi,
    I have to read values from list within the list in jsp. I got list of objects and I am reading the variables from it in jsp. for that I iterate through the list, read the variable from the object.
    I use
    <logic:iterate name="searchFormBean" property="policies" id="policiesList" indexId="index">
    and reading the variable like below.
    <html:hidden name="searchFormBean" property='<%= "partyId[" + index + "]" %>' />
    and I have method getPartyId(int index, String text) in searchFormBean class.
    now I have a problem that object has list variable which has to be read.
    I am not sure of how to pass both the index (index of object list and index of list within the object).
    I have method getIds(int index, int listIndex, String text)
    Please let me know how should I write code in jsp to call the above method.
    Thanks & Regards,
    Nasrin.N

    <%
    getPartyId(int index, String text);
    %>
    Nasree ..its quite confusin ur question...forget abt implementation..just tell us in detail what ur rqmt is..
    regards
    shanu

  • How to use List within javaFX(*.fx) script?

    How to use java.util.List within javaFX(*.fx) script?
    The following is my code in Java
    PDBFileReader pdbreader = new PDBFileReader();
              pdbreader.setPath("/Path/To/PDBFiles/");
              pdbreader.setParseSecStruc(true);// parse the secondary structure information from PDB file
              pdbreader.setAlignSeqRes(true);  // align SEQRES and ATOM records
              pdbreader.setAutoFetch(true);    // fetch PDB files from web if they can't be found locally
              try{
                   Structure struc = pdbreader.getStructureById(code);
                   System.out.println("The SEQRES and ATOM information is available via the chains:");
                   int modelnr = 0 ; // also is 0 if structure is an XRAY structure.
                   List<Chain> chains = struc.getChains(modelnr);
                   for (Chain cha:chains){
                        List<Group> agr = cha.getAtomGroups("amino");
                        List<Group> hgr = cha.getAtomGroups("hetatm");
                        List<Group> ngr = cha.getAtomGroups("nucleotide");
                        System.out.print("chain: >"+cha.getName()+"<");
                        System.out.print(" length SEQRES: " +cha.getLengthSeqRes());
                        System.out.print(" length ATOM: " +cha.getAtomLength());
                        System.out.print(" aminos: " +agr.size());
                        System.out.print(" hetatms: "+hgr.size());
                        System.out.println(" nucleotides: "+ngr.size()); 
              } catch (Exception e) {
                   e.printStackTrace();
              }The following is my code in JavaFX(getting errors)
    var loadbtn:SwingButton = SwingButton{
        text:"Load"
        action: function():Void{
            var pdbreader = new PDBFileReader();
            var structure = null;
            try{
                structure = pdbreader.getStructure(filepath.text);
                List<Chain> chains = structure.getChains(0);
                foreach (Chain cha in chains){
                        List < Group > agr = cha.getAtomGroups("amino");
                        List < Group > hgr = cha.getAtomGroups("hetatm");
                        List < Group > ngr = cha.getAtomGroups("nucleotide");
            } catch (e:IOException) {
                e.printStackTrace();
        };I'm using Netbeans 6.5 with JavaFX
    (PDBFileReader, Chain, Structure etc are classes from my own package, already added to the library folder under the project directory)
    Simply put, How to use List and Foreach in JavaFX?

    We can not use Java Generics syntax in JavaFX. But we can use Java Collection classes using the keyword 'as' for type-casting.
    e.g.
    import java.util.LinkedList;
    import java.util.List;
    import javafx.scene.shape.Rectangle;
    var outerlist : List = new LinkedList();
    var innerlist : List = new LinkedList();
    innerlist.add(Rectangle{
        width: 10 height:10});
    innerlist.add(Rectangle{
        width: 20 height:20});
    outerlist.add(innerlist);
    for (inner in outerlist) {
        var list : List = inner as List;
        for (element in list) {
            var rect : Rectangle = element as Rectangle;
            println("(width, height)=({rect.width}, {rect.height})");
    }

  • Select list within interactive report.

    Hello y'all,
    I have a need to develop an interactive report and am lost in how to proceed. I am asking for your help. The report requirements are as such:
    - There are 3 types of records that will be in the report
    - The is a checkbox to associate the records to a particular event.
    - If the record is of a certain value, 3 of the columns in that record have to show as select lists.
    - The records with the other 2 values should not have the select lists, just show a null in those columns.
    - The checkbox must be checked for the select lists to appear.
    - The select lists are based on a list of values. The values are populated with an existing common function used in many of the application pages.
    I am having no success in trying to get the select lists in the report. Has anyone developed an interactive report that uses select lists within the report? Is this even possible?
    I am using application Express 3.2.0.00.27. Any help that you can give is greatly appreciated. Thank you so much!
    *** Got it. It has to be a tabular report with updateable columns. ***
    Edited by: seashell on Sep 13, 2010 5:22 AM
    Edited by: seashell on Sep 13, 2010 7:07 AM

    Hi,
    I am not sure if the "equal to" condition applies to a DOM object... after all, a DOM object can be anything (any HTML element) not only a field.
    Try using a javascript expression instead, like this:
    $v('P6_IR_SELECT_LIST')=='Delete'UPDATE: Sorry, I just tested and "equal to" condition works for DOM objects... should have tested before posting!
    Luis
    Edited by: Luis Cabral on Feb 29, 2012 4:45 PM

  • TestStand crashes when a SequenceCa​ll step that counts failures within a list

    I have TestStand 4.0 and TestStand 4.1 installed on my system, as does everyone else in my department.  I am the only one with a 64bit machine and cannot execute a sequence in 4.0 that I can execute in 4.1.  Everyone else can execute the sequence in both.  The sequence generates a report and TestStand crashes when the sequence reaches a step that performs a sequence call which counts the number of failures within a list (array). 
    We are fresh out of ideas.  Any suggestions would be greatly appreciated.  If more information is needed, please ask.
    Thanks!

    When you say '64-bit machine' do you mean 64-bit Operating System?
    If so, which 64-bit operating system are you using, XP x64 or Vista x64? 
    TestStand 4.0.1f1 is only supported on Windows 2000 and XP x86.
    TestStand 4.1 is supported on Windows 2000, XP x86, Vista x86, and Vista x64.
    If you are trying to use XP x64, we have not tested it, and it is not guaranteed to work in all cases.  If you are using Vista x64, then it is expected that TestStand 4.1 will work, but TestStand 4.0.1f1 was never tested with any version of Vista, and so may not work.
    Josh W.
    Certified TestStand Architect
    Formerly blue

  • Sub Select list within the Select List!!

    Hi All,
    I want one solution, i want to have a sub select list within the select list, i mean i want to have a dropdown shown when we point a cursor on any of the Value of
    the select list. Sub select list for that value of the select list.
    Hope you all got it,Please Reply me if anybody has the solution, I am using APEX version 3.0.1.00.07
    Thanks

    Hm,
    Service Unavailable
    The proxy is currently unable to handle the request due to a (possibly) temporary error. Extended error information is:
    * Failed to forward the request to the web server at apps.oraclecorp.com:80. This may be due to a firewall configuration error or a DNS failure.
    If this situation persists, please contact your security gateway administrator.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    ------------------------------------------------------------------------------

  • Display construction type on the structure list within the work order

    I have a work order written against an equipment which has a construction type assigned to it.  When using the structure list from the components tab of the work order, the construction type does not display under the equipment in the list.  If I run the same structure list from transaction IH03, the construction type does display under the equipment.  How can I add the construction type to display on the structure list within the work order?  We are on release 4.7
    Thanks,
    Terry Gaskin

    Thanks PeteA, we know we can do that, but we are looking to get it consistent with IH03, where the construction type shows without being added to the BOM.  The construction type is listed immediately below the equipment in IH03.
    Thanks

  • Poor performance when dragging item within a list loaded with images - Flex 4

    Hi,
    I have a custom built List component that is using a TileLayout. I am using a custom itemRenderer to load images into this list from our server (in this test, 44 images rae loaded). I have enabled dragEnabled and dragMove so that I can move items around within the list. The problem comes when I start dragging an item. The dragging operation is very slow and clunky.
    When I move the mouse to drag the item, the dropIndicator does not get refreshed for a few seconds and the movement feels like my PC is lagging pretty badly. I've also noticed that during this time my CPU usage is spiking up to around 25-40%. The funny part is I can scroll the list just fine without any lag at all, but the minute I drag the application starts to lag really bad. I do have some custom dragOver code that I used to override the dragOverHandler of the list control, but the problem persists even if I take that code out. I've tried with useVirtualLayout set to both true and false and neither setting made a difference. 
    Any ideas as to what could be causing the poor performance and/or how I can go abouts fixing it?
    Thanks a lot in advance!

    Ahh, good call about the Performance profiler. I'm pretty new to the profiling thing with Flex (haven't used Builder Pro before
    the Flex 4 beta) so please forgive me
    I found some interesting things running the performance profiler but I'm not sure I understand what to make of it all. I cleared the Performance Profile data when right before I loaded the images into the list. I then moved some images around and then captured the Profiling Data (If I understand Adobe correctly, this is the correct way to capture performance information for a set of actions).
    What I found is there is a [mouseEvent] item that took 3101ms with 1 "Calls" (!!!!). When I drill down into that item to see the Method Statistics, I actually see three different Callees and no callers. The sum of the time it took the Callees to execute does not even come close to adding up to the 3101 ms (about 40ms). I'm not sure what I can make of those numbers, or if they are even meaningful. Any insight into these?
    The only other items that stand out to me are [pre-render] which has 863ms (Cumulative Time) / 639ms (Self Time), [enterFrameEvent] which has 746ms / 6ms (?!), and [tincan] (what the heck is tincan?) which has times of 521ms for both Cumulative and Self.
    Can anyone offer some insight into these numbers and maybe make some more suggestions for me? I apologize for my ignorance on these numbers - as I said, I'm new to the whole Flex profiling thing.
    Many thanks in advance!
    Edit: I just did another check, this time profiling only from the start of my drag to the end of my drop, and I still see [mouseEvent] taking almost 1000ms of Cumulative Time. However, when I double click that item to see the Method Statistics, no Callers or Callees are listed. What's causing this [mouseEvent] and how come it's taking so long?

  • External USB not recognized on my iMac (intel) in Disk Utility, Finder as well as in Terminal diskutil list but is listed in System Profile, which includes the location ID of 0xfa400000 / 5.  Can the location ID be used to restore USB identity ?

    My 1TB Seagate external USB not recognized by my iMac (intel) in Disk Utility, nor in Finder as well as in Terminal "diskutil list" but it is listed within the System Profile, which includes the location ID of 0xfa400000 / 5.  Can the location ID be used to restore the identity of my external USB ?

    Hello JNotorious,
    Thank you for using Apple Support Communities.
    For more information, take a look at:
    USB and FireWire Quick Assist
    http://support.apple.com/kb/ht1151
    Have a nice day,
    Mario

  • Numbered List and Bulleted List w/ Custom Style Sheet

    Hi,
    I am a new user to RoboHelp 7, and must say I find it useful
    but also painful to use. Currently I’m trying to solve
    something that feels like a bug in RoboHelp 7, but before I give in
    and accept defeat I wanted to check with the forum.
    I have FrameMaker 8, and import the files to RH where I use
    them to create WebHelp projects.
    Here’s a short procedure:
    1. I Import my files with a predefined style sheet matching
    the FM styles.
    2. I also check the Convert to HTML list option and set all
    numbering and bullet styles to User defined.
    - After import RH does the usual thing and creates a bunch
    of style sheets on its own
    3. I select all the files from the Topic List pod and apply a
    new custom style sheet. This enables me to have one style sheet for
    all the HTML files with the right layout and formatting
    4. I generate the output, and RH uses the new style sheet
    reference
    The resulting HTML files shows that the output is not the
    same as the generated HTML shown in RH’s HTML editor view
    - Editor view: <li class=”style”>
    - Browser view: <li>
    6. If I make a change (e.g. add a space) and save the HTML
    file, and generate the project again the HTML is correct in the
    browser
    One could argue that it’s not a big problem; however,
    with a large project this is starting to look more like a nightmare
    Does anyone know of this problem, and if so can it be fixed?
    Kind regards,
    Jon

    Is this the time when I get really angry at Adobe for creating the worst FrameMaker/RoboHelp integration ever? No! However, I must admit that I'm amazed that they are unable to solve an important feature as conversion of lists from a FrameMaker document to a RoboHelp WebHelp project. When I say conversion I mean a clean conversion with minimal interference from RoboHelp that allows me to use CSS to its full extent.
    Here's the problem, and this was also the problem with RoboHelp 7 and FrameMaker 8. BTW, I use standalone versions (not TCS 1 or 2).
    Figures: First image depicts FrameMaker 9's Paragraph Designer and the Autonumber format for a paragraph named VizNumbered. Second image depicts the RoboHelp 8's conversion setting.
    FrameMaker uses Autonumbering in front of paragraphs to create lists. This means that you in RoboHelp need to manage two formats, the autonumber and the paragraph style.
    RoboHelp does of course not (by default) use Autonumbering in front of paragraphs because a RoboHelp WebHelp project is HTML based, and list tags in HTML can perfectly handle any formatting of text etc.
    RoboHelp will convert, when "Convert Autonumber to HTML List" is selected, the Autonumber in FrameMaker to a list tag (LI). By default this will generate a list with a lot of margin, font and other CSS properties that tries to simulate the way the list is laid out in the FrameMaker document. In addition to the list tags it will convert the FrameMaker paragraph to a P tag which it inserts within a list tag. The issue you will experience with this is that indentations with the paragraph tag does not align properly between line 1 and 2. At the same time the WebHelp project will not look the same in IE, Firefox or Chrome. That is, Chrome and Firefox will look the same, and IE different. IE has the WYSIWYG feel, but it does not comply well with W3C standards (i.e. using P tags enclosed by LI tags is not a good idea ...).
    Selecting "Convert Autonumber to RoboHelp List" does something similar, but is not recommended at all!
    So, here's the big question. How can I make sure RoboHelp understands that I ONLY need to define a list tag with a CSS class attribute attached to it?
    Today I basically only get the following:
    <li><p class=""></p></li> or,
    <p class=""></p>
    What I want is the following:
    <li class=""></li>
    Can this be solved with today's versions, can anyone help me, or do I have to wait for the Adobe development team to realize this and to fix it?

  • Pick list and pull list

    Dear all
    1.Can any one explain the difference between Pick list(CO27)  and  Pull list(MF60) with a simple example.In which scenario we go for this pick and pull list
    2.What is Production storage location for components and finished product.How it is different from genereal storage location

    Hi,
    PIck List:
    Pick List is a document by which you carry out Goods Issue for the required materials from Storage location by Production order wise , material wise etc.By pick list you generate reservation for the particular materials and then issue them against that reservation for shop floor manufacturing.
    You can print the list, assemble the requested materials from the storage location accordingly, and post the goods issue via the pick list.
    Pull List
    Purpose
    The pull list controls the in-house flow of material for supplying production with materials. The system assumes that the components required for production have already been produced in-house or procured externally and are now available to be transferred from their current storage location or bin to the production storage location.
    The pull list checks the stock situation at the production storage location and calculates the quantities of missing parts. Replenishment elements can be created for these missing parts. Components can be staged via direct stock transfer or using stock transfer reservations. Replenishment can also be triggered by setting a kanban to u2018emptyu2019 or creating transfer requirements in Warehouse Management.
    Integration
    The pull list is an integral part of repetitive manufacturing and shop floor control.
    The basis of replenishment planning is MRP - the component requirements are calculated in the MRP run. The system takes requirements from run schedule quantities, production order reservations and manual reservations into account.
    Depending on the environment, replenishment can consist either of direct stock transfer, stock transfer reservations, kanbans or transfer requirements, which are then processed in the appropriate module.
    Features
    You can access the pull list by material to be produced (that is, by assembly), by component, production line or MRP controller, amongst others.
    The pull list calculates the missing parts by checking which requirements fall within a certain period of time, which stocks are available in the production storage location, and which replenishment quantities have already been initiated via the pull list.
    You can also use the pull list to create replenishment elements for the missing parts. The system first creates a replenishment proposal for the missing parts. The system can post this proposal as a replenishment element (stock transfer reservation, kanban or WM), or carry out a direct stock transfer.
    Constraints
    It is not the primary task of the pull list to determine the location of the required components. The only exception is in the direct stock transfer procedure where you have to enter a replenishment storage location or the system has to determine a replenishment storage location via stock determination.
    The pull list is primarily responsible for planning material staging (calculating missing parts and initiating replenishment) by creating a work list in the form of replenishment elements. The actual staging is carried out by a warehouse clerk, for example, and is supported by transactions which are carried out subsequently, based on the replenishment elements.
    Issue Storage Location
    In the case of a material produced in-house, this is the key of the storage location that is copied to the planned order, production order, or run schedule quantity.
    If the material is a component, it is the issuing storage location to which a backflush is posted.
    If the material is produced, it is the receiving storage location to which the receipt of the material is posted.
    Procedure
    You specify the receiving storage location for repetitive manufacturing in the production version for the material master record.
    Hope this helps.
    Edited by: surendra patil on Dec 29, 2008 1:22 PM

  • The podcasts that I have subscribed to via itunes have stopped downloading/syncing. I see new podcasts on the podcasts website but they are not listed on my list of itunes podcasts, nor do they show up when I sync to an iPod

    the podcasts that I have subscribed to via itunes have stopped downloading/syncing. I see new podcasts on the podcasts website but they are not listed on my list of itunes podcasts, nor do they show up when I sync to an iPod.   any ideas, thanks joanlvh

    Have you read for possible solutions over in the "More Like This" thread over here?----------------------->
    Check out the following KB Articles:  http://support.apple.com/kb/HT1329 How to use your iPod to move your music to a new computer
    http://support.apple.com/kb/HT4527 iTunes: How to move your music to a new computer

  • How do i add a reminders list (to do list?) like there us d to be on the right hand side of iCal?

    How do i add a reminders list (to do list?) like there used to be on the right hand side of iCal?

    Sorry - I linked the article for iOS Reminders. You are posting in the Mountain Lion forum, but you have listed the OS X for Snow Leopard. What OS X are you running?
    Here is the support article for all devices and computers using Reminders:
    iCloud: Calendar Events, Reminders, To Dos, and Tasks behavior differs by application - Apple Support
    GB

Maybe you are looking for

  • HT1178 I have failed to Map the Airport Time Capsule to my windows 7 HP laptop as a mapped drive, error message is "access denied"

    I have failed to Map the Airport time capsule to my windows 7 HP laptop, i followed all the installation steps and i get the error message "Access denied, you do not have permission to access this device, contact network administrator"

  • TCURM in target client empty after Client Copy

    Hi Experts, Has anyone encountered situation whereby TCURM does not contain a record for the target client after Client Copy process is completed? Is this a feature or bug? Regards

  • Problem: ERROR_BAD_NETPATH

    Hello All. System: - Tarantella 3.4.2 + Firewall Traversal - Red Hat 9.0 I try to use "Client Drive Mapping", but I found some problems with this feature. I read this Howto to install and configure: http://www.tarantella.com/support/documentation/sgd

  • Size and shape of screen?

    Where can I download an outline of the screen for my curve?  I have a large screen saver sheet and need a template so I can cut it to the correct shape and lay it on my screen.  Looking for file I can down load and print.  Thanks Art

  • My macbook won't boot or turn on?

    My macbook won't start up properly> Apple appears and spinner spins forever but doesn't complete starting process.Light doesn't come on.