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 Utomo
use 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
Similar Messages
-
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 eliminate null values from the data?
This query displays data for a project with approval & submission dates...I'm trying to eliminate records that have null values in Approval & submission date columns at the same time. But rather keep the records that have atleast one submission date or approval date?
SELECT distinct QP.QIP_id,
Max(decode( Upper(QP.Status_CD), Upper('Approved') , Effective_date, null )) as Approved_date,
Max( decode( Upper(QP.Status_CD), Upper('Submitted') , Effective_date, null ) ) as Submitted_date
FROM Llp_Sys.Project_Status QP
WHERE SYSDATE >= qp.effective_date
AND (qp.terminated_date IS NULL OR SYSDATE < qp.terminated_date)
GROUP by QP.QIP_ID,Qp.Status_CD
order by QP.QIP_IDfrancislazaro wrote:
This query displays data for a project with approval & submission dates...I'm trying to eliminate records that have null values in Approval & submission date columns at the same time. But rather keep the records that have atleast one submission date or approval date?
SELECT distinct QP.QIP_id,
Max(decode( Upper(QP.Status_CD), Upper('Approved') , Effective_date, null )) as Approved_date,
Max( decode( Upper(QP.Status_CD), Upper('Submitted') , Effective_date, null ) ) as Submitted_date
FROM Llp_Sys.Project_Status QP
WHERE SYSDATE >= qp.effective_date
AND (qp.terminated_date IS NULL OR SYSDATE < qp.terminated_date)
GROUP by QP.QIP_ID,Qp.Status_CD
order by QP.QIP_ID
based on my assumption, will the following not work ? if so then post some sample data and expected output (simplify as much as possible)
SELECT *
FROM (SELECT DISTINCT qp.qip_id,
MAX(DECODE(UPPER(qp.status_cd),
UPPER('Approved'), effective_date,
NULL
)) AS approved_date,
MAX(DECODE(UPPER(qp.status_cd),
UPPER('Submitted'), effective_date,
NULL
)) AS submitted_date
FROM llp_sys.project_status qp
WHERE SYSDATE >= qp.effective_date
AND ( qp.terminated_date IS NULL
OR SYSDATE < qp.terminated_date
GROUP BY qp.qip_id, qp.status_cd
ORDER BY qp.qip_id)
WHERE approved_date IS NOT NULL OR submitted_date IS NOT NULL;Edited by: Clearance 6`- 8`` on Jul 9, 2010 12:46 PM -
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 Distinct Values from Answers
Hi,
How to get Distinct values from answers, i've tried to put some functions on it.
Thanks,
MalliMalli,
Are you trying to fetch data from Dimension Attr OR Fact Measures? Did you try the advance tab - > Advanced SQL Clauses - > Check this box to issue an explicit Select Distinct. -
How to get selected value from selectOneRadio ???
Hi...i want to how to get selected value from selectOneRadio and use it in another page and in backing bean.
Note i have about 10 selectOneRadio group in one page i want to know value of each one of them.
Plzzzzzzzz i need helpYou have a datatable in which each row is a question, correct?
Also in each row you have 5 possible answers that are in a radio, correct?
So,
You need to put in your datatable model, a question, and a list of answers (5 in yor case) and the selected one.
So you will have a get to the question, an SelectItem[] list to populate the radios and another get/set to the selected question.
ex:
<h:selectOneRadio value="#{notas.selectedString}" id="rb">
<f:selectItem itemValue="#{notas.valuesList}"/>
</h:selectOneRadio>
Search the web for examples like yours. -
How to get column value from DB grid
Hi!
I wander how to get col value from GridControl?
My app consists of one rowsetinfo with two
columns CODE and DESCRIPTION and a jbutton
titled SELECT. When user clicks SELECT button
the app should show the value of the CODE col
of the selected row in GridControl.
I wander how to make this action ?
XxpsTransTimesMasterIter.setAttributeInfo( new AttributeInfo[] {
CODEXxpsTransTimesMasterIter,
DESCRIPTIONXxpsTransTimesMasterIter} );
XxpsTransTimesMasterIter.setName("XxpsTransTimes");
XxpsTransTimesMasterIter.setQueryInfo(new QueryInfo(
"XxpsTransTimesMasterIterViewUsage",
"lov.XxpsTransTimes",
"CODE, DESCRIPTION",
"XXPS_TRANS_TIMES",
null,
null
));Hi,
You could attach an ActionListener on the JButton, and try the following code :
NavigationManager fm = NavigationManager.getNavigationManager();
DataItem dataItem = fm.getFocusedControl().getDataItem();
ImmediateAccess col_code = null;
String code = null;
if (dataItem != null && dataItem instanceof RowsetAccess) {
RowsetAccess rowset = (RowsetAccess)dataItem;
try {
col_code = (ImmediateAccess) rowset.getColumnItem("CODE");
code = col_code.getValueAsString();
} catch (DuplicateColumnException de) {
return;
} catch (ColumnNotFoundException ce) {
return;
} catch (SQLException se) {
return;
JTextField tf = new JtextField();
tf.setText(code);
I haven't tested this code.
I am curious to know, the Object type of the dataItem.If it doesnot happen to be RowsetAccess ..try.. ScrollableRowsetAccess OR ImmediateAccess.
Your code would change accordingly, depending on the instance.Refer to the product documentation for this.
Do let me know, if this works.
TIA
Sandeep -
How to get string value from xml in JSF??
In JSF How to get string value from xml, .ini and properties file. I want to get string value from xml or text to JSF
Just use the appropriate API's for that. There are enough API's out which can read/parse/write XML, ini and properties files. E.g. JAXP or DOM4J for xml files, INI4J for ini files and Sun's own java.util.Properties for propertiesfiles.
JSF supports properties files as message bundle and resource bundle so that you can use them for error messages and/or localization. -
How to get selected value from OADefaultListBean.
Hi All,
How to get selected value from OADefaultListBean ?
Thanks,Hi,
To identify the user's selection(s) when the page is submitted, you would add the following logic to your processFormRequest() method:
OADefaultListBean list =
(OADefaultListBean)webBean.findChildRecursive("positionsList");
String name = list.getName();
String[] selectedValues = pageContext.getParameterValues(name);
To retrieve all the values in the list box, call list.getOptionsData().
--Prasanna -
How to get attribute value from standard page ?
Hi,
How to get attribute value from standard page ?
String str = (String)vo.getCurrentRow().getAttrbute("RunId");
But this value is returning a null value ....
Can anyone help me to get this attribute value which is actually having a actual value .getCurrentRow() would always return null if no setCurrentRow() is used.
Please check the page design and understand how many rows of VO are there. You can also use the following to get the row:
vo.reset();
vo.next();
Regards
Sumit -
How to get real value from selectOneChoice with javascript?
Hi,
How to get real value from selectOneChoice with javascript? The event.getNewValue() only gets me the index of the selected item, not the value/title.
JSF page:
<af:resource type="javascript">
function parseAddress(event)
alert("new value: " + event.getNewValue());
</af:resource>
<af:selectOneChoice label="Location:" value="" id="soc4">
<af:clientListener type="valueChange" method="parseAddress" />
<f:selectItems value="#{Person.locations}" id="si7"/>
</af:selectOneChoice>
HTML :
<option title="225 Broadway, New York, NY-10007" selected="" value="0">225 Broadway (Central Office)</option>
<option title="90 Mark St., New York, NY-10007" value="1">90 Mark St. (Central Office)</option>
Thanks a lot.Something I was missing ,
You need to add valuePassThru="true" in your <af:selectOneChoice component. I have personally tested it and got the actual value in alert box. I hope this time you got the real solution. You can also test the following code by your end.
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<jsp:directive.page contentType="text/html;charset=UTF-8"/>
<f:view>
<af:document id="d1">
<af:form id="f1">
<af:panelBox text="PanelBox1" id="pb1">
<af:selectOneChoice label="Set Log Level" id="soc1"
value="#{SelectManagedBean.loggerDefault}"
valuePassThru="true">
<af:selectItem label="select one" value="First" id="s6"/>
<af:selectItem label="select two" value="Second" id="s56"/>
<af:clientListener method="setLogLevel" type="valueChange"/>
</af:selectOneChoice>
<af:resource type="javascript">
function setLogLevel(evt) {
var selectOneChoice = evt.getSource();
var logLevel = selectOneChoice.getSubmittedValue();
// var logLevelObject = AdfLogger.NONE;
alert("new value is : " + logLevel);
//alert(evt.getSelection);
//alert(logLevelObject);
evt.cancel();
</af:resource>
</af:panelBox>
</af:form>
</af:document>
</f:view>
</jsp:root>
Maybe you are looking for
-
Hyper-V Host (Win 8) to XP Virtual Machine File Transfer
Hello guys, first post here, and I've got a question about transferring files from the host computer to an xp hyper v virtual machine. I've researched and tried many methods but some are too complicated or in the case of the floppy it doesn't have en
-
Error: Sender agreement not found, lookup of binding via CPA-CACHE failed.
Hi, I am doing an RFC to File Scenario in which RFC has to be triggered from CRM system. The TCP/IP connection and communication Channel are working fine. But when i trigger my RFC using the RFC destination following errors occur: 1. The SYSTEM_FALIU
-
ICR Process 003 - Should postings be stopped during activation of database
In our first go-live of ICR we only use process 003 and have no additional special ledger in scope for this phase. We have seen a recommendation that all postings should be stopped during activation of database. Is that really also valid if we only c
-
Hyperion Business Rules cannot connect to Hyperion Planning
I've deployed these applications into one machine server: - Hyperion Essbase 7.1.3 - Hyperion Planning 4.0.1 (including Hyperion Business Rules) - Essbase Administration Services 7.1.3 Everything runs well except that Hyperion Business Rules cannot c
-
printing from photo stream...says i need to pic a theme??? HOW???