Need to retain the values of LOV in Apex
Hi,
I had created three lovs namely A,B, and C in which A is the parent of B and C is an independent LOV. For parent child realtionship between the LOVS A and B, I had used the Ajax on demand process.
Now in my project all the three LOVs are mandatory, so what i want if suppose any user clicks on submit button without selecting any value from LOV C, then it must load to the same page and show an error. My problem is that after the page load, LOVs A and B are not retaining their earlier values and set to default values In my application I want to retain them.
I hope my problem is clear.
Please help.
Thanks
Saurabh
OK, now it is a different story.
First, you don't need to remove the page# from the action section as long as it is NOT in the clear cache attribute.
Second, You said that you are using AJAX to load the value of B , and I beleive that currently you have a JS that fires OnChange on item A. You need to call the same JS code when loading the page as follows:
In you page attributes :
Page HTML Body Attribute>> onLoad="your_function();"
where your_function is the same function you call when you change A's value to get B's value..
Hope this helps.
Sam
Similar Messages
-
hi all,
I am looping through a ResultSet to set properties of an Class(cl). Then I add each class to the vector(vt) by casting the cl into Object. But when I try to retrieve elements from the vector. I only get one element as though all the elements in the vector are occupied by only one element.
Tell me how to retain the values(Objects) in the vector?
Here I set the properties and load the vector
aud is an Object
vt_aud is the vector
while(rs.next())
aud.setFirstName(rs.getString(1));
aud.setLastName(rs.getString(2));
aud.setEmail(rs.getString(3));
vt_aud.add((Object)aud);
To retrive
for(int i=0;i{
aud = (audience)vt_aud.elementAt(i);
firstname = aud.getFirstName();
lastname = aud.getLastName();
email = aud.getEmail();
System.out.prinln(firstname);
The problem is it prints only the last record of the resultSet.
Thanks for help.Hi,
Java only stores references to objects in collections such as Vector. If you want to store several different objects in the Vector, you need to make sure each one is a separate object, not just the same object re-used each time.
Try this code:
Vector vt_aud = new Vector();
while(rs.next()){
audience aud = new audience();
aud.setFirstName(rs.getString(1));
aud.setLastName(rs.getString(2));
aud.setEmail(rs.getString(3));
vt_aud.add(aud);}
or, if you have control over the "audience" class, you can add a constructor and simplify the loop:
Try this:
Vector vt_aud = new Vector();
while(rs.next()){
vt_aud.add(new audience(rs.getString(1),rs.getString (2),rs.getString(3)));}
Hope this might help you.
Anil.
Developer Technical Support,
Sun Microsystems, India.
http://www.sun.com/developers/support -
Want to create a link on seeded page which can pass the values of LOVs
Hi,
I have a seeded page.. and i want to create a Link on the page which will redirect to new custom page...
When user clicks on the link, the values of some LOVs should be forwarded on the custom page......
I created a link through personalization... But I have doubt about how to attach the values of LOVs through url....
Is it possible to do the same???
Thanks in advance,
KaushikThanks Pratap,
Yes the LOVs are created through personalization....
Since i dint want to touch the code... so i created everything through personalization.....
The only problem now is to get the values of these LOVs in URL....
Is there no other method other then extension to do this???
Thanks,
Kaushik -
I need to get the value of a text field that is located in another page JSP
I need to get the value of a text field that is located in another page JSP. How do I do that?
Well you see, I have a page at angelfire.com, which
does not support JSP. I want to call a script located
at mycgisever and then, when pressing a link on the
former page, the JSP page is loaded, and the script
get the value from the text field on the OTHER page.
Is this possible?I know nothing about cgi. But that should not prevent me from understanding what can and cannot be done, assuming cgi is sort of comparable with jsps.
I'm unable to understand your description clearly. Try to explain it better. Give precise steps that you intend to follow and I should be able to help you further.
So you have a page1.
You hit submit from page1.
That goes to the cgiserver.
From the cgiserver, programmatically load up the jsp.
search this for the text field.
Display it on your page2.
Is that what you are trying to do?
BTW, won't be able to help you with cgi scripting at all. Can help with Java and Jsp. -
Need to pass the value from UI
Hi!!
I am using jdeveloper 11.1.1.5
I had dragged and dropped Three Input Text Boxes in my UI
I need to pass the values from the UI to my AMImpl Methods
i.e. In my AMImpl Methods
vo2.setNamedWhereClauseParam("year",[af:ImputTextBox1]);
vo2.setNamedWhereClauseParam("period",[af:ImputTextBox2]);
vo2.setNamedWhereClauseParam("bu",[af:InputTextBox3]);
vo2.executeQuery();The links given by Vinoth and jabr is very usefull for me!!
Still i m receiving an while i clicked the button
Cannot convert MEL of type class java.lang.String to class oracle.adf.view.rich.component.rich.input.RichInputText
Cannot convert 201011 of type class java.lang.String to class oracle.adf.view.rich.component.rich.input.RichInputText
Cannot convert 5 of type class java.lang.String to class oracle.adf.view.rich.component.rich.input.RichInputTextEdited by: wilhelm wundt on Dec 18, 2011 10:00 PM -
Doubt : retaining the value between the calls
hi,
Which statement would you use to declare a variable, within a Function Module/Form-routine, so as it will retain the value between the calls?"
GauravDear Gaurav,
To retain the same value outside a function module, you can define a variable with the same name as the exporting parameter in a function module. However in case of Subroutines you can pass the value by reference as any change in the formal parameters will be reflected in the actual parameters.
Check the following links for further clarification:
http://help.sap.com/saphelp_nw70/helpdata/en/9f/db988735c111d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db975c35c111d1829f0000e829fbfe/content.htm
Regards,
Rajesh K Soman
<b>Please reward points if found helpful.</b> -
Clicking on JTabbedPane showConfirmDialog whether to retain the values
I have 2 panel in the jtabbedpane.
Each panel has a jtable and the user able to add rows and do some calculations.
If the user clicks the 1st panel in the JTabbedpane and add few rows and calculations are done.
Then clicking the 2nd panel in the Jtabbedpane, before showing the 2nd panel it should showconfirmdialog OptionPane with Yes or No (You want to retain the values) .
if the user press Yes the value shoule be retained.
if the user press No reset all the values.
Now I have tried with jatabbedpane.addMouseListener();
How to perform this functionality.
Thanks you all.Consider
JTabbedPane.addChangeListener(ChangeListener l) -
How to call procedure inside a procedure and need to sore the value in a variable?
HI ALL,
i am usung oracle 11g.
here is my package and procedure
i want to call get_email_details this procedure inside the process_email_master and want to keep the value inside a varible in master procedure
create or replace
PACKAGE ms_gen_process_email
as
type email_type is record(subject varchar2(4000 char),
email_body varchar2(4000 char),
to_receipent varchar2(4000 char),
cc_receipent varchar2(4000 char));
type email_type_table is table of email_type;
procedure process_email_master(
p_metric_name IN VARCHAR2,
p_current_stage in varchar2,
p_action in varchar2,
p_pid in number,
P_OBJECT_ID in varchar2
--p_emai_master out p_email_type_table
PROCEDURE get_email_details (
p_metric_name IN VARCHAR2,
p_current_stage in varchar2,
P_ACTION in varchar2,
p_email_type_table1 out email_type_table
END ms_gen_process_email;
create or replace
PACKAGE BODY ms_gen_process_email
as
procedure process_email_master(
p_metric_name IN VARCHAR2,
p_current_stage in varchar2,
p_action in varchar2,
p_pid in number,
p_object_id in varchar2
as
begin
null;
EXCEPTION
WHEN OTHERS
then
null;
end process_email_master;
PROCEDURE get_email_details (
p_metric_name IN VARCHAR2,
p_current_stage IN VARCHAR2,
P_ACTION in varchar2,
p_email_type_table out email_type_table
as
BEGIN
select subject, email_body, to_receipent, cc_receipent
bulk collect into p_email_type_table
from ms_gen_email_config_detail
WHERE email_key = (
SELECT email_key
FROM ms_gen_email_config
WHERE metric_name = p_metric_name
AND action = p_action
and current_stage = p_current_stage
for i in p_email_type_table.first..p_email_type_table.last loop
dbms_output.put_line(p_email_type_table(i).subject||p_email_type_table(i).email_body||p_email_type_table(i).to_receipent||p_email_type_table(i).cc_receipent);
end loop;
EXCEPTION
WHEN OTHERS
THEN
NULL;
END get_email_details;
END ms_gen_process_email;
but i am getting this error
Error(15,31): PLS-00201: identifier 'P_EMAIL_TYPE_TABLE' must be declared
Regards
DambyIf you need to call a procedure which has yet to be defined in your package, you can use forward declaration...
That means that you declare the procedure/function before the place it's going to be called (typically people do this at the top of the package) without providing a body for the code...
PACKAGE BODY ms_gen_process_email as
PROCEDURE get_email_details
p_metric_name IN VARCHAR2,
p_current_stage IN VARCHAR2,
P_ACTION in varchar2,
p_email_type_table out email_type_table
); -- Forward declaration of get_email_details procedure
procedure process_email_master(
p_metric_name IN VARCHAR2,
p_current_stage in varchar2,
p_action in varchar2,
p_pid in number,
p_object_id in varchar2
as
begin
null;
EXCEPTION
WHEN OTHERS
then
null;
end process_email_master;
PROCEDURE get_email_details
p_metric_name IN VARCHAR2,
p_current_stage IN VARCHAR2,
P_ACTION in varchar2,
p_email_type_table out email_type_table
) as -
Need to get the values from "Signed" field from PDF form.
Hi,
This is Dinesh. I am PHP Developer. My issue is "I am not able to get the value of "signed" field from the PDF form when the form has been submitted.". I want to get the Digital Signature value of that field and i need to store it in the DB.
Please help me here Or Please forward this issue to any of the PHP developer who solved this issue and let me know.
Thanks & Regards
DineshHi Vikas,
you can use this badi MRM_WT_SPLIT_UPDATE, the method will be WHTAX_SPLIT_UPDATE
in this badi please see the importing and exporting parameters, you will get the values of withholding tax code as TE_RBWS in export parameters.
Please search in google or SCN you will get how to use it. -
Need to condense the value of VBELN in to new variable.
Here in this code..I had defined a Local variable LV_VBELN LIKE VBRK_VBELN and VBELN is Type c (10).
The function module that I had used in the Import Parameter
you can see the BRANCH...Its type is C (4).
I am passing the value of VBELN to the Import parameter in the function module. As it result it is throwing the short dump.
I need to declare a new Local variable of type c with length 4 and condense the VBELN value into this local variable and pass it to the Functino module.
Can anyone suggest me with the code.
Here is the code.
DATA: ADDRESS LIKE SADR,
BRANCH_RECORD LIKE J_1BBRANCH,
CGC_NUMBER LIKE J_1BWFIELD-CGC_NUMBER,
ADDRESS_VALUE LIKE ADDR1_VAL.
DATA : LV_VBELN LIKE VBRK-VBELN. "Local Variable for vbrk-vbeln
--->Select single bupla into lv_vbeln from vbrk where vbeln EQ is_bil_invoice-hd_gen-bil_number.
CALL FUNCTION 'J_1B_BRANCH_READ'
EXPORTING
BRANCH = lv_vbeln
COMPANY = is_bil_invoice-hd_org-comp_code
IMPORTING
ADDRESS = ADDRESS
BRANCH_RECORD = BRANCH_RECORD
CGC_NUMBER = CGC_NUMBER
ADDRESS_VALUE = ADDRESS_VALUE
EXCEPTIONS
BRANCH_NOT_FOUND = 1
ADDRESS_NOT_FOUND = 2
COMPANY_NOT_FOUND = 3
OTHERS = 4.
IF sy-subrc = 0.
st_txt-cnm1 = ADDRESS-NAME1. " Name 1
st_txt-cnm2 = 'BRAZIL'.
st_txt-cnm3 = ADDRESS-STRAS. " House address & street
st_txt-cnm4 = ADDRESS-ORT01. " City
st_txt-cnm5 = ADDRESS-PSTLZ. " Postal code
st_txt-cnm6 = 'Tel:'.
st_txt-cnm7 = ADDRESS-TELF1 " Telephone no.
st_txt-cnm8 = ADDRESS-TELFX. " Fax number
*Commmented and added to avoid hard code CNPJ
st_txt-cnm9 = 'CNPJ ' + CGC_NUMBER. " CGC number (company,branch,check digits)
CONCATENATE 'CNPJ' CGC_NUMBER INTO st_txt-cnm9 SEPARATED BY SPACE.
**End of changes
ENDIF.Hi Kittu,
The length of BRANCH is 4 but the length of VBELN is 10.
DATA: LV_VBELN like VBRK-VBELN. "Local Variable for vbrk-vbeln
The short dump is due to TYPE MISMATCH. So try to declare in the following way...
Declare like this....
DATA: LV_VBELN like J_1BBRANCH-BRANCH.
Best regards,
raam -
I need to add the values stored in the session object into the html textbox
Dear Sir,
i have been trying to create an edit employee details page
What i have done till now is as follow:
1. Got employee id from HTML page.
2. Compared it with the id stored in the database.
3. If the id is correct then pulled the record of the corresponding employee and stored it in the session object.
4. Dispatched the session values to another servlet EditEmpDetails2.java
what i need to do now
5. Now i need to set the session values in the text field of the html form
6. I also need to be able to edit those vales and store the edited values in the database.
Please help me as i have tried doing it for 1 week without any clues
i have tried to create a html page which is something like this:
<html>
<head>
<title>Edit Employee Details Page</title>
<body BGCOLOR="red" text="black">
<h1 ><font color="black">Edit Employee Details Page</font></h1>
<form action = "EditEmpDetails" method="Get">
<table width="50% align="center"
<tr><td>Employee ID: </td>
<td><INPUT TYPE="TEXT" name="employeeid"<br></td></tr>
<tr><td><center><input type="submit" value="submit"></center></td></tr>
<tr><td><center><input type="reset" value="reset" ></center></td></tr>
</table>
</form>
</body>
</html>
design of my servlet EditEmpDetails.java
public void EditEmpDetails1 extends HttpServlet
public void doGet(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException
PrintWriter out = response.getWriter();
response.setContentType("text/html");
HttpSession session = request.getSession();
String employeeid;
String X = request.getParameter("employeeid");
System.out.println("Employee iD:" + X);
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc:odbc:murphy");
String query = "Select * from users where employeeid=?";
PreparedStatement stat = con.prepareStatement(query);
System.out.println(stat);
stat.setString(1,X);
ResultSet rs = stat.executeQuery();
while(rs.next())
String Z = rs.getString(password);
if(Z.equals(X))
String A = rs.getString(1);
session.setAttribute("employeeid", A);
String B = rs.getString(2);
session.setAttribute("firstname", B);
String C = rs.getString(3);
session.setAttribute("lastname", C);
String D = rs.getString(4);
session.setAttribute("gender", D);
String E = rs.getString(5);
session.setAttribute("dateofbirth", E);
String F = rs.getString(6);
session.setAttribute("address", F);
String G = rs.getString(7);
session.setAttribute("postalcode", G);
String H = rs.getString(8);
session.setAttribute("phone", H);
String I = rs.getString(9);
session.setAttribute("mobile", I);
String J = rs.getString(10);
String url = "/EditEmpDetao;s.java";
RequestDispatcher dispatcher = getServletContext().getRequestDispatcher(url)
dispatcher.forward(request,response);
catch (Exception e)
system.out.println(e)
I do not know how to put the values stored in the session object into the html text box3. If the id is correct then pulled the record of the corresponding employee and stored it in the session object.do you really need to store this in session object?
5. Now i need to set the session values in the text field of the html form which form? in a new html/jsp page? i suggest go for a JSP
In your JSP page use JSP expression tags to put the session attributes.
it's something like : <input type='text' name='employeeid' value='<%= session.getAttribute("employeeid") %>' >and you need to generateanother servlet for saving the details/modifications to the database.
I think i m clear enough.
if you need more clarifications. just try it and then post your problem.
Diablo -
Need to retain the screen input after user clicks BACK
Hi,
I have a report program in HR, using LDB "PNP" and Report category : PSSPCDOC.
After the program is executed and the report is displayed on screen, if the user clicks the BACK button (F3), the selection screen is displayed with initial values. The input values provided by the user previously get lost.
I debugged and it seems that the memory gets cleared everytime the BACK button is clicked.
But i want to retain the user inputs on the selection screen if the user clicks the BACK button because the user wants to change some selection inputs not all.
I am new to HR module, please let me know how to solve this issue.Hi,
In your screen in the application bar,the right most button is a coloured monitor kind of icon, next to the Help icon (which is a white question mark in a yellow circle) ,click on this monitor icon ,then under the Local Data tab there is a History Block, select radio button History ON.
I hope it helps.
Regards,
Shraddha -
Needs to plot the values in x-axis linearly in obiee
Hello all,
I am trying to plot the values in x-axis linearly .
Actual it should be starting at -100,-50,0,50,100,150,200,250,300,350,400,450........
But now in my graph it is showing -100,-50,-25,-10,-1,+1,+25,+50,+100,+150..
Can you please suggest me, how to achieve the actual values in x-axis.
and also all the questions related to these situation.
Thanking all.
Thanks.Hi Luis,
find attached an example ( maybe not easy to understand); but you can cut it and reuse it for
your needs. Hope it helps.
regards
Werner
Attachments:
test_sweep.zip 108 KB -
Multiple select list not retaining the value for the first time
Hi,
I have a 3 select list depends on each other. select_list1 -- > select_list2 --> multiselect3. I have use denes example to create them.
For the first time when I select values from 1,2,3 and runs a report based on it, it works fine but *does not retain the selected value in multiselect3.
for the second time submit the process, it retails value in multiselect3. Please tell me if you came across this issue before
Here is the code.
function get_select_list_xml_VL(pThis,pSelect,pSelect1,pSelect2){
var l_Return = null;
var l_Select = html_GetElement(pSelect);
var l_Select1 = html_GetElement(pSelect1);
var l_Select2 = html_GetElement(pSelect2);
var get = new htmldb_Get(null,html_GetElement('pFlowId').value,
'APPLICATION_PROCESS=Cascading_Select_List_VL',0);
get.add('F660_CASCADING_TEST',l_Select1.value + '_' + pThis.value + '_' + l_Select2.value);
alert(l_Select1.value + '_' + pThis.value + '_' + l_Select2.value);
// alert(document.getElementById("F660_CASCADING_TEST").value);
gReturn = get.get('XML');
if(gReturn && l_Select ){
var l_Count = gReturn.getElementsByTagName("option").length;
l_Select.length = 0;
for(var i=0;i<l_Count;i++){
var l_Opt_Xml = gReturn.getElementsByTagName("option");
appendToSelect(l_Select, l_Opt_Xml.getAttribute('value'),
l_Opt_Xml.firstChild.nodeValue)
get = null;
function appendToSelect(pSelect, pValue, pContent) {
var l_Opt = document.createElement("option");
l_Opt.value = pValue;
if(document.all){
pSelect.options.add(l_Opt);
l_Opt.innerText = pContent;
}else{
l_Opt.appendChild(document.createTextNode(pContent));
pSelect.appendChild(l_Opt);Please ask any question if you dont understand about the problem.
Thanks -
Hi,
I am new to the OAF technology.I don't ve columns like customer_name and item in custom table. I am getting these values through the view object.If I enter customer_name and item the values of customer_id and item_id should place in the custom table. I ve these fields in custom table. And also i ve status field in custom table.It is not null.how to pass default value to that and how to pass customer_id and item_id to the custom table.
In controll file i written like this
OAApplicationModule am = pageContext.getApplicationModule(webBean);
am.invokeMethod("createItem");
and in formrequest
OAApplicationModule am = pageContext.getApplicationModule(webBean) ;
am.invokeMethod("saveDataToHDR") ;
and in application module I added this code
public void createItem()
OAViewObject vo = (OAViewObject)getForecastingHVO1();
if (!vo.isPreparedForExecution())
vo.executeQuery();
Row row=vo.createRow();
vo.insertRow(row);
row.setNewRowState(Row.STATUS_INITIALIZED);
}//end createItem()
public void saveDataToHDR()
getDBTransaction().commit();
and in entity object i added this code
public void insertRow()
try
OADBTransactionImpl oadbtransactionimpl = (OADBTransactionImpl)getDBTransaction();
String s = "begin xxic_insert_items(p_item => :1, p_customer => :2, ); end; ";
OracleCallableStatement oraclecallablestatement = (OracleCallableStatement) oadbtransactionimpl.createCallableStatement(s, -1);
//oraclecallablestatement.setNUMBER(1,getFrcstDesignator());
// oraclecallablestatement.setString(2,getProductFamily());
oraclecallablestatement.execute();
catch(SQLException sqlexception)
throw OAException.wrapperException(sqlexception);
catch(Exception exception)
throw OAException.wrapperException(exception);
I written the code like this.I am not getting any error. But the data is not inserting into the custom table.Please tell me the solution.
Thanks.Hi,
I am new to the OAF technology.I don't ve columns like customer_name and item in custom table. I am getting these values through the view object.If I enter customer_name and item the values of customer_id and item_id should place in the custom table. I ve these fields in custom table. And also i ve status field in custom table.It is not null.how to pass default value to that and how to pass customer_id and item_id to the custom table.
In controll file i written like this
OAApplicationModule am = pageContext.getApplicationModule(webBean);
am.invokeMethod("createItem");
and in formrequest
OAApplicationModule am = pageContext.getApplicationModule(webBean) ;
am.invokeMethod("saveDataToHDR") ;
and in application module I added this code
public void createItem()
OAViewObject vo = (OAViewObject)getForecastingHVO1();
if (!vo.isPreparedForExecution())
vo.executeQuery();
Row row=vo.createRow();
vo.insertRow(row);
row.setNewRowState(Row.STATUS_INITIALIZED);
}//end createItem()
public void saveDataToHDR()
getDBTransaction().commit();
and in entity object i added this code
public void insertRow()
try
OADBTransactionImpl oadbtransactionimpl = (OADBTransactionImpl)getDBTransaction();
String s = "begin xxic_insert_items(p_item => :1, p_customer => :2, ); end; ";
OracleCallableStatement oraclecallablestatement = (OracleCallableStatement) oadbtransactionimpl.createCallableStatement(s, -1);
//oraclecallablestatement.setNUMBER(1,getFrcstDesignator());
// oraclecallablestatement.setString(2,getProductFamily());
oraclecallablestatement.execute();
catch(SQLException sqlexception)
throw OAException.wrapperException(sqlexception);
catch(Exception exception)
throw OAException.wrapperException(exception);
I written the code like this.I am not getting any error. But the data is not inserting into the custom table.Please tell me the solution.
Thanks.
Maybe you are looking for
-
Adobe Air Installation problem in Mac OS 10.6.3
I am using a Mac OS 10.6.3, having this error message when installing Adobe Air, "an error occurred while installing adobe air. installation may not be allowed by your administrator. please contact your administrator" I downloaded the latest version
-
Goods issue dates are different in sales order & delivery
Hi, We have a situation where in sales order schedule line tab goods issue date is 21.30.2011 but in delivery the planned GI date is 28.03.2011. There are two line item in the sales order & in both the line items all the dates are same. Same route is
-
Managed Services NOT showing up in Qmaster Service Browser
This seems to be a strange one. The typical issue is people that have not set their Qmaster Preferences to Managed Services, when this happens the node does show up in the Qmaster Service Browser section of the Qadministrator but cannot be dragged in
-
How to get substring from string using index?
hi, here i am having string , i want the pullareddy from below line , i know how to get from substring. but i want to get the above using "index", can any help how to do it? String str1="janapana,pullareddy, in malaysia"; jpullareddy
-
Show ip bgp not showing all BGP Paths
Hi, We've setup BGP as shown in the diagram. Now Router Router A and B are peers of each other. Router A peers with ISP A and Router B peers with Router B. The issue we have is that Router B knows how to get to router C via eBGP connection to ISP B r