How to get the length of apex_item in javascript?

Hello all
I am having a tabular report using apex_item, I want to know how can i get the length of the item in javascript? like we do in pl/sql using apex_application.g_f01.count().
and one more thing, when I go to certain page, tab of that page is getting disabled, what should I do to make tab available always whether I am on that page or on any other page.
Thanks
Tauceef

Hi Oli
Thanks for replying, In my first question actually I am validating the report values in javascript for that I need the length of the apex_item to run the loop that many times.
Like we can get the length using apex_application.g_f011.count in pl/sql process how to get the length in the javascript, is there a way for that?
I got the answer for the second question, this is the one.
Thanks
Tauceef

Similar Messages

  • How to get the length of a audio file without play it ?

    Now I know a method to get the length of a audio file by play it:
    1 Create a Player, and add a ControllerListener
    2.Start the Player
    3.In the ControllerListener's controllerUpdate method, use getMediaTime() by receiving a EndOfMediaEvent
    However I think this method is not convenience, if I don't want to play it how I can get the length of the audio file?
    Is anyone can help me?Really thanks a lot !

    I got the answer here:
    http://forum.java.sun.com/thread.jspa?threadID=5149132&tstart=15
    I tried getDuration() before, but it always return a same time, I think maybe I didn't realize the player.

  • How to get the length of a field.

    Hi all,
    I m working on dynamic internal table.There is a need to get the length of a field, filled dynamically.How can we get it.
    Thanks in advance.
    Regards,
    Swati garg

    Swati,
    DATA: text(8) TYPE c,
          len TYPE i.
    DESCRIBE FIELD text LENGTH len IN CHARACTER MODE.
    Field LEN contains the value 8.
    ================================
    For ouput length :
      DATA: float TYPE f,
          out TYPE i,
          len TYPE i.
    DESCRIBE FIELD float LENGTH len OUTPUT-LENGTH out.
    This example results in the field LEN containing the value 8, while the field OUT contains the value 22.
    Don't forget to reward if useful.....

  • How to get the length in bytes of a string

    My string has both latin (1 byte) and chinese (2 bytes).
    My program is in unicode system.
    How to measure the length in bytes of the string?
    the xlen function does not work.

    Hello,
    parameters : p_str type string.
    data : len type i.
    len = strlen( p_str ).
    write : / len.
    With Regards,
    BVS
    Hi BSV, your code return the number of characters not bytes.
    Remember chinese character in US are encoded with 2 bytes.
    And my string contain both latin and chinese characters.
    thanks

  • How to get the length of a field value, not the length of DB's CHAR(20)

    Hello.
    I'm trying to handle a String from my DataBase and get its length:
    String myName;
    int i;
    PreparedStatement sql = Conn.prepareStatement("SELECT NAME FROM MY_TABLE");
    ResultSet results = sql.executeQuery();
    results.next();
    myName = results.getString("NAME");
    i = myName.length();
    out.println("The value is " + myName + " and the length is " + String.valueOf(i) );
    I get:
    " The value is Tom and the lengh is 20 "
    20 is the length of the field (it's a CHAR (20) ), but I would like to get the length
    of 'Tom'.
    On other hand, I would like to detect if this value is 'Tom' or not, but trying with:
    if (myName.equals("Tom")) {...}
    or
    if (myName == "Tom") {...}
    There is no response.
    Any experience?

    myName = results.getString("NAME");
    if(myName!=null) myName = myName.trim(); //Take out trailing spaces
    i = myName.length();Sudha

  • How to get the applet method value in javascript variable

    Hi,
    I have an applet which reading the text file content, text file has valued either ON or OFF
    import java.applet.*;
    import java.io.*;
    public class A extends Applet
    public String line="";
    public void init( )
    String strPath ="D:/WAS_Status.txt";
    try
                             BufferedReader objReader = new BufferedReader(new FileReader(strPath));
                             line = objReader.readLine();
    }catch( IOException e)
    e.printStackTrace();
                        System.out.println("val :"+line);
              public boolean returnFileValue()
                   if("ON".equals(line))
                        return true;
                   else
                        return false;
    In html file :
    <HTML>
    <HEAD>
    <SCRIPT language="JavaScript">
    var line='';
    function loadAppContent()
         line=document.TestApplet.returnFileValue();
         alert("val : "+line);
    </SCRIPT>
    </HEAD>
    <BODY onload="loadAppContent()">
    <APPLET CODE="A.class" NAME="TestApplet" >
    </APPLET >
    </BODY>
    </HTML>
    I am calling the applet method. But I am not able to get value either as true or false.
    line=document.TestApplet.returnFileValue();
    Getting error as object doesnt support this property.
    I tried, line=document.TestApplet.line;
    Gets val as undefined.
    The line variable of Applet will return either ON or OFF value.
    Pls suggest where it has gone wrong or is there any other way?

    Yes it is a reserved word to warn that this applet , lets say send messages to the HTML page that call it.
    You will find the instruction how to do that at sun site.
    Yes you have to implement an interface inside the applet (code)
    and send a message to HTML with the name and parameters of
    the Javascript you want to call!
    But for all this to work you have to put in your project two new classes.
    And after that call some methods that does the job you want.
    Look for Java to JavaScript Comunication to get what you want!.
    check this per exemple!
    http://java.sun.com/products/plugin/1.2/docs/jsobject.html
    See You ( Ate mais )

  • How can i get the length of a DefaultTreeModel

    i got a tree structure (DefaultTreeModel), now i want to know how many level of this tree, what method can i call to get the length of the tree???

    What sort of TreeNodes do you have in your Tree? If you have DefaultMutableTreeNodes in there then you could call the getDepth method on the root node. That operation is expensive though.
    Good Luck
    Lee

  • How can I get the length of a sequence using script

    I am trying to get the length of an image sequence that was imported using importOptions.sequence.  I need to check that the length is a correct number, and if it is too short/long it gives an error message.
    Is there a way to do this?
    Thanks

    //Assumes that your clip is the first item in your project
    var a = app.project.item(1).duration;     //Returns clip length in seconds
    var b = app.project.item(1).frameDuration     //Returns a single frame length in seconds
    var c = a/b;     //If you divide the clip duration by the frameDuration, you should get clip length in frames

  • How can u get the Length of a file u are going to download?

    HI,<br>
    I have another question, is it possible that u can get the length of a file which u are just going to download?<br>
    <br>
    I have the following code example:<br>
    <br>url = new URL(dlfrom);<br>
    f=new File(url.toURI());<br>
    System.out.println(f.length)();<br><br>
    unfortunatly it keeps throwing an exception, please help.

    RTFM
    http://java.sun.com/j2se/1.5.0/docs/api/java/net/URLCo
    nnection.html#getContentLength()<br>
    I tried to apply your sollution, but it is allways returning -1, so what should I do now, is there any possebility still to get the length of the object, because i thought of doing something similar as a tool to download stuff

  • How to get the table of value field? and can we expand the technical limits

    Dear
    I have created value field in COPA with KEA6. And now, I need the table which the value fields are saved. Yet, I have tried a lot to find it and get failure? Can any guy help me? Please tell me how to get the table of a value field.
    And another question is that, can we extend the technical limits for the number of value field for ECC6.0?
    We have a note for R.4.x Please see below:
    OSS note 160892
    You can display the length of a data record using Transaction KEA0 ('Maintain Operating Concern'). After you have navigated to the 'Characteristics Screen' or to the 'Value field Screen' choose menu path 'Extras -> Technical Limits'.
    The maximum displayed here under 'Length in bytes on the DB' is the maximum length permitted by the Dictionary. The reserve required for the release upgrade must be subtracted from this value.
    To increase the allowed number of the value fields, increase the value that is assigned to field ikcge-bas_max_cnt (FORM init_ikcge_ke USING fm_subrc, approx. line 165) in Include FKCGNF20. It specifies the number of the possible value fields. The corresponding part of the source code is attached to the note as a correction.
    David Sun
    Regards!

    how to extend the limit of value numbers? please see the original question.

  • How to get the value from a JavaScript and send the same to Java file?

    Hi.
    How to get the value from a JavaScript (this JS is called when an action invoked) and send the value from the JS to a Java file?
    Thanks and regards,
    Leslie V

    Yes, I am trying with web application.
    In the below code, a variable 'message' carries the needed info. I would like to send this 'message' variable with the 'request'.
    How to send this 'message' with and to the 'request'?
    Thanks for the help :-)
    The actual JS code is:
    function productdeselection()
    var i=0;
    var j=0;
    var deselectedproduct = new Array(5);
    var message = "Are you sure to delete Product ";
    mvi=document.forms[0].MVI;
    mei=document.forms[0].MEI;
    lpi=document.forms[0].LPI;
    if(null != mvi)
    ++i;
    if(null != mei )
    ++i;
    if(null != lpi)
    ++i;
    if(null != mvi && mvi.checked)
    deselectedproduct[++j]="MVI?";
    if(null != mei && mei.checked)
    deselectedproduct[++j]="GAP?";
    if(null != lpi && lpi.checked)
    deselectedproduct[++j]="LPI?";
    if( 0!=j)
    if(i!=j)
    for (x=0; x<deselectedproduct.length; x++)
    if(null != deselectedproduct[x])
    message =message+ "-" +deselectedproduct[x];
    alert(message);
    else
    //alert(" You cannot remove all products!");
    return false;
    return true;
    }

  • How to get the values of the objects inside an object??

    Hi,
    I am trying to write code to display name and memory usage of all session attributes, in a recursive way.
    I suppose reflection is needed here, but I can’t figure out how to get the values of the objects inside an object...
    private void handleIt(String attributeName, Object attributeValue) {
         boolean isPrimitiveOrNull = ((null == attributeValue) ||
              (attributeValue.getClass().isPrimitive()));                                         
         if (isPrimitiveOrNull) {
              sb.append("{" + attributeName + ":" + sizeOf(attributeValue) + "}");
         } else {
              sb.append("{" + attributeName + ":" + sizeOf(attributeValue) + "{");               
              Field[] fields = attributeValue.getClass().getDeclaredFields();
              int lim = fields.length;
              String name;
              Object value = null;
              for (int i = 0; i < lim; i++) {
                   name = fields.getName();
                   //LOOK AT THIS LINE: !!!!!!!!!!!!!!!!!!!!!!!!!!!
                   value = fields[i].get(obj); //I don´t know what 'obj' should be??
                   handleIt(name, value);
              sb.append("}");               
    Any suggestions will be greatly appreciated...

    I realized that massive int objects called MAX_VALUE, MIN_VALUE and SIZE where causing the StackOverflow, so I removed them from the analysis.
    This is the resultant code. But I think it isn’t accurate in calculating the real size of objects being got using reflexion.
    Do you or somebody have any more suggestions?
    import java.io.ByteArrayOutputStream;
    import java.io.IOException;
    import java.io.ObjectOutputStream;
    import java.lang.reflect.Field;
    import java.util.Enumeration;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.http.HttpSession;
    public class SessionMeasurer extends HttpServlet {
         private static final long serialVersionUID = 1470488362727841992L;
         private StringBuilder sb = new StringBuilder();
         public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              performTask(request, response);
         public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              performTask(request, response);
         public void performTask(HttpServletRequest request, HttpServletResponse response) {
              HttpSession     session = request.getSession(false);     
              String attributeName = "";
              Object attributeValue = null;
              for (Enumeration<?> attributeNames = session.getAttributeNames(); attributeNames.hasMoreElements();) {
                   attributeName = (String)attributeNames.nextElement();
                   attributeValue = session.getAttribute(attributeName);
                   handleIt(attributeName, attributeValue);               
              System.out.println(sb.toString());
         private void handleIt(String attributeName, Object attributeValue) {           
              if (attributeValue != null) {          
                   boolean isPrimitive = attributeValue.getClass().isPrimitive();
                   if (isPrimitive) {
                        sb.append("{" + attributeName + ":" + sizeOf(attributeValue) + "}");
                   } else {
                        sb.append("{" + attributeName + ":" + sizeOf(attributeValue) + "{");               
                        Field[] fields = attributeValue.getClass().getDeclaredFields();
                        String name;
                        Object value = null;
                        int lim = fields.length;
                        for (int i = 0; i < lim; i++) {
                             name = fields.getName();                                                                                                         
                             if (!name.endsWith("_VALUE") && !name.equals("SIZE") && !name.equals("serialVersionUID")) {
                                  try {
                                       value = fields[i].get(attributeValue);
                                  } catch(Exception e) {
                                       //PENDIENTE: Tratamiento excepción
                                  handleIt(name, value);
                        sb.append("}");               
         private int sizeOf(Object obj) {
              //Valid only for Serializables
              ByteArrayOutputStream baos = new ByteArrayOutputStream();
              ObjectOutputStream oos = null;     
              byte[] bytes = null;               
              try {          
                   oos = new ObjectOutputStream(baos);
                   oos.writeObject(obj);
                   bytes = baos.toByteArray();
              } catch(Exception e) {               
                   //PENDIENTE: Tratamiento excepción
              } finally {
                   if (oos != null) {
                        try {
                             oos.close();
                        } catch(Exception e) {
                             //PENDIENTE: Tratamiento excepción                         
                   if (baos != null) {
                        try {
                             baos.close();
                        } catch(Exception e) {
                             //PENDIENTE: Tratamiento excepción                         
              int size = -1;
              if (bytes != null) {
                   size = bytes.length;
              return size;          

  • How to get the number of bytes stored in a field?

    Hi Guys,
    How can i get the number of bytes stored in a field.
    I tried using DESCRIBE FIELD, But here i am getting the length from the definition.
    i.e 8 bytes for string and for character value is from definition.
    Prompt replies will be Awarded with full points:-)
    Thanks,
    vinod.

    u see this : http://help.sap.com/saphelp_nw04/helpdata/en/cf/21f2e5446011d189700000e8322d00/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21f2e5446011d189700000e8322d00/frameset.htm
    Madhavi

  • How to get the current schema name

    Hi,
    Can anybody please tell me how to get the current schema name, there is some inbuilt function for this,but i am not getting that. Please help me.
    Thanks
    Jogesh

    ok folks, I found the answer at Tom's as usual.
    http://asktom.oracle.com/tkyte/who_called_me/index.html
    I rewrote it into a function for kicks. just pass the results of DBMS_UTILITY.FORMAT_CALL_STACK to this function and you will get back the owner of the code making the call as well some extra goodies like the name of the code and the type of code depending on the parameter. This ignores the AUTHID CURRENT_USER issues which muddles the schemaid. Quick question, does the average user always have access to DBMS_UTILITY.FORMAT_CALL_STACK or does this get locked down on some systems?
    cheers,
    paul
    create or replace
    FUNCTION SELF_EXAM (
       p_call_stack VARCHAR2,
       p_type VARCHAR2 DEFAULT 'SCHEMA'
    ) RETURN VARCHAR2
    AS
       str_stack   VARCHAR2(4000);
       int_n       PLS_INTEGER;
       str_line    VARCHAR2(255);
       found_stack BOOLEAN DEFAULT FALSE;
       int_cnt     PLS_INTEGER := 0;
       str_caller  VARCHAR2(30);
       str_name    VARCHAR2(30);
       str_owner   VARCHAR2(30);
       str_type    VARCHAR2(30);
    BEGIN
       str_stack := p_call_stack;
       -- Loop through each line of the call stack
       LOOP
         int_n := INSTR( str_stack, chr(10) );
         EXIT WHEN int_cnt = 3 OR int_n IS NULL OR int_n = 0;
         -- get the line
         str_line := SUBSTR( str_stack, 1, int_n - 1 );
         -- remove the line from the stack str
         str_stack := substr( str_stack, int_n + 1 );
         IF NOT found_stack
         THEN
            IF str_line like '%handle%number%name%'
            THEN
               found_stack := TRUE;
            END IF;
         ELSE
            int_cnt := int_cnt + 1;
             -- cnt = 1 is ME
             -- cnt = 2 is MY Caller
             -- cnt = 3 is Their Caller
             IF int_cnt = 1
             THEN
                str_line := SUBSTR( str_line, 22 );
                dbms_output.put_line('->' || str_line);
                IF str_line LIKE 'pr%'
                THEN
                   int_n := LENGTH('procedure ');
                ELSIF str_line LIKE 'fun%'
                THEN
                   int_n := LENGTH('function ');
                ELSIF str_line LIKE 'package body%'
                THEN
                   int_n := LENGTH('package body ');
                ELSIF str_line LIKE 'pack%'
                THEN
                   int_n := LENGTH('package ');
                ELSIF str_line LIKE 'anonymous%'
                THEN
                   int_n := LENGTH('anonymous block ');
                ELSE
                   int_n := null;
                END IF;
                IF int_n IS NOT NULL
                THEN
                   str_type := LTRIM(RTRIM(UPPER(SUBSTR( str_line, 1, int_n - 1 ))));
                 ELSE
                   str_type := 'TRIGGER';
                 END IF;
                 str_line  := SUBSTR( str_line, NVL(int_n,1) );
                 int_n     := INSTR( str_line, '.' );
                 str_owner := LTRIM(RTRIM(SUBSTR( str_line, 1, int_n - 1 )));
                 str_name  := LTRIM(RTRIM(SUBSTR( str_line, int_n + 1 )));
              END IF;
           END IF;
       END LOOP;
       IF UPPER(p_type) = 'NAME'
       THEN
          RETURN str_name;
       ELSIF UPPER(p_type) = 'SCHEMA.NAME'
       OR    UPPER(p_type) = 'OWNER.NAME'
       THEN
          RETURN str_owner || '.' || str_name;
       ELSIF UPPER(p_type) = 'TYPE'
       THEN
          RETURN str_type;
       ELSE
          RETURN str_owner;
       END IF;
    END SELF_EXAM;

  • How to get the current PDF filename?

    Hi everyone,
    I know this might be a question that has been asked millions of times but I couldn't find a direct answer.
    I'm using a work flow that comes with a Content Manager Solution so it is not Adobe this WF will generate a very long file name (about 30 characters) which will be used as the unique process number.
    To move to the next step in the work flow I have to update the table in the database and the record to be updated will use the process number.  What I did is I added a hidden text field to the form which should have the process number on the initialize function.
    Now my question is how to get the file name of the opened PDF file??
    I'm sure there is a function in JS but I couldn't find the way to do it.
    Thanks in advance guys for the help.
    Mazen

    Thanks Bruce, it worked.
    Here is what I did:
    I create a textfield and added this script in initialize event:
    ==============================================================
    var 
    fileName = event.target.documentFileName;
    //removing the file extensionvar  vDot = fileName.length-4;
    //apply the value to the TxtFieldthis.rawValue= fileName.substring(0,vDot);

Maybe you are looking for

  • MobileMe "New Calendar" upgrade by Microsoft...??

    Am I missing something? Was the new mobileMe calendar upgrade designed by Microsoft instead of by Apple? Things are supposed to get better with Apple, not worse as with Microsoft. iCal before the new calendar upgrade - Organizer sends me new iCal eve

  • Itunes on windows vista doesn't recognized my iphone

    First of all I am having issues with even getting iTunes on my computer but when I did have it on it when I connected my phone to sync it it didn't even recognized my phone. Why is that?

  • Udev misses some (HDMI) plug/unplug events

    When I monitor udev events while plugging and unplugging my external hdmi monitor, only some random events are reported. It should be noted that I use a DVI screen with an HDMI cable and a small adapter between the cable and the screen. Here is a sam

  • [svn:bz-trunk] 17299: BLZ-555: Bad version number in . class when starting JBoss 5.x with latest BlazeDS app

    Revision: 17299 Revision: 17299 Author:   [email protected] Date:     2010-08-12 05:36:37 -0700 (Thu, 12 Aug 2010) Log Message: BLZ-555: Bad version number in .class when starting JBoss 5.x with latest BlazeDS app The "testdata" package has been comp

  • Employee Performance Management in SAP Portal

    Hi, I would like some advice on the best possible way of implementing Performance Management through SAP Portal. What do you suggest? I was reading about MSS business packages and it comes with two iviews: Status Overview and Performance Management D