Assign to a globa variable value from html variable.
I need to assign to a global varaible say pkg1.var1 a value from the form.varaible.value
how can it be done.
The code looks like
htp.p('<form name="f_a" method="get" >');
htp.p( 'Your ref. nr.: ');
htp.p('<input type="text" name="f_var1" maxlength="25" onChange="alert(''Your new reference num is ''+f_a.f_var1.value);" value="'||r_offerte.cusrefnur||'">');
pkg.var1:='f_a.f_var1.value';
htp.p('</form>');
This code does not work and the value assigned is null;
Thanks in advance.
Hi,
this forum is about Oracle Forms. maybe you try this in the database forum or Portal.
Frank
Similar Messages
-
Read values from html response
Hi,
I am trying to make a call to an API using UTL_HTTP POST method over SSL and read the response html page and extract the values from the reponse.
I am able to call and get a response back in html format. I have stored the html response in a clob variable.
Now i want to parse this html and extract values from the form input items and send them out through OUT parameters.
For example, from below reponse i want to extract the value '1111d7nhcwse30wq' from 'I4GO_UNIQUEID'
Can anyone help me with the code to parse this html response and extract the values.
Any help is greatly appreciated.
Thanks
Sharath
sample Code:
PROCEDURE get_token (
p_requesterreference IN VARCHAR2,
p_cardnumber IN VARCHAR2,
p_cardtype IN VARCHAR2,
p_cardholdername IN VARCHAR2,
p_expirationmonth IN VARCHAR2,
p_expirationyear IN VARCHAR2,
p_streetaddress IN VARCHAR2,
p_postalcode IN VARCHAR2,
p_cvv2code IN VARCHAR2,
po_uniqueid OUT VARCHAR2,
po_errorindicator OUT VARCHAR2,
po_primaryerrorcode OUT VARCHAR2,
po_response OUT VARCHAR2,
po_status_code OUT VARCHAR2,
po_reason_phrase OUT VARCHAR2
IS
v_url VARCHAR2 (200);
v_url_params VARCHAR2 (32767);
v_resp_str VARCHAR2 (32767);
l_http_req UTL_HTTP.req;
l_http_resp UTL_HTTP.resp;
v_requesterreference VARCHAR2 (12) := p_requesterreference;
v_i4go_cardnumber VARCHAR2 (32) := p_cardnumber;
v_i4go_streetaddress VARCHAR2 (30) := p_streetaddress;
v_i4go_postalcode VARCHAR2 (9) := p_postalcode;
v_i4go_expirationmonth VARCHAR2 (2) := p_expirationmonth; -- MM format
v_i4go_expirationyear VARCHAR2 (2) := p_expirationyear; -- yy format
v_i4go_cvv2code VARCHAR2 (3) := p_cvv2code;
v_name VARCHAR2 (256);
v_value VARCHAR2 (1024);
l_clob CLOB;
pv_amp CONSTANT CHAR (1) := CHR (38);
CURSOR setup_cur
IS
SELECT interface_id, interface_name, interface_url, account_id, site_id
FROM rsv.shift4_setup
WHERE interface_name = 'I4GO';
v_setup_rec setup_cur%ROWTYPE;
BEGIN
OPEN setup_cur;
FETCH setup_cur
INTO v_setup_rec;
CLOSE setup_cur;
v_url := 'https://certify.i4go.com//index.cfm?fuseaction=account.PostCardEntry';
v_url_params :=
pv_amp
|| 'i4GO_AccountID='
|| v_setup_rec.account_id
|| pv_amp
|| 'i4Go_SiteID='
|| v_setup_rec.site_id
|| pv_amp
|| 'i4Go_CardNumber='
|| v_i4go_cardnumber
|| pv_amp
|| 'i4Go_ExpirationMonth='
|| v_i4go_expirationmonth
|| pv_amp
|| 'i4Go_ExpirationYear='
|| v_i4go_expirationyear
|| pv_amp
|| 'i4Go_CVV2Code='
|| v_i4go_cvv2code
|| pv_amp
|| 'i4Go_PostalCode='
|| v_i4go_postalcode;
-- begin request using POST method
UTL_HTTP.set_response_error_check (FALSE);
UTL_HTTP.set_transfer_timeout (180);
UTL_HTTP.set_wallet ('file:/etc/ORACLE/WALLETS/oracle', 'welcome1');
l_http_req := UTL_HTTP.begin_request (v_url, 'POST');
UTL_HTTP.set_header (l_http_req, 'User-Agent', 'Mozilla/4.0');
UTL_HTTP.set_header (l_http_req, 'Content-Type', 'application/x-www-form-urlencoded');
UTL_HTTP.set_header (l_http_req, 'content-length', LENGTH (v_url_params));
UTL_HTTP.write_text (l_http_req, v_url_params);
-- get response
l_http_resp := UTL_HTTP.get_response (l_http_req);
po_status_code := l_http_resp.status_code;
po_reason_phrase := l_http_resp.reason_phrase;
-- read response into a clob
DBMS_LOB.createtemporary (l_clob, FALSE);
BEGIN
LOOP
UTL_HTTP.read_text (l_http_resp, v_resp_str, 32767);
DBMS_LOB.writeappend (l_clob, LENGTH (v_resp_str), v_resp_str);
END LOOP;
EXCEPTION
WHEN UTL_HTTP.end_of_body
THEN
-- end response
UTL_HTTP.end_response (l_http_resp);
END;
-- Fre resources
DBMS_LOB.freetemporary (l_clob);
EXCEPTION
WHEN OTHERS
THEN
DBMS_LOB.freetemporary (l_clob);
DBMS_OUTPUT.put_line (UTL_HTTP.get_detailed_sqlerrm);
RAISE;
END;
sample response:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Return With Payment Token</title>
<script src="js/jquery-1.6.4.min.js" type="text/javascript"></script>
<script type="text/javascript"><!--
picSpinner= new Image(40,40);
picSpinner.src="images/loading040.gif";
bodyOnLoad = function() {
$("#noScriptDiv").hide();
$("#scriptDiv").show();
$("#i4GoMainForm").submit();
//--></script>
</head>
<body onload="bodyOnLoad();">
<form name="i4GoMainForm" id="i4GoMainForm" action="http://google.com" method="POST" onsubmit="$('#i4Go_submit').attr('disabled','disabled');">
<input name="I4GO_RESPONSE" type="hidden" value="SUCCESS" />
<input name="I4GO_RESPONSECODE" type="hidden" value="1" />
<input name="I4GO_CARDTYPE" type="hidden" value="VS" />
<input name="I4GO_UNIQUEID" type="hidden" value="1111d7nhcwse30wq" />
<input name="I4GO_EXPIRATIONMONTH" type="hidden" value="12" />
<input name="I4GO_EXPIRATIONYEAR" type="hidden" value="2012" />
<input name="I4GO_CARDHOLDERNAME" type="hidden" value="" />
<input name="I4GO_STREETADDRESS" type="hidden" value="" />
<input name="I4GO_POSTALCODE" type="hidden" value="65000" />
<div id="scriptDiv" style="font-family:Arial, Helvetica, sans-serif;font-size:18px;visibility:hidden;">
<img src="images/loading040.gif" alt="Spinner..." /> Loading...
</div>
<div id="noScriptDiv" style="font-family:Arial, Helvetica, sans-serif;">
<noscript>
<h1>Statement of Tokenization</h1>
<p>The payment information you have submitted has been securely stored in the Shift4 PCI-DSS certified data center and a token representing this information will be sent to the merchant for processing. Below is the information that will be returning to the originating merchant:</p>
<ul>
<li>Response: <strong>SUCCESS</strong></li>
<li>Response Code: <strong>1</strong></li>
<li>Card Type: <strong>VS</strong></li>
<li>Token: <strong>1111d7nhcwse30wq</strong></li>
</ul>
</noscript>
<input type="submit" name="i4Go_submit" id="i4Go_submit" value="Continue" />
</div>
</form>
</body>
</html>
Edited by: sgudipat on Apr 24, 2012 1:20 PMHere is working example for your HTML using xpath to extract values from html
You can store your html response in clob variable and then extract the value with xpath
declare
l_clob clob;
l_value varchar2(100);
l_xml xmltype;
begin
l_clob :='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Return With Payment Token</title>
<script src="js/jquery-1.6.4.min.js" type="text/javascript"></script>
<script type="text/javascript"><!--
picSpinner= new Image(40,40);
picSpinner.src="images/loading040.gif";
bodyOnLoad = function() {
$("#noScriptDiv").hide();
$("#scriptDiv").show();
$("#i4GoMainForm").submit();
//--></script>
</head>
<body onload="bodyOnLoad();">
<form name="i4GoMainForm" id="i4GoMainForm" action="http://google.com" method="POST" onsubmit="$(''#i4Go_submit'').attr(''disabled'',''disabled'');">
<input name="I4GO_RESPONSE" type="hidden" value="SUCCESS" />
<input name="I4GO_RESPONSECODE" type="hidden" value="1" />
<input name="I4GO_CARDTYPE" type="hidden" value="VS" />
<input name="I4GO_UNIQUEID" type="hidden" value="1111d7nhcwse30wq" />
<input name="I4GO_EXPIRATIONMONTH" type="hidden" value="12" />
<input name="I4GO_EXPIRATIONYEAR" type="hidden" value="2012" />
<input name="I4GO_CARDHOLDERNAME" type="hidden" value="" />
<input name="I4GO_STREETADDRESS" type="hidden" value="" />
<input name="I4GO_POSTALCODE" type="hidden" value="65000" />
<img src="images/loading040.gif" alt="Spinner..." /> Loading...
<noscript>
Statement of Tokenization
The payment information you have submitted has been securely stored in the Shift4 PCI-DSS certified data center and a token representing this information will be sent to the merchant for processing. Below is the information that will be returning to the originating merchant:
Response: SUCCESS
Response Code: 1
Card Type: VS
Token: 1111d7nhcwse30wq
</noscript>
<input type="submit" name="i4Go_submit" id="i4Go_submit" value="Continue" />
</form>
</body>
</html>';
execute immediate 'alter session set events =''31156 trace name context forever, level 2''';
l_xml := xmltype(l_clob);
execute immediate 'alter session set events =''31156 trace name context off''';
select extractvalue( l_xml
, '/html/body/form/input[@name="I4GO_CARDTYPE"]/@value'
, 'xmlns="http://www.w3.org/1999/xhtml"' )
into l_value
from dual;
dbms_output.put_line(l_value);
end;
Problem when parsing html with xpath and xmltype
Edited by: peterv6i.blogspot.com on Apr 26, 2012 9:38 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 -
Passing values from HTML to JSP method,
Hello:
I am starting to wonder if what I am doing will ever work...
Ok, I am trying to avoid javascript. I have a drop-down list named "year" and I wish to call a JSP method that is defined/declared in the same JSP.
First, I want to pass the chosen option to the method and then store the name/value in a global variable.
Second, depending on what the user selects, I will get values from an array defined/initialized on page load AND display those values in another drop-down list.
As a test, and until now, I have done this. I am not passing anything yet, I just wanted to test this "fuzzy logic" I am having:
<%!
String currentYear;
private void showDaysInDDList()
currentYear = request.getparameter("year");
%>
Then on the HTML part of the page I have a drop-down list:
<html>
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body bgcolor="ffffcc">
<form method="POST" name="form1" action="left.jsp">
<select name="year" onchange="<%=showDaysInDDList()%>">
<option></option>
</select>
I am getting the following errors:
An error occurred at line: 105 in the jsp file: /p1/left.jsp
request cannot be resolved
....and regarding to the onchange="<%=showDaysInDDList()%>"> part I am getting the following:
An error occurred at line: 204 in the jsp file: /p1/left.jsp
The method print(boolean) in the type JspWriter is not applicable for the arguments (void)
In the action="left.jsp", left.jsp is the same page where the drop-down list and the method is. I am not sure if that is another error.
I will continue here with my coffee ... any help will be extremely appreciated !!..
I'll have to shut down my "asp.net mind" for a while..
I'll reply later,
MMSOk, this is a bit messy here. I don't know how much you've read up on JSP but you seem confused about some fundamentals to me. However, you mention that you've worked with ASP .net so I'm going to assume you do have some notion of how thing should work in general.
1. JSP is on the server-side and events like onchange that you've used take place on the client-side after the JSP/ servlet code has run and produced the HTML page. So calling your showDaysInDDList() will not work.
2. Are you sure you know how the declaration tags ( <%! %> ) work? When you normally write JSP code without these tags, all that code gets compiled into the service method of the corresponding servlet that the JSP gets turned into. But, you can declare your own methods and variables outside the service method by using these tags.
So what you're effectively doing is declaring
private String/ void showDaysInDDList()
}and followed by your usual _jspService()
public void _jspService(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException
}Now it may be clear, that the request object is not available in the showDaysInDDList() method by default; you'll either have to declare it ( not sure if it's good programming practice or not ) or pass the required parameters in the call.
3. Like you seem to have realized, that error about the printing of booleans was related to the return type of your method because <%= %> translates to out.println(); and since the argument was the method call, the return value was to be printed which here was a void ( not sure why it says boolean though :D ).
Read up on this introduction to JSPs http://java.sun.com/developer/onlineTraining/JSPIntro/contents.html, seems to be pretty good and covers everything in quick, short chunks.
Hope this helps. -
How to assign and display an attribute value from backing bean?
Hello all,
I am using Jdev 11g. I have a form page which has two inputText attributes The first one implements a valueChangeListener feature. When the user enters a value in the first field, a backing bean function will be invoked through the valueChangeListener . In this backing bean function, based on the value in the first field, I want to assign the value to the second field and display it on the page. Can somebody help me how to achieve this?
Thanks,
JohnHi John,
Here is small example.
Create two string variables in your backing bean and generate accessors for them.
private String text;
private String text1;
public void setText(String text) {
this.text = text;
public String getText() {
return text;
public void setText1(String text1) {
this.text1 = text1;
public String getText1() {
return text1;
}Bind this variables to the value property of the input texts you have. Add the valuechangedlistener for the first input text (and also set autosubmit to true for that item). Also, add the id of the first input text as partial triggers for the second input text. Like,
<af:inputText label="Label 1"
binding="#{backingBeanScope.backing_untitled1.it1}"
id="it1"
valueChangeListener="#{backingBeanScope.backing_untitled1.textValueChanged}" autoSubmit="true"
value="#{backingBeanScope.backing_untitled1.text}"/>
<af:inputText label="Label 2"
binding="#{backingBeanScope.backing_untitled1.it2}"
id="it2"
value="#{backingBeanScope.backing_untitled1.text1}"
partialTriggers="it1"/>Finally, put the logic on your value changed listener. Like,
public void textValueChanged(ValueChangeEvent vce){
this.setText1("Hi " + vce.getNewValue());
}Now, when you run the page and enter your name in the first input text, the second input text will display Hi <your_name>
HTH.
-Arun -
How can i pass parameter values from html to a shell script
Hi Guys...
I had a requirement where i need to execute a sql statement and print the output in HTML page. This report has parameters to enter. So i created a HTML form which accepts parameters. When the submit button is pressed, the action tag in the form invokes unix shell script file. It will open sqlplus and run the sql script file .sql and print the output in the HTML page.
sql script contains the query and some set options which prints the output in HTML page. Like "SET MARKUP HTML ON"... The query has some parameters like "select * from emp where empno = &&empnumber. I will use the same name "empnumber" while created the HTML parameter form like " <input type = "text" name="empnumber" size="10" align="left">.
user sees this parameter form and enters some value in to that empno text box.
My question is how can i catch these parameter values in a shell script and pass it to the sql script to execute it.
Help Appreciated
ThanxThis is a A Bad Idea (tm). This type of CGI processing is old and were (and still is) full of security holes. Very easy to inject stuff (Unix commands and SQL) into it.. To get those parameters into SQL*Plus requires using Unix shell commands to process it - and something like a backquote allows all kinds of nasty stuff to be injected. The Unix shell was never designed to be used as a secure CGI environment.
There are far better and far superior alternatives. Perl (with Perl_DBI) and PHP (using Zend Core for Oracle) come to mind as web scripting languages.
Even easier is using HTMLDB. Very few moving parts. Is free. Supports Oracle 9.2 and 10G. -
Gettting values from HTML elements in a servlet
Hello
I have some Java and embedded HTML code in a servlet which is asking the user to enter a value as below:
out.println("<form name=\"generategraph\" action=\"/monolith2/graphingoutput\" method = \"get\">");
out.println("<h3>Pick slope for graph type</h3>" +
"<input type = \"text\" name = \"slope\" size = \"3\" value = \"1\" align = \"right\>");
out.println("<input type = \"submit\" value = \"Generate graph\"></form>\n");
However, I cannot access the contents of the element slope which I need to validate. I have tried:
String str = request.getParameter("slope");
But without success; I simply get null.
Have you any ideas?
Thanks
Martin O'Shea.
Message was edited by:
Martin_OSheaskp71
I tried:
out.println("<form name=\"generategraph\" action=\"/monolith2/graphingoutput\" method = \"get\">");
out.println("<h3>Pick slope for graph type</h3>" +
"<input type = \"text\" name = \"slope\" size = \"3\" value = \"1\" align = \"right\>");
out.println("<input type = \"submit\" value = \"Generate graph\"></form>\n");
String str = (String) request.getParameter("slope");
But without success: I still get null
Have I done something wrong?
Martin O'Shea. -
Retrieving cell values from html in servlet - help!
Dear all,
I've got a table. I want to put links in each cell box. No problem. However I want to know when i've moved to my link what number cell the link came from. This is proving to be a big problem.
Here is what i've tried:
writer.println("<TR><TH bgcolor=\"brown\">Brown<TD id=1><li>
<a href=BookingFromScreen>1</a></li></TD>" +
"<TD name = \"id\" value = \"2\"><li><a href=BookingFromScreen>2</a></li></TD>".. etc...
then picking the id's up in BookingFromScreen like this:
String cell = request.getParameter("id");
String cellNo= request.getParameter("value");
System.out.println("this is the cell parameter: " +cell);
System.out.println("this is the cell Number: " +cellNo);
Object cell1 = request.getAttribute("id");
String cell2 = (String)cell1;
System.out.println("this may work: "+cell2);
neither of these ways work, once link has been clicked all the information about that cell is lost, can anyone pleeeeeeeeeease tell me why this isn't working? both are in the doGet methods of their respective servlets if thats any help....
thank you
Jen Cjust use
writer.println("<TR><TH bgcolor=\"brown\">Brown<TD id=1><li>
<a href=BookingFromScreen?id=1>1</a></li></TD>" +
"<TD name = \"id\" value = \"2\"><li><a href=BookingFromScreen?id=2>2</a></li></TD>"also you should be using a jsp for this -
I have a field in html:
<INPUT TYPE="TEXT" NAME="searchString">
I want applet to get searchString (something like in servlets:
String searchString = request.getParameter("searchString");)
thanks for helphmmm.. I send information to my applets as parameters
So the HTML code for the Applet has a parameter 'min_value':
<OBJECT>
<PARAM NAME=CODE VALUE="com.blah.Test.class">
<PARAM NAME=min_value VALUE="1">
</OBJECT>Next, The Applet code should contain the method:
public String getParameter(String key, String def) {
return isStandalone ? System.getProperty(key, def) :
(getParameter(key) != null ? getParameter(key) : def);
}Finally, I get the parameter value into the Applet using getParameter():
String minVal = getParameter("min_value");Seeya! -
how can i access the value in a text box to use it in a variable of a query statement before submitting the form?
the servlet part is yet to come, the fact is that one of the variables of the query string has to be the value in the text box.
-
Assignment field in FAGLL03/FBL3N different from document assignment field
Hi
We posted a vendor (say, vandor A) invoice through FB60. There was no input in the "Assignment" field in vendor line item and therefor it is blank in FBL1N.
A part of the invoice amount is to be retained as retention money. To do this we transferred the amount of retention through a special GL created for this purpose (transfer from vendor A to vendor A) such that the retention amount gets posted in a reconciliation account created for retention. Transfer is done through T-Code F-51 and vendor name is given in the "Assignment" field.
However, in FAGLL03 and FBL1N the vendor code (and not the name as was the input) is getting displayed. But while viewing the document we find the vendor name in the assignment field.
We noticed that the field defined as "sort key" for this particular reconciliation account is getting reflected in the assignment field of FAGLL03 / FBL3N. For other reconciliation accounts the input in the assignment field is correctly getting displayed in FAGLL03 / FBL3N
Awaiting your valuable inputs and advice.
Thanks in advance
AnindaHi Aninda,
If the fields was correctly customized as a special fields according to
the notes and the reports of note 215798 have been run, the field
should be displayed unless it was not inserted in the original document.
The assignment BSEG-ZUONR will get value from the sort key in vendor
master data. However the BSIS-ZUONR will get value from the GL account
sort key in FS00 (see note 334466).
F1 help on 'Assignment' provides details for customizing:
The assignment number is an additional information reference field in
the line item.
The program can display the account line items sorted according to the
content of this field.
You can either enter the field contents manually, or have the system
define them automatically in the master record via the sort key field.
You define the rules for the layout of the assignment number field in
the Implementation Guide (IMG) under Determine Standard Sorting for Line
Items.
If the account is a reconciliation account, you will need note 676338
If you display multiple split lines, implement note 1237389.
1-In the main screen of FAGLL03 you see at the bottom, list output.
Choose the apropriate layout.
2-For saving this layout , whjen viewing the results of FAGLL03, you
click on settings -> layout -> current.
Then you click with the right mouse button to display the technical
names. Add 1-U_ZUONR and after you can save this layout to be used
in step1.
If the notes are applied and the customizing is set, the field should
be displayed.
Also check the following links:
http://wiki.sdn.sap.com/wiki/x/ZQ3cCw
http://wiki.sdn.sap.com/wiki/x/SwLpCw
I hope I could be of assistance.
Kind Regards,
Fernando Evangelista -
Get parameters from html page from java application standalone ...
Hi all,
I work in one solution that i have values in Html Page and i want get the parameters values from html and cath they in java application standalone.
The Html page is in same host than de java application.
I want know if this is possible. I wnat know if without HttpServlet i can get the parameters from Html Page pure.
Thanks in Advance for the ideas,
Antonio.Hi Abdul,
The problem is my client want one solution where i have one page simple page Html and one application java standalone. This application runs in one machine, but we don't have web server. So the question is: Is possible without web server i can get the parameters values that is inside the html page from java application. I remember you that the application java is one .jar that run's with one command line from crontab "java -jar teste.jar". -
Assigning a node value from an XML variable to a String type in Weblogic Process Integrator
Hi,
Is there any way to assign a node value from an XML variable to a String variable
in Weblogic Process Integrator...
Thanx.
Narendra.Nerendra
Are you talking about using Xpath on the XML document and assigning to a
variable, it is unclear what you are asking
Tony
"Narendra" <[email protected]> wrote in message
news:3bba1215$[email protected]..
>
Hi,
Is there any way to assign a node value from an XML variable to a Stringvariable
in Weblogic Process Integrator...
Thanx.
Narendra. -
How to assign value from insert statement to variable from a trigger
Hi,
I got this really annoying problem and I don't know if I am doing it correctly.
I have a BEFORE INSERT trigger on a table. When someone executes an insert statement I want to grab the value of a column from that statement and assign it to a variable and then do stuff with it. I'm stuck on the assignment.. look below..
CREATE OR REPLACE TRIGGER CARS.geotest2_trigger
BEFORE INSERT ON CARS.GEO_TEST2
FOR EACH ROW
DECLARE
v_chainkey nchar(32);
v_chainkey2 nchar(32);
not_exists EXCEPTION;
BEGIN
:NEW.CHAINKEY := v_chainkey;
SELECT GEO_TEST.CHAINKEY INTO v_chainkey2 FROM GEO_TEST WHERE GEO_TEST.CHAINKEY = v_chainkey;
IF v_chainkey2 = '' or v_chainkey2 is null THEN
RAISE not_exists;
ELSE
INSERT INTO GEO_TEST2 VALUES(:NEW.CHAINKEY, :NEW.BLA, :NEW.FOO);
END IF;
EXCEPTION
WHEN not_exists THEN
RAISE_APPLICATION_ERROR(-20010, 'Chainkey does not exist in parent table GEO_TEST');
END;
I keep getting this error
Error: ORA-04098: trigger 'CARS.GEOTEST2_TRIGGER' is invalid and failed re-validation
SQLState: 42000
ErrorCode: 4098It isn't assigning because v_chainkey is not at the left hand side of the assignment statement.
test@ORA10G>
test@ORA10G>
test@ORA10G> declare
2 x number := 5;
3 y number;
4 begin
5 x := y; -- does not assign anything to y; assigns NULL to x,
6 -- because y is NULL at this point
7 -- so, essentially the value 5 of x is *LOST* now
8 dbms_output.put_line('x = '||x);
9 end;
10 /
x =
PL/SQL procedure successfully completed.
test@ORA10G>
test@ORA10G>
test@ORA10G>In any case, here's what you are probably looking for:
test@ORA10G>
test@ORA10G> --
test@ORA10G> drop table geo_test;
drop table geo_test
ERROR at line 1:
ORA-00942: table or view does not exist
test@ORA10G> drop table geo_test2;
drop table geo_test2
ERROR at line 1:
ORA-00942: table or view does not exist
test@ORA10G>
test@ORA10G> create table geo_test (chainkey nchar(32));
Table created.
test@ORA10G> insert into geo_test (chainkey) values ('a');
1 row created.
test@ORA10G> insert into geo_test (chainkey) values ('');
1 row created.
test@ORA10G>
test@ORA10G> create table geo_test2 (chainkey nchar(32), bla number(1), foo number(1));
Table created.
test@ORA10G>
test@ORA10G>
test@ORA10G> CREATE OR REPLACE TRIGGER geotest2_trigger
2 BEFORE INSERT ON GEO_TEST2
3 FOR EACH ROW
4 DECLARE
5 v_chainkey2 nchar(32);
6 not_exists EXCEPTION;
7 BEGIN
8 SELECT GEO_TEST.CHAINKEY INTO v_chainkey2 FROM GEO_TEST WHERE nvl(GEO_TEST.CHAINKEY,'~') = nvl(:new.chainkey,'~');
9 IF v_chainkey2 is null THEN
10 RAISE not_exists;
11 END IF;
12 EXCEPTION
13 WHEN not_exists THEN
14 RAISE_APPLICATION_ERROR(-20010, 'Chainkey does not exist in parent table GEO_TEST');
15 END;
16 /
Trigger created.
test@ORA10G>
test@ORA10G> --
test@ORA10G> insert into geo_test2 (chainkey,bla,foo) values ('b',1,1);
insert into geo_test2 (chainkey,bla,foo) values ('b',1,1)
ERROR at line 1:
ORA-01403: no data found
ORA-06512: at "TEST.GEOTEST2_TRIGGER", line 5
ORA-04088: error during execution of trigger 'TEST.GEOTEST2_TRIGGER'
test@ORA10G>
test@ORA10G> --
test@ORA10G> insert into geo_test2 (chainkey,bla,foo) values (null,1,1);
insert into geo_test2 (chainkey,bla,foo) values (null,1,1)
ERROR at line 1:
ORA-20010: Chainkey does not exist in parent table GEO_TEST
ORA-06512: at "TEST.GEOTEST2_TRIGGER", line 11
ORA-04088: error during execution of trigger 'TEST.GEOTEST2_TRIGGER'
test@ORA10G>
test@ORA10G> --
test@ORA10G> insert into geo_test2 (chainkey,bla,foo) values ('a',1,1);
1 row created.
test@ORA10G>
test@ORA10G>
test@ORA10G>pratz
I think the sole purpose of that "not_exists" exception is this -
If you try to insert a NULL value for GEO_TEST2.CHAINKEY, then this trigger will throw an error even if at least one NULL value exists in GEO_TEST.CHAINKEY column.
Not sure if that's something that you wanted.
Message was edited by:
pratz -
Assign a value from dropdownlist to input field value on BSP page
Hi,
I'm new to SAP and ABAP. We have a CRM project in which I have to maintain BSP pages.
Now, coming to my problem: I have a input field with
value = "//BTAdminH/HeaderInfo"
This field is normally maintainable. The required function is now to set this field as not maintainable/readonly. Then, the value should be set automatically to an value, which will be selected from a dropdownListBox. After saving, the value HeaderInfo should have the same value like the selected value from the dropdownListBox.
How can I now set the field as readonly (this should be the easier part) and
how can I set the value for the HeaderInfo to the value of the selected value from the dropdownListBox?
If I set it directly like this
value = "//BTActivity/Priority"
it is shown on the BSP page correclty, but it is not saved as HeaderInfo.
Please help me.
EnjaHello Gokul,
test was only for test purposes! I am using as a separator the plus sign!
But this is not the problem!
In debugging, the local variable has the concatenated value! So, this is working!
oncatenate ls_ddlb1-value ls_ddlb2-value ls_ddlb3-value into lv_headerinfo SEPARATED BY ' + '.
But when I assign the value of my set_headerinfo to the local variable, then it is returning only the separator sign!!!
if BTAdminH->GET_HEADERINFO( 'HEADERINFO' ) is initial.
BTAdminH->SET_HEADERINFO( attribute_path = 'HEADERINFO' value = lv_headerinfo ).
endif.
If I declare the local variable as one of the dropdown values, then it is getting populated also for set_headerinfo
lv_headerinfo =ls_ddlb1-value.
So, the assigning is also working! But it is not working, when the local variable equals more than one value! I hope that I could explained it in the right way for you!!!!
So. why is the value for set_headerinfo not the same as the one for the local variable! The local variable has the correct value after the concatination.
Regards
Enja
Maybe you are looking for
-
Capturing the JVM heap usage information to a log
When using weblogic 6.1sp3 the console under monitoring/performance a graph is displayed with the historical JVM heap usage information. Is there any way to capture this information to a log?
-
Enums as members of another class????
Hi , I have the following example on the server side public Enum Colors RED, ORANGE, UNKNOWN, the above enum is in a separate file/class Now the webservice class. @WebService public class A Colors myColor =Colors.UNKNOWN public void setMyColor(Colors
-
First time I connected my new IPhone 5 to my computer for the first time and it says the `Pairing record is missing`. What can I do to resolve this?
-
I attached my iphone to a computer that had been attacked by some viruses and from then on I can't charge my iphone correctly and it everytime i want to charge it iphone shows this message after 2 or 3 minutes from plugging charger to power source.
-
SAVE MY KEYBOARD- MySQL resources is invalid.
I have two pages that both use the same include. I posted awhile back b/c one of them would not work. I came in, redid the page - VOILA! It worked. Now it doesn't. Somebody, please save my machine from a pounding!!!!!! Working page: http://demo.media