Calling a form in a dynamic page
Hi all,
We are using dynamic pages for the creation of custom portlets. We can call a report in html tag by calling report.show procedure. What will I write for calling a form?
Thanx,
Gulsah
Gulsah,
In the component management screen you can find a URL-style "Run Link" which looks like this:
PORTAL30.wwa_app_module.new_instance?p_moduleid=1060253649
Also can put this PLSQL code:
PORTAL30.wwa_app_module.link (
p_arg_names => '_moduleid', p_arg_values => '[module id]',
p_arg_names => '_show_header',p_arg_values => 'YES');
where [module id] is your form id
for more information please see the Portal FAQ:
http://otn.oracle.com/products/iportal/htdocs/portal_faq.htm#BuildingApplications
Thanks,
Dmitry
Similar Messages
-
Including a form on a dynamic page (ORA-01036)
I created a form based on a proceedure. I also created a dynamic page which consists of:
DECLARE
BEGIN
PORTAL.wwa_app_module.new_instance('1235532770');
END;
When this dynamic page is run in development using the "Run" buttons, it works. When I include it on a portal page as a portlet, it errors with this error:
ORA-01036: illegal variable name/number
Does anyone have an idea as to why? I am sure it has something to do with context and/or the URL parameters, but don't know where to start.Using javascript, you could wrap the included page within a DIV tag or SPAN tag that is initially not visible. Then when the user clicks the button you would make the hidden DIV or SPAN visible.
The visibility attribute can be set to visible (to see it) or hidden (to not see it). Here's a page that might shed some light:
http://www.csctce.com/demos/dom_tutorial/
HTH -
Problem calling Procedure with parameter from Dynamic Page
I received an error saying the Page not found
here's how to reproduce the error.
1. Create procedure in portal30 schema.
Create or Replace PROCEDURE PORTAL30.ADD_TWO_VALUES
v_one IN NUMBER,
v_two IN NUMBER,
v_result OUT NUMBER)
as
begin
v_result :=v_one+v_two;
end;
2. Create Dynamic Page with following code
<ORACLE>DECLARE
v_total NUMBER;
BEGIN
ADD_TWO_VALUES(:v_one,:v_two, v_total);
htp.p('The total is => ');
htp.p('<input type="TEXT" VALUE='||v_total||'>');
htp.para;
htp.anchor('http://<machine.domain:port#>/pls/portal30/PORTAL30.DYN_
ADD_TWO_VALUES.show_parms', 'Re-Execute Procedure');
END;</ORACLE>
3. I clicked on Customize Link and entered 2 numbers as values for v_one and v_two.
4. Got "The page cannot be found" error in I.E. or "The requested URL /pls/portal30/PORTAL30.DYN_SAMPLE_ADD.show was not found on this server." on Netscape
However when I subsitute "ADD_TWO_VALUES(:v_one,:v_two, v_total);" in the dynamic page for "ADD_TWO_VALUES(3,2, v_total);", it runs just fine.
What's wrong here? Can I not use a parameter from a dynamic page and call a procedure with it? Help is needed urgently and will be greatly appreciated.
-AhsunHi,
I tried with your code with few changes ,please try with them.
Create or Replace PROCEDURE <myschema>.ADD_TWO_VALUES
v_one IN NUMBER,
v_two IN NUMBER,
v_result OUT NUMBER)
as
begin
v_result :=v_one+v_two;
end;
I created the procedure in <mySchema> and granted that to <application_schema> and made some changes
<ORACLE>
DECLARE
v_total NUMBER;
BEGIN
<procedure_schema>.ADD_TWO_VALUES(:v_one,:v_two, v_total);
htp.p('The total is => ');
htp.p('<input type="TEXT" VALUE='||v_total||'>');
htp.para;
htp.anchor('http://<your_host>/pls/<portal_schema>/<application_schema>.DYN_FOR_OTN.SHOW_PARMS', 'Re-Execute Procedure');
END;
</ORACLE>
Hope this helps.
rahul -
Forms, web applications, dynamic pages
Hi.
Can someone tell me what the best method is to create a form
in DW? Correct me if I am wrong as I am quite new to this, but I
see a lot of sites out there with different types of
pages...they're using .aspx, .jsp, .php, .cgi, .html, .asp .cfm
.........etc. Which one do you use??
I want a form for contact info filled in & then you click
a submit button & an email goes to your email listing all the
fields & the entries of whoever filled your form. What is the
difference of all of those mentioned above?
Also what is the difference between .aspx & .asp?
.html & .htm?
Any help would be appreciated.
Thanks.Forms can be html pages but once the submit button is clicked
the form is
usually processed on the sever hence the .asp. .aspx .jsp
.php etc.
Search google for active server pages. You can also look at
the help file
for info on database sites.
Dave
"Stella1251" <[email protected]> wrote in
message
news:gpmak2$ftb$[email protected]..
> Hi.
>
> Can someone tell me what the best method is to create a
form in DW?
Correct me
> if I am wrong as I am quite new to this, but I see a lot
of sites out
there
> with different types of pages...they're using .aspx,
.jsp, .php, .cgi,
.html,
> .asp .........etc. Which one do you use??
>
> I want a form for contact info filled in & then you
click a submit button
& an
> email goes to your email listing all the fields &
the entries of whoever
filled
> your form. What is the difference of all of those
mentioned above?
>
> Also what is the difference between .aspx & .asp?
> .html & .htm?
>
> Any help would be appreciated.
> Thanks.
> -
Calling Oracle Forms 6i from ADF Page.
Hi,
JDeveloper 11.1.1.3.0
Oracle Forms 6i.
I would like to know whether it is possible to invoke the Oracle Forms 6i fmx executable in ADF 11g. Please let me know how to achieve that.
Thanks,
RajeshHi Shay,
Thanks for the reply.
I am taking abt the ADF Faces. The idea is, want to access the forum in a web page. Like to know is it possible?
Thanks,
Rajesh -
Calling a procedure from Dynamic Page
I am trying to call a procedure from a dynamic page. The procedure displays multi records from a table. I have created a procedure:
PROCEDURE process_student_request( p_primary_request in wwv_utl_api_types.vc_arr,
p_alternate_request in wwv_utl_api_types.vc_arr,
p_action in varchar2,
l_status in out varchar2);
When I hit the submit button on the dynamic page it does not execute the procedure and tries to open a new page. How do I get this to work?
Here is the text of the page:
<HTML>
<HEAD>
<TITLE>Example</TITLE>
</HEAD>
<BODY>
<FORM action="portal30.star_portal.process_student_requests" method="post">
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="2" CELLSPACING="0" class="RegionBorder">
<TR>
<TD valign="top" align="left" width="40%"><FONT class="PortletText1">
<ORACLE>declare
row_num number := 1;
hold_row_num number;
hold_class_cd stars3.req.class_cd%TYPE;
begin
for c1 in (select A.start_yy, A.school, A.student_id, A.class_cd, B.name from stars3.course B, stars3.req A
where A.student_id = portal30.star_portal.get_session_variable('STUDENT_ID') and A.start_yy = '01' and
A.alternate_no = '0' and
B.start_yy = A.start_yy and
B.school = A.school and
B.class_cd = A.class_cd)
loop
hold_class_cd := c1.class_cd;
htp.p(lpad(to_char(row_num),2,'0'));
htp.p('<select name="p_primary_request">');
htp.p('<option value="' || c1.class_cd|| '">' || c1.name || '</option>');
row_num := row_num + 1;
htp.p('<BR>');
end loop;
htp.p('<input type="submit" name="p_action">');
end;
</ORACLE>
</BODY>
</FORM>
</TD>
</TR>
</TABLE>
</HTML>Bob,
You have variables in your procedure like l_status, p_alternate_status which you do not have in the form. Are these IN or OUT variables ?
If these are IN variables, this proc will not work because you do not have any variable in the form. So from where does it get the values? There is not any default declared too. You have to explicitly define IN or OUT variables.
Have you also given execute permission to public ? -
Is it possible to call on a link in a dynamic page?
I have created a dynamic page with sql code in it. When I go to customation form, for the page I just created, there is a button called run dynamic page. When I click this the sql code on the page execute. I can also make a link to the customation form so when I run this link the page with button run dynamic page appear. The question is if there is someway you can use this link in another dynamic page you just created so you get a page with the button run dynamic page when you run the page? Or is there another solution to the problem to get a page with a button to run sql code?
Hi,
You can call a component's customization form in the dynamic page like this
<HTML>
<HEAD>
<TITLE>Example</TITLE>
</HEAD>
<BODY>
<H2>Example of A Dynamic Page</H2>
<ORACLE>
begin
SJAYARAM903_1G.RPT_0911010900.show_parms;
end;
</ORACLE>
</BODY>
This would render the customization form in the dynamic page.
Thanks,
Sharmila -
How to call a procedure from dynamic page?
I am trying to submit a form (dynamic page) to a procedure but keep getting the generic page not found error.
I have the following dynamic page (bind variable works properly):
<HTML>
<HEAD>
<TITLE>Example</TITLE>
</HEAD>
<BODY>
<oracle>
declare
v_job_id number := :job_id;
begin
htp.p(v_job_id);
htp.formOpen('http://mssdiscovery.ssc.nasa.gov:7777/pls/portal/portal_public.buy_off', 'post');
htp.formHidden('JOBID', v_job_id);
htp.formSubmit('submit', 'Buy Off');
htp.formClose;
end;
</oracle>
</BODY>
</HTML>
This form should submit to a procedure called "BUY_OFF", defined in the PORTAL_PUBLIC schema as follows:
Create or Replace PROCEDURE PORTAL_PUBLIC.BUY_OFF
(JOBID IN number)
as
begin
update portal_public.components_jobs_syn
set
status = 'COMPLETE'
where job_id = JOBID;
/* add code to redirect */
exception
when others then
null;
end;
I have granted PORTAL and PUBLIC execute privileges.
I have never been able to submit a form in a dynamic page to a procedure... it never works... someone please help me out! What am I missing?Nevermind... I changed the submit button name from submit to NULL and it works fine now. I guess the name flipped it out for some reason.
-
Obtaining form parameters in a dynamic page
Hi
It is possible of course to create a form on a dynamic page and have a user provide input. But how can the user input be retrieved, if the user input is sent to the same page or to another Portal dynamic page? As a Portal dynamic page can only contain html and pl/sql between the <oracle> tags, it looks like there is no programmatic way (such as with perl or java) to obtain the information from the form and put it in one or more variables.
Is there a way to obtain the data from forms using pl/sql in a dynamic page? A code example would be most helpful.
Thanks very much.
HugoYou can do it using two dyns or one dyn.
Using one dyn:
Define a parameter :p1 and let a default value for it(e.g. 1).
Construct a form that submits to the same dyn
begin
declare
v_p1 varchar2(100) := :p1;
begin
htp.p('<form name="example" action="" method="post">
<input type="text" name="p1" value="'||v_p1||'">
<input type="submit">
</form>');
end;
When you submit it to same page you will be able to see your new parameter value. If you want to use two dyns then submit it to second dyn. -
Problems calling a html form from a different page
Hi,
I'm working on a logon for a website. I have a html page and a jsp page that contains the login function. I want to call the login form after the user presses submit. But I'm having problems calling the form from the html page.
Any help appreciated.
Here is my html page:
<form method="POST" action="login.jsp">
<table>
<tr>
<td>
<div align="center">
<b>UserName:</b>
<input name="user_name" type="text" class="input" id="username" maxlength="18">
<b>Password:</b></font>
<input type="password" name="password" class="input" maxlength="18">
</input>
<input type="button" border="0" value="Login" width="30" height="20">
</input>
My jsp page:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body bgcolor = "#E5E8EF">
<script language="javascript">
function login(form) {
alert("hello");
if (form.username.value=="joe") {
if (form.password.value=="bloggs") {
location="success.html"
} else {
alert("Invalid Password")
} else { alert("Invalid UserID")
//-->
</script>
</body>
</html>So your intention is that the JS function would be invoked somehow?
Are you aware that Javascript is a completely different language from Java/JSP/JSTL?
Here is a listing of some JSP/Servlet tutorials which might help you further:
http://www.google.com/search?q=java+tutorial+site:sun.com
http://www.google.com/search?q=jsp+tutorial+site:sun.com
http://www.google.com/search?q=servlet+tutorial+site:sun.com -
Help on oracle tags inside dynamic pages
Hi All
I have used dynamic pages like this , i create a html form inside a dynamic page on submit of which a procedure gets called & inserts the values in the table.
I see some <oracle> tags every time i create a dynamic page but have never used them. Could some one tell how to use these tags. whether they can be used to call a procedure or can i embed any dml statements in these oracle tags.
Kindly somebody could explain it with an example.
Regards
SushantThere is a brief description in the online help - see http://isd-demos2.oracle.com:7778/help/wvtdynam.htm.
You can also search this forum - there have been many examples posted here.
If you have further questions about dynamic pages, the Portal Applications forum would be a better place to post them.
Regards,
Jerry
Portal PM -
Help on oracle tags in dynamic pages
Hi All
I have used dynamic pages like this , i create a html form inside a dynamic page on submit of which a procedure gets called & inserts the values in the table.
I see some <oracle> tags every time i create a dynamic page but have never used them. Could some one tell how to use these tags. whether they can be used to call a procedure or can i embed any dml statements in these oracle tags.
Kindly somebody could explain it with an example.
Regards
SushantHi,
You can do all that you can do in a plsql block.
Here is an example which paints a form for the employee records and submits them. On submit a procedure submit_form is called.
<HTML>
<HEAD>
<TITLE>Example</TITLE>
</HEAD>
<BODY>
<FORM action="<schema name>.submit_form" method="post">
<H2>Example of A Dynamic Page</H2>
<ORACLE>
begin
for c1 in (select * from scott.emp )
loop
htp.p(c1.empno);
htp.p(c1.ename);
htp.p(c1.deptno);
htp.p(c1.hiredate);
htp.p(c1.sal);
htp.p('<input type="hidden" name="p_empno" value='||c1.empno||'>');
htp.p('<input type="text" name="p_comm">');
htp.p('<br>');
end loop;
htp.p('<input type="submit" name="p_action">');
end;
</ORACLE>
</BODY>
</FORM>
</HTML>
Thanks,
Sharmila -
How to call a form on 9i from a jsp?
Hi
I have a form running on forms 9i server.
I want to call this form from a jsp page . I have developer suite 9i installed on my system. LEt me know how this can be done .
thanks
sirishaHi ,
I think yes...but under some circumstances....
In your formsweb.cfg file you should define a named configuration alias... such as:
[TEST]
workingDirectory=C:\TEST_DIR
form=C:\TEST_DIR\MY_NEWFORM.FMX
Then , after stopping , starting your OC4J instance..... you call that as (in a button , for example):
web.show_document('http:<your_server>:<port>/forms/frmservlet?config=[TEST]',_blank);
I have not tested it.....
Regards,
Simon -
Dynamic page search passing parametars problem
I'm having problems with the search dynamic page in Oracle portal 3.0.
I don't know how to pass the bind variables through the form in the Oracle manner, like p_arg_names and p_arg_values. Can someone please e-mail me a short search dynamic page like an example , how can a bind variable be passed through a from.Hi Sharmila,
May I request this instead as the original thread seems to have died. I am trying to link a Oracle Form from a dynamic page, I am passing parameters from the dynamic page to the Oracle Form.
Please may I have a simple example of this.
Thanks Sharmila
Greg
Hi,
Your question is not very clear. Are you creating a dynamic page or a portal form? Do you want to pass parameters to a
form or from a form? Please elaborate.
Thanks,
Sharmila -
How to get form fields in a dynamic page as a portlet
I have a dynamic page(publish as portlet and added to a portal page) with a html form that has many radio button created dynamically (query a table and create as many radio button as records I found) and the name of each radio button is the id of the record from the table it represents.
When I click the submit button of my form it will recall the same portal page and then I have to check which radio buttons where selected to update the database depending on it.
The problem is that I can't get the radio buttons inside the dynamic page because they are created dynamically so I can't make them portlet parameters to be associated with page parameters.
So How can I tell which radio buttons have been selected?
Please help me.Hi,
Write a procedure which will be called as the form action. This procedure should take an array of parameters like p_arg_names and p_arg_values. For example
<html>
<form>
<input type="checkbox" name="p_radio">
<input type="checkbox" name="p_radio">
</form>
procedure submit_form(p_radio in wwv_utl_api_types.vc_arr)
begin
for i in 1..p_radio.count
loop
htp.p(p_radio(i));
end loop;
wwv_redirect.url(<page_url>);
end;
Hope that helps.
Thanks,
Sharmila
Maybe you are looking for
-
Itunes download will not work. Itunes crashes and won't open
Okay, seriously. I'm at my wits end. Please help. I have a Dell Inspiron 1420 running Vista and when I d/l itunes 8.1.1, this is the error message I get when I try to launch itunes. Problem signature: Problem Event Name: APPCRASH Application Name: iT
-
Safari 4.1.3 crashes on launch with System 10.4.11
Everytime I try to launch Safari, it crashes immediately. Does anyone know why? Here's my report. Many thanks to anyone who can help! Date/Time: 2012-11-15 20:41:19.992 -0800 OS Version: 10.4.11 (Build 8S2167) Report Version: 4 Command: Safari Pat
-
Method 'DBEngine' of object '_Application' failed
I am trying to run the latest version of OMWB against an Access 2000 database and am not able to export the information to XML. The subject error message is then followed with another message, 'object variable or With block variable not set'. Any com
-
Aperture 2 upgrade install hanging up
I'm trying to upgrade from Aperture version 1.5 to 2.1. I have a 1 yr old iMAC 2.4 Ghz, 4 GB RAM. During the install of the 2.1 software, I got a message that the software was installed successfully. The install then said it would update the library.
-
My iphone has synced with a later date than photos taken and now cant get resent photos back?
my iphone has synced with a later date than photos taken and now cant get photos recently taken same with messages :-(