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

Similar Messages

  • How to display array values in textfield?

    i am creating student details with mysql database using JSON to get values and display in xcode.i got json array values from php and converted to NSMuatable array. my array result
        firstName = hari;
        lastname = krishna;
        age=10;
        fathername=ragav;
        firstName = priya;
        lastname = amirtha;
        age=8;
        fathername=ravi;
    now i want to display values iwhen i am enter firstname other field values display  in  textfiled  on button click.how to do that .help me .thanks in advance.
    i am very new to xcode.

    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 the value of a column in a chart at the top of each column

    How to display the value of each column in a chart at the top of each column?

    Like this?
    Done using chart Inspector.
    For details, see Chapter 7,  Creating Charts from Numerical Data in the Numbers '09 User Guide. The guide may be downloaded via the Help menu in Numbers.
    Regards,
    Barry

  • How to display 7 values of  single field in row wise.

    hi,
    how to display 7 values of  single field in row wise.
    thankx in advance.

    hi ,
    do it like this :
    1 Place ur UI element in tranparent container with Layout as Row Data and Layout Data as Row Head Data
    2 Ur first  UI , which contains the first value as Row Head Data ,
    3 Others as Row Data
    u can do it with Matrix Data as well
    if u want to give space , u can use HORIZONTAL GUTTER and set its width to medium / large / Xlarge
    also there is a UI element "INVISIBLE ELEMENT" ,
    1 u can use this UI element to provide space between ur other UI elements in the view
    2 u can insert a text element as well , and in the Text property of the element press ALT + 0160.
    u can give the space bw UIs as desired.
    regards,
    amit

  • How to display filter values in analyzer

    Hi expert,
          I want to add filter into analyzer, above data table, I insert a few rows, and add text to hold filters, but after quit from design mode, inserted rows for filters dispear, and its spaces are taken by data table. could you please tell how to display filter values .
    Many Thanks,

    It is looking like you are saving them as workbooks. It will be possible to maintain fliters if you save with the filters given by workbook properties, not by manual feeding.
    let us know with clear expectation if you are not clear with it.

  • How to display negative values in a screen field of a screen

    Hi All,
    Please let me know how to display negative values in a screen field of a screen.
    thanks

    Hi Kishore,
    You can do this method. In the screen , create a text field of CHAR instead fo creating an INT4 field.
    I have created a field of CHAR of name say TEXT.
    In the main program,
    declare a variable of the same name ie. TEXT.
    data: TEXT(5) TYPE C.
    In PBO, just assign the negative values.
    It will work.Since there is automatic conversion between character and integer data types, it will work for positive values as well.
    Regards,
    Sylendra.

  • Display Key Values only on filter screen

    Hello all,
    I have one specific requirement. When user runes any query (based on an infoset) , data is displayed. After which if user presses right clicks on data filed -> Select filter value. Then one  Filter screen is displayed. Values from this filter screen are displayed as text values.
    I want it to display as key value. This particular infoobject is in coumpounding.
    I have already tried changing Bex properties at infoobject level and RSD1, it does not have any effect.
    can anyone suggest any option.
    Edited by: priyanka s on Sep 15, 2008 10:41 AM

    Hi Priyanka,
    In BI 7.0, these options are available in the definition of InfoProvider itself.
    For DSO:
    Right Click on Key/Data Fields --> Provider Specific Properties of the InfoObject --> Display (Column)
    For Cube:
    Right click on Dimensions --> Provider Specific Properties of the InfoObject --> Display (Column)
    Set the required properties here and you will get the required results.
    Hope this time you get it right
    Regards,
    Yogesh

  • How do I display array values in a text field?

    Hi there-
    I have a small Flash movie I'm trying to complete, it's my
    first go around with Flash 8 so I appreciate your patience:
    I built an array with some actionscript which seems to work
    fine (I can trace it and all is well in the trace window). Now I'm
    simply trying to display it to my Flash movie screen and I've built
    a dynamic text window which is working, except that I only ever get
    the last array element to appear in the dynamic text window. I've
    traced the code and see all of my array values, but when I use
    "myResults_txt.text=picker_array;" I only see the last position's
    value in my array. I tried playing with the "multiline" attribute
    for the text field, it didn't seem to make any difference.
    I'm sure it's probably something silly that I've missed, but
    how do you display an array, with all of it's values to a dynamic
    text field (I even tried using the textArea component but ran into
    the same problem).
    Thanks in advance for any help-
    rich

    Thanks for your input. I tried just about everything but
    ended up re-writing the contents of the array to a var and looping
    through the var. Not my first choice but it got me to done.
    Thanks again,
    Rich

  • JDEV 10G: how to display the value of the line chart using jChart in JSP

    I have draw the line chart in JSP using the JChart and now I wan to display the value label in the line there..
    but the value wasn't show..
    anyone can help me..
    thx..

    Hi,
    what I do understand, you want to display the value of each point in your Line Graph.
    I guess you will be having BIGraph.xml file. In this file check the "Show Data Tips When Mouse is over bars" checkbox.
    Lets try with this.
    --Abhijit                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to display JCO.Table in jsp, CRM ISA

    Hi,
    I have got a JCO.Table with results from teh CRM system and now want to display this in ISA.
    Is there any templates, or code, that could guide me as to how to transfer the table to jsp.
    thanks,
    sunil

    Hi Sunil,
    The code from bean class is here,
    public void listDetails(String releaseGroup,String releaseCode)                                 
    throws Exception
                    try
                         if (mRepository == null )
                              System.out.println("NuLL");
                         try
    IFunctionTemplate                                         ft=mRepository.getFunctionTemplate("BAPI_REQUISITION_GETITEMSREL");
    myFunction=ft.getFunction();
                   catch (Exception ex)
                   throw new Exception(ex + "Problem retrieving JCO.Function object.");
          if (myFunction == null)
         System.exit(1);
    mConnection.execute(myFunction);
                   JCO.ParameterList input = myFunction.getImportParameterList();
                           input.setValue(releaseGroup,"REL_GROUP");
                           input.setValue(releaseCode,"REL_CODE");
                           input.setValue(releaseFlag,"ITEMS_FOR_RELEASE");
                             System.out.println("Imported");
                         catch (Exception ex)
                              ex.printStackTrace();
                              System.exit(1);
                          mConnection.execute(myFunction);
                JCO.Table codes = null;
               codes =myFunction.getTableParameterList().getTable("REQUISITION_ITEMS");
               size =codes.getNumRows();
               if (size == 0)
                  System.out.println("No value matches the selection cretaria");
               purchaseRequisitionNo = new String[size];
               item   = new String[size];
               requestorName = new String[size];
               description = new String[size];
               creatorName = new String[size];
               purchaseRequisitionDate = new String[size];
               plant = new String[size];
              // getter methods
         public int  getSize() { return size; }
         public String getPurchaseRequisitionNo(int i){return                                                        purchaseRequisitionNo<i>; }
          public String getItem(int i) { return item<i>; }
         public String getDescription(int i) { return description<i>; }
         public String getCreatorName(int i) { return creatorName<i>; }
         public String getPurchaseRequisitionDate(int i)
                                             {return purchaseRequisitionDate<i>; }
         public String  getplant(int i) { return plant<i>; }
    Now in the JSP page get the number of entries in the table and try to get row by row from the bean class using the row number.
    <%
    int count = PR.getSize() ; // This method will return the number of
    rows in the table.
    for ( int i = 0; i < count ; i++ ) {
    %>
    <TR><TD ALIGN = "center"><%= PR.getPurchaseRequisitionNo(i) %> </TD>
    <TD ALIGN = "center"><%= PR.getItem(i) %> </TD>
    <TD ALIGN = "center"><%= PR.getDescription(i) %></TD>
    <TD ALIGN = "center"><%= PR.getCreatorName(i)%> </TD>
    <TD ALIGN = "center"><%= PR.getPurchaseRequisitionDate(i)%> </TD>
    <TD ALIGN = "center"><%= PR.getplant(i)%> </TD>
    <% } %>
    Hope this is a simple way to get your requirement.
    Let me know if this does not help you.
    Thanks
    Kathirvel.

  • Displaying Hashmap values in JSP using struts taglib

    Please can any one provide me the solution for the below query,
    I have stored hasmap key as string and value as arraylist, can any one suggest how to display the hashmap values(arraylist) in table format in jsp using struts taglib.
                             HashMap hsMap=new HashMap();
                             ArrayList arrList = new ArrayList();
                             arrList.add("filesize");
                             arrList.add("filelength");
                              hsMap.put("filename",arrList);
               In jsp i want to display filename and filesize in table format.

    Read this documentation:
    http://struts.apache.org/struts-doc-1.2.x/userGuide/struts-logic.html#iterate

  • How to display array

    Hi, I have a problem to display array from my database. The following are the two files that I tried to input multiple values in mailaddress database in the second file and I tried to display the values from the database when the user login the first file. The values are recorded in the database well but I always got java.lang.NullPointerException error in my first file. I checked the code, it shows that array display wrong. Would you please help me? Thanks a lot in advance.
    <zhangmailinputtest.jsp>
    <%@ page language="java" contentType="text/html; charset=Shift_JIS" %>
    <%@ page import="beanYama.*,java.sql.*,java.util.*,java.text.*" %>
    <%@ include file="inc_conv_char.jsp" %>
    <%
    String uid =(String)session.getAttribute("uid");
    String unam =(String)session.getAttribute("unam");
    String depart =(String)session.getAttribute("depart");
    String perms =(String)session.getAttribute("perms");
    String flag =(String)session.getAttribute("flag");
    if(flag==null){
         response.sendRedirect("index.jsp");
    }else{
    %>
    <html>
    <body>
    <%!      String[] name;
         String[] departa;
         String[] email;
    %>
    <%
              Connection con = null;
              Statement stmt1 = null;
              ResultSet rsq = null;
              Class.forName("org.gjt.mm.mysql.Driver");
              con=DriverManager.getConnection("jdbc:mysql://localhost/progress?user=ntjs&password=ntjs&useUnicode=true&characterEncoding=Shift_JIS");
              stmt1=con.createStatement();
         rsq=stmt1.executeQuery("SELECT name AS name1 from mailaddress;");
              if(rsq.next()){
                   for (int i=0;i<name.length;i++) {
                   name[i] = rsq.getString("name1");
                   rsq.next();
              stmt1.close();
              con.close();     
    %>
    <form action="zhangmailtestfinal.jsp" method="post">
    <table width="60%" border="1" cellpadding="1" cellspacing="1" bordercolor="#000099">
    <tr>
    <td width="20%"><div align="center">Name</div></td>
    <td width="20%"><div align="center">Department</div></td>
    <td width="50%"><div align="center">Address</div></td>
    </tr>
    <tr>
    <td><input type="text" name="name" size="25" value="<%=name[0]%>" align="middle"></td>
    <td><input type="text" name="departa" size="25" align="middle"></td>
    <td><input type="text" name="email" size="53"align="middle"></td>
    </tr>
    <tr>
    <td><input type="text" name="name" size="25" align="middle"></td>
    <td><input type="text" name="departa" size="25" align="middle"></td>
    <td><input type="text" name="email" size="53"align="middle"></td>
    </tr>
    <td><input type="text" name="name" size="25" align="middle"></td>
    <td><input type="text" name="departa" size="25" align="middle"></td>
    <td><input type="text" name="email" size="53"align="middle"></td>
    </tr>
    <tr>
    <td><input type="text" name="name" size="25" align="middle"></td>
    <td><input type="text" name="departa" size="25" align="middle"></td>
    <td><input type="text" name="email" size="53"align="middle"></td>
    </tr>
    <td><input type="text" name="name" size="25" align="middle"></td>
    <td><input type="text" name="departa" size="25" align="middle"></td>
    <td><input type="text" name="email" size="53"align="middle"></td>
    </tr>
    <tr>
    <td><input type="text" name="name" size="25" align="middle"></td>
    <td><input type="text" name="departa" size="25" align="middle"></td>
    <td><input type="text" name="email" size="53"align="middle"></td>
    </tr>
    <td><input type="text" name="name" size="25" align="middle"></td>
    <td><input type="text" name="departa" size="25" align="middle"></td>
    <td><input type="text" name="email" size="53"align="middle"></td>
    </tr>
    <tr>
    <td><input type="text" name="name" size="25" align="middle"></td>
    <td><input type="text" name="departa" size="25" align="middle"></td>
    <td><input type="text" name="email" size="53"align="middle"></td>
    </tr>
    <td><input type="text" name="name" size="25" align="middle"></td>
    <td><input type="text" name="departa" size="25" align="middle"></td>
    <td><input type="text" name="email" size="53"align="middle"></td>
    </tr>
    <tr>
    <td><input type="text" name="name" size="25" align="middle"></td>
    <td><input type="text" name="departa" size="25" align="middle"></td>
    <td><input type="text" name="email" size="53"align="middle"></td>
    </tr>
    </table>
    <input type="submit" name="save_button" value="Save">
    </body>
    </CENTER>
    </html>
    <%
    %>
    <zhangmailtestfinal.jsp>
    <%@ page language="java" contentType="text/html; charset=Shift_JIS" %>
    <%@ page import="beanYama.*,java.sql.*,java.util.*,java.text.*" %>
    <%@ include file="inc_conv_char.jsp" %>
    <%
    String uid =(String)session.getAttribute("uid");
    String unam =(String)session.getAttribute("unam");
    String depart =(String)session.getAttribute("depart");
    String perms =(String)session.getAttribute("perms");
    String flag =(String)session.getAttribute("flag");
    if(flag==null){
         response.sendRedirect("index.jsp");
    }else{
    %>
    <html>
    <body>
    <%!
         Connection con = null;
         PreparedStatement ps = null;
         ResultSet rs = null;
    %>
    <%
         String[] name = request.getParameterValues("name");
         String[] departa = request.getParameterValues("departa");
         String[] email = request.getParameterValues("email");
    try{          
              Class.forName("org.gjt.mm.mysql.Driver");
              con=DriverManager.getConnection("jdbc:mysql://localhost/progress?user=ntjs&password=ntjs&useUnicode=true&characterEncoding=Shift_JIS");
              Statement stmt0=con.createStatement();
              stmt0.executeUpdate("delete from mailaddress");
              String query ="INSERT INTO mailaddress (mail_userid,name,departa,email) VALUES (?,?,?,?)";
              ps = con.prepareStatement(query);
                   for (int i=0;i<name.length;i++){
                   ps.setString(1,uid);
                   ps.setString(2, name);
                   ps.setString(3, departa[i]);
                   ps.setString(4, email[i]);
                   ps.addBatch();
              ps.setString(4,uid);
              int[] results = ps.executeBatch();
              Statement stmt1=con.createStatement();
              ResultSet rsq=stmt1.executeQuery("SELECT name AS name1 from mailaddress where mail_userid=" + "'" + uid + "'" + ";");
              if(rsq.next()){
                   for (int i=0;i<name.length;i++) {
                   name[i] = rsq.getString("name1");
                   rsq.next();
    } catch (Exception e) {
                   throw new ServletException(e);
              } finally {
                   try {
                        if(rs != null) {
                             rs.close();
                             rs = null;
                        if(con != null) {
                             con.close();
                             con = null;
                   } catch (SQLException e) {}
    %>
    </html>
    <%
    %>

    Where exactly is the exception being generated?
    My guess is this bit here:
    if(rsq.next()){
      for (int i=0;i<name.length;i++) {
        name = rsq.getString("name1");
        rsq.next();
    }I don't think your name array has been initialised in this file. Plus it assumes that the name array has exactly the same number of items as the query returns. To me thats rather dubious...
    I would suggest this instead
    while (rsq.next()){
        name = rsq.getString("name");
    }I'm still not entirely certain what you are trying to accomplish, but thats probably the cause of the null pointer.
    good luck,
    evnafets

  • Display HashMap values in JSP using Taglib in struts

    Hi ,
    I am new to struts and JSTL. I am developing Discussion Forums using Struts.
    I have HashMap object with(key & values) in My Action class.
    I want to diplay in my JSP as a List with html:links to do other process.
    How can I display HashMap values in my JSP. Which is the best way to display
    My intenetion is maxmum avoiding <%%> code in jsp.
    Which is the best way to display ?
    Can I diplay using taglib which is generic tag for any collection object ?
    Can any one help me ASAP.
    thanks
    Chandra

    Hi Riaz,
    You can use same code in JSP
    Java Code
    import java.util.*;
    class TestHashMap
    public static void main(String args[])
    HashMap hm=new HashMap();
    //store some Objects.
    hm.put("Rajib Sarma","100");
    //duplicate keys are not allowed.
    hm.put("Rajib Sarma","200");//The value "100" is replaced by "200".
    hm.put("Sazid Ahmed","200");
    //Display the contents of the HashMap
    System.out.println("Displaying all the keys/values.\r\n");
    System.out.println("Key\t\tValue\r\n");
    //get all the keys
    Collection c=hm.keySet();
    //obtain an Iterator
    Iterator i=c.iterator();
    while(i.hasNext())
    //obtain a key
    Object key=i.next();
    //obtain the value of the key
    Object value=hm.get(key);
    System.out.println(key +"\t" + value);
    }//while ends
    }//main ends
    }

  • How to display ascii value

    sir i want to know d solution for displaying ascii value?/?
    also sir plz tell how to convert ascii to hex and hex to ascii????
    i am finding difficulty to make d program.... dats y i have attached any file bcz my program is not prepared yet

    Hi sir,
    convert your string to an U8 array and display that array in an array indicator set to hex display.
    Or switch your string to hex display…
    Also read this! It's a pain to read your message for non-native English speakers!
     

  • How to display the values stored in the database in the combobox on load?

    I am develping one application where in
    I wanted to display the values in the combobox which I am taking from the database and in the same form passing that value in same form after selecting it,My program is running fine for the first time but next time it is giving me NullPointerException.
    So can anyone tell me please how I should develop the this application to avoid this exception?
    Thank You
    Praddy

    Thanx a lot for showing interest in answering my query.I am pasting my code for ur reference.Please try to reply ASAP.
    Thank You,
    Praddy.
    CODE:
    ======
    <html>
    <head>
         <script language="javascript">
              function submitthisform(thisForm)
                   thisForm.submit();                    
         </script>
    </head>
    <body>
    <form method=post name=samepgm>
    Select City:     <select name=city onChange='submitthisform(samepgm)'><br><br><br>
    <option value=''></option>
    <option value='All'>All</option>
    <%@ page language="java" import="java.sql.*" %>
    <%
              String scity = request.getParameter("city");
              System.out.println(scity);
              Connection con = null;
              Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              con = DriverManager.getConnection("jdbc:odbc:property","","");
              Statement st = con.createStatement();          
              ResultSet rs1 = st.executeQuery("select distinct hcity from housefinance");
              while(rs1.next())
                   //String ohname = rs1.getString("hname");     
                   String     ocity = rs1.getString("hcity");     
                   //out.println(ohname +"<br>");
                   out.println(ocity +"<br>");
    %>
    <br><br><br><option value='<%=ocity%>'><%=ocity%></option><br>
    <%               }
                   rs1.close();
              if(scity.equals("All"))
              ResultSet rs2 = st.executeQuery("select * from housefinance");      
              while(rs2.next())
                   String     ohname = rs2.getString("hname");     
                   String     ohadd1 = rs2.getString("hadd1");
                   //String ohadd2 = rs2.getString("hadd2");
                   String     ohcity = rs2.getString("hcity");
                   String     ohpcode = rs2.getString("hpcode");
                   String     ohtelno = rs2.getString("htelno");
                   String     ohfaxno = rs2.getString("hfaxno");
                   String     ohemail = rs2.getString("hemail");
                   String     ohmobile = rs2.getString("hmobile");     
    %>
    <pre>
    <tr>
    <td><p>Company          :     <%=ohname%> </p></td>
    <td><p>Address          :     <%=ohadd1%></p></td>
    <td><p>City          :     <%=ohcity%> </p></td>
    <td><p>Pin          :     <%=ohpcode%></p></td>
    <td><p>Telphone          :     <%=ohtelno%></p></td>
    <td><p>Fax No:          :     <%=ohfaxno%></p></td>
    <td><p>Email          :     <%=ohemail%></p></td>
    <td><p>Mobile No.     :     <%=ohmobile%></p></td>
    </tr>
    </pre>
    <%
              else
    ResultSet rs = st.executeQuery("select * from housefinance where hcity like '%"+scity+"%'");
              while(rs.next())
                   String     ohname = rs.getString("hname");     
                   String     ohadd1 = rs.getString("hadd1");
                   //String ohadd2 = rs.getString("hadd2");
                   String     ohcity = rs.getString("hcity");
                   String     ohpcode = rs.getString("hpcode");
                   String     ohtelno = rs.getString("htelno");
                   String     ohfaxno = rs.getString("hfaxno");
                   String     ohemail = rs.getString("hemail");
                   String     ohmobile = rs.getString("hmobile");     
    %>
    <tr>
    <td><p>Company          :     <%=ohname%> </p></td>
    <td><p>Address          :     <%=ohadd1%></p></td>
    <td><p>City          :     <%=ohcity%> </p></td>
    <td><p>Pin          :     <%=ohpcode%></p></td>
    <td><p>Telphone          :     <%=ohtelno%></p></td>
    <td><p>Fax No:          :     <%=ohfaxno%></p></td>
    <td><p>Email          :     <%=ohemail%></p></td>
    <td><p>Mobile No.     :     <%=ohmobile%></p></td>
    </tr>
    <hr>
    <%               }
    %>
    </select>
    </form>
    </body>
    </html>

Maybe you are looking for