How to get the Values i need from a String???

hi i need some help on my program,
I have a Server that actually sent some data to my Client.
The data consist of some messages and intergers . The whole piece of data is stores as a String message.
ARRAY 'Monitor Chart' 2 5
'Total OverFlow' 'Queued' 'Completed' 'Host Resets' 'Errors'''
0.0 1.0 2.0 3.0 4.0
'Series1' 11.0 0.6 8.6 11.5 6.6
'Series2' 12.8 6.7 21.6 11.1 30.0Inside the Client i need to get the values out to showed on my textfields
Example :
Tf1 = 11.0
Tf2 = 0.6
Tf3 = 8.6
Tf4 = 11.5
Tf5 = 6.6
Question: How to i get the values out from the String???

using the split() method. i am able to split everything now
so it appear somthing like this :
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
public class testing{
     String d1 =     "ARRAY 'Monitor Chart' 1 5";
     String d2 = "'Total OverFlow' 'Queued' 'Completed' 'Host Resets' 'Errors'";
     String d3 = "'' 0.0 1.0 2.0 3.0 4.0 ";
     String d4 = "'Series1' 11.0 0.6 8.6 11.5 6.6 ";
     String d5 = "'Series2' 12.8 6.7 21.6 11.1 30.0 ";
     String data = d1 + d2 + d3 + d4 + d5;     
     public testing(){
          System.out.println(data);
          String[] result = data.split("\\s");
          for(int x=0;x<result.length;x++)
          System.out.println(result[x]);
     public static void main (String args[])throws IOException{
        testing Application = new testing();
}ARRAY
'Monitor
Chart'
2
5
'Total OverFlow'
'Queued'
'Completed'
'Host Resets'
'Errors'''
0.0
1.0
2.0
3.0
4.0
'Series1'
11.0
0.6
8.6
11.5
6.6
'Series2'
12.8
6.7
21.6
11.1
30.0
but how do i get the values out ??how do i noe it is which index or wad?
11.0
0.6
8.6
11.5
6.6

Similar Messages

  • How to get the value of column from previous row to current row?

    Hi All,
    I am facing a critical problem in SQL query (for reporting purpose (COGNOS)). please reply to my query.
    REQUIREMENT: i want to retrive value of a column (this is not a table column, this will be calculated based expression) from previous row to current row.
    EXAMPLE:
    TABLE NAME: i have to join multiple tables. so, i am not mentioning table names here.
    DISPLAY COLUMNS in the report: item, loc, sku, beginval (not table column), endval (not table column, this will calculated based on some expressions), etc. Here, first time the value of BEGINVAL will be taken from some x column name of x table. ENDVAL will calculated based on the expression. For the next row onwards, BEGINVAL will become the value of ENDVAL and the value of ENDVAL will be calculated based on the expression and this expression uses the value of BEGINVAL.
    my report will look like below.
    ITEM LOC SKU BEGINVAL ENDVAL
    1 HYD 1-HYD 10 10+1+2 (13)
    2 HYD 2-HYD 13 13+1+2 (16)
    3 SEC 3-SEC 16 16+1+2 (19)
    4 SEC 4-SEC 19 19+1+2 (22)
    etc....
    in the above output, BEGINVAL and ENDVAL columns are not part of any table. they are alias column names.if you observe intially BEGINVAL will be assigned to some value, but from subsequent rows, BEGINVAL will become the ENDVAL of previous row.
    Please help me on how to write this query?

    Hi, please find the detail description of the problom.
    DDL (table scripts)
    ITEM
    CREATE TABLE ITEM
    ITEM VARCHAR2(50 CHAR) NOT NULL,
    DESCR VARCHAR2(50 CHAR) DEFAULT ' ' NOT NULL,
    UOM           VARCHAR2(50 CHAR)
    SKU
    CREATE TABLE SKU
    ITEM VARCHAR2(50 CHAR) NOT NULL,
    LOC VARCHAR2(50 CHAR) NOT NULL,
    OH float
    SKUPROJSTATIC
    CREATE TABLE SKUPROJSTATIC
    ITEM VARCHAR2(50 CHAR) NOT NULL,
    LOC VARCHAR2(50 CHAR) NOT NULL,
    STARTDATE DATE
    VehicleLoad
    CREATE TABLE VEHICLELOAD
    LOADID VARCHAR2(50 CHAR) NOT NULL,
    DESCR VARCHAR2(50 CHAR) DEFAULT ' ' NOT NULL,
    SHIPDATE DATE DEFAULT TO_DATE('01/01/1970','MM/DD/YYYY') NOT NULL,
    ARRIVDATE      DATE
    VEHICLELOADLINE
    CREATE TABLE VEHICLELOADLINE
    LOADID VARCHAR2(50 CHAR) NOT NULL,
    ITEM VARCHAR2(50 CHAR) NOT NULL,
    QTY float(126)
    DML scripts
    I can't provide the the DML scripts, because its very huge data.
    Main QUERY is below.
    below is the query which i have to write and execute.
    select
    i.item,
    i.descr,
    i.unitsperpallet,
    sp.loc,
    sp.startdate,
    'Crucial_IND',
    LAG (EndBal,1,0) OVER (ORDER BY STARTDATE) BeginBal,
    SP.FCSTCUSTORDERS CustOrders,
    SP.COMMITINTRANSOUT,
    SP.RECARRIV,
    SP.TOTINTRANSIN,
    (BeginBal - sp.FCSTCUSTORDERS - sp.COMMITINTRANSOUT + sp.TOTINTRANSIN ) EndBal,
    'CuttingQty',
    VLL.QTY,
    vl.source,
    vl.arrivdate,
    vl.shipdate,
    vl.loadid,
    s.oh
    from item i, skuprojstatic sp, sku s, VehicleLoad vl, VehicleLoadLine vll
    where sp.item = i.item
    and s.item=i.item
    and sp.item =s.item (+)
    and sp.loc = s.loc (+)
    and vll.item = s.item
    and vll.loadid = vl.loadid
    and to_char(sp.startdate ,'mm/dd/yyyy') = to_char(vl.arrivdate,'mm/dd/yyyy')
    and sp.loc = vl.dest (+)
    order by sp.startdate
    problem description: in the above query, BeginBal and EndBal is what i am looking for. when i execute this query, oracle throwing an error saying that alias names can't be used as expressions. For the first row, the BeginBal should be the value sku.OH and for the subsequent rows, this value will be the previous row value of EndBal.

  • How to get the backup of photos from  i cloud id ?

    plz provide me the answers as soon as possible.

    BALAJI_PRASANNA wrote:
    Hello,
    I am very new to Labview. Í have an image of an LED and wanted to find the luminance value. I got the luminance image from the IMAQ ExtractSingleColorPlane but the value is not displaying. I just wanted to know how to get the value of luminance from the IMAQ ExtractSingleColorPlane. I have attached what i have done below.
    Thanks in advance.
    Before learning about LabVIEW, learn about images.  An Image (in LabVIEW) is a "representation of an image", that is, the wire itself doesn't really have a "value", but "points to" a collection of data that can be "imaged" (i.e. looked at as through it were a picture), "manipulated" (for example, extracting a color plane, basically getting the "red channel", an image looking as through it were viewed through a red filter), and possibly returning arrays of numbers representing the intensity of the light at a certain position in the picture.  
    BS

  • 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 from repeated frame?.

    Hi
    how to get the values from repeated frame?. i have to disply the first 3 digits in another place in my report.
    i have field empno in repeated frame and i want to disply first 3 digits in another place in the same report.
    thanks

    How often do you need to display it? It sounds like you might want to base a summary on that formula with a function of first or last. If it's a per page basis, it can be a page level summary. If it's at a higher level repeating frame, then you can create the summary at that level. I'd suggest taking a look at the online help for summaries using the first/last functions.
    Hope that helps,
    Toby

  • How to get the values from popup window to mainwindow

    HI all,
       I want to get the details from popup window.
          i have three input fields and one search button in my main window. when i click search button it should display popup window.whenever i click on selected row of the popup window table ,values should be visible in my main window input fields.(normal tables)
       now i am able to display popup window with values.How to get the values from popup window now.
       I can anybody explain me clearly.
    Thanks&Regards
    kranthi

    Hi Kranthi,
    Every webdynpro component has a global controller called the component controller which is visible to all other controllers within the component.So whenever you want to share some data in between 2 different views you can just make it a point to use the component controller's context for the same. For your requirement (within your popups view context) you will have have to copy the component controllers context to your view. You then will have to (programmatically) fill this context with your desired data in this popup view. You can then be able to read this context from whichever view you want. I hope that this would have made it clear for you. Am also giving you an [example|http://****************/Tutorials/WebDynproABAP/Modalbox/page1.htm] which you can go through which would give you a perfect understanding of all this. In this example the user has an input field in the main view. The user enters a customer number & presses on a pushbutton. The corresponding sales orders are then displayed in a popup window for the user. The user can then select any sales order & press on a button in the popup. These values would then get copied to the table in the main view.
    Regards,
    Uday

  • How to get the value from databank

    Hi,
    How to get the value from databank? and how to set the same value to visual script object?
    thanks,
    ra

    Hi,
    You can use GetDatabankValue(HeaderName, Value) to get the value from databank and SetDataBankValue(HeaderName, Value) to set the value to databank.
    You can refer to the API Reference to see list of associated functions and techniques we can use with related to Data Bank.
    This is the for OFT but if you are using Open Script then you have direct access for getting the databank value but when it comes to setting a value you have to use File operation and write you own methods to do the set operation.
    Thanks
    Edited by: Openscript User 100 on Nov 13, 2009 7:01 AM

  • How to get the values from html:select? tag..?

    i tried with this, but its not working...
    <html:select styleClass="text" name="querydefs" property="shortcut"
                 onchange="retrieveOptions()" styleId="firstBox" indexed="true">
    <html:options collection="advanced.choices" property="shortcut" labelProperty="label" />
    </html:select>
                        <td align="left" class="rowcolor1">
                        <script language="javascript" type="text/javascript">
                              function retrieveOptions(){
                             var sel = document.querydefs.options;
                             var selectedOption = sel[sel.selectedIndex].value;
                             document.write(selectedOption);
                           </script>

    <td align="left" class="rowcolor1">
                        <script language="javascript" type="text/javascript">
                              function retrieveOptions(){
                             var sel = document.querydefs.options;
                             var selectedOption = sel[sel.selectedIndex].value;
                             document.write(selectedOption);
                           </script>This java script is not working at all..its not printing anything in document.write();
    This is code..
    <td class="rowcolor1" width="20%">
    <html:select styleClass="text" name="querydefs" property="shortcut"
                             onchange="retrieveSecondOptions()" styleId="firstBox"
                             indexed="true">
                             <html:options collection="advanced.choices" property="shortcut"
                                  labelProperty="label"  />
                        </html:select>i tried with this also. but no use..i'm not the getting the seleced option...
    function retrieveOptions(){
    firstBox = document.getElementById('firstBox');
                             if(firstBox.selectedIndex==0){
          return;
        selectedOption = firstBox.options[firstBox.selectedIndex].value;
    }actually , how to get the values from <html:select> ...?
    my idea is to know which value is selected from the combo box(<html:select> ) if that value is equal some string i have enable a hyperlink to open a popup window

  • How to get the values from profileFormHandler

    Hi,
    here i have problem with how to get the values after setting the values to that , how i have to call repository, what repository i've to call?

    When you are setting values, check the repository(getRepository()) from which mutable repository item is created. Go to that class .properties file and check the repository mapping.
    -karthik

  • How to get the values of all elements and sub elements from  following xml

    how to get the values of all elements and sub elements from following xml...
    <?xml version="1.0" encoding="UTF-8" ?>
    <List_AML_Finacle xmlns="http://3i-infotech.com/Cust_AML_Finacle.xsd"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://3i-infotech.com/Cust_AML_Finacle.xsd List_AML_Finacle.xsd">
    <TransactionID>TransactionID</TransactionID>
    <Match>
    <Src_Matched_Field>Src_Matched_Field</Src_Matched_Field>
    <List_Matched_Field>
    <FSFM_Matches>
    <NUMBER>NUMBER</NUMBER>
    <TERROR>TERROR</TERROR>
    <TU>TU</TU>
    <NAMEU>NAMEU</NAMEU>
    <DESCRIPT>DESCRIPT</DESCRIPT>
    <KODCR>KODCR</KODCR>
    <KODCN>KODCN</KODCN>
    <AMR>AMR</AMR>
    <ADDRESS>ADDRESS</ADDRESS>
    <SD>SD</SD>
    <RG>RG</RG>
    <ND>ND</ND>
    <VD>VD</VD>
    <GR>GR</GR>
    <YR>YR</YR>
    <MR>MR</MR>
    <CB_DATE>CB_DATE</CB_DATE>
    <CE_DATE>CE_DATE</CE_DATE>
    <DIRECTOR>DIRECTOR</DIRECTOR>
    <FOUNDER>FOUNDER</FOUNDER>
    <TERRTYPE>TERRTYPE</TERRTYPE>
    </FSFM_Matches>
    <OfacMatchDetails>
    <UID>UID</UID>
    <TITLE>TITLE</TITLE>
    <SDNTYPE>SDNTYPE</SDNTYPE>
    <REMARKS>REMARKS</REMARKS>
    <ID_UID>ID_UID</ID_UID>
    <IDTYPE>IDTYPE</IDTYPE>
    <IDNUMBER>IDNUMBER</IDNUMBER>
    <IDCOUNTRY>IDCOUNTRY</IDCOUNTRY>
    <ISSUEDATE>ISSUEDATE</ISSUEDATE>
    <EXPIRATIONDATE>EXPIRATIONDATE</EXPIRATIONDATE>
    <ADDRESS1>ADDRESS1</ADDRESS1>
    <ADDRESS2>ADDRESS2</ADDRESS2>
    <ADDRESS3>ADDRESS3</ADDRESS3>
    <CITY>CITY</CITY>
    <STATEORPROVINCE>STATEORPROVINCE</STATEORPROVINCE>
    <POSTALCODE>POSTALCODE</POSTALCODE>
    <COUNTRY>COUNTRY</COUNTRY>
    </OfacMatchDetails>
    </List_Matched_Field>
    </Match>
    </List_AML_Finacle>

    avoid multi post
    http://forum.java.sun.com/thread.jspa?threadID=5249519

  • How to get the values of Select-options from the screen.

    The value of parameter can be obtained by function module 'DYNP_VALUES_READ' but How to get the values of Select-options from the screen? I want the F4 help values of select-options B depending on the values in Select-option A.So I want to read the Select-option A's value.

    Hi,
    Refer this following code..this will solve your problem...
    "Following code reads value entered in s_po select options and willprovide search
    "help for s_item depending upon s_po value.
    REPORT TEST.
    TABLES : ekpo.
    DATA: BEGIN OF itab OCCURS 0,
    ebelp LIKE ekpo-ebelp,
    END OF itab.
    SELECT-OPTIONS   s_po FOR ekpo-ebeln.
    SELECT-OPTIONS s_item FOR ekpo-ebelp.
    INITIALIZATION.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_item-low.
      DATA:
      dyn_field TYPE dynpread,
      temp_fields TYPE TABLE OF dynpread,
      zlv_dynpro TYPE syst-repid.
      zlv_dynpro = syst-repid.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname     = zlv_dynpro
          dynumb     = syst-dynnr
          request    = 'A'
        TABLES
          dynpfields = temp_fields
        EXCEPTIONS
          OTHERS     = 0.
      LOOP AT temp_fields INTO dyn_field.
        IF dyn_field-fieldname EQ 'S_PO-LOW'.
            SELECT * INTO CORRESPONDING fields OF TABLE itab FROM ekpo
            WHERE ebeln EQ dyn_field-fieldvalue.
            EXIT.
        ENDIF.
      ENDLOOP.

  • How to get the values from IDXML during a Pre processing

    Hi,
    I have a requirement to validate the attributes in the IDXML request while deactivating a user. I have configured a workflow with the steps "Initiate" "Externalaction" "Disable" "Commit".
    The following is my IDXML request. I want to get the values that is coming in the IDXML in the pre action (written a c++ plugin) and perform certain validations.
    <?xml version="1.0"?>
    <SOAP-ENV:Envelope
                             xmlns:SOAP-ENV="http://schemas-xmlsoap.org/soap/envelope/"
                             xmlns:oblix="http://www.oblix.com">
    <SOAP-ENV:Body>
         <oblix:authentication xmlns:oblix="http://www.oblix.com" type="basic">
              <oblix:login>adminuser</oblix:login>
              <oblix:password>password1</oblix:password>
         </oblix:authentication>
         <oblix:request application="userservcenter" function="workflowDeactivateUserSave">
         <oblix:params>     
              <oblix:param name="ObWorkflowName">obworkflowid=9bbb88b273b1012d000086E812d695ad,obcontainerId=workflowDefinitions,o=Oblix,dc=dnb,dc=com</oblix:param>          
              <oblix:param name="uid">[email protected],ou=dnbCustomers,ou=People,dc=dnb,dc=com</oblix:param>
              <oblix:param name="attrName_1">UserID</oblix:param>
              <oblix:param name="attrValue_1">[email protected]</oblix:param>
              <oblix:param name="attrValue_1_old">[email protected]</oblix:param>
              <oblix:param name="attrOperation_1">REPLACE</oblix:param>
              <oblix:param name="attrName_2">ApplicationID</oblix:param>
              <oblix:param name="attrValue_2">12345611</oblix:param>
              <oblix:param name="attrValue_2_old">123456</oblix:param>
              <oblix:param name="attrOperation_2">REPLACE</oblix:param>
              <oblix:param name="attrName_3">SubscriberNum</oblix:param>
              <oblix:param name="attrValue_3">09787655</oblix:param>
              <oblix:param name="attrValue_3_old">09787655</oblix:param>
              <oblix:param name="attrOperation_3">REPLACE</oblix:param>
              <oblix:param name="noOfFields">3</oblix:param>
         </oblix:params>
         </oblix:request>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    How to get the values "ApplicationID","SubscriberNum" inside the preaction hook (c++). Please provide suggestions.
    Thanks,
    Lakshmi

    Read the doc, write the code, test it and debug it . http://download.oracle.com/docs/cd/E15217_01/doc.1014/e12491/idapi.htm#CDEIDDAF

  • Variable type Hierarchy, how to get the value from another similar variable

    Hi.
    We have created a variable, type hierarchy (using ORGEH hierarchy in HR based on 0ORGUNIT). Let's call this VAR1. We want to fill this with an User Exit, beacuse we want VAR1 to have the value from another variable, VAR2, which is also type hierarchy (and based on the same characteristic).
    However, when we program this user exit and use the VAR1 afterwards, it just behaves as if we have a single characteristic value and not a node value. As a result, we just get posts which do have the 'parent itself' as characteristic value, and none of the subnodes...  Any hints as to what we can do in our User exit to get the value passed over from VAR2 to VAR1 as a node value? Is there any spesific syntax to be used here that we are missing? ( The VAR1 and VAR2 are both defined as hierarchy variables, we have double checked...).

    Hi,
    are you on BI7.0? There you can create variables type replacement path and get the value out from a different variable without any coding.
    regards
    Cornelia

  • 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 Portal Page name from PLSQL?

    Can anyone tell me how to get the portal page name from my dynamic page using plsql?
    Apparently you can get the page id and work it out from there, but my calls to get the page id are not returning any values anyway.
    My code for attempting to get the page id is below.
    <oracle>
    declare
    v_pageid varchar2(30);
    begin
    v_pageid := wwpro_api_parameters.get_value('_pageid', '/pls/portal30');
    htp.print('Page is '|| v_pageid);
    end;
    </oracle>
    Ideally I'd actually just like to get the page name. Is there a straightforward way to do this?
    Thanks in advance!
    Sarah

    Few clarifications -
    1. wwpro_api_parameters cannot be used to get default portal
    page parameters such as '_pageid', '_dad', '_schema' etc.,
    2. Page information can be obtained through any components which
    are available in that particular page. For example, in case of
    dynamic page, we need to publish it as a portlet and add it to the
    page. This process creates necessary packages in the DB, but we
    will not have access to the portlet methods.
    So, I would prefer creating a simple DB provider & portlet and access
    page title from its show method as follows -
    //Declare local variable l_page_id, l_page_title as varchar2
    select page_id into l_page_id from wwpob_portlet_instance$ where
    portlet_id = p_portlet_record.portlet_id and
    provider_id = p_portlet_record.provider_id;
    select name into l_page_title from wwpob_page$ where id=l_page_id;
    More information on DB provider can be found at
    http://portalstudio.oracle.com/pls/ops/docs/FOLDER/COMMUNITY/PDK/articles/understanding.database.providers.html
    Secondly, usage of wwpro_api_parameters.get_value method is
    incorrect. This method expects two arguments -
    <ul>
    <li><b>p_name : </b> The name of the parameter to be returned.</li>
    <li><b>p_reference_path : </b> An unique identifier for a portlet instance on the current page.</li>
    </ul>
    p_reference_path would be something like 99_SNOOP_PORTLET_76535103 and not some type of path as its name suggests.
    The following code fragment fetches all parameters available
    for a portlet.
    Note : Copy this code into 'show' method of your portlet.
    //Declare l_names, l_values as owa.vc_arr
    * Retreive all of the names of parameters for this portlet
    l_names := wwpro_api_parameters.get_names(
    p_reference_path=>p_portlet_record.reference_path);
    * Retreive all of the values of parameters for this portlet
    l_values := wwpro_api_parameters.get_values(p_names=>l_names,
    p_reference_path=>p_portlet_record.reference_path);
    //Loop through these arrays to get parameter information
    htp.p('<center><table BORDER COLS=2 WIDTH="90%" >');
    htp.p('<tr ALIGN=LEFT VALIGN=TOP>');
    htp.tableData(wwui_api_portlet.portlet_heading('Name',1));
    htp.tableData(wwui_api_portlet.portlet_heading('Value',1));
    htp.tableRowClose;
    if l_names.count = 0 then
    htp.p('<tr ALIGN=LEFT VALIGN=TOP>');
    htp.p('<td COLSPAN="2">'
    ||wwui_api_portlet.portlet_text(
    'No portlet parameters were passed on the URL.',1)
    ||'</td>');
    htp.tableRowClose;
    else
    for i in 1..l_names.count loop
    htp.p('<tr ALIGN=LEFT VALIGN=TOP>');
    htp.tableData(l_names(i));
    htp.tableData(l_values(i));
    htp.tableRowClose;
    end loop;
    end if;
    htp.p('</table></center>');
    Hope it helps...
    -aMJAD.

Maybe you are looking for

  • [SOLVED] Xorg crashes at random?

    Gnome/Xorg crashes at random for me sometimes. Happens almost everyday. Don't know what triggers it but I've been typing something on the keyboard every single time it happens. Here is my Xorg.0.log if it helps: This is a pre-release version of the X

  • No mention of contract expiry date on bill?

    I realise that when you enter into a new contract with BT you receive written details of start date, services etc. When logging in to My BT and viewing current balance, phone, broadband etc, I cannot see any reference to the contract period. Viewing

  • Exception occurs when list all certs in keystore!

    I import a xx.p12 certificate into the keystore.jks using pk12import utiliy, when i try to print the certificate infromation in the keystore using command: keytool -list -v -keystore keystore.jks, exections printed as below: #3: ObjectId: 2.5.29.31 C

  • Maximum RFC connections in RFC

    Hi all, i am facing a problem while trying to send lots of messages from R3 to XI via RFC Sender Adapter: See the SM21 log in sender system: (R3): Communication error, CPIC return code 027, SAP return code 677 > CPI-C function: CMINIT(SAP)   anf if i

  • Shot mark metadata from C300 not showing up

    I would love to see my "shot marks" that I set while recording with the Canon C300 show up on the clips in the timeline.  Is this possible?  Premiere Pro does not seem to recognize this data.  It does recognize the "Good Take" data but not the shot m