How to get the value from the checkbox
Hi All,
Good Evening,
i want to get the value from the check box.
for this i wrote like this
OAMessageCheckBoxBean cbb=(OAMessageCheckBoxBean)webBEan.findChildRecurssive("item240")
String val=cbb.getvalue(pageContext).toString();
val getting the value only when checkbox is checked.
suppose check box is not checked that time i got NULL POINTER exceptionn.
so
i tried the following way alsoo
string val=pageContext.getParameter("item240");
here val return 'on' only when checkbox is checked.
otherwise NULL value returnss.
but i want to get the value is 'Y' when i am checked the checkbox
otherwise returns NULL valuee.
already i set the checkbox properties alsoo
Checked :Y
unchecked:N
pls tell me
Hi,
use
try
OAMessageCheckBoxBean cbb=(OAMessageCheckBoxBean)webBEan.findChildRecurssive("item240")
String test = cbb.getvalue(pageContext).toString();
catch(Exception e)
String test = "";
this way you can handle null pointer exception.
Thanks,
Gaurav
Similar Messages
-
How to get maximal value from the data/class for show in Map legend
I make WAD report that using Map Web Item.
I devide to four (4) classes for legend (Generate_Breaks).
I want to change default value for the class by javascript and for this,
I need to get maximal value from the class.
How to get maximal value from the data/class.
please give me solution for my problem.
Many Thx
Eddy Utomouse this to get the following End_date
<?following-sibling::../END_DATE?>
Try this
<?for-each:/ROOT/ROW?>
==================
Current StartDate <?START_DATE?>
Current End Date <?END_DATE?>
Next Start Date <?following-sibling::ROW/END_DATE?>
Previous End Date <?preceding-sibling::ROW[1]/END_DATE?>
================
<?end for-each?>
o/p
==================
Current StartDate 01-01-1980
Current End Date 01-01-1988
Next Start Date 01-01-1990
Previous End Date
================
==================
Current StartDate 01-01-1988
Current End Date 01-01-1990
Next Start Date 01-01-2005
Previous End Date 01-01-1988
================
==================
Current StartDate 01-01-2000
Current End Date 01-01-2005
Next Start Date
Previous End Date 01 -
How to get multiple values from the list
I've a list of an item which I queried it from the database. I also created a button that will takes a selected items from the list when it was clicked. I used javabean to get the data from database.
<% // clicked on Select District Button
Vector vselectedDistrict = new Vector();
Vector vdistrictID = new Vector();
String tmpSelectDistrict = "";
tmpSelectDistrict = request.getParameter("bSelectDistrict");
if(tmpSelectDistrict != null)
// get multiple values from the list
String[] selectedDistrict = request.getParameterValues("usrTDistrict");
vselectedDistrict.clear();
vdistrictID.clear();
if((selectedDistrict != null) && (selectedDistrict.length != 0))
for(int i=0;i<selectedDistrict.length;i++)
vselectedDistrict.addElement(selectedDistrict);
vdistrictID = dbaseInfo.getcurrentDistrictID(nstate,vselectedDistrict);
for(int i=0;i<vdistrictID.size();i++)
out.println("district = " + selectedDistrict[i]); out.println("district ID= " + vdistrictID.get(i).toString());
%>
// get vdistrict from the database here......
<select name="usrTDistrict" size="5" multiple>
<% for(int i = 0; i< vdistrict.size(); i++)
%>
<option value="<%=vdistrict.get(i).toString()%>"><%=vdistrict.get(i).toString()%></option>
<%
%>
</select>
<input type="submit" name="bSelectDistrict" value="Select District">
Lets say the item that i selected from the list is 'Xplace' and I clicked on the Select District button,
what I got is this error message:
org.apache.jasper.JasperException: Unable to convert string 'Xplace' to class java.util.Vector for attribute usrTDistrict: java.lang.IllegalArgumentException: Property Editor not registered with the PropertyEditorManager
So where is going wrong and what the message means?. Any help very much appreciated. ThanksThese are just guesses that might hopefully steer you in directions you haven't looked in yet.
I presume you used triangle brackets (< >) to avoid having the Jive Forum think it was the "italics" tag?
Are you certain this: dbaseInfo.getcurrentDistrictID(nstate,vselectedDistrict);
expects a Vector as its second parameter? And returns a Vector?
I don't believe you've shown how you use the javabean, or its code? Perhaps it should be rewritten to accept an array of strings instead of a Vector? -
How to get a value from the previous element (XSLT/XPATH gurus ahoy!)
Hi All,
I am building an RTF template for a "letter of reference"-report. Sometimes there are several rows in the data, that need to be printed as one. This is due to consecutive temporary contracts, which will be printed out as one period of service.
Here's a simplified data example to illustrate the problem.
<ROW>
<START_DATE>01-01-1980</START_DATE>
<END_DATE>01-01-1988</END_DATE>
</ROW>
<ROW>
<START_DATE>01-01-1988</START_DATE>
<END_DATE>01-01-1990</END_DATE>
</ROW>
<ROW>
<START_DATE>01-01-2000</START_DATE>
<END_DATE>01-01-2005</END_DATE>
</ROW>
With the data above, I should print two lines:
01-01-1980 - 01-01-1990
01-01-2000 - 01-01-2005
I need to compare START_DATE of an element (except for the first one) with the END_DATE of the previous element, to find out whether to print the END_DATE for that element or not. How can I get that value from the previous element?
Thanks & Regards, Matildause this to get the following End_date
<?following-sibling::../END_DATE?>
Try this
<?for-each:/ROOT/ROW?>
==================
Current StartDate <?START_DATE?>
Current End Date <?END_DATE?>
Next Start Date <?following-sibling::ROW/END_DATE?>
Previous End Date <?preceding-sibling::ROW[1]/END_DATE?>
================
<?end for-each?>
o/p
==================
Current StartDate 01-01-1980
Current End Date 01-01-1988
Next Start Date 01-01-1990
Previous End Date
================
==================
Current StartDate 01-01-1988
Current End Date 01-01-1990
Next Start Date 01-01-2005
Previous End Date 01-01-1988
================
==================
Current StartDate 01-01-2000
Current End Date 01-01-2005
Next Start Date
Previous End Date 01 -
How to Get Parameter Values from the URL ?
Hi,
I have built a calendar called cal_test. I am calling this calendar with this URL:
http://.../pls/.../xyz.cal_test.show?p_arg_names=p_sc_id&p_arg_values=2&p_arg_names=_start_date&p_arg_values=FEB-2002
In the 'Additional PL/SQL Code' tab of cal_test, I need to call a procedure which requires me to pass in as parameters the values of p_sc_id and startdate embedded in the URL named above. How can I retrieve these 2 values from the URL ? Any advice will be appreicated !
DorothyHi Daniel
The following thread might help;
if not, you could try posting the question in Application Server » Web Dynpro Java
Thanks
Kenny -
How to get updated values from the loops while they are running
Hello,
I am having difficulty solving a very basic problem, how to access the updated values from the 'FOR loop' while its running? Basically, the VI I am currently working on calls two sub VIs. Each sub VI has a for loop, and both VIs may or may not run for same number of iterations. My goal is to read the values at each terminal inside the loop of both sub VIs, in the Main VI. I tried to achieve it using Global Variables, but in main VI it displays only the last iteration value from both sub VIs. Could anyone please tell me whrere am I going wrong? Is there any other/better way to achieve this.
I appreciate any input on this issue.
Kudos are (always) welcome for the good post. :-)
Solved!
Go to Solution.Dennis,
In attached VI, I can see the values changing in the sub VI from the main VI with the numeric indicator whose reference is passed on to the sub VI. Now if I wanted to store or use those values how do I do that? I tried to chnge the indicator to control and read from it (in the attached VI) , but the the indicator updates only once. Tried to create a property node and read the Value from it and it didn't work either.
Thanks in Advance!
-Nilesh
Kudos are (always) welcome for the good post. :-)
Attachments:
main-1.vi 8 KB
sub-1.vi 9 KB -
How to get multiple values from the db using select
hi all,
i am using oracle 9i database
i created a procedure
create or replace procedure sample_proce
as
to_i varchar2(50)
begin
select to_id into to_i from sample where flag in('y');
dbms_output.put_line('hai'|| to_i);
end;
when i executed this procedure the following error occurred.
error at line 5 fetching too many rows.
but when i execute the select query alone i can able to view all the rows.
how to resolve iti used the following procedure
create or replace procedure sample_proc
as
begin
for s in(select to_id from sample where flag='y')
loop
dbms_output.put_line(s.to_id);
end loop.
end;
it is executed fine. i can able to fetch all the rows.
how to pass all these values into the another procedure.
we usually pass only one value into another procedure, i do no how to pass all the values . please help me.
Thank u. -
How to get each value from a parameter passed like this '(25,23,35,1)'
Hi
One of the parameter passed to the function is
FUNCTION f_main_facility(pi_flag_codes VARCHAR2) return gc_result_set AS
pi_flag_codes will be passed a value in this way '(25,23,35,1)'
How to get each value from the string
like 25 first time
23 second time
35 third time
1 fourth time
I need to build a select query with each value as shown below:-
(SELECT t2.org_id, t4.description
from org_name t2, ref_org_name t3, code_table t4
where t2.att_data = t4.code
and t3.ref_code = t2.att_type
and t2.att_type = 25 and t3.code_type = t4.code_type
and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date) q1,
(SELECT t2.org_id, t4.description
from org_name t2, ref_org_name t3,code_table t4
where t2.att_data = t4.code
and t3.ref_code = t2.att_type
and t2.att_type = 23 and t3.code_type = t4.code_type
and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date) q2,
(SELECT t2.org_id, RTRIM(xmlagg(xmlelement(e, t4.description || ';')
ORDER BY t4.description).EXTRACT('//text()'), ';') AS DESCRIPTION
from org_name t2, ref_org_name t3,code_table t4
where t2.att_data = t4.code
and t3.ref_code = t2.att_type
and t2.att_type = 35 and t3.code_type = t4.code_type
and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date
group by t2.org_id) q3,
(SELECT t2.org_id, t4.description
from org_name t2, ref_org_name t3, code_table t4
where t2.att_data = t4.code
and t3.ref_code = t2.att_type
and t2.att_type = 1 and t3.code_type = t4.code_type
and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date) q4
Please help me with extracting each alue from the parm '(25,23,35,1)' for the above purpose. Thank You.chris227 wrote:
I would propose the usage of regexp for readibiliy purposes and only in the case if this doesnt perform well, look at solutions using substr etc.
select
regexp_substr( '(25,23,35,1)', '\d+', 1, 1) s1
,regexp_substr( '(25,23,35,1)', '\d+', 1, 2) s2
,regexp_substr( '(25,23,35,1)', '\d+', 1, 3) s3
,regexp_substr( '(25,23,35,1)', '\d+', 1, 4) s4
from dual
S1 S2 S3 S4
"25" "23" "35" "1"In pl/sql you do something like l_val:= regexp_substr( '(25,23,35,1)', '\d+', 1, 1);
If t2.att_type is type of number you will do:
t2.att_type= to_number(regexp_substr( '(25,23,35,1)', '\d+', 1, 1))Edited by: chris227 on 01.03.2013 08:00Sir,
I am using oracle 10g.
In the process of getting each number from the parm '(25,23,35,1)' , I also need the position of the number
say 25 is at 1 position.
23 is at 2
35 is at 3
1 is at 4.
the reason I need that is when I build seperate select for each value, I need to add the query number at the end of the select query.
Please see the code I wrote for it, But the select query is having error:-
BEGIN
IF(pi_flag_codes IS NOT NULL) THEN
SELECT length(V_CNT) - length(replace(V_CNT,',','')) FROM+ ----> the compiler gives an error for this select query : PLS-00428:
*(SELECT '(25,23,35,1)' V_CNT FROM dual);*
DBMS_OUTPUT.PUT_LINE(V_CNT);
-- V_CNT := 3;
FOR L_CNT IN 0..V_CNT LOOP
if L_CNT=0 then
V_S_POS:=1;
V_E_POS:=instr(pi_flag_codes, ',', 1, 1)-1;
else
V_S_POS:=instr(pi_flag_codes,',',1,L_CNT)+1;
V_E_POS:=instr(pi_flag_codes, ',', 1, L_CNT+1)-V_S_POS;
end if;
if L_CNT=V_CNT then
V_ID:=TO_NUMBER(substr(pi_flag_codes,V_S_POS));
else
V_ID:=TO_NUMBER(substr(pi_flag_codes,V_S_POS,V_E_POS));
end if;
VN_ATYPE := ' t2.att_type = ' || V_ID;
rec_count := rec_count +1;
query_no := 'Q' || rec_count;
Pls help me with fetching each value to build the where cond of the select query along with the query number.
Thank You. -
How to get all the values from the dropdown menu
How to get all the values from the dropdown menu
I need to be able to extract all values from the dropdown menu; I know how to get all those values as a string, but I need to be able to access each item; (the value in a dropdown menu will change dynamically)
How do I get number of item is selection dropdown?
How do I extract a ?name? for each value, one by one?
How do I change a selection by referring to particular index of the item in a dropdown menu?
Here is the Path to dropdown menu that I'm trying to access (form contains number of similar dropdowns)
RSWApp.om.GetElementByPath "window(index=0).form(id=""aspnetForm"" | action=""advancedsearch.aspx"" | index=0).formelement[SELECT](name=""ctl00$MainContent$hardwareBrand"" | id=""ctl00_MainContent_hardwareBrand"" | index=16)", element
Message was edited by: testtestThe findElement method allows various attributes to be used to search. Take the following two examples for the element below:
<Select Name=ProdType ID=testProd>
</Select>
I can find the element based on its name or any other attribute, I just need to specify what I am looking for. To find it by name I would do the following:
Set x = RSWApp.om.FindElement("ProdType","SELECT","Name")
If I want to search by id I could do the following:
Set x = RSWApp.om.FindElement("testProd","SELECT","ID")
Usually you will use whatever is available. Since the select element has no name or ID on the Empirix home page, I used the onChange attribute. You can use any attribute as long as you specify which one you are using (last argument in these examples)
You can use the FindElement to grab links, text boxes, etc.
The next example grabs from a link on a page
Home
Set x = RSWApp.om.FindElement("Home","A","innerText")
I hope this helps clear it up. -
How to get the values from the resultset???
I have a problem with this code given below,
i am executing an sql query which return a union of values from two tables.
the problem here is how do i read the values from the resultset.
here is the code....
package com.webserver;
import java.sql.*;
public class UnionDemo{
public static void main(String args[]){
Connection connection =null;
Statement statement =null;
ResultSet rs =null;
try{
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
connection = DriverManager.getConnection("jdbc:oracle:thin:@:1521:ORCL","scott","tiger");
statement = con.createStatement();
rs = statement.executeQuery("(select tablename from node where appid=432) union (select tablename from uomnode where appid=432)");
ResultSetMetaData rsmd = rs.getMetaData();
int numberOfColumns = rsmd.getColumnCount();
while (rs.next()){
System.out.println(rs.getString(1));
// instead of rs.getString(1) I also used rs.getString("tablename") but of no success....
}//end of while
}catch(Exception exp){
exp.printStackTrace();
finally{
try{
if (rs!=null) rs.close();
if (statement!=null) statement.close();
if (con!=null) con.close();
}catch(Exception exp1){
exp1.printStackTrace();
}//end of finally
}//end of main
}//end of class
when i execute this program i get an oracle error ORA-01009
which says (java.sql.SQLException: ORA-01009: missing mandatory parameter)
can anyone help to retrieve the values from this resultset...
thanx[cut]
i am executing an sql query which return a union of
values from two tables.
the problem here is how do i read the values from the
resultset.[cut]
When the error occours?
1) Executing query ?
2) Retrieving the field from the resultSet ?
3) ecc. ?
BTW, first of all, try to execute the query removing the parenthesis
of the two select statement. I know that there are some problem
with the oracle jdbc driver about them.
Hope it helps. -
How to select multiple values from the parameters in BI Publisher report
How to select multiple values from the parameter drop down in BI Publisher, and how to handle this mulitple values from the report sql...
Hi kishore,
I have used all the steps as you mentioned in your previous reply....including checking Mulitple Selection Check Box..
Iam able to get the results when I am selecting one value..
and also I am able to handle multiple values the in the query by using IN :Parameter, but seems when we select more than one value from the parameter drop down i think the Bi Publisher is sending the values in concatenated form something ilke
ex: "'ACCOUNT','HR','SALES'" ,and when trying to display the parameters values in the output, its throwing the error as 'missing right paranthesis' ....on the whole do you have any solution which would handle
1.Single selection.
2.Multiple selection.
3.'ALL' Values.
4.Separating the concatenated string into individual strings and dispaly them on the output of the report..etc..in case of Mulitple selection.
Ex:
Concatenated String from BI Publisher:"'ACCOUNT','HR','SALES'"
Expected Output on the report:ACCOUNT,HR,SALES
reply to this would be much appreciated....
thanks,
manoj -
Unable to get the value from the textfield in valueChangeEvent
Hi,
I have created one custom textField by extending the CoreInputText. Now i have attched default ValueChangeListener to it. I am using this textField in my application.
Now i type some thing and do a focus lost, the value change listener get called. i want to validate the value entered. In that listener method if i take the getSource() from ValueChnageEvent object and do a getValue() I am getting the entered value.
My problem is that if i do a getValue() of the textField i am not gettting the value entered.
How can i get the entered value from the textfield.? Is there any method to notify to do this?
Thanks in advance.Hi,
I tried to the value from coreInputText also. If i check the getValue method of the component, i am getting the last updated value. I have debug the FlowPhaseListsner also. And i found that this listener is calling before the updateModel phase. Due to that i am not getting the value from the Field. -
When i am retreiving the values from the access table i am getting null val
hi all,
I comeacross the following problem,I connected my applet to the Access database with jdbc:odbc driver.
I am trying to retreive the values from the table.I am getting the result correctly when the same code with using applet it was giving the correct result.
when I am using an applet program it was giving the null value istead of the actual records.
can anybody tell me the reason why
thanks in advance
and also how to connect the databse in the webserver when i installed my applet in the client side
please give me some suggestions to do that
thankyou
lakshmanHi Krishna,
Can you please copy the code generated by ODI for creating your C$ table ?
i mean :- create table C$_0Entity ( from the operator log
Regards,
Rathish A M -
How to pass the values from the Wb Dynpro Application to the SAP Backend ?
Hi All,
Good morning..,
I have scenario like:
I want to pass the values from the web dynpro appication to the SAP Back end R/3 Table. IN backend the RFC is writtn to accept the structure input from the Webdynpro.
Upto know I imported the corresponding RFC and maaped to the View.
How to proceed with the coding to save the data...
PLease suggest...
Regards and Thanks in Advance,
CSPHi Pradeep
Steps:
1. First create an instance for bapi and bind the instance to the bapi node.
Z<bapi name> zb=new Z<bapi name>();
wdContext.nodeZ<bapi name>. bind(zb);
2. Then if u have the import parameter u have to set them by using
The instance of the above bapi.
Zb.set<import parameters>;
3. If the bapi has a table parameters then the structure for the table parameters will also be imported
In the model class.
4. Set the table parameters by creating the instance for that structure and using this instance set it.
Z<Struct>itm tab=new Z<Struct>();
Tab.set<table parameters>
5. Then add the structure instance to the bapi instance.
Zb.add(Tab);
6. Then Execute the bapi after setting the import parameters.
7. If there is any export parameters, then get the values after execution.
Look at this thread for codes
Re: RFC call on click of button
Regards,
Arun -
I want to get the values from the second hiphen only
Hey Guys,
I have one column and the data like this
col1 = 'AI463-901-001'
Now,
I want to get the values from the second hiphen only(any no. of values).
Please can any one help me on this .
Thanks in advance!
Regards,
-LKyou have a mistake
you result is -001
this is right
select substr('AI463-901-001',instr('AI463-901-001','-',1,2)+1) from dual;
-- @user11928732 - if you are using Oracle Database 11g, ttry this please
with data as
(select 'AI463-901-001'from dual)
select substr(str,instr(str,'-',1,2)+1) from data;
select substr(<YOUR COLUMN>,instr(<YOUR COLUMN>,'-',1,2)+1) from <YOUR TABLE>;result is : 001
Edited by: Mahir M. Quluzade on May 3, 2011 5:37 PM
Maybe you are looking for
-
TS1398 I am unable to connect iPhones to our home wifi. Other devices work fine.
Recently, I was having issues with our D-Link Dir-665. I did a factory reset to it on the routers settings (ie. 192.168.0.1). I was able to succsessfully connect my laptop, as well as our Kindle Fire HD. However, when trying to connect our iPhones (4
-
Macbook Pro 2011 won't boot, grey screen, 10.9.4
Hi guy I hope you are all well, I have been running a 1.1 MBP Santa Rosa since 2010 and decided it was time for an update, so in January I got hold of a 2008 Penrhyn model. That was running Mavericks absolutely fine until 2 weeks after 10.9.3 when it
-
Video shot on iPad 3 doesn't sync. Yes, "Include Videos" is checked.
I just shattered my iPad 3 video screen, so I'm backing it up. Unfortunately, iTunes isn't syncing the two videos I've shot with the iPad. I can't email the video because it's "too long". Because Apple has decided to make things "user-friendly" there
-
Feature request: keyword search like Google Toolbar
One of the features (well, the ONLY feature) that keeps me from using Safari as my default browser is a feature I get through Google's Toolbar. After you type in keywords for a search in Google's toolbar. You can click on the word (in the right area)
-
Internet Connect is requiring "natd' "want to connect to 0.0.0.0 on DIVERT
... port 10". If I don't allow "Internet Connect" shows a connection to the internet but mail, browser, etc don't really have a connection; nothing loads. Why is this little request screen coming up upon connecting to internet and should I be concern