How to get ArrayCollection's total data after filter
after i use filterFunction to filter data of some
ArrayCollection. so how to get the total original data of this
ArrayCollection?
NOT use filterFunction = null, because i use the filter data
to show at the same time!
thank you!
You can get the underlying array by accessing the
ArrayCollection's "source".
Similar Messages
-
How-To "Refresh a table of data after inserting or deleting"
I'd like to say a word on the how-to article "How to refresh a table of data after inserting or deleting a row using ADF".
(http://www.oracle.com/technology/products/jdev/howtos/1013/updtable/index.html?_template=/ocom/technology/content/print)
I spent a lot of time on it because I needed help in implementing simple CRUD functionality on a table, using JSF-ADF-TopLink technologies.
While the the article does provide correct steps, it is in one important place not specific enough, so the reader may easily get stuck. In section "Refresh the data table", point 1: when you double click on the removeEntity() button, in Structure window, then you do not get the required dialog. You get CommandButton Properties dialog.
You must click on the removeEntity() button in Editor's Design view. But even there you may get the CommandButton Properties dialog, not managed beans dialog.
You may resolve that by going to JSF configuration file, faces-config.xml, and switch to Overview view. This will show you the managed beans that you have.
Then, you may already have a backing bean for the page. You can use that and avoid creating a new managed bean.
I could understand what the operations mean only after very careful reading of "Creating More Complex Pages", section "Overriding Declarative Methods" in JDeveloper Help (or in ADF Developer's Guide PDF document).
In general: I believe that "ADF bindings" need more conceptual explanation, maybe in form of an article. Grammatical form "bindings" may create a false understanding that "bindings" are just references. But they are not -- ADF bindings are active objects that handle traffic between UI components and Data Controls. It seems that "bindings" even communicate among themselves. Maybe it would be more understandable to differentiate strictly between "binding objects" (or "binders"?), binding object definitions and binding object references.
It would be very helpful to have a diagram showing grahically what specific binder objects are created in a small apllication (2-3 pages using 1-2 tables), with whom they communicate and what type of data is passed on.
PriitHi
Thanks for your infos.
Yes exactly I use almost the same code you have post here.
Could You answer to my next questions?
First - >what do you mean by saying that "it's not good idea using refreshing in IE?" Of course I use refreshing in backing_bean for my button "remove" that removes row, commit changes to database and refresh table, almost the same as You said in your post:
Code in backing_bean is and comments on difference to Your code is below:
public commandButton2_action1(){
BindingContainer bindings = getBindings();
OperationBinding operationBinding =
bindings.getOperationBinding("removeEntity");
Object result = operationBinding.execute();
if (!operationBinding.getErrors().isEmpty()) {
return null;
//above remove entity, but I dont now if it do commit to database? So i do it below
OperationBinding commit1 = bindings.getOperationBinding("Commit");
commit1.execute();
//and at the end I refresh my table, "findAllRezerwacja1 - it is an id of the methodAction, not the iterator -> is it ok? or should I change to Iterator id?
OperationBinding requery = bindings.getOperationBinding("findAllRezerwacja1");
requery.execute();
return null;
Page Definition code for this:
<methodAction id="findAllRezerwacja1"
InstanceName="SessionEJBLocal.dataProvider"
DataControl="SessionEJBLocal" MethodName="findAllRezerwacja"
RequiresUpdateModel="true" Action="999"
ReturnName="SessionEJBLocal.methodResults.SessionEJBLocal_dataProvider_findAllRezerwacja_result"/>
<table id="findAllRezerwacja2" IterBinding="findAllRezerwacja1Iter">
<AttrNames>
<Item Value="dataDo"/>
<Item Value="dataOd"/>
<Item Value="idRezerwacja"/>
<Item Value="liczbaUczestnikow"/>
<Item Value="prowadzacy"/>
<Item Value="uwagi"/>
</AttrNames>
</table>
<methodAction id="removeEntity" InstanceName="SessionEJBLocal.dataProvider"
DataControl="SessionEJBLocal" MethodName="removeEntity"
RequiresUpdateModel="true" Action="999">
<NamedData NDName="entity"
NDValue="${bindings.findAllRezerwacja2.currentRow.dataProvider}"
NDType="java.lang.Object"/>
</methodAction>
<action id="Commit" IterBinding="findAllRezerwacja1Iter"
InstanceName="SessionEJBLocal.dataProvider"
DataControl="SessionEJBLocal" RequiresUpdateModel="true"
Action="2"/>
</bindings>
//and rest of code for Iterator etc
My second question is, why when you use refresh button in IE (I know is not recommended as You said, but sometimes user do it, so I want prevent situations that I will describe here) so when I press refresh button in IE exactly after removing one row by clicking my button, refreshing by pressing IE button is doing the same --> is deleting next row. How to stop deleting row, when for example user would press IE refresh button after pressing remove button for table. If I change selection in table after deleting row, and press refresh button in IE, instead of deleting row, I got error message: JBO-29000: JBO-35007: and
JBO-35007. So where Im doing wrong. Maybe I should do sth with postback ? Could You help me? Thanks in advance
Last one question: what is the difference between using delete and removeEntity from operations node? Im now reading carefully ADF Dev Guide, so I hope I can find infos there? But if You know, please answer to this question.
Thanks -
How to get the Grand Total in Module pool Screen
Hi Frds.
How to get the Grand Total in Module pool Screen
Example i have 10 different materials
for each matarial has different moving . But in my case matarials is doesnt matter here
10 material Moving Average price to do Frand total and display in one column...
Please Help me out Frds.
Regards,
KabilHi
You need to calculate the total in a module of PAI (or PBO) event:
PROCESS PAI.
LOOP.....
ENDLOOP.
MODULE CALCULATE_TOTAL.
MODULE CALCULATE_TOTAL.
GRAND_TOTAL = 0.
LOOP AT ITAB,
GRAND_TOTAL = GRAND_TOTAL + ITAB-PWB.
ENDLOOP.
ENDMODULE.
In this way the grand total will be calculated as soon as the user presses enter or another command.
You can't insert the calculation in the loop of table control, because this loop runs the visible lines only, so it's better to calculate the total out of those loop, -
How to get the plsql table data into output cursor
Hi,
Could anybody please help me.
Below is an example of the scenario..
CREATE OR REPLACE PACKAGE chck IS
PROCEDURE getdata(dept_no IN VARCHAR2,oc_result_cursor OUT sys_REFCURSOR);
TYPE get_rec is record (ename varchar2(20),
eno number(12));
TYPE t_recs IS TABLE OF get_rec INDEX BY BINARY_INTEGER;
emp_tab t_recs;
END chck;
CREATE OR REPLACE PACKAGE BODY chck AS
PROCEDURE getdata(dept_no IN VARCHAR2,oc_result_cursor OUT sys_REFCURSOR)
is
BEGIN
select ename, eno
bulk collect into emp_tab
from emp;
open oc_result_cursor for select * from table(emp_tab); -- I believe something is wrong here ....
END;
END chck;
the above package is giving me an error:
LINE/COL ERROR
10/29 PL/SQL: SQL Statement ignored
10/43 PL/SQL: ORA-22905: cannot access rows from a non-nested table
item
let me know what needs to be changed
Thanks
Manjumanjukn wrote:
once i get the data into a plsql table, how to get this plsql table data into the cursor?There is no such thing as a PL/SQL table - it is an array.
It is nothing at all like a table. It cannot be indexed, partitioned, cluster, etc. It does not exist in the SQL engine as an object that can be referenced. It resides in expensive PGA memory and needs to be copied (lock, stock and barrel) to the SQL engine as a bind variable.
It is an extremely primitive structure - and should never be confused as being just like a table.
Its use in SQL statements is also an exception to the rule. Sound and valid technical reasons need to justify why one want to push a PL/SQL array to the SQL engine to run SELECT 's against it. -
How to get the user entered data?
Hi all,
I have created an HTMLB DynPage component.
In That i have created my input screen with textboxes using response.write method.
i have added one onConfirm event on which the data whould validate.
so onConfirm method im trying to get the data with request.getParameter method which returns null...
how to do...how to get the user entered data to do my validations...can anyone plz advice.
Thanks,
ViswesHi
inputfield or textbox component entered directly using response.write(...) are not htmlb , but html.
to create portal input field (ie HTMLB), you should do something like
this in the doProcessBeforeOutput member function
InputField field1 = new InputField("Id1");
field1.setSize(8); // 8 characters
this.getForm().addComponent(field1);
and in doProcessAfterInput member function
InputField field1 =
(InputField) this.getComponentByName("Id1");
you can then manipulate the content of the field.
Hope this help,
Guillaume -
How to get length of a data field
Hi Experts,
How to get length of a data field. For example data field /BIC/0COSTCENTER length is 9. and the entry in the table is /BIC/0COSTCENTER = 1000 only. How to get the lenth of value in the table.
Any help greatly appreciated. Thanks.
Best Regards,
Suresh.Below is example code
Data: var1(10) type c value '2500',
var2 type i.
var2 = Strlen( var1 ).
write var2.
<b>Reward Points for helpful answers</b>
Satish -
How can get difference between 2 dates in the form of days
how can get difference between 2 dates in the form of days
Hi,
Check the following program:
REPORT ZDATEDIFF.
DATA: EDAYS LIKE VTBBEWE-ATAGE,
EMONTHS LIKE VTBBEWE-ATAGE,
EYEARS LIKE VTBBEWE-ATAGE.
PARAMETERS: FROMDATE LIKE VTBBEWE-DBERVON,
TODATE LIKE VTBBEWE-DBERBIS DEFAULT SY-DATUM.
call function 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
exporting
i_date_from = FROMDATE
i_date_to = TODATE
I_FLG_SEPARATE = ' '
IMPORTING
E_DAYS = EDAYS
E_MONTHS = EMONTHS
E_YEARS = EYEARS.
WRITE:/ 'Difference in Days ', EDAYS.
WRITE:/ 'Difference in Months ', EMONTHS.
WRITE:/ 'Difference in Years ', EYEARS.
INITIALIZATION.
FROMDATE = SY-DATUM - 60.
Regards,
Bhaskar -
How to get current time and date??
How to get current time and date from my PC time and date to the java application??
i use java.util.* package but got error, that is:
- java.util.* and java.sql.* class are match
- abstract class cannot be instantiated
so what can i do, pls guide...thanks...There is a method in the System class that will return the current system time. You could also instantiate a Date, Time, Timestamp, or Calendar object, all of which get created with the system time by default.
Don't import *. Import the specific classes you need.
Next time, post the actual text of the exceptions/compile errors. If you make people guess, most just won't bother. -
How to get group when the data source from system instead of UME database
Hig guys,
How to get group when the data source comes from backend system instead of UME database?
I tried to use
IUMPrincipal RefGroup = WPUMFactory.getGroupFactory().getGroup(groupName);
But I was not able to get the group. But in "UserAdministrator", I can find this groupName.
Which kind of API can I use?
Thanks in advance!
Regards,
Liying
Message was edited by:
Liying WangOk,
try this:
com.sapportals.portal.security.usermanagement.IGroupFactory ep5GroupFactory = userManagementService.getGroupFactory();
IGroupFactory groupFactory = UMFactory.getGroupFactory();
com.sap.security.api.IGroup group = groupFactory.getGroupByUniqueName(groupName);
IUMPrincipal ep5Principal = ep5GroupFactory.getEP5Group(group);
This should do the trick,
Romano
PS: and thanks for the stars! -
I lost my iphone, how to get back all the data is there?
Thank you for explain kappy..
how if I want to get my skype message? is it can ? help me.. -
How to get an email when data got inserted
Hi All,
Could you please let me know how to get an email when data got inserted into table by using sql/plsql
Thanks in adavanceCould you please let me know how to get an email when data got inserted into table by using sql/plsql
Well that seems pretty straightforward - write some pl/sql to send you an email when that pl/sql inserts data into a table.
See this Oracle-base article for an example of sending mail.
http://www.oracle-base.com/articles/misc/email-from-oracle-plsql.php
Post what you have tried so far. What part of what you have tried doesn't seem to be working? -
How can get back my backup data from an external element ?
How can get back my backup data from an external element ?
See the section titled "restoring data from Time Machine backups" in this Apple support article; that should get you going.
http://support.apple.com/kb/ht1427
Regards. -
How to get Po item Delivery Date ?
who can tell me how to get PO Item Delivery Date ?
Thank You!hi
good
go through these links,hope these ll help you to solve your probelm
http://web.mit.edu/sapr3/windocs/bpors03m.htm
http://www.sap.com/southafrica/services/education/pdf/BPP.pdf
thanks
mrutyun^ -
How to get days between two dates
Hi ,
How to get days between two dates.
Regards,
Ramesh.Hi Ramesh,
REPORT ZDATEDIFF.
DATA: EDAYS LIKE VTBBEWE-ATAGE,
EMONTHS LIKE VTBBEWE-ATAGE,
EYEARS LIKE VTBBEWE-ATAGE.
PARAMETERS: FROMDATE LIKE VTBBEWE-DBERVON,
TODATE LIKE VTBBEWE-DBERBIS DEFAULT SY-DATUM.
call function 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
exporting
i_date_from = FROMDATE
i_date_to = TODATE
I_FLG_SEPARATE = ' '
IMPORTING
E_DAYS = EDAYS
E_MONTHS = EMONTHS
E_YEARS = EYEARS.
WRITE:/ 'Difference in Days ', EDAYS.
WRITE:/ 'Difference in Months ', EMONTHS.
WRITE:/ 'Difference in Years ', EYEARS.
INITIALIZATION.
FROMDATE = SY-DATUM - 60. -
How to get the max total sale by date on every store
I am trying to write a query in Oracle which will return both the store_id and the maximum total sale by date
Hi,
Whenever you have a question, please post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data.
Explain, using specific examples, how you get those results from that data.
Always say what version of Oracle you're using (e.g. 11.2.0.2.0).
See the forum FAQ: https://forums.oracle.com/message/9362002#9362002
Hjava wrote:
I am trying to write a query in Oracle which will return both the store_id and the maximum total sale by date
Do you mean you want to see the store_id that had the maximum total sale?
In general, this can be done with a Top-N Query, using an analytic function such as RANK. For an example, see http://forums.oracle.com/forums/thread.jspa?messageID=3739610
If you only want the date, the maximum total from that date, and 1 column from the same row with the maximum (e.g. store_id), then you might be able to use the aggregate LAST function instead.
What results do you want in case of a tie? (That is, if 2 or mote store_ids have the same total sale on a given date, and no other store_id has a higher total.)
Maybe you are looking for
-
In update task & Express document Update was terminated
Hi all Need help! Requirement: When i do confirmation through CO11N i have to do GI through a BADI. Solution: I have written a wrapper Update module(internally has /AFS/BAPI_GOODSMVT_CREATE) with Start delayed and called that module(in update task) i
-
A .swf inside a .swf wrapped in a pdf
Here's what I'm doing: I've created interactive swfs of some print brochures using InDesign CS5. Before export I've tried to install some small .swf animated charts created either out of InDesign or out of Flash Catylyst as well as some f4v and flv m
-
Lightroom won't open TIFF or JPEG files to CS5
Recently upgraded to a new iMac. This morning when I tried to open a TIFF file from Lightroom 3.4.1 into Photoshop CS5 I got a message saying: Lightroom was unable to prepare the selected file at /Volumes/Drobo1/Photos/2011/02-14-2011 Yellowstone/Yel
-
Java code to call methods in .ocx file
dear friends, i have an .ocx file with me which is used to communicate with a specific device.it is an already existing one. i wish to know whether i can call method sin that .ocx file using java .using vb6 we can do this. if it is possible with java
-
LG L204WT LCD as External Display
I just bought this brand new at a local Circuit City for $300 on sale. It's a 20" Wide LCD and it is simply brilliant beautiful. I contemplated the Apple 20" but realistically the price difference for essiantlly the same hardware (yes I do believe th