Filtering a table with 19699 rows
Hello
I am new to Xcelsisu and I am trying to aply filter component to a table with 19699 rows. I is suppose to show in the filter 45 diferent clasifications. I seems to be using only the first 500 rows to aply the filter. I changed the maximum number of rows in the preferences. What should i do ?
a component cannot handle 20.000 rows you should filter these in the database by using quries when getting the data in the dashboard. If there is no database connection available, you can use pivot tables to create list for the different dimensions and then use lookup formulas like match and index o display the data for your chart.
Similar Messages
-
Select on table with 1800 rows is slow
I have a table with 1800 rows. Each entry has a geometry position and a geometry polygon around the position. I am using the polygon to detect which (other) entries are near the current entry.
In the following testdata and the subsequent query, i am filtering on 625 (of 1865) rows, and then using the .STContains-method to finding other rows (the testdata is fully found by this query, in the live database the values are not so regular as in the testdata.
The query take 6500 ms. In the live database, only 800 records are (yet) in the table, and it takes 2200 ms.
select SlowQueryTable.id
from SlowQueryTable
inner join dbo.SlowQueryTable as SlowQueryTableSeen
on SlowQueryTable.[box].STContains(SlowQueryTableSeen.position) = 1
where SlowQueryTable.userId = 2
(The query in the live system is even more complex, but this is main part of it and even simplified as it is just takes too long).
This script generates test data and runs the query:
-- The number table is just needed to generate test data
CREATE TABLE [dbo].[numbers](
[number] [int] NOT NULL
go
declare @t table (number int)
insert into @t select 0 union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9
insert into numbers
select * from
select
t1.number + t2.number*10 + t3.number*100 + t4.number*1000 as x
from
@t as t1,
@t as t2,
@t as t3,
@t as t4
) as t1
order by x
go
-- this is the table which has the slow query. The Columns [userId], [position] and [box] are the relevant ones
CREATE TABLE [dbo].SlowQueryTable(
[id] [int] IDENTITY(1,1) NOT NULL,
[userId] [int] NOT NULL,
[position] [geometry] NOT NULL,
[box] [geometry] NULL,
constraint SlowQueryTable_primary primary key clustered (id)
create nonclustered index SlowQueryTable_UserIdKey on [dbo].SlowQueryTable(userId);
--insert testdata: three users with each 625 entries. Each entry per user has its unique position, and a rectangle (box) around it.
-- In the database in question, the positions are a bit more random, often tens of entries have the same position. The slow query is nevertheless visible with these testdata
declare @range int;
set @range = 5;
INSERT INTO [dbo].SlowQueryTable (userId,position,box)
select
users.number,
geometry::STGeomFromText('POINT (' + convert(varchar(15), X) + ' ' + convert(varchar(15), Y) + ')',0),
geometry::STPolyFromText('POLYGON ((' + convert(varchar(15), X - @range) + ' ' + convert(varchar(15), Y - @range) + ', '
+ convert(varchar(15), X + @range) + ' ' + convert(varchar(15), Y - @range) + ', '
+ convert(varchar(15), X + @range) + ' ' + convert(varchar(15), Y + @range) + ', '
+ convert(varchar(15), X - @range) + ' ' + convert(varchar(15), Y + @range) + ','
+ convert(varchar(15), X - @range) + ' ' + convert(varchar(15), Y - @range) + '))', 0)
from (
select
(numberX.number * 40) + 4520 as X
,(numberY.number * 40) + 4520 as Y
from numbers as numberX
cross apply numbers as numberY
where numberX.number < (1000 / 40)
and numberY.number < (1000 / 40)) as positions
cross apply numbers as users
where users.number < 3
CREATE SPATIAL INDEX [SlowQueryTable_position]
ON [dbo].SlowQueryTable([position])
USING GEOMETRY_GRID
WITH (
BOUNDING_BOX = ( 4500, 4500, 5500, 5500 ),
GRIDS =(LEVEL_1 = HIGH,LEVEL_2 = HIGH,LEVEL_3 = HIGH,LEVEL_4 = HIGH),
CELLS_PER_OBJECT = 64, PAD_INDEX = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
go
ALTER INDEX [SlowQueryTable_position] ON [dbo].SlowQueryTable
REBUILD;
go
CREATE SPATIAL INDEX [SlowQueryTable_box]
ON [dbo].SlowQueryTable(box)
USING GEOMETRY_GRID
WITH ( BOUNDING_BOX = ( 4500, 4500, 5500, 5500 ) ,
GRIDS =(LEVEL_1 = HIGH,LEVEL_2 = HIGH,LEVEL_3 = HIGH,LEVEL_4 = HIGH),
CELLS_PER_OBJECT = 64, PAD_INDEX = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
go
ALTER INDEX [SlowQueryTable_box] ON [dbo].SlowQueryTable
REBUILD;
go
SET STATISTICS IO ON
SET STATSTICS TIME ON
-- this is finally the query. it takes about 6500 ms
select SlowQueryTable.id
into #t1
from SlowQueryTable
inner join dbo.SlowQueryTable as SlowQueryTableSeen
on SlowQueryTable.[box].STContains(SlowQueryTableSeen.position) = 1
--on SlowQueryTable.position.STDistance(SlowQueryTableSeen.position) < 5
where SlowQueryTable.userId = 2
drop table #t1
drop table SlowQueryTable
drop table numbers
Using an explicit index hint does do the job, but then the query gets slow if i change the where clause:
select SlowQueryTable.id
into #t1
from SlowQueryTable
with (index([SlowQueryTable_box]))
inner join dbo.SlowQueryTable as SlowQueryTableSeen
on SlowQueryTable.[box].STContains(SlowQueryTableSeen.position) = 1
where SlowQueryTable.userId = 2
leads to 600ms, and changing the where clause
where SlowQueryTable.id = 100
slows it again down to 1200ms. Filtering on ID get massively slowed down when using index hint on the spatial index.
Since the table in the live system will grow to 10000+ rows, and the query is called often by users, I badly need a more efficient query.
Do I have to create a different queries for each use-case, some with index hints and some without?I've run your example and can confirm your results. There's a couple of things that I noticed though.
After looking at query plans, it's not a matter of "with spatial index" vs. "without spatial index". You have two spatial indexes, one on each column (position and box). When you don't hint the "box" spatial index, the query
uses the "position" spatial index. Because of what they are indexing (points vs. polygons), the "box" spatial index requires a lot more IO. With some (non-spatial) predicates, the "box" spatial index gives better performance,
with others the "position" one does. I've yet to figure out exactly why (short on time, I might get back to it in future), but you can examine query plans and use the spatial index diagnostic procs (e.g. sp_help_spatial_geometry_index_xml ) in
addition to the diagnostics you're running to see why and if you can find a better performing plan/index.
Bear this in mind. Given a choice of multiple spatial indexes, the SQL Server query optimizer is not able to choose (for the most part, IO etc. aside), which one is best. Also, there is usually only one choice of spatial query plan shape, in general. If
your query is more complex than the one in your example, you might benefit by breaking it in two: one query to filter out all the rows and predicates that don't use a spatial index and one query that uses the spatial index on the subset. I've had good
luck with this other situations with complex queries involving spatial predicates. This method may not be applicable to a spatial query as simple as the one in your example, however.
Hope this helps, Bob -
TO DRAW A TABLE WITH MULTIPLE ROWS AND MULTIPLE COLOUMNS IN FORM
Hi,
How to draw a table with multiple rows and columns seperated by lines in form printing?check this
http://sap-img.com/ts003.htm
Regards
Prabhu -
How to insert a table with variable rows in smart form
Hi all,
How to insert a table with variable rows in smart form?
Any help would be appreciated.
Regards,
Mahesh.Hi,
Right click the mouse->create->table
If you want 5 columns, you need to declare 5 cells in one line type of the table
Click on Table -> Details, then do the following
Line Type 1 2 3 4 5
L1 2mm 3mm etc
Here specify the width of the columns as many as you want..
then in the header/main area of the table, click create Table Line, Rowtype is L1, automatically 5 cells will come,In each cell create a text element, display the variable to be printed there. -
Hi
I have a problem to import a dump that contains the tables with 0 rows.
When i exported from ORACLE 11.2 64 bit on SERVER 2008 i noticed that log didn't confirm the tables with 0 rows.
When i want to import to ORACLE 11.2 64 bit on other SERVER 2008 i have a lot of errors on this tables with 0 rows.
In the log i get the same tables with 1 row at least, but no one with 0 rows.
I open my dump in TEXTPAD and i see it contains "CREATE ....." these tables.
I don't understand why it happens. I used FUll DUMP by SYS, it didn't help.
This is not first time when i export and import dumps,no errors.
I'm using command "EXP" and "IMP" and every time it's ok.(IF it's a releavent)
Why it happens? any solutions for this issue?
ThanksI've found (i guess so) solution to this issue
here are two links to this new feature that is called deffered segment creation
The reason for this behavior is 11.2 new feature ‘Deferred Segment Creation‘ – the creation of a table sent is deferred until the first row is inserted.
As a result, empty tables are not listed in dba_segments and are not exported by exp utility
http://www.nativeread.com/2010/04/09/11gr2-empty-tables-skipped-by-export-deferred-segment-creation/
http://antognini.ch/2010/10/deferred-segment-creation-as-of-11-2-0-2/
And this is i've found in official documentation from oracle
Beginning in Oracle Database 11g Release 2, when creating a non-partitioned heap-organized table in a locally managed tablespace, table segment creation is deferred until the first row is inserted. In addition, creation of segments is deferred for any LOB columns of the table, any indexes created implicitly as part of table creation, and any indexes subsequently explicitly created on the table.The advantages of this space allocation method are the following:A significant amount of disk space can be saved for applications that create hundreds or thousands of tables upon installation, many of which might never be populated.Application installation time is reduced.There is a small performance penalty when the first row is inserted, because the new segment must be created at that time.
To enable deferred segment creation, compatibility must be set to '11.2.0' or higher. You can disable deferred segment creation by setting the initialization parameter DEFERRED_SEGMENT_CREATION to FALSE. The new clauses SEGMENT CREATION DEFERRED and SEGMENT CREATION IMMEDIATE are available for the CREATE TABLE statement. These clauses override the setting of the DEFERRED_SEGMENT_CREATION initialization parameter.
+Note that when you create a table with deferred segment creation (the default), the new table appears in the _TABLES views, but no entry for it appears in the SEGMENTS views until you insert the first row. There is a new SEGMENTCREATED column in _TABLES, _INDEXES, and _LOBS that can be used to verify deferred segment creation+
Note:
The original Export utility does not export any table that was created with deferred segment creation and has not had a segment created for it. The most common way for a segment to be created is to store a row into the table, though other operations such as ALTER TABLE ALLOCATE EXTENTS will also create a segment. If a segment does exist for the table and the table is exported, the SEGMENT CREATION DEFERRED clause will not be included in the CREATE TABLE statement that is executed by the original Import utility. -
How to create table with 1 row 1MB in size?
Hello,
I am doing some R&D and want to create a Table with 1 row, which is 1 MB in size.
i.e. I want to create a row which is 1 MB in size.
I am using a 11g DB.
I do this in SQL*Plus:
(1.) CREATE TABLE onembrow (pk NUMBER PRIMARY KEY, onembcolumn CLOB);
(2.) Since 1MB is 1024*1024 bytes (i.e. 1048576 bytes) and since in English 1 letter = 1 byte, I do this
SQL> INSERT INTO onembrow VALUES (1, RPAD('A', 1048576, 'B'));
1 row created.
(3.) Now, after committing, I do an analyze table.
SQL> ANALYZE TABLE onembrow COMPUTE STATISTICS;
Table analyzed.
(4.) Now, I check the actual size of the table using this query.
select segment_name,segment_type,bytes/1024/1024 MB
from user_segments where segment_type='TABLE' and segment_name='ONEMBROW';
SEGMENT_NAME
SEGMENT_TYPE
MB
ONEMBROW
TABLE
.0625
Why is the size only .0625 MB, when it should be 1 MB?
Here is the DB Block related parameters:
SELECT * FROM v$parameter WHERE upper(name) LIKE '%BLOCK%';
NUM NAME TYPE VALUE
478 db_block_buffers 3 0
482 db_block_checksum 2 TYPICAL
484 db_block_size 3 8192
682 db_file_multiblock_read_count 3 128
942 db_block_checking 2 FALSE
What am I doing wrong here???When testing it is necessary to do something that is a reasonably realistic model of a problem you might anticipate appearing in a production system - a row of 1MB doesn't seem likely to be a useful source of information for "R&D on performance tuning"
What's wrong with creating millions of rows ?
Here's a cut and paste from a windows system running 11.2.0.3
SQL> set timing on
SQL>
SQL> drop table t1 purge;
Table dropped.
Elapsed: 00:00:00.04
SQL>
SQL> create table t1
2 nologging
3 as
4 with generator as (
5 select
6 rownum id
7 from dual
8 connect by
9 level <= 50
10 ),
11 ao as (
12 select
13 *
14 from
15 all_objects
16 where rownum <= 50000
17 )
18 select
19 rownum id,
20 ao.*
21 from
22 generator v1,
23 ao
24 ;
Table created.
Elapsed: 00:00:07.09
7 seconds to generate 2.5M rows doesn't seem like a problem. For a modelling example I have one script that generates 6.5M (carefully engineered) rows, with a couple of indexes and a foreign key or two, then collects stats (no histograms) in 3.5 minutes.
Regards
Jonathan Lewis
http://jonathanlewis.wordpress.com
Now on Twitter: @jloracle -
How to create table with resizable row ?
how to create table with resizable row ?
I'd suggest you start here:
http://java.sun.com/docs/books/tutorial/uiswing/components/table.html -
How to constuct a table with each row having a button to select
Hi,
Imagine i have 5 orders and i want to select one order to view or update in other page.
How i construct a table with each row having a button to select it.
I'm having a hard time to do this. How i select a backingBean method in Javascript?.
ThanksI'm trying to put a <h:commandButton> inside <h:dataTable> like this:
<h:dataTable id="books" value="#{BuscarLibros.booksSearched}" var="book">
<h:column>
<f:facet name="header">
<h:outputText value="#{messages.title}"/>
</f:facet>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="#{messages.isbn}"/>
</f:facet>
<h:outputText value="#{book.isdn}"/>
</h:column>
<h:column>
<h:outputFormat value="#{book.fechaPublicacion}">
<f:convertDateTime pattern="ddd/MM/yyyy"/>
</h:outputFormat>
<h:commandButton action="#{BuscarLibros.prepareUpdateBook}" value="Hello WORLD"/>
</h:column>
</h:dataTable>but it does not call the method.
If it is outside it calls but inside not. Its strange because Duke's bookstore example from Sun Java EE is like that.
Any clues? -
Editable table with multiple rows
Hi All!
We're trying to develop some application in VC 7.0. That application should read data from some R/3 tables (via standard and custom functional modules), then display data to user and allow him/her to modify it (or add some data into table rows), and then save it back to R/3.
What is the best way to do that?
There's no problem with displaying data.
But when I try to add something to table (on portal interface), I'm able to use only first row of the table... Even if I fill all fields of that row, I'm not able to add data to second row, etc.
Second question. Is it possible to display in one table contents of output of several BAPIs? For example we have three bapis, one displaying user, second displays that user's subordinates, and the third one - that user's manager. And we want one resulting table...
And last. What is the best way to submit data from table view in VC (portal) to R/3 table? I understand that we should write some functional module, that puts data to R/3. I'm asking about what should be done in VC itself. Some button, or action...
Any help will be appreciated and rewarded :o)
Regards,
DKHere are some former postings:
Editable table with multiple rows
and
Editable table with multiple rows
Are you on the right SP-level?
Can you also split up your posting: one question, one posting? This way you get faster answers, as people might just browse the headers. -
How to know the the list of tables with no rows inside a schema?
with reference to
http://www.ss64.com/orad/USER_TABLES.html
How to know the the list of tables with no rows inside a schema?
I try this select table_name from user_tables where num_rows=0;
I can found one table that is empty.
So what's the query to return list of tables in a schema which has no rows?
thanksYou can do that only if your have collected the stats properly. Otherwise its going to show you wrong information.
Check this out...
SQL> drop table t
2 /
Table dropped.
SQL> create table t
2 as
3 select level no from dual connect by level <=100
4 /
Table created.
SQL> select table_name,num_rows from user_tables where table_name = 'T'
2 /
TABLE_NAME NUM_ROWS
T
SQL> begin
2 dbms_stats.gather_table_stats(user,'T');
3 end;
4 /
PL/SQL procedure successfully completed.
SQL> select table_name,num_rows from user_tables where table_name = 'T'
2 /
TABLE_NAME NUM_ROWS
T 100
SQL>Thanks,
Karthick. -
Several reports on joined master-detail tables with single row source
I have 1 master table (Fixed Assets) and several datail tables (Improvements, Depreciation, ...)
I need to create several reports based on them all with criteria
'Select ALL from Master and join details
/1 total row from details for 1 master row/
filtered by [on_date <= report_date]'
How to do it better and not copy same code in every report?
As mentioned on this forum, ApEx is not able to use RefCursor as row source for ApEx reports
So I tried this Tom Kyte's example:
create type apex_user.myRecordType as object
(seq int,
a int,
b varchar2(10),
c date
Create Or Replace Type Apex_User.Mytabletype As Table Of Apex_User.Myrecordtype;
create or replace function Apex_User.my_function return Apex_User.myTableType
Is
l_data Apex_User.myTableType;
Begin
l_data := Apex_User.myTableType();
for i in 1..5
loop
L_Data.Extend;
l_data(i) :=Apex_User.myRecordType(i, i, 'row ' || i, sysdate+i);
end loop;
Return L_Data;
End;
Select *
from TABLE (cast(Apex_User.my_function() as Apex_User.mytableType))
Where C > Sysdate+1
Order By Seq Desc
SEQ A B C
5 5 row 5 22.08.2010
4 4 row 4 21.08.2010
3 3 row 3 20.08.2010
2 2 row 2 19.08.2010
4 Rows Selected
- and it really works from ApEx reports.
The questions are:
1) is this the best solution for my task (one centralized code for several reports with parameter filtering detail tables)?
2) how to change example properly to have here -
loop
L_Data.Extend;
l_data(i) :=Apex_User.myRecordType(i, i, 'row ' || i, sysdate+i);
end loop;
- simple SELECT from my MASTER-DETAILS joined tables?Hi,
if (row != null)
Row masterRow = row;
vo.setCurrentRow(masterRow);
// not needed : getMesReponsesPourTiersVO1().executeQuery();
You shouldnot execute the child VO after setting current row in master VO.
When the current row is set in master VO, then the child rows will get refreshed automatically.
Cheers,
Prasanna -
Issue in retrieving all the records from ADF Table with multiple row
Hi,
As per my requirement, I need to fill the table with multi selected LOV values and when user clicks on commit, I need to save them to database.
I am using ADF 11g, Multi select table. Using the below ADD method, I am able to add the records but if user clicks on cancel, I need to remove those from view and clear the table as well.
But the Issue I am facing is, in my cancel method, always I am getting half of the records. Lets assume table contains 100 records but in my cancel method, I am getting only 50 records.
Please let me know what is the issue in my source code.
ADD Method:
public void insertRecInCMProcessParamVal(String commType, String processType, Number seqNumber){
try{
Row row = this.getCmProcessParamValueView1().createRow();
row.setAttribute("ParamValue7", commType);
row.setAttribute("ProcessType", processType);
row.setAttribute("CreationDate", new Date());
row.setAttribute("CreatedBy", uid);
row.setAttribute("ParamValueSeqNum", seqNumber);
row.setAttribute("ProcessedFlag", "N");
this.getCmProcessParamValueView1().insertRow(row);
}catch(Exception e){
e.printStackTrace();
Table Code:
<af:table value="#{bindings.CmProcessParamValueView11.collectionModel}"
var="row"
rows="#{bindings.CmProcessParamValueView11.rangeSize}"
emptyText="#{bindings.CmProcessParamValueView11.viewable ? 'No data to display.' : 'Access Denied.'}"
fetchSize="#{bindings.CmProcessParamValueView11.rangeSize}"
rowBandingInterval="1"
selectedRowKeys="#{bindings.CmProcessParamValueView11.collectionModel.selectedRow}"
selectionListener="#{bindings.CmProcessParamValueView11.collectionModel.makeCurrent}"
rowSelection="multiple"
binding="#{backingBeanScope.backing_app_RunCalcPage.t1}"
id="t1" width="100%" inlineStyle="height:100px;" >
<af:column sortProperty="ParamValue6"
sortable="true"
headerText="#{bindings.CmProcessParamValueView11.hints.ParamValue6.label}"
id="c1" visible="false">
<af:inputText value="#{row.bindings.ParamValue6.inputValue}"
label="#{bindings.CmProcessParamValueView11.hints.ParamValue6.label}"
required="#{bindings.CmProcessParamValueView11.hints.ParamValue6.mandatory}"
columns="#{bindings.CmProcessParamValueView11.hints.ParamValue6.displayWidth}"
maximumLength="#{bindings.CmProcessParamValueView11.hints.ParamValue6.precision}"
shortDesc="#{bindings.CmProcessParamValueView11.hints.ParamValue6.tooltip}"
id="it3">
<f:validator binding="#{row.bindings.ParamValue6.validator}"/>
</af:inputText>
</af:column>
<af:column sortProperty="ParamValue7"
sortable="true"
headerText="Comm Type"
id="c2">
<af:inputText value="#{row.bindings.ParamValue7.inputValue}"
label="#{bindings.CmProcessParamValueView11.hints.ParamValue7.label}"
required="#{bindings.CmProcessParamValueView11.hints.ParamValue7.mandatory}"
columns="#{bindings.CmProcessParamValueView11.hints.ParamValue7.displayWidth}"
maximumLength="#{bindings.CmProcessParamValueView11.hints.ParamValue7.precision}"
shortDesc="#{bindings.CmProcessParamValueView11.hints.ParamValue7.tooltip}"
id="it4">
<f:validator binding="#{row.bindings.ParamValue7.validator}"/>
</af:inputText>
</af:column>
<af:column sortProperty="ParamValue8"
sortable="true"
headerText="#{bindings.CmProcessParamValueView11.hints.ParamValue8.label}"
id="c3" visible="false">
<af:inputText value="#{row.bindings.ParamValue8.inputValue}"
label="#{bindings.CmProcessParamValueView11.hints.ParamValue8.label}"
required="#{bindings.CmProcessParamValueView11.hints.ParamValue8.mandatory}"
columns="#{bindings.CmProcessParamValueView11.hints.ParamValue8.displayWidth}"
maximumLength="#{bindings.CmProcessParamValueView11.hints.ParamValue8.precision}"
shortDesc="#{bindings.CmProcessParamValueView11.hints.ParamValue8.tooltip}"
id="it2">
<f:validator binding="#{row.bindings.ParamValue8.validator}"/>
</af:inputText>
</af:column>
</af:table>
Backing Bean Code:
DCBindingContainer dcBindings=(DCBindingContainer)getBindings();
DCIteratorBinding dcIterator=dcBindings.findIteratorBinding("CmProcessParamValueView1Iterator");
RowSetIterator rs = dcIterator.getRowSetIterator();
System.out.println("In Cancel Row Count is : "+ rs.getRowCount());
if (rs.getRowCount() > 0) {
Row row = rs.first();
row.refresh(Row.REFRESH_UNDO_CHANGES);
row.remove();
while (rs.hasNext()) {
int count = rs.getRowCount();
System.out.println("Count is : "+ count);
Row row = rs.next();
System.out.println("Row === "+ row);
if(row != null){
row.refresh(Row.REFRESH_UNDO_CHANGES);
row.remove();
Thanks.Issue resolved.
remove selectionListener and selectedRowKeys....
code to get all the selectedRows.
RowSetIterator rs = dcIterator.getRowSetIterator();
RowKeySet rks = this.t1.getSelectedRowKeys();
Iterator rksIter = rks.iterator();
while (rksIter.hasNext()) {
List l = (List) rksIter.next();
Key key = (Key)l.get(0);
Row row = rs.getRow(key);
Thanks. -
How to display data in table with dynamic rows, section wise in a page.
Hello all,
I work on report creation in BI Publisher where I need to display data from xml in a table in pdf format.The output page is divided into two vertical sections , containing tables, with exactly same columns on left and right sections. The number of rows in table depends on the output of the fetching query. The page is to be populated in such a way that, at first, the left table is populated, then the next rows fill up the table on the right section of the page, if more rows are left, they fill up the tables on next page[first the left table, and then the right one, in a similar fashion as in page 1]
On a bird's eye view, the data needs to be simply mapped to a table, with dynamic number of rows, and so can span number of pages depending on size of data. On a implementation level, I am stuck in getting the left section of the page populated first, then the right section[in place of the right page], and then the next page.
Please guide me if someone has any idea in getting this achieved.
Thanks in advance.Thanks for the response...
I am able to get the desired functionality. I just need the tables to be inside a bigger table, that also has a dividing line between the two columns. This is was is intended in the req. provided to me. The column formatting option provides me a line ,but that is not further modifiable .Please help me in getting a perpendicular line between the two columns, which I need to be of a specified width and color. -
Issues in Table with Multi-Row Insert
I have created a master detail screens using jheadstart on 2 separate pages, Master in the Form layout and detail in the Table Layout with multi-row insert, update and delete flags ON. Have set the New Rows count = 2.
Issue 1
If I try to delete any existing rows, it gives error for new rows saying value is required for the mandatory fields. It should just ignore the new rows if I have not updated any values for any attributes in the those row(As it does for non Master-Detail Table layout). I guess this might be happening because the jheadstart code is setting the foreign key for new rows the detail, but not resetting the status of the rows back to INITIALIZED.
I also noticed that the create() of underlying EO is getting called for those blank rows when I click on 'Save' button, even if I have not changed any data in those rows.
Issue 2
When I try to select the new rows also for deletion, I am getting a '500 Internal Server Error' with following stack trace... This is also happening for normal (non Master-Detail) Table layout.
java.lang.IllegalStateException: AdfFacesContext was already released or had never been attached. at oracle.adf.view.faces.context.AdfFacesContext.release(AdfFacesContext.java:342) at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:253) at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)
Issue 3
I have put some validation code in the validate() method in the MyEntityImpl.java class.
The validate method seems tobe getting called lots of times, in my case 20 times, where the new rows are just 2.
Environment:
Jdeveloper 10.1.3, JHeadStart 10.1.3 build 78, Windows XP
thanksThanks for the reply.
Issue 1:
What I have observed that in case of multi-row select enabled tables, the blank rows do not have any data. This is because the EO's create() method is called only when we post the data using 'Save' button. Thus the Foreign Keys are also not setup. This is a correct behavior since create() and FK setups etc should get done only if the user has inputted any value in the new rows and thus intend to insert new data into the table.
I am able to find the exact cause of this issue. It is happening because in the details table, I have a column which needs tobe shown as checkbox. Since we can only bind checkbox to an Boolean attribute in VO, I have created a transient attribute of type Boolean, which basically calls the getter/setter of actual attribute doing the String "Y"/"N" to true/false conversion. Here is code for the transient attribute getter/setter
public Boolean getDisplayOnWebBoolean() {
return "Y".equals(getDisplayOnWeb()) ? Boolean.TRUE : Boolean.FALSE;
public void setDisplayOnWebBoolean(Boolean value) {
if(Boolean.TRUE.equals(value))
setDisplayOnWeb("Y");
else
setDisplayOnWeb("N");
Now when I click on the "Save" button, the setter for the boolean field is getting called with the value = false and this is resulting into the row being maked as dirty and thus the validation for the required attributes is getting executed and failing.
Issue 2:
Confirmed that correct filter-mapping entries are present in the web.xml.
Now when I select the new blank rows for deletion and click save, following exception is thrown:
java.lang.ClassCastException: oracle.jheadstart.controller.jsf.bean.NewTableRowBean at oracle.jheadstart.controller.jsf.bean.JhsCollectionModel.getRowsToRemove(JhsCollectionModel.java:412) at oracle.jheadstart.controller.jsf.bean.JhsCollectionModel.doModelUpdate(JhsCollectionModel.java:604) at oracle.jheadstart.controller.jsf.lifecycle.JhsPageLifecycle.processModelUpdaters(JhsPageLifecycle.java:541) at oracle.jheadstart.controller.jsf.lifecycle.JhsPageLifecycle.validateModelUpdates(JhsPageLifecycle.java:571)
thanks - rutwik -
Create an internal table with the rows of another internal table.
Hi I want to know if posible to create an internal table structure with the rows of another internal table?
ex.
If in i_tab column A has this values: row 1 = first, row 2 = second, row 3 = third.
Now I want that the structure of my internal table be: first, second, thirdHi,
If you do this way then what will be the difference between the two table anyway?? First internal table has the same structure irrespective of which row you select. and you are going to store the data from each row to the rows of the second internal table. In that case, the structure of the internal table is the same as first table. and it would have same rows.
Am I missing something here? or you want to declare the internal table with each field being the structure of the first table? In this case you'd have to do a dynamic declaration of data as the first table can have any no of rows then the second table would have any no of fields in the structure.
Now if you know that your first internal table is going to have a fixed no of rows eg 3 rows then it becomes simple. Do the following then
Data: begin of second_table occurs 0,
first type <first_table type>,
second type <first_table type>,
third type <first_table type>,
end of second_table.
Regards
Prasenjit
Maybe you are looking for
-
Front end printing with control technology problem with Mac platforms
Hello, We are looking into replacing Host Spool Access method "F: Printing on front end computer" with the newer "front end printing with control technology" but are running into an issue. Our Mac platforms cannot print duplex nor print multiple
-
2.2.1 released, bug fixes - including lossless skipping?
Downloading now... Scott
-
How to display hourglass while ADF view link is retrieving rows in a swing.
I posted this yesterday but did not get a solution, here is my posting again: Hi All, I have an ADF panel which includes several interdependent ADF View Objects and View Links. The query of the top view object might return several rows, then once use
-
Bex query; RSBBS: GOTO ECC transaction
Hello experts, i have been looking SDN and google this afternoon, but i cannot find my specific problem. My customer wants to start an ECC transaction from a Bex query. I created a 'transaction' RSBBS variant and am testing to see how it works. From
-
Java sql and Oracle resultsets
I am trying to execute a query but I never get anything back from the database. Do I have to format the date in my sql quoted string to get it to bring back data correctly? The sql that I am trying to execute looks like the following. sql = "SELECT "