How to display an Array of ints in an Array of TextFields

I'm trying to create an array of textfield's, and then create an array of ints and display one of those ints in each textfield. Can anyone please help me?

Yea after you create the array of textfields and ints, do a for loop with textfield.length limit.
for(int i = 0; i < textfield.length; i++){
look in the JTextField API for how to put int into
a text. I know, but if this is for a class, you have
figure it out. (You might have to use the Integer object to convert it to a string
I hope this helps. If you still can't get it, post some code and I'm sure someone will help you through it.
gl
kimoS

Similar Messages

  • How to Display string array in jsp page using netui-data:repeater tag ??

    hi,
    I am trying to display a string array in a table using the netui-data:repeater tag.
    I have to use a page flow controller Array(1 Dimensional) to be displayed in the jsp.
    Can any one tell me how to print the array in a table of 3rows & 5 columns.
    Here is the code on which I am crrently working on.
    <netui-data:repeater dataSource="{pageFlow.strWorkObject_Array}">
    <netui-data:repeaterHeader>
    <table cellpadding="4" border="1" class="tablebody">
    </netui-data:repeaterHeader>
    <netui-data:repeaterItem>
    <tr>
    <td><netui:label value="{container.item}" >
    </netui:label></td>
    <td><netui:label value="{container.item}">
    </netui:label></td>
    <td><netui:label value="{container.item}">
    </netui:label></td>
    </tr>
    </netui-data:repeaterItem>
    <netui-data:repeaterFooter>
    </table>
    </netui-data:repeaterFooter>
    </netui-data:repeater>

    weblogic.developer.interest.workshop
    Mansoor Naseem wrote:
    I would like to know where the pageflow newsgroup is.
    These are all the groups in weblogic.developer.interest:
    weblogic.developer.interest.60beta.* (5 groups) weblogic.developer.interest.management
    weblogic.developer.interest.61beta.* (2 groups) weblogic.developer.interest.misc
    weblogic.developer.interest.clustering.* (1 group) weblogic.developer.interest.performance
    weblogic.developer.interest.commerce weblogic.developer.interest.personalization
    weblogic.developer.interest.ejb.* (3 groups) weblogic.developer.interest.portal
    weblogic.developer.interest.environment weblogic.developer.interest.rmi-iiop
    weblogic.developer.interest.jdbc weblogic.developer.interest.security
    weblogic.developer.interest.jms weblogic.developer.interest.servlet
    weblogic.developer.interest.jndi weblogic.developer.interest.tools
    weblogic.developer.interest.jsp weblogic.developer.interest.weblogicenterprise
    MN

  • How to display an Array in a Tree

    Hi everyone !
    i have an Array of simple objects filled from my DB, and i
    want to display it in a tree <mx:Tree>
    do i have to convert the Array into a XMLList first of all?
    and how???
    if not, please anyone can help realising this ???
    thank you ! :D

    Your array will need to be objects so you can tell the tree
    what children fields are. From the FB help sys:

  • How to display an array in a VB form

    I am new to Measurement Studio. This could be a silly question.
    I am so used to the front panel in Labview where you can have control/indicator arrays. You can expand an array to see several values at the same time. Plus you have an index display to scroll.
    Is there any similar feature in Measurement Studio for Visual Basic or Visual C? If not, why not.
    cheers

    No, there isn't currently a tabular or array control provided with Measurement Studio. There are a few reasons for this. First off, remember, LabVIEW is a graphical language, there isn't anything that isn't a control or indicator on a front panel. The array control in LabVIEW is mainly there as the datatype for arrays, not specifically as a UI object, although it is frequently used that way.
    In Measurement Studio, the focus of the User Interface components is adding the controls to Visual Studio that are needed for test and measurement applications. Visual Studio comes with a tabular type interface called the DataGrid control for displaying numeric and string data in a table format built-in. This is what you would want to use to display arrays. We
    would definately consider adding a table type interface if our users needed a lot more functionality than was provided by the Visual Studio DataGrid control.
    I know it can be frustrating going back and forth between the tools and seeing different things available. Remember, they are designed for different users though. Measurement Studio is designed to equip Visual Studio programmers to do Test & Measurement programming easily, it isn't designed to provide LabVIEW type functionality to Visual Studio users. So some LabVIEW functionality won't exist in Measurement Studio purposefully, and also some functionality in Measurement Studio that isn't in LabVIEW since it doesn't suit graphical programming.
    Try the DataGrid control, and let us know if it doesn't meet your needs.
    Best Regards,
    Chris Matthews
    National Instruments

  • How to display Image by using Array?

    Hi all, I know to how to display the image in MXML by using
    AS 3.0
    like this:
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    width="100" height="80" borderStyle="solid">
    <mx:Script>
    <![CDATA[
    [Embed(source="logo.gif")]
    [Bindable]
    public var imgCls:Class;
    ]]>
    </mx:Script>
    <mx:Image source="{imgCls}"/>
    <!--OR-->
    <mx:Image source="@Embed('assets/Nokia_6630.png')"/>
    </mx:Application>
    But the thing is I am building a list for display the images,
    the values is come from the Array. I am trying a different way for
    display it but no working, here is my code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml">
    <mx:Script>
    <![CDATA[
    public var PICTURE_ARRAY:Array = [{label:"FileA",
    icon:"@Embed('upload/myjpg.jpg')"},
    {label:"FileC", icon:"@Embed('upload/myjpg.jpg')"},
    {label:"FileB", icon:"@Embed('upload/myjpg.jpg')"}]
    ]]>
    </mx:Script>
    <mx:Tile id="pictureSelection" height="180" width="500"
    borderStyle="solid">
    <mx:Repeater id="picRP"
    dataProvider="{PICTURE_ARRAY}">
    <mx:VBox horizontalAlign="center" verticalAlign="middle"
    verticalGap="0" borderStyle="none" width="100" height="100">
    <mx:Image width="80" height="80"
    source="{picRP.currentItem.icon}"
    toolTip="{picRP.currentItem.icon}"/>
    <!--
    I also tryed this as well:
    set the icon value as picture location like: "A.jpg" or
    "B.jpg"
    then
    <mx:Image width="80" height="80"
    source="@Embed('upload/{picRP.currentItem.icon}')" />
    -->
    <mx:Label text="{picRP.currentItem.label}" width="100"
    textAlign="center"/>
    </mx:VBox>
    </mx:Repeater>
    </mx:Tile>
    </mx:Application>
    Can anyone tell how to display the array value into Image
    tag? Thanks

    In your data you have this:
    {label:"FileC", icon:"@Embed('upload/myjpg.jpg')"},
    change it to this:
    {label:"FileC", icon:"upload/myjpg.jpg"}, // this is just the
    filename, not embedded
    In your Repeater you have this Image tag:
    <mx:Image width="80" height="80"
    source="{picRP.currentItem.icon}"
    toolTip="{picRP.currentItem.icon}"/>
    which is fine, except for the toolTip. The toolTip uses a
    string, not an image. If you want to show an image in the toolTip,
    you'll need to write your own toolTip class.
    Now the source property of the image will be given the URL to
    the image which will then be requested from the server and
    downloaded at runtime - it is not embedded.
    If you need to embed the images, then your dataProvider
    should have the variable name associated with the embedded
    image.

  • How to list an array of objects using struts in jsp and ActionForm

    I am using the struts ActionForm and need to know how to display an Array of objects. I am assuming it would look like this in the ActionForm:
    private AddRmvParts addRmv[];
    But I am not sure how the getter and setter in the ActionForm should look. Should it be a Collection or an Iterator?
    I am thinking I need to use an iterator in the jsp page to display it.
    I am also wondering if the AddRmvParts class I have can be the same class that gets populated by the retrieval of data from the database. This class has 10 fields that need to display on the jsp page in 1 row and then multiple rows of these 10 fields.
    Thanks.

    Most probably the easiest way to make it accessible in your page is as a collection.
    ie
    public Collection getAddRmvParts()
    You can use the <logic:iterate> or a <c:forEach>(JSTL) tag to loop through the collection
    As long as the individual items in the collection provide get/set methods you can access them with the dot syntax:
    Example using JSTL:
    <c:forEach var="addRmvPart" items="${addRmvParts}">
      <c:out value="${addRmvPart.id} ${addRmvPart.name} ${addRmvPart.description}"/>
    </c:forEach>

  • How to display array values in jsp of screen flows

    Hi,
    can u please help me .
    I am having one array variable i have stored all the values but i have to display that in JSP page .how to display
    Edited by: user12171025 on Nov 4, 2009 11:11 PM

    Hi,
    I think that its necessaries to use AJaX.
    I am implemeting something like that.
    I have a input text that works like a filter and depends on what my user types in input text I populate my table with some information.
    In order to do that, I put in my JSP a div with an Id and I used ajax, like that:
    function ajaxFunction()
              var xmlhttp;
              if (window.XMLHttpRequest)
              xmlhttp=new XMLHttpRequest();
              else if (window.ActiveXObject)
              // code for IE6, IE5
              xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
              else
              alert("Your browser does not support XMLHTTP!");
              xmlhttp.onreadystatechange=function()
                                                      if( xmlhttp.readyState==4 )
                                                           document.getElementById("tabelaResponsaveis").innerHTML = xmlhttp.responseText;
         var resp = "<f:invokeUrl var='solicitacao' methodName='getResponsaveis'/>";
         xmlhttp.open("POST",resp,true);
         xmlhttp.send(null);
    getResponsaveis is a method inside my BPM that returns a HTML code (the table HTML code with all the information that I need to show.
    I Hope to help
    Thanks Marcos

  • How to display on the graph three or more waveforms where time scale is not an index of array but a real time

    How to display on the graph three or more waveforms where time scale is not an index of array but a real time:
    I measure three voltages Va, Vb, and Vc on my Test stands every 3sec. So I’m building four arrays (Va, Vb, Vc, Time) and combine all in one.
    Time
    Va
    Vb
    Vc
    0
    5
    3.5
    2.8
    3
    4.9
    3.6
    2.9
    6
    4.8
    3.8
    2.1
    Now I need to show on the graph in which scale X is “Voltage” and scale Y is “Time”.
    How can I do it?
    Thanks a lot,
    Boris

    Hi, thanks all your reply.
    You may find "points_to_bar_graph.vi" from this website, I find it by this way.
    I will ask a stupid question: I don't have any photo processing software, how can I save the vi into a picture format?
    So here I just paste it into word document.
    Attachments:
    question.doc ‏520 KB
    points_to_bar_graph.vi ‏62 KB

  • How to display records of int. table in list tree?

    friends,
       i want to display a list tree using fm RS_TREE_CONSTRUCT and RS_LIST_DISPLAY.
    this is the data that i have to display
    Matnr      doc no.        Stock qty.     Age
    1     45601236           100          55
    1     45601237           10          54
    1     45601238        11          53
    1     45601239           101          52
    now, only the first record should be displayed with a + symbol... when the user clicks the + symbol, then the node has to expand and display the other 3 records pertaining to that material...how to display 4 fields of an internal table in one line and like that, 3 records...i have seen some threads relating to this, but they all display only one value in the child node..how to  display multiple fields like this?
    please address this functinality using FMs alone, as i am not exposed to objects :!
    thanks all
    Sathish. R

    satish,
    Before passing the Node name ,Concatenate all the values of record in one string and pass that string as node name.Now it will work.
    To develop the basic logic  simple program name is :
    "SAPSIMPLE_TREE_CONTROL_DEMO"  In this program use above logic.
    Don't forget to reward if useful.
    Don't forget to reward if useful

  • How do display array of labels and buttons in JSplitPane

    Helloo
    Iam doing doing project on swing. I want to display an array of JLabels in JSplitPane. That to the leftside of the JSplitPane. On Right side Array of Jutton Please can any body solve my problem.
    regards
    sonali

    Hi Sonali,
    If u wish to add JLabel and JButton in the following manner
    label
    label
    label
    label
    why not try using GridLayout for each of the panel in the splitpane.try setting gridLayout(0,10) assuming that u have 10 labels.Then add those to the panel which is added to the SplitPane.
    Hope this gives u an idea.
    Cheers :)
    Nagaraj

  • Functions to read and display an array of integers

    Hi guys,
    I am trying to implement with a class called Sort a function to read in an array of integers from a file and a function to display that array.
    public class Sort
         public static int[] read(String file) throws IOException
            /* Create Reader object to read contents of file */
            BufferedReader br = new BufferedReader(new FileReader(file));
            /* Read file and store lines in ArrayList */
            ArrayList<Integer> list = new ArrayList<Integer>();
            /* Variable */
            String in;
            /* While not equal to null reads data from file */
            while ((in = br.readLine()) != null)
                /* Adds data from file to ArrayList */
                list.add(Integer.parseInt(in));
            /* Converts ArrayList into an array */
            int[] array = new int[list.size()];
            for(int i = 0; i < list.size(); i++)
                /* Get array elements */
                array[i] = list.get(i);
            /* Returns array */
            return array;
        public int display()
            for (int i = 0; i < list.size(); i++)
                System.out.println(list.get(i));
    }I am having one of those moments when you forget everything, I need help with display the array in a seperate function, will someone help me please?
    Thanks!

    I know that its just implementing it.
    I have:
    public void display()
            for(int i = 0; i < array.length; i++)
                System.out.println(array);
    But I'm lost on how to make this work, i.e it says "cannot find array variable". I've not done Java for a while and feel like I have forgot everything!
    Edited by: mbruce10 on Nov 15, 2009 1:31 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How do i use Arrays and For Loops in Loading Multiple Images?

    I am struggling to load a sequential array of images to appear like a moving image. So when u click the button the images load one after the other.
    The code below is what i have so far, but it fails to do what i seek in that there's only one image loading which is the last image in the array, so either because the images are stacking up atop each other, or because i simply dont understand the basics...
    And, i am unclear about what you said kglad, that my solution will be more complicated because i need to preload my image sequence and then use a loop to load it?
    import flash.net.URLRequest;
    import flash.display.Loader;
    var count:int = 0;
    var imageArray:Array=["1.jpg","2.jpg","3.jpg","4.jpg","5.jpg","6.jpg","7.jpg",
    "8.jpg","9.jpg","10.jpg","11.jpg","12.jpg","13.jpg"];
    for(var i:uint=0;i<imageArray.length;i++){
    var btn:YourButton=new YourButton();
    btn.ivar=i;
    addChild(btn);
    btn.x=0;
    btn.y=0;
    btn.addEventListener(MouseEvent.CLICK,clickF);
    var ldr:Loader=new Loader();
    addChild(ldr);
    ldr.x=20;
    ldr.y=20;
    function clickF(e:MouseEvent){
        ldr.load(new URLRequest("D:/flash cs5.5/image_sequence/twirlSeq/"+imageArray[e.currentTarget.ivar]));
    function loadComplete(e:Event){
         // first process loaded image, then...
        count++;
        if(count < imageArray.length){
            loadCurrentImage();  // load the next image
        } else {
            // sequencial loading complete, carry on to next activity
    function loadCurrentImage(){
         ldr.load(imageArray[count]);
         ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);

    create a new fla, add btn and add the code i suggested.  test.
    var count:int;
    var imageArray:Array=["1.jpg","2.jpg","3.jpg","4.jpg","5.jpg","6.jpg","7. jpg",
    "8.jpg","9.jpg","10.jpg","11.jpg","12.jpg","13.jpg"];
    var ldr0:Loader=new Loader();
    ldr0.contentLoaderInfo.addEventListener(Event.COMPLETE,loadCompleteF);
    var ldr1:Loader=new Loader();
    ldr1.contentLoaderInfo.addEventListener(Event.COMPLETE,loadCompleteF);
    btn.addEventListener(MouseEvent.CLICK,clickF);
    function clickF(e:MouseEvent):void{
    // initialize count
    count=0;
    // call loadF
    loadF();
    function loadF():void{
    // add one of the loaders to the top of the displaylist and load the next image
    addChild(this["ldr"+count%2])
    this["ldr"+count%2].load(new URLRequest(imageArray[count]));
    function loadCompleteF(e:Event):void{
    // increment count
    count++;
    // check if the last has loaded
    if(count<imageArray.length){
    // if not clear the content out of the next loader.
    if(this["ldr"+count%2].content){
    this["ldr"+count%2].unloadAndStop();
    // and call loadF so the next loader can load the next image in the array
    loadF();
    } else {
    // if the last has loaded.
    // last load completed

  • Please Help::How to display a Map with LIsts as Keys and Values using JSTL

    Hi,
    I need some assistance on how to display a Map in JSP using struts or core JSTL. I have a HashMap which has a List of keys and each key maps to a value of an ArrayList.i.e I have an ArrayList of taxCodes and each taxCode maps to a value of taxDetails which is an ArrayList of details for for that particular taxCode. I have some trouble to display each taxCode then display taxDetails for each taxCode. Here is my code below:
    OrderDetails.java
    package orderitems;
    import java.sql.*;
    import java.util.*;
    public class OrderDetails {
        private LineOder lineOrder;
        private Map lineItems;
        //returns an item number, key_item, from its unique keys
        public int getItemNumber(int key_item, String key_year,
                String key_office,String key_client,String key_company){
            Connection conn = null;
            Statement stat = null;
            ResultSet rst = null;
            int itmNum = 0;
             * key_item a unique number for an item.
             * key_year,key_office,key_client,key_company unique keys
             * for each order where this key_item is taken
             * from.
            String select = "SELECT key_item FROM "+
                    Constants.WEB_TABLE +" WHERE key_item = " + key_item +
                    " AND key_year = '" + key_year + "'" +
                    " AND key_office = '" + key_office + "'" +
                    " AND key_client = '" + key_client + "'" +
                    " AND key_company = '" + key_company +"'";
            DbConnection dbConn = new DbConnection();
            try {
                conn = dbConn.getDbConnection(Constants.WEB_JNDI);
                stat = conn.createStatement();
                rst = stat.executeQuery(select);
                if(rst.next()){
                    itmNum = Integer.parseInt(rst.getString("key_item"));
            } catch (SQLException ex) {
                ex.printStackTrace();
            } finally{
                SQLHelper.cleanUp(rst, stat, conn);
            return itmNum;
        //get a list of item number(item codes)
        public List getAllItemNumbers(String key_year,
                String key_office,String key_client,String key_company){
            List itemNumbers = new ArrayList();
            LineItem itemNumber = null;
            Connection conn = null;
            Statement stat = null;
            ResultSet rst = null;
            String select = "SELECT key_item FROM "+ Constants.WEB_TABLE +
                    " WHERE key_year = '" + key_year + "'" +
                    " AND key_office = '" + key_office + "'" +
                    " AND key_client = '" + key_client + "'" +
                    " AND key_company = '" + key_company + "'";
            DbConnection dbConn = new DbConnection();
            try {
                conn = dbConn.getDbConnection(Constants.WEB_JNDI);
                stat = conn.createStatement();
                rst = stat.executeQuery(select);
                while(rst.next()){
                    itemNumber = new LineItem();
                    itemNumber.setKey_item(Integer.parseInt(rst.getString("key_item")));
                    itemNumbers.add(itemNumber);
            } catch (SQLException ex) {
                ex.printStackTrace();
            } finally{
                SQLHelper.cleanUp(rst, stat, conn);
            return itemNumbers;
        //get a list of tax codes
        public List getAllTaxCodes(int key_item, String key_year,
                String key_office,String key_client,String key_company){
            Connection conn = null;
            Statement stat = null;
            ResultSet rst = null;
            ItemTax taxCode;
            List taxCodes = new ArrayList();
            int itemNum = getItemNumber(key_item, key_year,
                    key_office,key_client,key_company);
            String select = "SELECT key_tax_code FROM "+
                    Constants.WEB_TABLE +" WHERE key_item = " + itemNum +
                    " AND key_year = '" + key_year + "'" +
                    " AND key_office = '" + key_office + "'" +
                    " AND key_client = '" + key_client + "'" +
                    " AND key_company = '" + key_company +"'";
            DbConnection dbConn = new DbConnection();
            try {
                conn = dbConn.getDbConnection(Constants.WEB_JNDI);
                stat = conn.createStatement();
                rst = stat.executeQuery(select);
                while(rst.next()){
                    taxCode = new ItemTax();
                    taxCode.setKey_tax_code(rst.getString("key_tax_code"));
                    taxCodes.add(taxCode);
            } catch (SQLException ex) {
                ex.printStackTrace();
            } finally{
                SQLHelper.cleanUp(rst, stat, conn);
            return taxCodes;
        /////This methode returns a Map which am trying to display in JSP
        //use tax code to get tax details
        public Map getItemTaxDetails(String key_year,String key_office,
                String key_client,String key_company,int key_item){
            ItemTax taxDetail = null;
            List taxDetails = new ArrayList();
            List itemTaxCodes = new ArrayList();
            Map itemTaxDetails = new HashMap();
            Connection conn = null;
            Statement stat = null;
            ResultSet rst = null;
            //get a list of all tax codes of an item with a
            //given item number
            itemTaxCodes = getAllTaxCodes(key_item,key_year,
                    key_office,key_client,key_company);
            DbConnection dbConn = new DbConnection();
            try {
                conn = dbConn.getDbConnection(Constants.WEB_JNDI);
                stat = conn.createStatement();
                for(Iterator taxCodeIter= itemTaxCodes.iterator(); taxCodeIter.hasNext();){
                    ItemTax itemTaxCode = (ItemTax)taxCodeIter.next();
                    String taxCode = itemTaxCode.getKey_tax_code();
                    String select = "SELECT tax_type,tax_value," +
                            "tax_limit_val FROM "+ Constants.WEB_TABLE +
                            " WHERE key_item = "+ key_item +
                            " AND key_year = '" + key_year + "'" +
                            " AND key_office = '" + key_office + "'" +
                            " AND key_client = '" + key_client + "'" +
                            " AND key_company = '" + key_company +"'" +
                            " AND key_tax_code = '" + taxCode + "'";
                    rst = stat.executeQuery(select);
                    while(rst.next()){
                        taxDetail = new ItemTax();
                        //records to be displayed only
                        taxDetail.setKey_item(Integer.parseInt(rst.getString("key_item")));
                        taxDetail.setTax_value(rst.getString("tax_value"));
                        taxDetail.setTax_limit_val(Float.parseFloat(rst.getString("tax_limit_val")));
                        //////other details records ommited//////////////////////////
                        taxDetails.add(taxDetail);////An ArrayList of taxDetails for each taxCode
                     * A HashMap which has all taxCodes of an item as its keys
                     * and an ArrayList of taxdetails as its values.
                     * I return this for display in a JSP.
                    itemTaxDetails.put(taxCode,taxDetails);
                System.out.println();
                System.out.println("*********CONSOLE OUTPUT*************");//display on console
                Set set = itemTaxDetails.keySet();
                Iterator iter = set.iterator();
                System.out.println("Key\t\tValue\r\n");
                while (iter.hasNext()) {
                    Object taxCode=iter.next();
                    Object details=itemTaxDetails.get(taxCode);
                    System.out.println(taxCode +"\t" + details);
                System.out.println("************************************");
            } catch (SQLException ex) {
                ex.printStackTrace();
            } finally{
                SQLHelper.cleanUp(rst, stat, conn);
            return itemTaxDetails;
        //details of an item with all its taxes
        public List getAllItemDetails(String key_year,
                String key_office,String key_client,String key_company){
            List lineItems = new ArrayList();
            List itemNumbers = new ArrayList();
            Map taxDetails = new HashMap();
            LineItem item = null;
            Connection conn = null;
            Statement stat = null;
            ResultSet rst = null;
            //A list of all item numbers in the declaration
            itemNumbers = getAllItemNumbers(key_year,
                    key_office,key_client,key_company);
            DbConnection dbConn = new DbConnection();
            try {
                conn = dbConn.getDbConnection(Constants.WEB_JNDI);
                stat = conn.createStatement();
                for(Iterator itemIter= itemNumbers.iterator(); itemIter.hasNext();){
                    LineItem itemNum = (LineItem)itemIter.next();
                    int itemNumber = itemNum.getKey_item();
                    String select = "SELECT item_description,item_mass," +
                            "item_cost" +
                            " FROM " + Constants.WEB_TABLE +
                            " WHERE key_year = '"+key_year+"'" +
                            " AND key_office = '"+key_office+ "'"+
                            " AND key_client = '"+key_client+ "'"+
                            " AND key_company = '"+key_company+ "'"+
                            " AND key_item = " + itemNumber;
                    rst = stat.executeQuery(select);
                    while(rst.next()){
                        item = new LineItem();
                        item.setItem_description(rst.getString("item_description"));
                        item.setItem_mass(Float.parseFloat(rst.getString("item_mass")));
                        item.setKey_item(Integer.parseInt(rst.getString("item_cost")));
                        //////other details records ommited//////////////////////////
                        /* A HashMap of all itemTaxeCodes as its keys and an
                         * ArrayList of itemTaxedetails as its values
                        taxDetails = getItemTaxDetails(item.getKey_year(),item.getKey_office(),
                                item.getKey_client(),item.getKey_company(),item.getKey_item());
                        //item tax details
                        item.setItmTaxes(taxDetails);
                        //list of items with tax details
                        lineItems.add(item);
            } catch (SQLException ex) {
                ex.printStackTrace();
            } finally{
                SQLHelper.cleanUp(rst, stat, conn);
            return lineItems;
        public Set getOrders(String key_year,String key_office,
                String key_client,String key_company){
            List lineItems = new ArrayList();
            Set lineOrders = new HashSet();
            Connection conn = null;
            Statement stat = null;
            ResultSet rst = null;
            LineOder lineOrder = null;
            String select = "SELECT * FROM " + Constants.WEB_TABLE +
                    " WHERE key_year = '" + key_year + "'" +
                    " AND key_office = '" + key_office + "'" +
                    " AND key_client = '" + key_client + "'" +
                    " AND key_company = '" + key_company + "'";
            DbConnection dbConn = new DbConnection();
            try {
                conn = dbConn.getDbConnection(Constants.WEB_JNDI);
                stat = conn.createStatement();
                rst = stat.executeQuery(select);
                while(rst.next()){
                    lineOrder = new LineOder();
                    lineOrder.setKey_year(rst.getString("key_year"));
                    lineOrder.setKey_office(rst.getString("key_office"));
                    lineOrder.setKey_client(rst.getString("key_client"));
                    lineOrder.setKey_company(rst.getString("key_company"));
                    ////list of items with all their details
                    lineItems = getAllItemDetails(lineOrder.getKey_year(),lineOrder.getKey_office(),
                            lineOrder.getKey_client(),lineOrder.getKey_company());
                    //setting item details
                    lineOrder.setItems(lineItems);
                    //a list of order with all details
                    lineOrders.add(lineOrder);
            } catch (SQLException ex) {
                ex.printStackTrace();
            } finally{
                SQLHelper.cleanUp(rst, stat, conn);
            return lineOrders;
    Controller.java
    package orderitems;
    import java.io.*;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Controller extends HttpServlet {
        private Map taxDetails = new HashMap();
        private OrderDetails orderDetails = null;
        protected void processRequest(HttpServletRequest request,
                HttpServletResponse response)throws
                ServletException, IOException {
            response.setContentType("text/html;charset=UTF-8");
            String key_year = "2007";
            String key_office = "VZX00";
            String key_company = "DG20";
            String key_client =  "ZI001";
            int key_item = 1;
            String nextView = "/taxdetails_list.jsp";
            orderDetails = new OrderDetails();
            taxDetails = orderDetails.getItemTaxDetails(key_year,key_office,
                    key_company,key_client,key_item);
            //Store the collection objects into HTTP Request
            request.setAttribute("taxDetails", taxDetails);
            RequestDispatcher reqstDisp =
                    getServletContext().getRequestDispatcher(nextView);
            reqstDisp.forward(request,response);
        protected void doGet(HttpServletRequest request,
                HttpServletResponse response)throws
                ServletException, IOException {
            processRequest(request, response);
        protected void doPost(HttpServletRequest request,
                HttpServletResponse response)throws
                ServletException, IOException {
            processRequest(request, response);
    taxdetails_list.jsp
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
        <head>
            <title>Simple Tax Detail Diaplay ::</title>
            <link rel="stylesheet" type="text/css" href="imgs/orders.css"/>
        </head>
        <body>
            <jsp:useBean id="taxDetails" class="java.util.HashMap" scope="request"/>
            <table>
                <c:forEach items="${taxDetails}" var="hMap">
                    <tr>
                        <td><c:out value="${hMap.key}" /></td>
                        <!--td><%--c:out value="${hMap.value}" /--%></td-->
                    </tr>
                </c:forEach>
            </table>
        </body>
    </html>am displaying taxCodes(in this case i have VAT and ICD) fine but cant figure out how to display a list of value for each taxCode.Here is the output am getting
    both in my JSP and on the console:
    *******************************CONSOLE OUTPUT****************************
    Key          Value
    ICD     [orderItems.ItemTax@13e6226, orderItems.ItemTax@9dca26]
    VAT [orderItems.ItemTax@13e6226, orderItems.ItemTax@9dca26]
    Edited by: aiEx on Oct 8, 2007 6:54 AM

    hi evnafets,
    yes i need a nested for loop.I have tried your advice but my bean properties are not found.Am getting this error:
    javax.servlet.ServletException: Unable to find a value for "key_item" in object of class "java.lang.String" using operator "."
    I have tried this as stated earlier in the post:I have tried to make the method getItemTaxDetails return a List and get the returned list value as taxDetails. I then tested to display this list on JSP and its displaying fine.
    public List getItemTaxDetails(String key_year,String key_office,
                String key_client,String key_company,int key_item){
            ItemTax taxDetail = null;
            List taxDetails = new ArrayList();
            List itemTaxCodes = new ArrayList();
            Map itemTaxDetails = new HashMap();
            Connection conn = null;
            Statement stat = null;
            ResultSet rst = null;
            //get a list of all tax codes of an item with a
            //given item number
            itemTaxCodes = getAllTaxCodes(key_item,key_year,
                    key_office,key_client,key_company);
            DbConnection dbConn = new DbConnection();
            try {
                conn = dbConn.getDbConnection(Constants.WEB_JNDI);
                stat = conn.createStatement();
                for(Iterator taxCodeIter= itemTaxCodes.iterator(); taxCodeIter.hasNext();){
                    ItemTax itemTaxCode = (ItemTax)taxCodeIter.next();
                    String taxCode = itemTaxCode.getKey_tax_code();
                    String select = "SELECT tax_type,tax_value," +
                            "tax_limit_val FROM "+ Constants.WEB_TABLE +
                            " WHERE key_item = "+ key_item +
                            " AND key_year = '" + key_year + "'" +
                            " AND key_office = '" + key_office + "'" +
                            " AND key_client = '" + key_client + "'" +
                            " AND key_company = '" + key_company +"'" +
                            " AND key_tax_code = '" + taxCode + "'";
                    rst = stat.executeQuery(select);
                    while(rst.next()){
                        taxDetail = new ItemTax();
                        //records to be displayed only
                        taxDetail.setKey_item(Integer.parseInt(rst.getString("key_item")));
                        taxDetail.setTax_value(rst.getString("tax_value"));
                        taxDetail.setTax_limit_val(Float.parseFloat(rst.getString("tax_limit_val")));
                        //////other details records ommited//////////////////////////
                        taxDetails.add(taxDetail);////An ArrayList of taxDetails for each taxCode
                     * A HashMap which has all taxCodes of an item as its keys
                     * and an ArrayList of taxdetails as its values.
                     * I return this for display in a JSP.
                    itemTaxDetails.put(taxCode,taxDetails);
            } catch (SQLException ex) {
                ex.printStackTrace();
            } finally{
                SQLHelper.cleanUp(rst, stat, conn);
            //return itemTaxDetails;
            return taxDetails;
        }And my JSP
    taxdetails_list.jsp
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <link rel="stylesheet" type="text/css" href="imgs/orders.css"/>
        </head>
        <body>
            <table>
                <c:forEach var="curRecord" items="${taxDetails}" varStatus="rowCounter">
                        <c:choose>
                            <c:when test="${rowCounter.count % 2 == 0}">
                                <c:set var="rowStyle" scope="page" value="odd" />
                            </c:when>
                            <c:otherwise>
                                <c:set var="rowStyle" scope="page" value="even" />
                            </c:otherwise>
                        </c:choose>
                        <tr class="${rowStyle}">
                            <td>${curRecord.key_item}</td>
                            <td>${curRecord.tax_value}</td>
                            <td>${curRecord.tax_limit_val}</td>
                        </tr>
                    </c:forEach>
            </table>
        </body>
    </html>I can't see where am going wrong even with your advice.Please help.
    Thnx.

  • How to display the content of a BLOB column in a ADF/BC pages ?

    How to display the content of a BLOB column in a ADF/BC pages ?
    There is some image in database table blog column. And we want to display image on the screeen.
    There is some example about upload and dowload blog columns.
    (steve not yet document example page etc...)
    But We want to display blog picture in a image component...
    is there any basic way to do it ?
    Thanks a lot...

    Ali,
    You could just download the sample app... but... here is the servlet code from the demo (look at it just for technique - you'll obviously have to change it for your needs)...
    John
    package oracle.fodemo.storefront.servlet;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import oracle.jbo.ApplicationModule;
    import oracle.jbo.Key;
    import oracle.jbo.Row;
    import oracle.jbo.ViewObject;
    import oracle.jbo.client.Configuration;
    import oracle.jbo.domain.BlobDomain;
    import oracle.jbo.domain.DBSequence;
    import oracle.jbo.domain.Number;
    import oracle.jbo.server.ViewObjectImpl;
    public class ImageServlet
      extends HttpServlet
      private static final String CONTENT_TYPE =
        "image/jpg; charset=windows-1252";
      public void init(ServletConfig config)
        throws ServletException
        super.init(config);
      public void doGet(HttpServletRequest request,
                        HttpServletResponse response)
        throws ServletException, IOException
        response.setContentType(CONTENT_TYPE);
        response.setContentType(CONTENT_TYPE);
        String detailProductId = request.getParameter("detail");
        String thumbnailProductId = request.getParameter("thumbnail");
        boolean thumbnail = true;
        String productId = null;
        OutputStream os = response.getOutputStream();
        String amDef = "oracle.fodemo.storefront.store.service.StoreServiceAM";
        String config = "StoreServiceAMLocal";
        ApplicationModule am =
          Configuration.createRootApplicationModule(amDef, config);
        ViewObjectImpl vo =
          (ViewObjectImpl) am.findViewObject("ProductImages"); // get view object (the same as used in the table)
        if (detailProductId != null)
          productId = detailProductId;
          thumbnail = false;
        else
          productId = thumbnailProductId;
        vo.defineNamedWhereClauseParam("paramThumbnail", null, null);
        vo.defineNamedWhereClauseParam("paramProductId", null, null);
        vo.setWhereClause("DEFAULT_VIEW_FLAG = :paramThumbnail AND PRODUCT_ID = :paramProductId");
        vo.setNamedWhereClauseParam("paramThumbnail", (thumbnail? "Y": "N"));
        vo.setNamedWhereClauseParam("paramProductId", productId);
        vo.executeQuery();
        Row product = vo.first();
        BlobDomain image = (BlobDomain) product.getAttribute("Image");
        InputStream is = image.getInputStream();
        // copy blob to output
        byte[] buffer = new byte[10 * 1024];
        int nread;
        while ((nread = is.read(buffer)) != -1)
          os.write(buffer, 0, nread);
        os.close();
        vo.setWhereClause(null);
        vo.removeNamedWhereClauseParam("paramProductId");
        vo.removeNamedWhereClauseParam("paramThumbnail");
        Configuration.releaseRootApplicationModule(am, false);
    }

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

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

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

Maybe you are looking for

  • Gmail App Issue with picture embed in mail body

    Hi, I am an iphone 5 user and have installed the Gmail app from google inc. . But there seems to be an issue with sending emails. If a new email is composed with a picture copied from the camera roll or other app in phone and pasted onto the email bo

  • Navigation to the web page was cancelled

    Hi All, I have a requriement where ABAP code in ISTEP1 is returning some 20,000 values. I could see that the program is executed in a jiffy and also returning values. But when I execute the query from Query Designer, the internet explorer runs for 10

  • JDBC MS-SQL Server at Oracle

    Hi, I'm developing Java procedures in Oracle 8.1.7. I've already loaded the Sybase JDBC driver successfully with loadjava and the Oracle procedures that access Sybase are working correctly. I've tried doing the same with Microsoft SQL Server 2000 JDB

  • Need help about jar file again!!

    I want to make some of my package used as library. And also put my application into executable jar file. I edited following codes: uner path: D:\dd\b\b1 package b.b1; public class Son      int x = 10;      public Son(){      public int getX(){       

  • How to test BPM Scenario?

    HI, Experts, I have developed a BPM scenario successfully but i didn't understand how to test that BPM Scenario i tried test that in ID->Test Configuration but i having only one sender details how to another sender details or any transaction to test