Any practical help about XML API for databases
HI friends,
I have a problem, i want to connect to my Database using JSP but by using XML api for database. I want to MAP my database tables, rows columns as xml elements to make it more flexible. Anyone who had practicaly worked on it, please help me out.
I am waiting for a quick response.
Thanks for any help in advance,
Yours Truly,
Khawaja Salman Sarfraz
Some databases have a feature that allows you to output the result of a query as XML. But that's not standard SQL, and it probably varies from one DB to the next. Look up the documentation for your DB for more information.
Similar Messages
-
What is the good voice xml api for java
dear buddies,
what is the best voice xml api for java? has somebody comeacross and work involving this, i would like to hear more about this
thanks
KuhaMaybe the VXML forum is a better place: http://www.voicexml.org/
Good luck. -
Question about Java API for XML schema?
Hello, everyone!
I am looking for a java api for XML schema. I hope the API is capable for parsing the structure of element
or complextype declarations in XML schema. So for example, if I specify a name of an element or
complextype defined in a schema, the name, dataype and other constraints of contained child elements can be returned.
Does anyone know if there exists such a paser?
Thanks very much!An implementation of DOM Level 3.
-
What is newest/best/simplest Java XML API for loading/saving/validating?
Here's what I need to do:
- Load XML files. Preferably validate using XSD validation referenced by "xsi:schemaLocation" hints.
- Generate XML files. I'd like to be able to specify indentation (tabs?) and "xsi:schemaLocation" XSD hints
- I'm working with fairly small configuration files, so I'd like to work with document-centric (and not streaming oriented) APIs.
I've spent a full day reading articles showing different code snippets for different APIs. There are dozens of standards and APIs. Also, all the articles that I can find are several years old at the least.
This is surprisingly complex for something so seemingly simple.
What's the best XML API that fits my criteria? Any links for code snippets and up-to-date documentation?
Thanks!Well, XML hasn't changed since it was formalized, and that was in 1999. So there's really no need for people to write new parsers every couple of years any more. And that's why you don't find new tutorials being written every year either. There's really not much need for that.
Anyway, my recommendation would be to use the classes that are built into your current version of Java. Use them for a while. Once you have experience with them, all those tutorials about other products will start to make sense and you will be able to make an educated decision for yourself. -
Need XML APIs for finding server status details
Hi,
Can any one help me with the XML API format for finding server status details like Admin State,Avail State,Assoc State,etc.
Thanks and Regards
-PrateekHere is a very basic example. I pulled out all the extra error trapping / logging. I have been building a module that simplifies most of this .. will produce simple Dumper output for what you are generally looking to do.
The below example will connect to a default UCSM emulator ( http://developer.cisco.com/web/unifiedcomputing/start ) .. just change IP to match. If you want a significantly more detailed information ( hierarchical ) ... change inHierarchical="false" to inHierarchical="true".
Let me know if you want something more specific.
#!/usr/local/bin/perl
use strict;
use warnings;
use Data::Dumper;
use LWP::UserAgent;
use HTTP::Request::Common;
use XML::Simple;
use POSIX;
$Data::Dumper::Purity = 1;
$Data::Dumper::Useqq = 1;
### Configurables
my $ucsm = "10.#.#.#";
my $user = "config";
my $pass = "config";
my $proto = "http";
my $cookie;
my $xml = XML::Simple->new();
my $xml_blade = XML::Simple->new(ForceArray => ['computeBlade']);
## Setup User Agent
my $ContentType = "application/x-www-form-urlencode";
my $userAgent = LWP::UserAgent->new(agent => 'perl post');
$userAgent->timeout(5);
&connect;
my $blades = &getblade;
print Dumper $blades;
&disconnect;
### Subroutines
sub connect {
my $message = q();
print 'http://'.$ucsm.'/nuova\n';
my $response = $userAgent->request(POST $proto.'://'.$ucsm.'/nuova', Content_Type => $ContentType, Content => $message);
my $xml_ref = $xml->XMLin($response->content);
$cookie = $xml_ref->{outCookie};
sub getblade {
my $message = q();
my $response = $userAgent->request(POST $proto.'://'.$ucsm.'/nuova', Content_Type => $ContentType, Content => $message);
my $xml_ref = $xml_blade->XMLin($response->content, keyattr => []);
return $xml_ref->{outConfigs};
sub disconnect {
my $message = q();
my $response = $userAgent->request(POST $proto.'://'.$ucsm.'/nuova', Content_Type => $ContentType, Content => $message); -
� XML Api for 1.3 java version?
Hello friends!! I need a little help...
I always have work in my programms with jbuilder, using java 1.3 version. The programs after will be installed in pc's where have de jre 1.3 or the 1.4 java version.
I need now to do a module wich need to work with XML.. exactly read xml only, for take some information.
I tried to use an famous api i have discover by "google":
import org.xml.sax.*But it not works in java 1.3!! Only for 1.4 or supperior...
Do you know any api for work with xml compatible with 1.3? I've tried to look this for google.com but it's a very complicated for me...
Thanks, all i need is the name : )If you need to work with java 1.3 you can use the Xerces XML parser
http://xerces.apache.org/xerces2-j
You only have to download it and add the jars to your classpath (see the xerces documentation for details)
Xerces-J also contains the org.xml.sax.* package
http://xerces.apache.org/xerces2-j/javadocs/api/index.html -
[METASOLV XML AP]devolop JAVA client using XML API for metasolv application
Hi All,
I am new in this group, and I need to help me to develop a java client to communicate with metasolv application using XML API.
I read "XML API Developer’s Reference" document, but I still not understand how can I setup the cllient.
I still need:
1- What API needed(jar files) I must use to build the client
2- A sample of source code using java.
3- detailed guide to communicate with metasolv application using XML API.
Thanks&Best Regards
RADOUANE Mohamedany help please!!!!
-
Can any one help about visit planning
Hi SAP Gurus,
can any one knows about visit planning in sapcrm and how we will integrate and without crm also they can plan their visits in ms-outlook
Regards,
reddyas a starter use the following link:http://help.sap.com/saphelp_crm50/helpdata/en/48/7b044017355c0ce10000000a1550b0/frameset.htm
this will give a good overview of the functionality.
hope this helps
RH -
Need help about roll ups for average that contains logic
--Hi everyone,
--I have posted this one on the forum before.
(how to do outer join select query for an APEX report )--I thought it works fine, but then yesterday, the tester check and said that the Average total is not correct
--the query is as below
DEFINE startmonth = "Aug 2012";
DEFINE endmonth = "Oct 2012";
WITH all_months AS
SELECT ADD_MONTHS(to_date('&startmonth','MON YYYY'), ROWNUM-1) AS which_month
, ADD_MONTHS(to_date('&startmonth','MON YYYY'), ROWNUM ) AS next_month
from all_objects
where
rownum <= months_between(to_date('&endmonth','MON YYYY'), add_months(to_date('&startmonth','MON YYYY'), -1))
SELECT ph.phase_number
,TO_CHAR (am.which_month, 'Mon YYYY') AS month
, NVL(sum ( (CASE
WHEN ph.date_finished IS NULL OR ph.date_finished > last_day(am.which_month)
THEN last_day(am.which_month)
ELSE ph.date_finished
END
) - ph.date_started + 1
) / count(def.def_id), 0) as avg_days
FROM all_months am
LEFT OUTER JOIN a_phase_membership ph PARTITION BY (ph.phase_number)
ON am.which_month <= ph.date_started
AND am.next_month > ph.date_started
AND ph.date_started <= last_day(am.which_month) -- May not be needed
AND ph.active = 1
LEFT OUTER JOIN a_engagement ce
ON ph.mpm_eng_id = ce.engagement_id
AND ce.court_name IS NOT NULL -- or something involving LIKE
LEFT OUTER join a_defendant def
ON ce.defendant_id = def.def_id
AND def.active = 1
GROUP BY ROLLUP(phase_number, am.which_month)
ORDER BY ph.phase_number, am.which_month
--result is
PHASE_NUMBER MONTH AVG_DAYS
PHASE ONE Aug 2012 0
PHASE ONE Sep 2012 12
PHASE ONE Oct 2012 8
PHASE ONE 11
PHASE THREE Aug 2012 0
PHASE THREE Sep 2012 1
PHASE THREE Oct 2012 0
PHASE THREE 1
PHASE TWO Aug 2012 0
PHASE TWO Sep 2012 9
PHASE TWO Oct 2012 14
PHASE TWO 11.5
9.71428571428571428571428571428571428571
--And the tester is right, AVG days for phase one should be (12+8) /3 = 6.67 not 11, the same with phase two and three.
-- I tried to put a union select below the above which wrap it and do the average, but found that this select is too long and cumbersome.
--I have to ask for the Forum expert again, is there any way to make it look like
PHASE_NUMBER MONTH AVG_DAYS
PHASE ONE Aug 2012 0
PHASE ONE Sep 2012 12
PHASE ONE Oct 2012 8
PHASE ONE 6.67
PHASE THREE Aug 2012 0
PHASE THREE Sep 2012 1
PHASE THREE Oct 2012 0
PHASE THREE 0.33
PHASE TWO Aug 2012 0
PHASE TWO Sep 2012 9
PHASE TWO Oct 2012 14
PHASE TWO 7.66
4.896... (average of Phase one, phase two, and phase three) --Here is the sample data structure (Database version is 11g)
CREATE TABLE "A_DEFENDANT"
"DEF_ID" NUMBER NOT NULL ENABLE,
"FIRST_NAME" VARCHAR2(50 BYTE),
"SURNAME" VARCHAR2(20 BYTE) NOT NULL ENABLE,
"DOB" DATE NOT NULL ENABLE,
"ACTIVE" NUMBER(2,0) DEFAULT 1 NOT NULL ENABLE,
CONSTRAINT "A_DEFENDANT_PK" PRIMARY KEY ("DEF_ID"));
Sample Data
Insert into A_DEFENDANT (DEF_ID,FIRST_NAME,SURNAME,DOB,ACTIVE) values (101,'Joe','Bloggs',to_date('12/12/99','DD/MM/RR'),1);
Insert into A_DEFENDANT (DEF_ID,FIRST_NAME,SURNAME,DOB,ACTIVE) values (102,'John','Smith',to_date('20/05/00','DD/MM/RR'),1);
Insert into A_DEFENDANT (DEF_ID,FIRST_NAME,SURNAME,DOB,ACTIVE) values (103,'Jane','Black',to_date('15/02/98','DD/MM/RR'),1);
Insert into A_DEFENDANT (DEF_ID,FIRST_NAME,SURNAME,DOB,ACTIVE) values (104,'Minnie','Mouse',to_date('13/12/88','DD/MM/RR'),0);
Insert into A_DEFENDANT (DEF_ID,FIRST_NAME,SURNAME,DOB,ACTIVE) values (105,'Daisy','Duck',to_date('05/08/00','DD/MM/RR'),1);
CREATE TABLE "A_ENGAGEMENT"
"ENGAGEMENT_ID" NUMBER NOT NULL ENABLE,
"COURT_NAME" VARCHAR2(50 BYTE) NOT NULL ENABLE,
"DATE_REFERRED" DATE,
"DETERMINATION_HEARING_DATE" DATE,
"DATE_JOINED_COURT" DATE,
"DATE_TREATMENT_STARTED" DATE,
"DATE_TERMINATED" DATE,
"TERMINATION_TYPE" VARCHAR2(50 BYTE),
"ACTIVE" NUMBER(2,0) DEFAULT 1 NOT NULL ENABLE,
"DEFENDANT_ID" NUMBER,
CONSTRAINT "A_ENGAGEMENT_PK" PRIMARY KEY ("ENGAGEMENT_ID"));
Insert into A_ENGAGEMENT (ENGAGEMENT_ID,COURT_NAME,DATE_REFERRED,DETERMINATION_HEARING_DATE,DATE_JOINED_COURT,DATE_TREATMENT_STARTED,DATE_TERMINATED,TERMINATION_TYPE,ACTIVE,DEFENDANT_ID) values (1,'AA',to_date('12/08/12','DD/MM/RR'),null,to_date('12/08/12','DD/MM/RR'),null,null,null,1,101);
Insert into A_ENGAGEMENT (ENGAGEMENT_ID,COURT_NAME,DATE_REFERRED,DETERMINATION_HEARING_DATE,DATE_JOINED_COURT,DATE_TREATMENT_STARTED,DATE_TERMINATED,TERMINATION_TYPE,ACTIVE,DEFENDANT_ID) values (2,'BB',to_date('01/09/12','DD/MM/RR'),null,to_date('02/09/12','DD/MM/RR'),null,null,null,1,102);
Insert into A_ENGAGEMENT (ENGAGEMENT_ID,COURT_NAME,DATE_REFERRED,DETERMINATION_HEARING_DATE,DATE_JOINED_COURT,DATE_TREATMENT_STARTED,DATE_TERMINATED,TERMINATION_TYPE,ACTIVE,DEFENDANT_ID) values (3,'AA',to_date('02/09/12','DD/MM/RR'),null,to_date('15/09/12','DD/MM/RR'),null,null,null,1,103);
Insert into A_ENGAGEMENT (ENGAGEMENT_ID,COURT_NAME,DATE_REFERRED,DETERMINATION_HEARING_DATE,DATE_JOINED_COURT,DATE_TREATMENT_STARTED,DATE_TERMINATED,TERMINATION_TYPE,ACTIVE,DEFENDANT_ID) values (4,'BB',to_date('01/10/12','DD/MM/RR'),null,to_date('02/10/12','DD/MM/RR'),null,null,null,1,105);
CREATE TABLE "A_PHASE_MEMBERSHIP"
"MPM_ID" NUMBER NOT NULL ENABLE,
"MPM_ENG_ID" NUMBER NOT NULL ENABLE,
"PHASE_NUMBER" VARCHAR2(50 BYTE),
"DATE_STARTED" DATE NOT NULL ENABLE,
"DATE_FINISHED" DATE,
"NOTES" VARCHAR2(2000 BYTE),
"ACTIVE" NUMBER(2,0) DEFAULT 1 NOT NULL ENABLE,
CONSTRAINT "A_PHASE_MEMBERSHIP_PK" PRIMARY KEY ("MPM_ID"));
Insert into A_PHASE_MEMBERSHIP (MPM_ID,MPM_ENG_ID,PHASE_NUMBER,DATE_STARTED,DATE_FINISHED,NOTES,ACTIVE) values (1,1,'PHASE ONE',to_date('15/09/12','DD/MM/RR'),to_date('20/09/12','DD/MM/RR'),null,1);
Insert into A_PHASE_MEMBERSHIP (MPM_ID,MPM_ENG_ID,PHASE_NUMBER,DATE_STARTED,DATE_FINISHED,NOTES,ACTIVE) values (2,1,'PHASE TWO',to_date('21/09/12','DD/MM/RR'),to_date('29/09/12','DD/MM/RR'),null,1);
Insert into A_PHASE_MEMBERSHIP (MPM_ID,MPM_ENG_ID,PHASE_NUMBER,DATE_STARTED,DATE_FINISHED,NOTES,ACTIVE) values (3,2,'PHASE ONE',to_date('12/09/12','DD/MM/RR'),null,null,1);
Insert into A_PHASE_MEMBERSHIP (MPM_ID,MPM_ENG_ID,PHASE_NUMBER,DATE_STARTED,DATE_FINISHED,NOTES,ACTIVE) values (4,3,'PHASE ONE',to_date('20/09/12','DD/MM/RR'),to_date('01/10/12','DD/MM/RR'),null,1);
Insert into A_PHASE_MEMBERSHIP (MPM_ID,MPM_ENG_ID,PHASE_NUMBER,DATE_STARTED,DATE_FINISHED,NOTES,ACTIVE) values (5,3,'PHASE TWO',to_date('02/10/12','DD/MM/RR'),to_date('15/10/12','DD/MM/RR'),null,1);
Insert into A_PHASE_MEMBERSHIP (MPM_ID,MPM_ENG_ID,PHASE_NUMBER,DATE_STARTED,DATE_FINISHED,NOTES,ACTIVE) values (6,4,'PHASE ONE',to_date('03/10/12','DD/MM/RR'),to_date('10/10/12','DD/MM/RR'),null,1);
Insert into A_PHASE_MEMBERSHIP (MPM_ID,MPM_ENG_ID,PHASE_NUMBER,DATE_STARTED,DATE_FINISHED,NOTES,ACTIVE) values (7,3,'PHASE THREE',to_date('17/10/12','DD/MM/RR'),null,null,0);
Insert into A_PHASE_MEMBERSHIP (MPM_ID,MPM_ENG_ID,PHASE_NUMBER,DATE_STARTED,DATE_FINISHED,NOTES,ACTIVE) values (8,1,'PHASE THREE',to_date('30/09/12','DD/MM/RR'),to_date('16/10/12','DD/MM/RR'),null,1);--Probably after this crazy project (reason: BA cannot make up her minds, and keep changing requirements about the reports, and then business want it done asap),
-- I need to buy a book and spend a lot of time to learn more about Oracle SQL Analytical function and Aggregation.
--Thanks a lot again, guys.
Ann--Thanks Jeneesh
--However, this time I found another bug relating filter the figures by court_name
DEFINE startmonth = "Aug 2012";
DEFINE endmonth = "Oct 2012";
WITH all_months_pre AS
SELECT ADD_MONTHS(to_date('&startmonth','MON YYYY'), ROWNUM-1) AS which_month
, ADD_MONTHS(to_date('&startmonth','MON YYYY'), ROWNUM ) AS next_month
from all_objects
where
rownum <= months_between(to_date('&endmonth','MON YYYY'), add_months(to_date('&startmonth','MON YYYY'), -1))
all_months as
select phase_number,which_month,next_month
from all_months_pre,(select distinct phase_number from a_phase_membership)
total_data as
SELECT am.phase_number,
TO_CHAR (am.which_month, 'Mon YYYY') AS month,
nvl((CASE
WHEN ph.date_finished IS NULL OR ph.date_finished > last_day(am.which_month)
THEN last_day(am.which_month)
ELSE ph.date_finished
END
) - ph.date_started + 1,0) days,def_id
FROM all_months am
LEFT OUTER JOIN a_phase_membership ph --PARTITION BY (ph.phase_number)
ON am.phase_number = ph.phase_number
--I have found out that the Requirement don't need these, so I comment it out
--and am.which_month <= ph.date_started
--AND am.next_month > ph.date_started
AND ph.date_started <= last_day(am.which_month)
AND ph.active = 1
LEFT JOIN a_engagement ce
ON ph.mpm_eng_id = ce.engagement_id
AND ce.court_name LIKE 'BB'
LEFT OUTER join a_defendant def
ON ce.defendant_id = def.def_id
AND def.active = 1
avg_data as
select phase_number,month,avg(days) avg_days
from total_data
group by phase_number,month
select phase_number,month,round(avg(avg_days),2) avg_days
from avg_data
group by rollup(phase_number,month)
order by 1
;--I run the select for
AND court_name like 'BB'
--then run for
AND court_name LIKE 'AA'
or court_name LIKE '%'--They all return the same result which is
PHASE_NUMBER MONTH AVG_DAYS
PHASE ONE Aug 2012 0
PHASE ONE Oct 2012 12.67
PHASE ONE Sep 2012 7.2
PHASE ONE 6.62
PHASE THREE Aug 2012 0
PHASE THREE Oct 2012 5.67
PHASE THREE Sep 2012 0.33
PHASE THREE 2
PHASE TWO Aug 2012 0
PHASE TWO Oct 2012 5.75
PHASE TWO Sep 2012 3
PHASE TWO 2.92
3.85
13 rows selected --If I adjust the statement to
WITH all_months_pre AS
SELECT ADD_MONTHS(to_date('&startmonth','MON YYYY'), ROWNUM-1) AS which_month
, ADD_MONTHS(to_date('&startmonth','MON YYYY'), ROWNUM ) AS next_month
from all_objects
where
rownum <= months_between(to_date('&endmonth','MON YYYY'), add_months(to_date('&startmonth','MON YYYY'), -1))
all_months as
select phase_number,which_month,next_month
from all_months_pre,(select distinct phase_number from a_phase_membership)
total_data as
SELECT am.phase_number,
TO_CHAR (am.which_month, 'Mon YYYY') AS month,
nvl((CASE
WHEN ph.date_finished IS NULL OR ph.date_finished > last_day(am.which_month)
THEN last_day(am.which_month)
ELSE ph.date_finished
END
) - ph.date_started + 1,0) days,def_id
FROM all_months am
LEFT OUTER JOIN a_phase_membership ph --PARTITION BY (ph.phase_number)
ON am.phase_number = ph.phase_number
AND ph.date_started <= last_day(am.which_month)
AND ph.active = 1
INNER JOIN a_engagement ce
ON ph.mpm_eng_id = ce.engagement_id
AND ce.court_name LIKE 'BB'
LEFT OUTER join a_defendant def
ON ce.defendant_id = def.def_id
AND def.active = 1
avg_data as
select phase_number,month,avg(days) avg_days
from total_data
group by phase_number,month
select phase_number,month,round(avg(avg_days),2) avg_days
from avg_data
group by rollup(phase_number,month)
order by 1;--The result will be
PHASE_NUMBER MONTH AVG_DAYS
PHASE ONE Oct 2012 29
PHASE ONE Sep 2012 19
PHASE ONE 24
24 --AND IF COURT_NAME = 'AA'
PHASE_NUMBER MONTH AVG_DAYS
PHASE ONE Oct 2012 9
PHASE ONE Sep 2012 8.5
PHASE ONE 8.75
PHASE THREE Oct 2012 17
PHASE THREE Sep 2012 1
PHASE THREE 9
PHASE TWO Oct 2012 11.5
PHASE TWO Sep 2012 9
PHASE TWO 10.25
9.33 --It seems to me the figures now is correct. But then when there is no figures for the Phase, it will not display the phase.
-- is there any way to adjust the select statement so the result for ce.court_name LIKE 'BB' looks like
PHASE_NUMBER MONTH AVG_DAYS
PHASE ONE Oct 2012 29
PHASE ONE Sep 2012 19
PHASE ONE 24
PHASE TWO Oct 2012 0
PHASE TWO Sep 2012 0
PHASE TWO 0
PHASE THREE Oct 2012 0
PHASE THREE Sep 2012 0
PHASE THREE 0
8 The reason why I need it, because this is just one column that will be included in a union combined in the report that will looks like
PHASE_NUMBER MONTH SUM(AVG_IN_PHASE_ALL) SUM(NUM_IN_PHASE_CURR)
Phase 1 Aug 2012 0 0
Sep 2012 14.25 0
Oct 2012 11.14 1
8.46 1
Phase 2 Aug 2012 0 0
Sep 2012 18 0
Oct 2012 20.33 2
12.78 2
Phase 3 Aug 2012 0 0
Sep 2012 10 0
Oct 2012 12 0
7.33 0
9.53 3
13 rows selected And to put thing in big picture, this is the requirement from the Business Analyst
The requirements are:
The user must be able to request the extract for one or more calendar months, e.g.
May 2013
May 2013 – Sep 2013.
The file must contain a separate row for each calendar month in the requested range. Each row must contain the statistics computed for that calendar month.
The file must also include a row of totals.
The user must be able to request the extract for either AA or BB or Consolidated (both courts’ statistics accumulated).
Then the part that I am working on is
For each monitoring phase:
Phase name (e.g. “Phase One”)
Avg_time_in_phase_all_particip
for each phase name,
Add up days in each “phase name” Monitoring Phase, calculated as:
If Monitoring Phase.Date Finished is NULL or > month end date,
(*Month end date* Minus Monitoring Phase.Date Started Plus 1)
Otherwise (phase is complete)
(Monitoring Phase.Date Finished Minus Monitoring Phase.Date Started Plus 1.)
Divide by the numbers of all participants who have engaged in “phase name”.Thanks again for reading and spending time to help,
Ann
Edited by: Ann586341 on Nov 13, 2012 4:31 PM -
Help:UIModel.xml file for ADF Tree with three level depth
Hello,
I am trying to create a DCTree with structure like this:
root....branch1----child11,child12
..........branch2......branch21---child212,child212
............................branch22---child221,child222
Because I can not create more than one binding rule due to the problem that "Add New Rule" button disappears after the first rule is created when I use the tool under Createbinding/Input/Tree to create the DCTree.
Could somebody post or send me a script of the UIModel.xml file of the tree structure above so that I can work around this problem?
Thanks in advance,
DeborahHi,
I haven't test it for more than 3 layers but I have never seen this limitation mantioned anywhere.
I used HGrid and this is my code:
1. UIX file (the relevant part highlighted):
<?xml version = '1.0' encoding = 'windows-1252'?>
<page xmlns="http://xmlns.oracle.com/uix/controller"
xmlns:ui="http://xmlns.oracle.com/uix/ui"
xmlns:data="http://xmlns.oracle.com/uix/ui"
xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
xmlns:html="http://www.w3.org/TR/REC-html40" expressionLanguage="el"
xmlns:myTemplate="test">
<templates xmlns="http://xmlns.oracle.com/uix/ui">
<templateImport source="baseTemplate.uit"/>
</templates>
<content>
<dataScope xmlns="http://xmlns.oracle.com/uix/ui">
<provider>
<!-- Add DataProviders (<data> elements) here -->
</provider>
<contents>
<document>
<metaContainer>
<!-- Set the page title -->
<head title=""/>
</metaContainer>
<contents>
<body>
<contents>
<form name="form0">
<contents>
<myTemplate:baseTmpl title="" xmlns:myTemplate="test">
<contents>
<rowLayout>
<contents>
<link text="Bets View" destination="browseCustBets.do"/>
<spacer width="10" height="10"/>
<link text="Customer Bets" destination="viewCustBets.do"/>
</contents>
</rowLayout>
<rowLayout>
<contents>
<spacer width="10" height="10"/>
</contents>
</rowLayout>
<rowLayout>
<contents>
<hGrid id="hg1" treeData="${uix.data.treeData}" proxy="${uix.eventResult.hGridProxy}">
<columnHeaderData>
<col text="Email"/>
<col text="Bet Date"/>
<col text="ID"/>
<col text="Is Winner"/>
<col text="Amount"/>
<col text="Rate"/>
</columnHeaderData>
<columnHeaderStamp>
<text text="${uix.current.text}"/>
</columnHeaderStamp>
<columnFormats>
<columnFormat columnDataFormat="textFormat" width="140"/>
<columnFormat columnDataFormat="textFormat" width="160"/>
<columnFormat columnDataFormat="textFormat" width="40"/>
<columnFormat columnDataFormat="textFormat" width="70"/>
<columnFormat columnDataFormat="textFormat" width="70"/>
<columnFormat columnDataFormat="textFormat" width="40"/>
</columnFormats>
<contents>
<text text="${uix.current.Email}"/>
<text text="${uix.current.BetDate}"/>
<text text="${uix.current.BetID}"/>
<text text="${uix.current.IsWinner}"/>
<text text="${uix.current.Amount}"/>
<text text="${uix.current.Rate}"/>
</contents>
</hGrid>
</contents>
</rowLayout>
</contents>
<tabs/>
<pageButtons/>
<globalButtons/>
<pageHeader/>
<start/>
<end/>
<about/>
<copyright/>
<privacy/>
<corporateBranding/>
<productBranding/>
</myTemplate:baseTmpl>
<formValue name="${bindings.statetokenid}" value="${bindings.statetoken}" id="_uixState"/>
</contents>
</form>
</contents>
</body>
</contents>
</document>
</contents>
<provider>
<data name="treeData">
<method class="view.CreateTreeData" method="getTreeData"/>
</data>
</provider>
</dataScope>
</content>
<handlers>
<event name="*">
<method class="view.BetDetailsAction" method="doHGridEvent"/>
</event>
</handlers>
</page>
2. CreateTreeData class:
It has a static method getTreeData() that returns a DataObject containing the tree nodes. This methode is mentiond in <provider> node in UIX/XML.
package view;
import java.util.Enumeration;
import model.*;
import oracle.cabo.servlet.BajaContext;
import oracle.cabo.servlet.ServletConstants;
import oracle.cabo.servlet.ui.BajaRenderingContext;
import oracle.cabo.ui.RenderingContext;
import oracle.cabo.ui.UIConstants;
import oracle.cabo.ui.data.DataObject;
import oracle.cabo.ui.data.servlet.HttpSessionDataObject;
import oracle.cabo.ui.data.tree.SimpleTreeData;
import oracle.jbo.ApplicationModule;
import oracle.jbo.ViewObject;
import oracle.adf.model.BindingContext;
import oracle.adf.model.binding.DCDataControl;
//import oracle.jbo.common.Configuration;
import javax.servlet.http.HttpSession;
import oracle.jbo.client.Configuration;
public class CreateTreeData
public CreateTreeData()
public static DataObject getTreeData(RenderingContext context, String namespace, String name)
// create root node
SimpleTreeData root = new SimpleTreeData();
int BetID = 0;
// get the parameter from url
BajaContext bContext = (BajaContext) context.getProperty(ServletConstants.BAJA_NAMESPACE,
BajaRenderingContext.BAJA_CONTEXT_PROPERTY);
HttpSession session = bContext.getServletRequest().getSession(true);
try
//BetID = new Integer(( bContext.getServletRequest( ) ).getParameter( "BetID" )).intValue();
String s = ( bContext.getServletRequest( ) ).getQueryString();
BetID = new Integer(s).intValue();
session.setAttribute("BetID", s);
//BetID = new Integer(session.getAttribute("BetID").toString()).intValue();
catch ( Exception ex)
// log the error on the console
BetID = new Integer(session.getAttribute("BetID").toString()).intValue();
//System.out.println( "Parameters cannot be retrieved" );
//System.out.println( ex.getMessage() );
String amDef = "model.AppModule";
String config = "AppModuleLocal";
ApplicationModule am = Configuration.createRootApplicationModule(amDef, config);
AppModuleImpl myAm = (AppModuleImpl)am;
root = myAm.createNodesData(BetID);
myAm.remove();
Configuration.releaseRootApplicationModule(am,true);
// return the tree
return root;
3. createNodesData(int Id) is the actual function that creates the data structure containing the nodes.
It is in AppModule. The actual tree is kept in one table and every node knows its parent ID. There is no limitation in depth.
This function is called recursively until the tree is finished and the parameter Id is the Id of the parent node that I want to be listed. Tne top parent nodes has null in ParentID field.
public SimpleTreeData createNodesData(int Id)
SimpleTreeData tData = new SimpleTreeData();
String baseSQL =
"SELECT Bet.ID, Bet.CUST_LOGIN_ID, Bet.BET_CLASS_ID, Bet.PARENT_BET_ID," +
"Bet.CHAMPIONSHIP_ID, Bet.AMOUNT, Bet.WIN_RATE, Bet.IS_WINNER, Bet.BET_DATE, " +
"BetClass.NAME, CustLogin.EMAIL, CustLogin.ID AS CUST_LOGIN_ID " +
"FROM BET Bet, CUST_LOGIN CustLogin, BET_CLASS BetClass " +
"WHERE (Bet.CUST_LOGIN_ID = CustLogin.ID) AND (Bet.BET_CLASS_ID = BetClass.ID) ";
if(Id!=0){
String sqlStmt = baseSQL + " AND (Bet.ID = '"+ Id +"')";
ViewObject betVo = this.createViewObjectFromQueryStmt("betVo", sqlStmt);
betVo.executeQuery();
if(betVo.hasNext())
//SimpleTreeData tData = new SimpleTreeData();
tData.setText(betVo.first().getAttribute("NAME").toString());
if(betVo.first().getAttribute("PARENT_BET_ID")==null)
tData.put("Email", betVo.first().getAttribute("EMAIL").toString());
tData.put("BetDate", betVo.first().getAttribute("BET_DATE").toString());
tData.put("BetID", betVo.first().getAttribute("ID").toString());
tData.put("IsWinner", betVo.first().getAttribute("IS_WINNER").toString());
tData.put("Amount", betVo.first().getAttribute("AMOUNT").toString());
tData.put("Rate", betVo.first().getAttribute("WIN_RATE").toString());
if(Integer.parseInt(betVo.first().getAttribute("BET_CLASS_ID").toString())>1){
tData.setExpandable(UIConstants.EXPANDABLE_EXPANDED);
betVo.remove();
String sqlStmt = baseSQL + " AND (Bet.PARENT_BET_ID = '"+ Id +"')";
ViewObject betVo = this.createViewObjectFromQueryStmt("betVo" + Id, sqlStmt);
betVo.executeQuery();
while(betVo.hasNext()){
tData.addChild(createNodesData(Integer.parseInt(betVo.next().getAttribute("ID").toString())));
betVo.remove();
return tData;
Hope this will help... -
Can we get any documents or notes of API for APPS11i?
I know the Integration Repository website. Does iRep show us only supportable API? I would like to know about non-public API also, like FND_FLEX_VAL_API.
And is there any API to load data to FND_LOOKUP_VALUES?As far as I know, irep contains all of the APIs supported for customers.
However, if you need to do something that isn't listed as an API, it is a matter of looking for packages that reference the object (ie via DBA_DEPENDENCIES) or finding a standard function that does what you want and work out what it is doing.
Using this second process, you can find that the FNDFFMSV form (used for the various value set values functions) uses the FND_FLEX_VALUES_PKG.INSERT_ROW procedure to create new Value Set Values. -
About XML Parameter for Web Service invoking
I would like to use the XML parameter as the Web Service's input(Attachment is
the XML schema) in WebLogic Server 8 sp1. When I generated the Web Service and
use the WebLogic Server generate test web page to test it, I got Exception. The
WebLogic Server can't constructe the input XML.
The correct XML should look like this:
<ids>
<desc>Description</desc>
<id>1</id>
<id>2</id>
<id>3</id>
</ids>
Is there any one can tell me whether this kind of XML was permitted for Web Service
invoking or not?
[sample.xsd]Hi Andy,
On the test page, before the invoke of the operation, did it say
something like:
<!-- Do not know how to create a sample instance for this part due to
the following exception:java.lang.InstantiationException:
javax.xml.soap.SOAPElement. Pls replace this with the correct XML before
invoking the service. --->
if so, the service itself may be working OK, the deficiency is that the
test page tries its best to determine sample values for the invoke,
however it does not know in this case.
Did you try with a client?
Your XML should be fine.
Regards,
Bruce
Andy wrote:
>
I would like to use the XML parameter as the Web Service's input(Attachment is
the XML schema) in WebLogic Server 8 sp1. When I generated the Web Service and
use the WebLogic Server generate test web page to test it, I got Exception. The
WebLogic Server can't constructe the input XML.
The correct XML should look like this:
<ids>
<desc>Description</desc>
<id>1</id>
<id>2</id>
<id>3</id>
</ids>
Is there any one can tell me whether this kind of XML was permitted for Web Service
invoking or not?
Name: sample.xsd
sample.xsd Type: ACT Project (text/xml)
Encoding: base64 -
Ergent help about inbound IDoc for Goods Receipts
Dear friends
We have an ergent issue needing your help.
It is about DEVRY03.
Senarios is as following:
When we create a delivery by using VL31n, system try the IDoc and transfer to XI.
This is ok.After external warehouse system processes the IDoc,a message is sent back to SAP to post the goods receipts for the delivery.
Inbound IDoc type is DEVRY03. Is it right?
Which function module or which process ok is used for this senario?
Can anyone suggest how to do it?
MinghanHi !
Here comes some information for the INBOUND idocs....
There is a IDOC for transmitting goods movements from a legacy system.
It's message-type is: WMMBXY
IDOC-Type is: WMMBID02 (See we60 for it's pretty good docu....)
Prcoess-Code is :WMMB
The function that processes the data is: L_IDOC_INPUT_WMMBXY
Hope that helped a bit (for inbound)....
Regards
Rainer
Some points would be nice if that helped. -
Help on HtmlSourceNode API for extension
I am writing an extension for JDev 10.1.3.
I need some info regarding the HTML editor/HtmlSourceNode
How can I access the "title" and "body" content of a html source node in Jdeveloper?
I didn't find any API doc on this but only for JspSourceNodeJdev team,
Any updates, how I can do this. -
Can I have your help about the software for apple
can I knew how I can change my security Question for apple account?
Am waitting your answer........Assuming that you don't know your current answer(s), then from http://support.apple.com/kb/HT5665 :
If you have three security questions and a rescue email address, sign in to My Apple ID and select the “Password and Security” tab to send an email to your rescue email address to reset your security questions and answers.
If you have one security question and you know your Apple ID password, sign in to My Apple ID and select the “Password and Security” tab to reset your security question.
If you have one security question, but don't remember your Apple ID password, contact Apple Support for assistance. Learn more about creating a temporary support PIN to help Apple confirm your identity when you contact Apple Support.
If you can’t reset them via the above instructions (you won't be able to add a rescue email address until you can answer your questions) then you will need to contact Support in the country where you and your iTunes account are to get the questions reset (these are user-to-user forums).
Contacting Apple about account security : http://support.apple.com/kb/HT5699
When they've been reset (and if you don't already have a rescue email address) you can then use the steps half-way down this page to add a rescue email address for potential future use : http://support.apple.com/kb/HT5312
Maybe you are looking for
-
Dynamic characteristics scenario
Hi experts, Im facing a problem figuring out the best way to do this. In ECC I have data with this structure Msg class; No Msg; Char_name; char_value; numeric_value ZSOMETHING;1;POSTING_DATE; 01.01.2009 ZSOMETHING;1;SOME_RATIO_1; 9.5 ZSOMETHING;
-
How can I find the date modified and group membership in contacts?
I used to have a smart group that could show the modification date, but those criteria don't exist in mountain lion (ML) i also had a script that would find any contact that was not a member of any group. It does not work any more in ML.
-
Lenovo Yoga 8" as a pdf reader?
Hi I'm thinking of buying a Lenovo Yoga 8-inch tablet for use mainly as a pdf and ebook reader. (The long battery life makes it particularly attractive to me.) Can anyone comment on how suitable the Yoga will be, please? In particular, is the screen
-
Site Manager Tabs Can't be Selected
I've been having the same trouble with the 'root folder' issue as reported by many others, however, I go one further. Once I resolve the root folder problem, I can't click on any of the site setup tabs (under Site; Site Manager) in CS 5 Dreamweaver.
-
HT4208 is there iphone5 with gsm network to use it in egypt
i want to buy iphone5 to use it in egypt,the network in egypt is gsm .i want to find iphone 5 containing gsm network ,can i find it in ll apple company in america.thank you ,please help me