How to get the value of an xml element attributes

Oracle Database 10g Enterprise Edition Release 10.2.0.4.0

I'm trying to parse an XML document

< response >
< well uwi = "102112900816W400" > < / well >
< production >
< PRODUCING_ENTITY >
< NUMBER YEAR = '2009' >
< NUMBER of MONTHS = LAST_DAY '1' = "31" / >
< NUMBER of MONTHS = LAST_DAY '2' = "28" / >
< NUMBER of MONTHS = LAST_DAY "3" = "30" / >
< / YEAR >
< NUMBER YEAR = '2010' >
< NUMBER of MONTHS = LAST_DAY '1' = "31" / >
< NUMBER of MONTHS = LAST_DAY '2' = "28" / >
< NUMBER of MONTHS = LAST_DAY "3" = "30" / >
< / YEAR >
< NUMBER YEAR = '2011' >
< NUMBER of MONTHS = LAST_DAY '1' = "31" / >
< NUMBER of MONTHS = LAST_DAY '2' = "28" / >
< NUMBER of MONTHS = LAST_DAY "3" = "30" / >
< / YEAR >
< NUMBER YEAR = '2012' >
< NUMBER of MONTHS = LAST_DAY '1' = "31" / >
< NUMBER of MONTHS = LAST_DAY '2' = "28" / >
< NUMBER of MONTHS = LAST_DAY "3" = "30" / >
< / YEAR >
< / PRODUCING_ENTITY >
< / production >
< / well >
< well uwi = "100092900816U400" > < / well >
< production >
< PRODUCING_ENTITY >
< NUMBER YEAR = "1999" >
< NUMBER of MONTHS = LAST_DAY '1' = "31" / >
< NUMBER of MONTHS = LAST_DAY '2' = "28" / >
< NUMBER of MONTHS = LAST_DAY "3" = "30" / >
< / YEAR >
< NUMBER YEAR = '2000' >
< NUMBER of MONTHS = LAST_DAY '1' = "31" / >
< NUMBER of MONTHS = LAST_DAY '2' = "28" / >
< NUMBER of MONTHS = LAST_DAY "3" = "30" / >
< / YEAR >
< NUMBER YEAR = '2001' >
< NUMBER of MONTHS = LAST_DAY '1' = "31" / >
< NUMBER of MONTHS = LAST_DAY '2' = "28" / >
< NUMBER of MONTHS = LAST_DAY "3" = "30" / >
< / YEAR >
< NUMBER YEAR = "2003" >
< NUMBER of MONTHS = LAST_DAY '1' = "31" / >
< NUMBER of MONTHS = LAST_DAY '2' = "28" / >
< NUMBER of MONTHS = LAST_DAY "3" = "30" / >
< / YEAR >
< / PRODUCING_ENTITY >
< / production >
< / well >
< / answer >

For the purposes of the practice, I have saved this in my table tdw_test_xml_files;

My goal is to get the /WELL/@uwi and /YEAR/@NUMBER

UWI YEAR
------ ---------------
102112900816W400 2009
102112900816W400 2010
102112900816W400 2011
102112900816W400 2012
100092900816U400 1999
100092900816U400 2000
100092900816U400 2001
100092900816U400 2003


I tried this... but I can't get the value of the attribute for the element < YEAR >

Select r.uwi, r.year
of tdw_test_xml_files.
XMLTABLE
(
"for $WELL in $ response/WELL/good.
for $DEPT to $UWIIDX in $WELL, Production, PRODUCING_ENTITY, YEAR
return < RESULT >
University of the West Indies West <>{fn:data($WELL/@uwi)} < / UWI >}
{
$WELL/production/PRODUCING_ENTITY/YEAR [$UWIIDX]-> (I don't know how to extract the value of the attribute here)
}
< / RESULT > '
passing FILECONTENT as 'GOOD '.
columns
UWI VARCHAR (50),
YEAR vARCHAR2 (24)
) r
/


If I do this; I get the Cartesian plan result set, which is not my goal

SELECT xtab.*, xtab2.*
OF tdw_test_xml_files, XMLTable (' for $i in/Response/Well)
Return $i"
PASSAGE filecontent
Uwi varchar2 COLUMNS (50) PATH'@uwi'
rn for ORDINALITE
) xtab
, XMLTable (' for $i in/Response/Well/Production/PRODUCING_ENTITY/YEAR)
Return $i"
PASSAGE filecontent
COLUMNS year varchar2 (50) PATH'@NUMBER'
) xtab2;

Any help will be highly appreciated thanks...

I'm just curious to know how make the query now in unique XMLTable, not that I am forced by using x number of xmltable; - P, just look more clean...

Here goes:

SQL> SELECT x.*
  2  FROM tdw_test_xml_files t
  3     , XMLTable(
  4         'for $i in /Response/Well
  5            , $j in $i/Production/PRODUCING_ENTITY/YEAR
  6            , $k in $j/MONTH
  7          return element r {
  8            $i/@uwi
  9          , element year  {data($j/@NUMBER)}
 10          , element month {data($k/@NUMBER)}
 11          }'
 12         passing t.filecontent
 13         columns uwi   varchar2(50) path '@uwi'
 14               , yr    varchar2(4)  path 'year'
 15               , mon   varchar2(2)  path 'month'
 16       ) x
 17  ;

UWI                            YR   MON
------------------------------ ---- ---
102112900816W400               2009 1
102112900816W400               2009 2
102112900816W400               2009 3
102112900816W400               2010 1
102112900816W400               2010 2
102112900816W400               2010 3
102112900816W400               2011 1
102112900816W400               2011 2
102112900816W400               2011 3
102112900816W400               2012 1
102112900816W400               2012 2
102112900816W400               2012 3
100092900816U400               1999 1
100092900816U400               1999 2
100092900816U400               1999 3
100092900816U400               2000 1
100092900816U400               2000 2
100092900816U400               2000 3
100092900816U400               2001 1
100092900816U400               2001 2
100092900816U400               2001 3
100092900816U400               2003 1
100092900816U400               2003 2
100092900816U400               2003 3

24 rows selected
 

Tags: Database

Similar Questions

  • How to get the previous group on XML element

    My XML structure goes like this.

    <? XML version = "1.0" encoding = "UTF-8"? >
    < SA321 >
    PT BOOK < P_BOOK > < / P_BOOK >
    < P_YEAR > 2009 < / P_YEAR >
    < LIST_G_FAMILY >
    < G_FAMILY >
    < PARENT_FAMILY > 2240 < / PARENT_FAMILY >
    < FAM_CODE_DESC > Cruiser informatico < / FAM_CODE_DESC >
    < SUBTOT_FLAG > Y < / SUBTOT_FLAG >
    < NEW_USED > NEW < / NEW_USED >
    < LIST_G_ASSET >
    < G_ASSET >
    < ASSET_DESCR > 2240 - Cruiser informatico < / ASSET_DESCR >
    < ACQUISITION_YEAR > 2009 < / ACQUISITION_YEAR >
    JANUARY < EFFECTIVE_MONTH > < / EFFECTIVE_MONTH >
    < EFFECTIVE_YEAR > 2009 < / EFFECTIVE_YEAR >
    < ASSET_AMOUNT > 3000 < / ASSET_AMOUNT >
    < EXEMPT_GAIN_AMOUNT > 450 < / EXEMPT_GAIN_AMOUNT >
    < EXPECTED_LIFE_YRS / >
    < PRV_FY_NBV > 0 < / PRV_FY_NBV >
    < RATES_DEC > 37.5 < / RATES_DEC >
    < RATE_FROM_LAW > 50 < / RATE_FROM_LAW >
    < RATES_DEC1 / >
    < 1 > 0 < / 1 >
    < FISCAL_LIMIT > 1275 < / FISCAL_LIMIT >
    < DEPRN_RATE > 25 < / DEPRN_RATE >
    < PY_DEPRN_RESERVE > 0 < / PY_DEPRN_RESERVE >
    < YTD_DEPRN > 749.99 < / YTD_DEPRN >
    < ACCUM_DEPRN > 749.99 < / ACCUM_DEPRN >
    < NET_BOOK_VALUE > 2250.01 < / NET_BOOK_VALUE >
    < YTD_IMPAIRMENT > 0 < / YTD_IMPAIRMENT >
    < IMPAIRMENT_RESERVE > 0 < / IMPAIRMENT_RESERVE >
    < ACCUM_LOST_RATES > 0 < / ACCUM_LOST_RATES >
    < DEPR_REINT_LOSS_NOTEXP > 0 < / DEPR_REINT_LOSS_NOTEXP >
    < GAIN_AMOUNT > 600 < / GAIN_AMOUNT >
    < GAIN_YEAR > 2006 < / GAIN_YEAR >
    < > 110270 ASSET_ID < / ASSET_ID >
    < > 110270 ASSET_ID < / ASSET_ID >
    < REINT_NOT_ACC > 437.5 < / REINT_NOT_ACC >
    < PY_COL15 > 0 < / PY_COL15 >
    < LIST_G_COL15 >
    < G_COL15 >
    < COL15_TOT > 0 < / COL15_TOT >
    < COL16_TOT / >
    < COL_16 > 0 < / COL_16 >
    < / G_COL15 >
    < / LIST_G_COL15 >
    < / G_ASSET >
    < G_ASSET >
    < ASSET_DESCR > 2240 - Cruiser informatico < / ASSET_DESCR >
    < ACQUISITION_YEAR > 2009 < / ACQUISITION_YEAR >
    JUNE < EFFECTIVE_MONTH > < / EFFECTIVE_MONTH >
    < EFFECTIVE_YEAR > 2009 < / EFFECTIVE_YEAR >
    < ASSET_AMOUNT > 1500 < / ASSET_AMOUNT >
    < EXEMPT_GAIN_AMOUNT > 0 < / EXEMPT_GAIN_AMOUNT >
    < EXPECTED_LIFE_YRS / >
    < PRV_FY_NBV > 0 < / PRV_FY_NBV >
    < RATES_DEC > 40 < / RATES_DEC >
    < RATE_FROM_LAW > 50 < / RATE_FROM_LAW >
    < RATES_DEC1 / >
    < 1 > 0 < / 1 >
    < FISCAL_LIMIT > 750 < / FISCAL_LIMIT >
    < DEPRN_RATE > 20 < / DEPRN_RATE >
    < PY_DEPRN_RESERVE > 0 < / PY_DEPRN_RESERVE >
    < YTD_DEPRN > 316.95 < / YTD_DEPRN >
    < ACCUM_DEPRN > 166.95 < / ACCUM_DEPRN >
    < NET_BOOK_VALUE > 1333.05 < / NET_BOOK_VALUE >
    < YTD_IMPAIRMENT > 150 < / YTD_IMPAIRMENT >
    < IMPAIRMENT_RESERVE > 150 < / IMPAIRMENT_RESERVE >
    < ACCUM_LOST_RATES > 2.92 < / ACCUM_LOST_RATES >
    < DEPR_REINT_LOSS_NOTEXP > 0 < / DEPR_REINT_LOSS_NOTEXP >
    < GAIN_AMOUNT > 0 < / GAIN_AMOUNT >
    < GAIN_YEAR / >
    < > 110289 ASSET_ID < / ASSET_ID >
    < > 110289 ASSET_ID < / ASSET_ID >
    < REINT_NOT_ACC > 89,32 < / REINT_NOT_ACC >
    < PY_COL15 > 0 < / PY_COL15 >
    < LIST_G_COL15 >
    < G_COL15 >
    < COL15_TOT > 0 < / COL15_TOT >
    < COL16_TOT / >
    < COL_16 > 0 < / COL_16 >
    < / G_COL15 >
    < / LIST_G_COL15 >
    < / G_ASSET >
    < / G_FAMILY >
    < / LIST_G_FAMILY >
    < / SA321 >

    Now, I have a query like the following.

    Select *.
    FROM (SELECT sap_getFileContent ('o5875854.xml', 'DIR') report_data)
    T FROM dual)
    xmltable)
    "SA321/LIST_G_FAMILY/G_FAMILY/LIST_G_ASSET/G_ASSET.
    by the way of xmltype (t.report_data)
    path of VARCHAR2 (50) column column1 ' / SA321, LIST_G_FAMILY, G_FAMILY, PARENT_FAMILY.
    , path VARCHAR2 (100) Column2 "ASSET_DESCR."
    , Column3 VARCHAR2 (50) path 'EFFECTIVE_MONTH '.
    , NUMBER column4 path 'EFFECTIVE_YEAR '.
    , path NUMBER column 5 "ASSET_AMOUNT".
    , path NUMBER column6 "EXEMPT_GAIN_AMOUNT".
    , path NUMBER column7 'EXPECTED_LIFE_YRS '.
    , path NUMBER column8 'YTD_DEPRN '.
    , path NUMBER column9 "PY_DEPRN_RESERVE".
    , path NUMBER column10 'RATE_FROM_LAW '.
    , column11 NUMBER path '1 '.
    , path NUMBER column12 'FISCAL_LIMIT '.
    , path NUMBER column13 'YTD_IMPAIRMENT '.
    , path NUMBER column14 'ACCUM_LOST_RATES '.
    , path NUMBER column15 'YTD_IMPAIRMENT '.
    , path NUMBER column16 ' LIST_G_COL15/G_COL15/COL_16.
    ) x ;

    the query always returns NULL for collumn1. Can someone help me please.

    Concerning
    SAP

    Hello

    Your example of XML code is not correct, there is no LIST_G_ASSET element closing tag.
    But I guess that's not the real problem.

    the query always returns NULL for collumn1.

    The important thing to understand is that the paths that you declare in the COLUMNS clause are relative to the context item is past the main XQuery expression. He knows more about the rest of the document, in particular of his ancestors.
    In this case, you try to process a node whose absolute path would be

    /SA321/LIST_G_FAMILY/G_FAMILY/PARENT_FAMILY
    

    in a document which the node root is G_ASSET.

    The solution is to divide the query into two parts, the first one finds PARENT_FAMILY and the collection of G_ASSET and the second more shreds the collection G_ASSET is passed the first XMLTable in relational lines:

    SQL> SELECT x1.column1
      2       , x2.*
      3  FROM XMLTable(
      4         '/SA321/LIST_G_FAMILY/G_FAMILY'
      5         passing xmltype(bfilename('TEST_DIR','o5875854.xml'), nls_charset_id('AL32UTF8'))
      6         columns
      7           column1     VARCHAR2(50)  path 'PARENT_FAMILY'
      8         , assets      XMLType       path 'LIST_G_ASSET'
      9       ) x1
     10     , XMLTable(
     11         '/LIST_G_ASSET/G_ASSET'
     12         passing x1.assets
     13         columns
     14           column2 VARCHAR2(100) path 'ASSET_DESCR'
     15         , column3 VARCHAR2(50)  path 'EFFECTIVE_MONTH'
     16         , column4 NUMBER        path 'EFFECTIVE_YEAR'
     17         , column5 NUMBER        path 'ASSET_AMOUNT'
     18         , column6 NUMBER        path 'EXEMPT_GAIN_AMOUNT'
     19         , column7 NUMBER        path 'EXPECTED_LIFE_YRS'
     20         , column8 NUMBER        path 'YTD_DEPRN'
     21         , column9 NUMBER        path 'PY_DEPRN_RESERVE'
     22         , column10 NUMBER       path 'RATE_FROM_LAW'
     23         , column11 NUMBER       path 'CASE1'
     24         , column12 NUMBER       path 'FISCAL_LIMIT'
     25         , column13 NUMBER       path 'YTD_IMPAIRMENT'
     26         , column14 NUMBER       path 'ACCUM_LOST_RATES'
     27         , column15 NUMBER       path 'YTD_IMPAIRMENT'
     28         , column16 NUMBER       path 'LIST_G_COL15/G_COL15/COL_16'
     29       ) x2
     30  ;
    
    COLUMN1    COLUMN2                          COLUMN3        COLUMN4    COLUMN5    COLUMN6    COLUMN7    COLUMN8    COLUMN9   COLUMN10   COLUMN11   COLUMN12   COLUMN13   COLUMN14   COLUMN15   COLUMN16
    ---------- -------------------------------- ----------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
    2240       2240-Equipamento informatico     JANUARY           2009       3000        450                749,99          0         50          0       1275          0          0          0          0
    2240       2240-Equipamento informatico     JUNE              2009       1500          0                316,95          0         50          0        750        150       2,92        150          0
     
    
  • How to get the value of a literal XML node content in BPEL 2.0?

    Hello!

    I have a problem creating A Expression in the distribution of the XML literal one activity, I would like to help me...

    Well, I have the same activity in the 1.0 version of BPEL and is now different is BPEL 2.0,.

    I have a Web Service < WSEjecutaComandos > when having a function of controls remote that connects,

    Entries of my Web Service: "int numEquipo, String [] comandos, int numCta, int publicar, int, String date version"

    The second argument is an array of string type...

    Now in my BPEL process, I do is the following assignment:

    ************************************************************

    < assign the name = "AssignCreaPath" >

    < copy >

    < from >

    < literal >

    " < fnCRexecElement xmlns =" http://Servicios/ ">

    < numEquipo > 2 < / numEquipo >

    < comandos >mkdir etl/entries/mmkis /< / comandos >

    < numCuenta > 1 < / numCuenta >

    < publicar > 0 < / publicar >

    < / fnCRexecElement >

    < / literal >

    < / from >

    < to > $InvokeClear_fnCRexec_InputVariable.parameters < /pour >

    < / copy >

    < copy >

    (< a >concat(ora:getContentAsString($InvokeClear_fnCRexec_InputVariable.parameters/comandos),$inputVariable.payload/client:fecha)< / from >

    < to >$InvokeClear_fnCRexec_InputVariable.parameters/comandos< /pour >

    < / copy >

    < copy >

    < a > $InvokeVersion_fnGetVersionProcesoByFecha_OutputVariable.parameters/version < / from >

    < to > $InvokeClear_fnCRexec_InputVariable.parameters/version < /pour >

    < / copy >

    < copy >

    < a > $inputVariable.payload / client: date < / from >

    < to > $InvokeClear_fnCRexec_InputVariable.parameters/date < /pour >

    < / copy >

    < / assign >

    ***************************************************

    Well the conflict I have is as follows,

    previously defined an entitlement with the XML Fragment copied on the payload to the Web Service (WSEjecutaComandos), input variable

    and the XML code is copied to each of the variables,

    Then him concatenating input values (I noted in red) < comandos > with the value of 'farm' (String), and once again copy Variable < comandos > and has not had any problems

    but now with the new BPEL 2.0, I do the same thing now using literal XML (this good!) but the option to concatenate (that I've noticed in red) and copied to the same variable ( I noticed blue ), I mark the following error message:

    Error1.png

    I should know, I am doing wrong, or you need to to XPath function as the value that they already have the variable < comandos > will concatenate date,

    and is the final value of my entry, my Web Service.

    must be defined as table of values of type < comandos [i] >

    define the following activities before $InvokeClear_fnCRexec_InputVariable.parameters/comandos [1],

    but it seems that this BPEL 2.0 does not respect me in the form of hooks index.

    Thank you...

    See you soon,.

    I found the solution to get the value of an xml element and it concatenated with another variable within a beneficiary.

    is:

    ORA: getNodeValue (ora:getChildElement($InvokeCreaPath_fnCRexec_InputVariable.parameters,2))

    first get the desire here in my tree xml element is position 2 < comandos=""> and then get the value of this node.

    See you soon,.

  • XML: How to get the value of the node when the node of pasing as a parameter name

    Hello

    I've got some xml:

    var xmlData:XML = 
    <1stNode>
        <buttonID>first child node value</buttonID>
        <imageID>second child node value</imageID>
        <labelID>third child node value</labelID>
    </1stNode>
    

    So, I want to read the value of specific node based on a value passed to a function. .

    var buttonID = new Button;
    
    var imageID = new Image;
    
    var labelID = new Label;
    
    
    getNodeValue(buttonID); //the value here is set dynamically
    
    private function getNodeValue (nodeName:String):void {
    
    trace (xmlData.nodeName)                      //doesn't work
    
    var str:String = "xmlData." + nodeName;
    var xml:XMLList = str as XMLList             //doesn't work
    
    }
    

    I don't know how to get the value when the name of the node is changed dynamically.

    use:

    getNodeValue(buttonID); //the value here is set dynamically
    
    private function getNodeValue (nodeName:String):void {
    trace (xmlData[nodeName])
    }
    
    
  • How to get the value of a particular tag to a column (clob)

    Hi friends,

    How to get the value of a particular tag to a column (clob), which has an XML value?

    Thanks in advance.

    Kind regards
    Sirot Chauvet

    You are welcome, if you got your answer to the question as such brand

  • How to get the value of an editField on onUnfocus()

    I want to check the value of an editfield on focusout/focusouthandler(), how to get the value in the onUnfocus() method?

    getText

  • How to get the value of the TextField on Buton FieldChangeListener

    friends I am new on the development of blackberry applications could you please help me how to get the value of text I typed in the textField when I click the button?

    constructor

    public Dialogs()
    {
      
    using design in the same screen
      
    Display display = new MainScreen();
      
    ButtonField btnPress = new ButtonField();
    btnPress.setLabel ("press me");
    btnPress.setChangeListener (ButtonPressListener);
      
    TxtValue TextField = new TextField();
    txtvalue.setLabel ("enter something :");
      
    HFM VerticalFieldManager = new VerticalFieldManager (VerticalFieldManager.FIELD_VCENTER);
    HFM. Add (txtValue);
    HFM. Add (btnPress);
      
    mainScreen.add (hfm);
    pushScreen (mainScreen);
      
      
    }

    FieldChangeListener ButtonPressListener = new FieldChangeListener() {}
    ' Public Sub fieldChanged (field field, int context) {}
        
           
    Dialog.Alert (t.GetText ());
         
         
         
    }
    };

    any help would be appreciated.

    You must ensure that your FieldChangeListener has access to the object of txtvalue, while it can make a

    String inputString = txtvalue.getText ();

  • How to get the value of a column in sql query?

    Hi, anyone knows how to get the value of a column in sql query?

    Here is my code, the value must be 1350079224397 in my PB, but I get 0

    QString query ("SELECT version FROM db_version");

    QVariant result = sda.execute (query);
    QVariantMap versionMap = result.toList () such () .toMap ();
    If (! versionMap.IsEmpty ())
    {
    qDebug()<"Version: "=""><>
    }

    OK, I have the solution

    QString query ("SELECT version as version FROM db_version");

  • How to get the value on a model that is defined in the java code in email

    Hello

    I created a custom code and send email as well to custom component. I can send emails using the method:

    InternetFunctions.sendMailTo (EmailID, EmailTemplate, subject, cxt);

    But my problem is that I have to get a value in the model of "EmailTemplate" which are defined from java code. but I don't know how to get the value.

    I will highlight in the java code by using this code: binder.putLocal ("ErrorApproveRejectMsg", massegeBody);

    I'm trying to enhance the model using the code below, but not able to get.

    1 < $exec getValue ("#active", "ErrorApproveRejectMsg") $ >

    2 < $exec getValue ("#active", ErrorApproveRejectMsg) $ >

    3 < getValue ("ErrorApproveRejectMsg") $exec $ >

    4 < $exec getValue (ErrorApproveRejectMsg) $ >

    5 < getValue ("#local", ErrorApproveRejectMsg) $exec $ >

    6 < getValue ("#local", "ErrorApproveRejectMsg") $exec $ >

    7 < $ErrorApproveRejectMsg$ >

    8 < $exec ErrorApproveRejectMsg$ >

    Assuming that cxt will be your Service or execution context object

    You can do something like this

    DB. PutLocal ("ErrorApproveRejectMsg", "Error");

    cxt.setCachedObject ("DataBinder", db);

    PageMerger h = new PageMerger (db, cxt);

    cxt.setCachedObject ("PageMerger", h);

    InternetFunctions.sendMailTo (usersEmail, emailTemplate, emailSubject, cxt);

    where db is current databinder object, and you can put any variable custom in the workbook by using the putLocal method.

    Thank you

    Vikram

  • How to get the value with DBSequence in EL links

    Hello

    I have a DBSequence type id and check if the value is null or positive

    #{bindings. Id.inputValue! = null and links. Id.inputValue > 0? {"Edit": "Create"} does not work because the links. Id.inputValue returns a DBSequence and cannot convert Long

    How to get the value?

    JDev 11.1.1.6

    You can try this:

    #{bindings. Id.inputValue.sequenceNumber.value! = null and links. Id.inputValue.sequenceNumber.value > 0? {'Edit': 'Create'}

    Jean Lou

  • How to get the value of the outputtext in javascript and send it to backing bean

    Hi Experts ADF,

    JDev Version 11.1.1.7.0

    I have the following: the value of the outputtext must be treated in javascript and the serverlistener method has the same value. I founded this value returns a string that wshould see the mouseover NIJ.

    Help, please. Thanks in advance.

    < af:column sortProperty = "#{bindings." OrderProposalReadClient.hints.exceptions.name}.

    filterable = "true" sortable = "true".

    headerText = "#{suiviewBundle.EXCEPTIONS} '"

    ID = "c16" >

    < af:outputText value = "#{row.exceptions}" id = "ot32" clientComponent = "true" > "

    < af:clientListener type = "mouseOver".

    method = "customJsFunction" / >

    < af:serverListener type = "mycustomserverEvent".

    Method="#{pageFlowScope.ChangeOrderProposalBean.handleServerEvent}"/ >

    < / af:outputText >

    < / af:column >

    JavaScript

    < af:resource type = "javascript" >

    var customJsFunction = function (event)

    {

    var exceptiondata = AdfPage.PAGE.findComponentByAbsoluteId ('ot32');

    AdfCustomEvent.queue ();

    Returns true;

    }

    < / af:resource >

    BackingBean

    public String handleServerEvent(EC ClientEvent)

    {

    Please let me know how to get the value that javascript code sends here.

    Let's say javascript sends the value of outputtext as "001".

    So, I have to check "001" in my list and return a value that appears on mouseover.

    }

    Kind regards
    Roy

    Hello, Roy.

    To use the value on another component of the user interface, I shows an example:

    -code of the page

    shortDesc = "shortDesc" >

    method = "customJsFunction" / >


    -the javascript code

    var customJsFunction = function (event)

    {

    var exceptiondata = event.getSource ().findComponent("ot32").getValue ();

    AdfCustomEvent.queue (event.getSource (),

    "mycustomserverEvent,"

    {param1:exceptiondata},

    (true);

    Returns true;

    }

    -OutputTextCase11.java

    public void handleServerEvent (EC ClientEvent)

    {

    String param = (String) ce.getParameters () .get ("param1");

    RichOutputText outputText = (RichOutputText) ce.getComponent () .findComponent ("ot1");

    outputText.setShortDesc (param);

    outputText.setValue (param);

    AdfFacesContext.getCurrentInstance () .addPartialTarget (outputText);

    }

    I hope this helps you.

    RFH.

  • I'm new in indesign scripting, please tell me how to write a script to get the contents of an XML element and then sort all the content

    I'm new in indesign scripting, please tell me how to write a script to get the contents of an XML element and then sort all the content

    Hello

    Can the code below is useful for you, but I do not know how to sort.

    Change the tag based on your employment application.

  • How to get the value of a * Global * Application point of JS

    If we declare an element of the request, which is NOT a level of the page in question, how we get the value of this element in an Action dynamic JavaScript on a page?

    For example, we declare a "global" variable as an Application named DEFAULT_AJAX_SEPERATOR and set its value with a calculation of the claim "on the new Instance" a moment later, on a page of the application, we would like to get the value of DEFAULT_AJAX_SEPERATOR via JavaScript.

    Page* level syntax element...
    $v( 'DEFAULT_AJAX_SEPERATOR' );
    .. How does not work. I don't understand why it's like $v can only access the elements on the page. However, the APEX is clearly able to get these global values since, for example, they are available in PL/SQL blocks. Also, I know that it is on the session object, because I can see it when viewing the session.

    So... What is sauce secret for obtaining this value?

    Thank you

    -Joe

    Hello
    Use something like this in your javascript code.

    var appItemVal = "& DEFAULT_AJAX_SEPERATOR.";

    Thank you
    Naidu789.

    If you think, I responded to your question, please mark as answer.

  • How to get the value of PMT in oracle?

    Hi all

    I need to calculate the value of the PMT


    There is the Excel PMT function == > PMT (rate, nPer, PV, (FV), (TYPE))

    I have to calculate using pl/sql.

    Can any body help how to get the value of PMT in PL/SQL?

    Thanks for your help.

    Kind regards
    Iwanto

    There is no Oracle built-in function to calculate the payments, but the formula is easy to find. If you look at using Excel PV function, you should find the formula that excel uses to calculate. You can rearrange the calculation in terms of payment. If FV and TYPE are 0, then the calculation is

    PV*rate*power((1+rate),nPer)/(power((1+rate),nPer) - 1)
    

    You don't need really PL/SQL to do this.

    Kind regards
    Bob

  • How to get the values of page jspx (view layer) to the custom method defined in AM

    Hello

    I have 1 text field and 1 submit to homepage.jspx. When I click the button submit, it will call the custom method defined in the 'Module of the Application' java class (ApplicationModuleImpl.java). Can I know how to get the value of this text field in this custom method.

    I used the getter and setter method, however it didn't work as it is defining the value correctly, but get method returns null. Its not allowing to use FacesContext. Could someone please tell me how to get the value of the text field to this custom method (that is, using ADFContext,... something like that)

    Thanks in advance

    User,
    you have mixed up something here. Bean (as you did) cannot use the module of the application. They belong to different layers.
    I suggest you to look at some first tutorials (http://docs.oracle.com/cd/E18941_01/tutorials/toc.htm) or watch the developer guide http://docs.oracle.com/cd/E16162_01/web.1112/e16182/toc.htm and take a look at some of the videos http://www.oracle.com/technetwork/developer-tools/adf/learnmore/adfinsider-093342.html

    Timo

Maybe you are looking for