How get pervious row value in grid
hi master
sir
I have grid in my form my user design the balance sheet
Then he want add the last row value in next row
Such as
Row2 amount=1000
Row3 row2+2000
Total row3-row2
How I get last row value
Please give me idea
Other solution is to use a collection in a package unit.
Type TYP_COLL is table of Number INDEX BY BINARY_INTEGER ;
my_coll TYP_COLL ;
Then in the Post-Trigger :
my_coll( :system.current_record ) := value ;so you can navigate easily within the collection in both directions Next/Previous.
Easy to get the previous value:
value := my_coll( :system.current_record - 1 ) ;Francois
Similar Messages
-
How to get Current Row values in Af:ForEach
Hi,
We have a requirement to conditionally Display/Hide CommandLink item in af:forEach Loop.
<af:forEach items="#{bindings.RegionalAreaPVO.rangeSet}" var="parent">
<af:spacer height="10" id="s1"/>
<af:commandLink inlineStyle="font-weight:bold;" text="#{parent.ItemName}" partialSubmit="true" actionListener="#{backingBeanScope.RegionalAreaBean.launchTaskflow}" id="cl1" rendered="*#{backingBeanScope.XXWFCRegionalAreaBean.modelEligibleflag eq true}*">
<af:setActionListener from="#{parent.Code}" to="#{parentNode}"/>
</af:commandLink>
</af:forEach>
I have added a Cutom Managed Bean Class and Returning boolean value to Control Render property which is working. But now i want to add business Logic based on 'parent.ItemName' or 'parentNode' Values in the bean method to return proper Boolean value.
But i am unable to get the Current Iteration values in the bean method.
I am using below EL expressions to get the values. But no luck.
String nameel = (String)ADFUtil.evaluateEL("#{bindings.parent.ItemName}");
String codeel = (String)ADFUtil.evaluateEL("#{parent.Code}");
String nodeEl = (String)ADFUtil.evaluateEL("#{parentNode}");
Also, i have tried getting the Row object like below but i am getting the First row details always. My intention is to get Current row values and use them for Business logic.
ViewRowImpl row =
(ViewRowImpl)ADFUtil.evaluateEL("#{bindings." + VoName +
"Iterator.currentRow}");
String code = (String)row.getAttribute("Code");
Any help is highly appreciated.
Thanks
KajaHi Sascha,
I have tried that. But in my case the functional logic behind the Rendering is based on more complex logic. Hence i am trying to add a method to return a boolean in Render property of the Link.
But the real problem for me is, in the Managed bean method i am not finding a way to get the Current Iteration index. If i can get the Current iteration index, i can get the Corresponding Component ID of Command link (In the forEach Loop Component Id's are getting generated Dynamically based on Iteration Index), i can use that and add additional logic and derive true/false to return.
Any inputs?
Thanks
Kaja -
Issue in getting current row value using getCurrent Value
Issue:When I call ththe method executeSearchVO from controller class
with Row row = personalActionSearchVO.first();
I am getting the corresponding value.
but my requirement is I have multiple record , If i press action on any of the record, I need to read SITName value for the particular record and need to pass it as parameter to other pager(i mean If i select any record, I need to get corresponding value in the attribute for the record.)
if i comment personalActionSearchVO.first(); i am getting null pointer exception.
Pl. helpme how to get current row instead of first row always.
AMIMPL Clause
public void executeSearchVO(String loginPersonId)
XXHRPersonalActionSearchVOImpl personalActionSearchVO =getXXHRPersonalActionSearchVO1();
personalActionSearchVO.initQuery(loginPersonId);
// Row row = personalActionSearchVO.first();
row = personalActionSearchVO.getFirstFilteredRow("action","1");
Row masterRow = row;
personalActionSearchVO.setCurrentRow(masterRow);
OARow Row1 = (OARow)personalActionSearchVO.getCurrentRow();
System.out.println("Org "+Row1.getAttribute("Organization"));
calling this method from controller clause
if("action".equals(pageContext.getParameter(EVENT_PARAM)) )
System.out.println("Person Id "+ pageContext.getParameter("XXHRPersonId"));
Serializable methodParams[] = {pageContext.getEmployeeId()+""};
applicationModule.invokeMethod("executeSearchVO",methodParams);
need it urgently. pl. help
thanks
sivaTimo,
I am new to Jdevloper. I will explain the issue in detail.
Version: Oracle 9i Jdeveloper
I have a query page with multiple records. when I perform action , I need to pass 2 parameters from query screen to my actual page.
1 parameter is Login person Id,. Now the issue is with getting current value for 2nd paramenter. 2nd Parameter will be changed depends upon record i am choosing in my query page: column is : Information Name.
when I use getcurrentrow , I am getting null pointer exception.
My controller class when I click action button :
if("action".equals(pageContext.getParameter(EVENT_PARAM)) )
Serializable methodParams[] = {pageContext.getEmployeeId()+""};
applicationModule.invokeMethod("executeSearchVO1",methodParams);
{color:#993300}
// Here I need to get InformationName value based on the record I am choosing{color}
HashMap hashMap = new HashMap(2);
hashMap.put("XXHRPersonId", pageContext.getParameter("XXHRPersonId"));
// hashMap.put("InformationName", methodParams);
pageContext.forwardImmediately(
"OA.jsp?page=/xxhr/oracle/apps/xxhr/selfservice/personalaction/webui/XXHRPersonalActionPG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
hashMap,
true, // Retain AM
OAWebBeanConstants.ADD_BREAD_CRUMB_NO
my AMIMPL Clause :
I am just pasting whatever I have tried. Pl. suggest me If my code is wrong.
*{color:#993300}I need to get current row information value from the below method*
*{color}*
public void executeSearchVO1(String loginPersonId)
XXHRPersonalActionSearchVOImpl personalActionSearchVO =getXXHRPersonalActionSearchVO1();
personalActionSearchVO.initQuery(loginPersonId);
System.out.println("Row count "+personalActionSearchVO.getRowCount());
// Row row = personalActionSearchVO.first();
Row row = personalActionSearchVO.getCurrentRow();
System.out.println("Informaton Name "+row.getAttribute("InformationName");
In this , If i initialzie with Row row = personalActionSearchVO.first();I am able to get value for my column Information Name.
whereas, if I use directly Row row = personalActionSearchVO.getCurrentRow();, i am getting null pointer exception.
Pl. let me know how to get current row value for Information Name.
Looking for the reply at the earliest.
Thanks
siva -
How to get current row value from table when press the submit button
Hi,
I want to get the current row value of SuccessionPlanId which is one of the column in a advanced table.
I created one button (created using personalization, action fired thru CO)in the table as column, so each row having one button, if i press the first row's button means then i want to fetch the first row's SuccessionPlanId and if it is 3rd means then i want to get the value of third row's value.
How to do it in controller extension?
Please reply soon, its urgent.
Thanks in advance,
SANPratap,
Yes, I tried with 'delete' button which is seeded one.
For this, our code using row reference is working too fine. it throws exact SuccessionPlanId value of corresponding row.
I created MessageStyledText, but here i need to give text value right, then only it 'll appear in the page.
Instead i created one image and fired explicitly from the controller processRequest method.
But the same problem remains..
here my code:
public void processRequest(OAPageContext pageContext, OAWebBean webBean){
super.processRequest(pageContext, webBean);
OAButtonBean oabb = (OAButtonBean)webBean.findChildRecursive("XXSubmit");
FireAction action = new FireAction("XXSubmit");
oabb.setAttributeValue(UIConstants.PRIMARY_CLIENT_ACTION_ATTR, action);
OAImageBean oaib=(OAImageBean)webBean.findChildRecursive("XXSubmitImage");
oaib.setFireActionForSubmit("XXSubmitImage", null, null, true);
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean){
if("XXSubmitImage".equals(pageContext.getParameter("event"))){
String succIdI="";
String rowRefI = pageContext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);
if(rowRefI != null && !("".equalsIgnoreCase(rowRefI ))){
PerSuccPlanSearchVORowImpl rowI = (PerSuccPlanSearchVORowImpl)oaam.findRowByRef(rowRefI);
if(rowI != null)
succIdI=rowI.getAttribute("SuccessionPlanId").toString();
}else{
throw new OAException("Row is null");
throw new OAException(succIdI, OAException.INFORMATION);
}else{
super.processFormRequest(pageContext, webBean);
If i run the page using this controller, it throws exception without any value, because for 'succIdI' i initialized without any string.
Can you please suggest me how to solve? -
How to get edited row values from ADF table?
JDev 11.
I have a table which is populated with data from Bean.
I need to save changes after user make changes in any table cell. InputText is defined for table column component.
I have defined ValueChangeListener for inputText field and AutoSubmit=true. So when user change value in inputText field, method is called:
public void SaveMaterial(ValueChangeEvent valueChangeEvent) {
getSelectedRow();
SaveMaterial(material);
This method should call getSelectedRow which take values from selected table row and save them into object:
private Row getSelectedRow(){
RichTable table = this.getMaterialTable();
Iterator selection = table.getSelectedRowKeys().iterator();
while (selection.hasNext())
Object key = selection.next();
table.setRowKey(key);
Object o = table.getRowData();
material = (MATERIAL) o;
System.out.println("Selected Material Desc = "+material.getEnumb());
return null;
Problem is that getSelectedRow method doesnt get new (edited) values, old values are still used.
I have tried to use ActiveButton with same method and it works fine in that case. New values are selected from active row and inserted into object.
JSF:
<af:table var="row" rowSelection="single" columnSelection="single"
value="#{ManageWO.material}" binding="#{ManageWO.materialTable}">
<af:column sortable="false" headerText="E-number">
<af:inputText value="#{row.enumb}" valueChangeListener="#{ManageWO.SaveMaterial}" autoSubmit="true"/>
</af:column>
<af:column sortable="false" headerText="Description">
<af:inputText value="#{row.desc}" valueChangeListener="#{ManageWO.SaveMaterial}" autoSubmit="true"/>
</af:column>
</af:table>
<af:activeCommandToolbarButton text="Save" action="#{ManageWO.EditData}"/>
What is a correct place from where save method should be called to get new (edited) values from ADF table?
Thanks.Did you look into the valueChangeEvent?
It has oldValue and newValue attributes.
public void SaveMaterial(ValueChangeEvent valueChangeEvent) {
Object oldVal = valueChangeEvent.getOldValue();
Object newVal = valueChangeEvent.getNewValue();
// check if you see what you are looking for.....
getSelectedRow();
SaveMaterial(material);
}Timo -
Get selected row values from Table view control
Hi ,
I am using transaction ME23N, would like to access row values from item table for selected row. I have written a script as in screen shot and its giving me error at java script step two. I want to get the PR number from item table for selected row.
With Regards
Vishal LokapurH Vishal,
Can you please share how you were able to resolve the issue regarding the selected row
in case of a table control .
Regards -
How to use row values in Presentation or Administration for calculation
Hi All,
I am working on OBIEE, I want to calculate / or % on two rows.
e.g. In my report row 3 is value 20 and row 5 is value 200.
In same column row 6 I want to display *(row 5 / row 3 )* 200/ 20 i.e. output should be 10.
Else can I use variable to and assign value to variable.
I tried but giving error :
CASE
WHEN "Report Structure".Seq = 101 and Currency.Code = 'SAR' THEN
"Fact Report"."Actual PTD" ,
VALUEOF("col10") = "Fact Report"."Actual PTD"
ELSE "Fact Report"."Actual PTD"
END
I am trying to store row value to repository variable to solve above problem.
My question is how to assign value to variable.
Please guide me to solve this problem.
Thanks In advance
Regards
DixitWhen you want to compare two row values, you can use the lag and lead analytical function of oracle.
lag and lead are analytical functions that can be used to get the value of a column in a previous/next row.
I have made just an example on my blog for a period to period comparison on OBIEE
http://gerardnico.com/weblog/2009/04/17/obiee-period-to-period-comparison-with-the-analytical-function-laglead/
And if you want an example on Oracle :
http://gerardnico.com/wiki/dw/analytic_function/analytic_function_lag
But I don't understand completely your problem. What about the row 1, 2, 4 ? I don't really see you report.
What I see, is that you have a problem with the currency.
You say :
I am trying to store row value to repository variable to solve above problem.For me, it's not possible...
Success
Nico -
Getting multiple row value on valuechange of selectBooleanCheckbox in table
Hello All,
I am using jDeveloper 11.1.1.5. I have a java class which is returning me a list. I have created a data control of my class and I am using it on my page as a table.
On my page I have inserted a text box selectedamount. In my table there are 4 columns Type, Qty, Amount and one boolean value select. I have changed column select to selectBooleanCheckbox. and I have specified its value as true(when selected) and false(when deselected). Which is getting reflected in my pagedef file.
There are 4 rows coming in table and displaying properly.
Now my requirement is on value change of selectBooleanCheckbox if user selects the rows I want to add the Amount for the selected row and I have to set it to the text box selectedamount.
On value change of selectBooleanCheckbox I have written a method. Code snippet is like this:
+public void valueChanged(ValueChangeEvent valuechangeevent) {+
+if (valuechangeevent.getNewValue() == valuechangeevent.getOldValue()) {+
System.out.println("new value is same as old value");
+} else {+
System.out.println("************************new value is other than old value**********************************");
DCBindingContainer bindings =(DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
DCIteratorBinding iter = bindings.findIteratorBinding("NAME OF MY ITERATOR");
float temp2 = 0;
Row currentRow ;
int count = (int)iter.getViewObject().getEstimatedRowCount();
for (int i=1; i<=count;i++) {
currentRow = iter.getRowAtRangeIndex(i);
+if(currentRow != null) {+
if(true == currentRow.getAttribute("select"))
+{+
temp2= temp2 + Float.parseFloat(currentRow.getAttribute("totAmount").toString());
System.out.println("value of total amount after adding is :: "+ temp2);
+}+
+}+
+}+
After this I am setting temp2 to selectedamount textbox.
But I am not getting the desired value in the textbox.
Is there any other method I can achieve this.
Thanks
Navin KInside f(currentRow != null) When I added
System.out.println(currentRow.getAttribute("select"));
It is showing as null.
So select attribute is not getting assigned as true or false while checking and unchecking selectboolean checkbox.
Am I missing something ? -
Psd file format specification how get the pixel values
Hello
I'm trying to convert psd to xml and get all information from layers
I already got all necessary info but for example the radius in rounded rectangle is in math double format but I need to have it in pixels.
I'm using Adope photoshop file format specification but there is no information how to convert double values to pixels,
The same is with colors that also given in double.
I need to know how to convert these values to actual values
ThanksHi,
You can't do that. You have to format the numbers before you print them. Take a look at the decimal format class:
http://java.sun.com/j2se/1.5.0/docs/api/java/text/DecimalFormat.html
/Kaj -
Hi,
In a Table 50 Columns are there and 10 Records are there. In those 10 records are not inserted all columns (Some are null values). How to find The Count of Record (Row) Values .
For Example
Table
p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 .........
10 20 30 40 50
20 30
60 80
In the Above table, how to find
the count of values in 1st record is 5
the count of values in 2nd record is 2
the count of values in 3rd record is 2
Thanks & Regards,
HariHi ,
CREATE TABLE Sample
Col1 NUMBER(2),
Col2 NUMBER(2),
Col3 NUMBER(2),
Col4 NUMBER(2),
Col5 NUMBER(2),
Col6 NUMBER(2),
Col7 NUMBER(2),
Col8 NUMBER(2),
Col9 NUMBER(2),
Col10 NUMBER(2)
Table Created.
I inserted Data like below
Col1 Col2 Col3 Col4 Col5 Col6 Col7 Col8 Col9 Col10
10 20 30 40 50 70 60
10 30 40 50 60 20
10 20 30
10 20 30 40
10 20 30 40 50
10 20 30 40 50 60 70 80 90 100
10 20
10 20 30 40
10 20 30 40 50 60 70
10 20 30 40
In the above data, How To find out
1st row has 7 Values (Which Columns are not null)
2nd Row has 6 Values
3rd Row has 3 Values
4th Row has 4 Values
5th Row has 5 Values
6th Row has 10 Values
7th Row has 2 Values
8th Row has 4 Values
9th Row has 7 Values
10th Row has 4 Values -
How to get multiple row values in one text box while clicking one row from grid?
hi friends,
i am working on flex4 web application i am using one datagrid ,it have two records(bills),one button and one text box.
ex:
customername salesrepname receipt no amount
venkat raj 1102 10000
ramu ramesh 1102 20000
here both receipt no is same.now i want to select one of this receipt and click pay button which is place in outside the grid.
now my need is after click the pay button in text box i need 10000+20000=30000,after click that button i want both receipts should be invisible...'
how i will do this,
any suggession,
Thanks
B.venkatesanOne way with 10g:
select mgr,
rtrim(xmlagg(xmlelement(empno,empno||',').extract('//text()')),',') emps
from emp
where mgr is not null
group by mgr;10g:
-- define this function:
create or replace
function concatenate(c Sys_refcursor, sep varchar2 default null) return varchar2
as
val varchar2(100);
return_value varchar2(4000);
begin
-- open c;
loop
fetch c into val;
exit when c%notfound;
if return_value is null then
return_value:=val;
else
return_value:=return_value||sep||val;
end if;
end loop;
return return_value;
end;
select mgr,
concatenate(cursor(select empno from emp e where e.mgr=emp.mgr order by empno),',')
from emp
where mgr is not null
group by mgr;With 11g:
select mgr,
listagg(empno,',') within group (order by empno) emps
from emp
where mgr is not null
group by mgr; -
hi Friends,
I am Using ME_PROCESS_PO_CUST badi for validation in Purchase oreder (ME21N),
For that I implementaed PROCESS_ITEM method which fires during each row now i want to add another validation in same implimentation for that i need privious row's value so how to get that value ?
following is my current validation code.
method IF_EX_ME_PROCESS_PO_CUST~PROCESS_ITEM.
DATA:ls_poitem TYPE mepoitem.
DATA:ls_poheader TYPE MEPOHEADER.
DATA:lm_poheader TYPE ref to IF_PURCHASE_ORDER_MM.
DATA:w_mara TYPE mara.
DATA:IT_ZMMTBL039 TYPE STANDARD TABLE OF ZMMTBL039 ,
WA_ZMMTBL039 TYPE ZMMTBL039 .
DATA:ls_poitem1 TYPE mepoitem.
DATA:V_KUNNR1 TYPE KNA1-KUNNR.
DATA:V_KUNNR2 TYPE KNA1-KUNNR.
ls_poitem = im_item->get_data( ).
lm_poheader = im_item->GET_HEADER( ).
ls_poheader = lm_poheader->GET_DATA( ).
CLEAR: WA_ZMMTBL039,w_mara.
REFRESH:IT_ZMMTBL039[] .
SELECT *
INTO TABLE IT_ZMMTBL039
FROM ZMMTBL039
WHERE bsart EQ ls_poheader-bsart.
IF sy-subrc EQ 0.
CLEAR: WA_ZMMTBL039,w_mara.
SELECT SINGLE *
INTO w_mara
FROM mara
WHERE matnr EQ ls_poitem-MATNR.
IF SY-SUBRC EQ 0.
READ TABLE IT_ZMMTBL039 INTO WA_ZMMTBL039 WITH KEY bsart = ls_poheader-bsart
mtart = w_mara-mtart
spart = w_mara-spart.Hello
If you had searched the SDN forums you would have found plenty of answers to your question.
Following is some sample coding:
method IF_EX_ME_PROCESS_PO_CUST~POST.
DATA:
ls_header TYPE mepoheader,
lt_items TYPE purchase_order_items,
ls_item TYPE purchase_order_item,
ls_item TYPE mepoitem.
ls_header = im_header->get_data( ).
lt_items = im_header->get_items( ).
LOOP AT items INTO ls_item.
ls_item = line_item-item->getdata( ).
" process item data...
ENDLOOP.
ENDMETHOD.
Regards,
Uwe
PS: Do not use such kind of pseudonyms instead of your real name. Because my impression is that a nobody (in term of ABAP development competence) tries to claim to be a somebody who fills his knowledge gaps via SDN. Using pseudonyms significantly decreases your changes to get any answers at the SDN forums. -
How to get selected row values in a table using check box
Hi ADF Experts,
JDEV Version 11.1.1.7.0
My requirement is getting the selected row valuesof a af:table using a checkbox(multi select).
Thanks,
AnimeshHi,
add a transient attribute to the POJO entity and update this through a check box. The ensure you have autosubmit=true set on the check box. In a value change listener set or remove the row's checbox attribute value
Frank -
Getting selected row values of a classic report
Hi Guys,
i'm using Apex 4.1,
I have a classic report on my apex page. First column of this report is check box for row selection. and its binded to primary key of a table. i know that i can get the selected row's primary key (Check box value) using APPLICATION_ITEM.G_FO1() function. What i need is how can i get the other cell values of the selected row ?
Appreciate if someone can help on this,
Thanks.Apex-Ape wrote:
i'm using Apex 4.1,
I have a classic report on my apex page. First column of this report is check box for row selection. and its binded to primary key of a table. i know that i can get the selected row's primary key (Check box value) using APPLICATION_ITEM.G_FO1() function. What i need is how can i get the other cell values of the selected row ?If you really have a report with just one checkbox column and the rest of the data standard read-only report columns then it's not clear exactly what the requirement is. What do you want to do with them when you get them?
I can think of 2 possible approaches:
<li>Stick with the current report. On page submit you get an array of zero or more PKs. Create a collection with a row containing each PK. Whatever it is that you want to do next can then use a query that is a clone of the original report query plus a join to the PK values in the collection.
<li>Recreate the report with shadow <tt>apex_item.hidden</tt> columns in the query for each value. In the report column attributes, do not display the <tt>apex_item.hidden</tt> columns, but include them with each displayed column (or stuff them all into one column for convenience) using HTML Expressions. The values will then be available in <tt>apex_application.g_fxx</tt> arrays like the row selector checkbox.
I prefer the first one, but really it depends on what the next step is...
(If it's actually a tabular form then the values will be in other <tt>apex_application.g_fxx</tt> arrays.) -
How get table column value in textfield on mouse click in table column
hi master
sir i have one table that have three field
sno
name
fname
and three textfield in my page
how i get sno,name,fname in textfield form table when i click any reow or any record
when i cliek any record that record value sno,name and fname transfer to textfiled1,textfield2 and textfield3
please give me idea and code
thank's
aamirHi Gorge,
Are you sure the column you are accessing is of type EditText ?
Please step through your code and do check the type of the column first.
While Rows <= index
Dim o = omatrix.Columns.Item("2000002049").Type 'Check the type here first.
edit1 = oMatrix.Columns.Item("2000002049").Cells.Item(index).Specific
index = index + 1
Regards
Edy
Maybe you are looking for
-
How to merge libraries from one external drive to another?
I have 2 iTunes libraries, one at home and one at work. Both are stored on external LaCie d2 drives. Is it possible to bring my work d2 home, mount it to my home d2, and copy the contents of my work library to my home library? Both computers are flat
-
Trouble with Round trip between Soundtrack Pro 2 and Final Cut Pro 6
I have edited a home movie together. I then have sent the sequence to Color for grading and then after completing the Color changes and Rendering. I sent it back to Final Cut Pro. It starts out working fine but during the transfer process it stops at
-
Java.lang.NullPointerException on connection
it always prompt me this error. pls help. if need more detial info pls let me know. java.lang.NullPointerException at com.maint.support.model.Model.connect(Model.java:34) at com.maint.support.model.WebModel.init(WebModel.java:32) at or
-
Hi , My requirement is to pick a file from a location which can be either be a pdf or jpeg file and then transfer it to a different location. Is this possible using BPEL or ESB?
-
Is there any way in Solaris 10 to create a bootable backup tape like "mksysb" in AIX or "make_recovery" in HP-UX. I looked through the commmands and didn't see anything at first glance.