Flex pagination example help
I've found a flex paging example I'd like to get working, but can't seem to get it running.
The Example files can be found here: http://blogs.adobe.com/tlf/2008/12/actionscript-pagination-exampl.html
I've downloaded and imported the project into flex. However I seem to have an error that prevents the example from running. Here is the error that appears
unable to open '/Users/Adam/Documents/Flex Builder 3/libs'
This is what displays if I try to run the project anyways:
File not found: file:/Users/Adam/Documents/Flex%20Builder%203/Pagination/bin-debug/PaginationAS.swf
Does anyone have any idea how I can go about getting this example up and running in flex?
take a look at this post with an advanced DataGrid Pagination Example.
http://forums.adobe.com/message/3166670#3166670
Similar Messages
-
hi,
In the database, A table consists of more than 200 records.i have to display 10 by 10 records.
My question is ,In the datagrid First i have to display the first ten records.When a user scrolls the in the datagrid i need to display the another 10 records like ....... until all the records i need to display from the table.
Please help me to solve the problem.
Thanks and Regards,
venkat.RI have done Flex Pagination using PHP before. It is not impossible as Flex just displays what data comes back from the webservice you are calling. If you would like to see some examples you can click here:
https://www.gridsport.net/store/?itemid=Alpinestars&name=Alpinestars
You will have to keep track of the page number. I have my webservice send back an additional parameter that tells flex how many pages of data it has in order to set the maximum for the numericalStepper in the above example. Aside from that the other suggestions of passing variables to a webservice sound right on the mark. I hope this helps.
Thanks -
[svn] 3891: Adding a DataGroup and Group Flex Explorer example for Steve S.
Revision: 3891
Author: [email protected]
Date: 2008-10-24 16:32:40 -0700 (Fri, 24 Oct 2008)
Log Message:
Adding a DataGroup and Group Flex Explorer example for Steve S.
Linked these examples to the ASDoc.
Modified Paths:
flex/sdk/branches/gumbo_alpha/frameworks/projects/flex4/src/mx/components/DataGroup.as
flex/sdk/branches/gumbo_alpha/frameworks/projects/flex4/src/mx/components/Group.as
flex/sdk/branches/gumbo_alpha/samples/explorer/explorer.xml
Added Paths:
flex/sdk/branches/gumbo_alpha/frameworks/projects/flex4/asdoc/en_US/mx/components/example s/DataGroupExample.mxml
flex/sdk/branches/gumbo_alpha/frameworks/projects/flex4/asdoc/en_US/mx/components/example s/GroupExample.mxmlIs this the webpage you're referring to: http://www.ngeneng.com/services/default.html
If so, consider using <h2> <h3> <h4> tags for headings and use <p> only for paragraphs.
Something like this:
<h2>Services</h2>
<h4>
Watershed Planning and water rights</h4>
<p>
NextGen staff have worked on watershed assessments and management
plans from data collection to reporting and implementing
recommendations, as watermaster staff in adjudicated basins (San
Gabriel River, and Central Basin), and participated in the court
process to determine water rights (Santa Maria groundwater rights).
This understanding can be helpful in any water conflict negotiation
or planning process.</p>
<h4>Creek Restoration, Levees, Embankments and
Bio-Engineering</h4>
<p>
Planning and design of creek restoration and flood protection
facilities including river embankments, open channels, underground conduits, levees, debris and
detention basins, use of bio engineering methods to retain and
enhance environmental values of project sites. Designs include use
of spurs, dikes, large wood debris (LWD),
vegetation and natural
materials.</p>
Your markup has lot of redundant spaces in form of tags. Clean your markup first. Then style the page with CSS.
Define your CSS properly and call them as classes or IDs within your html constructs. Do not ever use inline styling. -
In the latest pagination example, found here, http://sourceforge.net/projects/tlf.adobe/files/2.0/current/samples.zip/download, the pages 2 and on do not continue where the previous pages left off. They seem to skip a paragraph or more between pages.
Hi thx1138, I debugged in it and found there is a bug in the sample code, please comment out line 128 in Pagination.as. The key down event was called twice sometime, this caused page missing.
//_pageView.processKeyDownEvent(e); -
Span removing spaces in Pagination example
any idea why the pagination example removes spaces when span is applied? for example, this code (straight from the example),
renders like this,This was a bug in the example, sorry. The "ignoreWhitespace" flag in the XML object is set true by default, and for parsing text-related XML it should be set false. If you change that, the spaces should be handled correctly.
- robin -
Pagination query help needed for large table - force a different index
I'm using a slight modification of the pagination query from over at Ask Tom's: [http://www.oracle.com/technology/oramag/oracle/07-jan/o17asktom.html]
Mine looks like this when fetching the first 100 rows of all members with last name Smith, ordered by join date:
SELECT members.*
FROM members,
SELECT RID, rownum rnum
FROM
SELECT rowid as RID
FROM members
WHERE last_name = 'Smith'
ORDER BY joindate
WHERE rownum <= 100
WHERE rnum >= 1
and RID = members.rowidThe difference between this and the one at Ask Tom's is that my innermost query just returns the ROWID. Then in the outermost query we join the ROWIDs returned to the members table, after we have pruned the ROWIDs down to only the chunk of 100 we want. This makes it MUCH faster (verifiably) on our large tables, as it is able to use the index on the innermost query (well... read on).
The problem I have is this:
SELECT rowid as RID
FROM members
WHERE last_name = 'Smith'
ORDER BY joindateThis will use the index for the predicate column (last_name) instead of the unique index I have defined for the joindate column (joindate, sequence). (Verifiable with explain plan). It is much slower this way on a large table. So I can hint it using either of the following methods:
SELECT /*+ index(members, joindate_idx) */ rowid as RID
FROM members
WHERE last_name = 'Smith'
ORDER BY joindate
SELECT /*+ first_rows(100) */ rowid as RID
FROM members
WHERE last_name = 'Smith'
ORDER BY joindateEither way, it now uses the index of the ORDER BY column (joindate_idx), so now it is much faster as it does not have to do a sort (remember, VERY large table, millions of records). So that seems good. But now, on my outermost query, I join the rowid with the meaningful columns of data from the members table, as commented below:
SELECT members.* -- Select all data from members table
FROM members, -- members table added to FROM clause
SELECT RID, rownum rnum
FROM
SELECT /*+ index(members, joindate_idx) */ rowid as RID -- Hint is ignored now that I am joining in the outer query
FROM members
WHERE last_name = 'Smith'
ORDER BY joindate
WHERE rownum <= 100
WHERE rnum >= 1
and RID = members.rowid -- Merge the members table on the rowid we pulled from the inner queriesOnce I do this join, it goes back to using the predicate index (last_name) and has to perform the sort once it finds all matching values (which can be a lot in this table, there is high cardinality on some columns).
So my question is, in the full query above, is there any way I can get it to use the ORDER BY column for indexing to prevent it from having to do a sort? The join is what causes it to revert back to using the predicate index, even with hints. Remove the join and just return the ROWIDs for those 100 records and it flies, even on 10 million records.
It'd be great if there was some generic hint that could accomplish this, such that if we change the table/columns/indexes, we don't need to change the hint (the FIRST_ROWS hint is a good example of this, while the INDEX hint is the opposite), but any help would be appreciated. I can provide explain plans for any of the above if needed.
Thanks!Lakmal Rajapakse wrote:
OK here is an example to illustrate the advantage:
SQL> set autot traceonly
SQL> select * from (
2 select a.*, rownum x from
3 (
4 select a.* from aoswf.events a
5 order by EVENT_DATETIME
6 ) a
7 where rownum <= 1200
8 )
9 where x >= 1100
10 /
101 rows selected.
Execution Plan
Plan hash value: 3711662397
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1200 | 521K| 192 (0)| 00:00:03 |
|* 1 | VIEW | | 1200 | 521K| 192 (0)| 00:00:03 |
|* 2 | COUNT STOPKEY | | | | | |
| 3 | VIEW | | 1200 | 506K| 192 (0)| 00:00:03 |
| 4 | TABLE ACCESS BY INDEX ROWID| EVENTS | 253M| 34G| 192 (0)| 00:00:03 |
| 5 | INDEX FULL SCAN | EVEN_IDX02 | 1200 | | 2 (0)| 00:00:01 |
Predicate Information (identified by operation id):
1 - filter("X">=1100)
2 - filter(ROWNUM<=1200)
Statistics
0 recursive calls
0 db block gets
443 consistent gets
0 physical reads
0 redo size
25203 bytes sent via SQL*Net to client
281 bytes received via SQL*Net from client
8 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
101 rows processed
SQL>
SQL>
SQL> select * from aoswf.events a, (
2 select rid, rownum x from
3 (
4 select rowid rid from aoswf.events a
5 order by EVENT_DATETIME
6 ) a
7 where rownum <= 1200
8 ) b
9 where x >= 1100
10 and a.rowid = rid
11 /
101 rows selected.
Execution Plan
Plan hash value: 2308864810
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1200 | 201K| 261K (1)| 00:52:21 |
| 1 | NESTED LOOPS | | 1200 | 201K| 261K (1)| 00:52:21 |
|* 2 | VIEW | | 1200 | 30000 | 260K (1)| 00:52:06 |
|* 3 | COUNT STOPKEY | | | | | |
| 4 | VIEW | | 253M| 2895M| 260K (1)| 00:52:06 |
| 5 | INDEX FULL SCAN | EVEN_IDX02 | 253M| 4826M| 260K (1)| 00:52:06 |
| 6 | TABLE ACCESS BY USER ROWID| EVENTS | 1 | 147 | 1 (0)| 00:00:01 |
Predicate Information (identified by operation id):
2 - filter("X">=1100)
3 - filter(ROWNUM<=1200)
Statistics
8 recursive calls
0 db block gets
117 consistent gets
0 physical reads
0 redo size
27539 bytes sent via SQL*Net to client
281 bytes received via SQL*Net from client
8 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
101 rows processed
Lakmal (and OP),
Not sure what advantage you are trying to show here. But considering that we are talking about pagination query here and order of records is important, your 2 queries will not always generate output in same order. Here is the test case:
SQL> select * from v$version ;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
SQL> show parameter optimizer
NAME TYPE VALUE
optimizer_dynamic_sampling integer 2
optimizer_features_enable string 10.2.0.1
optimizer_index_caching integer 0
optimizer_index_cost_adj integer 100
optimizer_mode string ALL_ROWS
optimizer_secure_view_merging boolean TRUE
SQL> show parameter pga
NAME TYPE VALUE
pga_aggregate_target big integer 103M
SQL> create table t nologging as select * from all_objects where 1 = 2 ;
Table created.
SQL> create index t_idx on t(last_ddl_time) nologging ;
Index created.
SQL> insert /*+ APPEND */ into t (owner, object_name, object_id, created, last_ddl_time) select owner, object_name, object_id, created, sysdate - dbms_random.value(1, 100) from all_objects order by dbms_random.random;
40617 rows created.
SQL> commit ;
Commit complete.
SQL> exec dbms_stats.gather_table_stats(user, 'T', cascade=>true);
PL/SQL procedure successfully completed.
SQL> select object_id, object_name, created from t, (select rid, rownum rn from (select rowid rid from t order by created desc) where rownum <= 1200) t1 where rn >= 1190 and t.rowid = t1.rid ;
OBJECT_ID OBJECT_NAME CREATED
47686 ALL$OLAP2_JOIN_KEY_COLUMN_USES 28-JUL-2009 08:08:39
47672 ALL$OLAP2_CUBE_DIM_USES 28-JUL-2009 08:08:39
47681 ALL$OLAP2_CUBE_MEASURE_MAPS 28-JUL-2009 08:08:39
47682 ALL$OLAP2_FACT_LEVEL_USES 28-JUL-2009 08:08:39
47685 ALL$OLAP2_AGGREGATION_USES 28-JUL-2009 08:08:39
47692 ALL$OLAP2_CATALOGS 28-JUL-2009 08:08:39
47665 ALL$OLAPMR_FACTTBLKEYMAPS 28-JUL-2009 08:08:39
47688 ALL$OLAP2_DIM_LEVEL_ATTR_MAPS 28-JUL-2009 08:08:39
47689 ALL$OLAP2_DIM_LEVELS_KEYMAPS 28-JUL-2009 08:08:39
47669 ALL$OLAP9I2_HIER_DIMENSIONS 28-JUL-2009 08:08:39
47666 ALL$OLAP9I1_HIER_DIMENSIONS 28-JUL-2009 08:08:39
11 rows selected.
SQL> select object_id, object_name, last_ddl_time from t, (select rid, rownum rn from (select rowid rid from t order by last_ddl_time desc) where rownum <= 1200) t1 where rn >= 1190 and t.rowid = t1.rid ;
OBJECT_ID OBJECT_NAME LAST_DDL_TIME
11749 /b9fe5b99_OraRTStatementComman 06-FEB-2010 03:43:49
13133 oracle/jdbc/driver/OracleLog$3 06-FEB-2010 03:45:44
37534 com/sun/mail/smtp/SMTPMessage 06-FEB-2010 03:46:14
36145 /4e492b6f_SerProfileToClassErr 06-FEB-2010 03:11:09
26815 /7a628fb8_DefaultHSBChooserPan 06-FEB-2010 03:26:55
16695 /2940a364_RepIdDelegator_1_3 06-FEB-2010 03:38:17
36539 sun/io/ByteToCharMacHebrew 06-FEB-2010 03:28:57
14044 /d29b81e1_OldHeaders 06-FEB-2010 03:12:12
12920 /25f8f3a5_BasicSplitPaneUI 06-FEB-2010 03:11:06
42266 SI_GETCLRHSTGRFTR 06-FEB-2010 03:40:20
15752 /2f494dce_JDWPThreadReference 06-FEB-2010 03:09:31
11 rows selected.
SQL> select object_id, object_name, last_ddl_time from (select t1.*, rownum rn from (select * from t order by last_ddl_time desc) t1 where rownum <= 1200) where rn >= 1190 ;
OBJECT_ID OBJECT_NAME LAST_DDL_TIME
37534 com/sun/mail/smtp/SMTPMessage 06-FEB-2010 03:46:14
13133 oracle/jdbc/driver/OracleLog$3 06-FEB-2010 03:45:44
11749 /b9fe5b99_OraRTStatementComman 06-FEB-2010 03:43:49
42266 SI_GETCLRHSTGRFTR 06-FEB-2010 03:40:20
16695 /2940a364_RepIdDelegator_1_3 06-FEB-2010 03:38:17
36539 sun/io/ByteToCharMacHebrew 06-FEB-2010 03:28:57
26815 /7a628fb8_DefaultHSBChooserPan 06-FEB-2010 03:26:55
14044 /d29b81e1_OldHeaders 06-FEB-2010 03:12:12
36145 /4e492b6f_SerProfileToClassErr 06-FEB-2010 03:11:09
12920 /25f8f3a5_BasicSplitPaneUI 06-FEB-2010 03:11:06
15752 /2f494dce_JDWPThreadReference 06-FEB-2010 03:09:31
11 rows selected.
SQL> select object_id, object_name, last_ddl_time from t, (select rid, rownum rn from (select rowid rid from t order by last_ddl_time desc) where rownum <= 1200) t1 where rn >= 1190 and t.rowid = t1.rid order by last_ddl_time desc ;
OBJECT_ID OBJECT_NAME LAST_DDL_TIME
37534 com/sun/mail/smtp/SMTPMessage 06-FEB-2010 03:46:14
13133 oracle/jdbc/driver/OracleLog$3 06-FEB-2010 03:45:44
11749 /b9fe5b99_OraRTStatementComman 06-FEB-2010 03:43:49
42266 SI_GETCLRHSTGRFTR 06-FEB-2010 03:40:20
16695 /2940a364_RepIdDelegator_1_3 06-FEB-2010 03:38:17
36539 sun/io/ByteToCharMacHebrew 06-FEB-2010 03:28:57
26815 /7a628fb8_DefaultHSBChooserPan 06-FEB-2010 03:26:55
14044 /d29b81e1_OldHeaders 06-FEB-2010 03:12:12
36145 /4e492b6f_SerProfileToClassErr 06-FEB-2010 03:11:09
12920 /25f8f3a5_BasicSplitPaneUI 06-FEB-2010 03:11:06
15752 /2f494dce_JDWPThreadReference 06-FEB-2010 03:09:31
11 rows selected.
SQL> set autotrace traceonly
SQL> select object_id, object_name, last_ddl_time from t, (select rid, rownum rn from (select rowid rid from t order by last_ddl_time desc) where rownum <= 1200) t1 where rn >= 1190 and t.rowid = t1.rid order by last_ddl_time desc
2 ;
11 rows selected.
Execution Plan
Plan hash value: 44968669
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1200 | 91200 | 180 (2)| 00:00:03 |
| 1 | SORT ORDER BY | | 1200 | 91200 | 180 (2)| 00:00:03 |
|* 2 | HASH JOIN | | 1200 | 91200 | 179 (2)| 00:00:03 |
|* 3 | VIEW | | 1200 | 30000 | 98 (0)| 00:00:02 |
|* 4 | COUNT STOPKEY | | | | | |
| 5 | VIEW | | 40617 | 475K| 98 (0)| 00:00:02 |
| 6 | INDEX FULL SCAN DESCENDING| T_IDX | 40617 | 793K| 98 (0)| 00:00:02 |
| 7 | TABLE ACCESS FULL | T | 40617 | 2022K| 80 (2)| 00:00:01 |
Predicate Information (identified by operation id):
2 - access("T".ROWID="T1"."RID")
3 - filter("RN">=1190)
4 - filter(ROWNUM<=1200)
Statistics
1 recursive calls
0 db block gets
348 consistent gets
0 physical reads
0 redo size
1063 bytes sent via SQL*Net to client
385 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
1 sorts (memory)
0 sorts (disk)
11 rows processed
SQL> select object_id, object_name, last_ddl_time from (select t1.*, rownum rn from (select * from t order by last_ddl_time desc) t1 where rownum <= 1200) where rn >= 1190 ;
11 rows selected.
Execution Plan
Plan hash value: 882605040
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1200 | 62400 | 80 (2)| 00:00:01 |
|* 1 | VIEW | | 1200 | 62400 | 80 (2)| 00:00:01 |
|* 2 | COUNT STOPKEY | | | | | |
| 3 | VIEW | | 40617 | 1546K| 80 (2)| 00:00:01 |
|* 4 | SORT ORDER BY STOPKEY| | 40617 | 2062K| 80 (2)| 00:00:01 |
| 5 | TABLE ACCESS FULL | T | 40617 | 2062K| 80 (2)| 00:00:01 |
Predicate Information (identified by operation id):
1 - filter("RN">=1190)
2 - filter(ROWNUM<=1200)
4 - filter(ROWNUM<=1200)
Statistics
0 recursive calls
0 db block gets
343 consistent gets
0 physical reads
0 redo size
1063 bytes sent via SQL*Net to client
385 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
1 sorts (memory)
0 sorts (disk)
11 rows processed
SQL> select object_id, object_name, last_ddl_time from t, (select rid, rownum rn from (select rowid rid from t order by last_ddl_time desc) where rownum <= 1200) t1 where rn >= 1190 and t.rowid = t1.rid ;
11 rows selected.
Execution Plan
Plan hash value: 168880862
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1200 | 91200 | 179 (2)| 00:00:03 |
|* 1 | HASH JOIN | | 1200 | 91200 | 179 (2)| 00:00:03 |
|* 2 | VIEW | | 1200 | 30000 | 98 (0)| 00:00:02 |
|* 3 | COUNT STOPKEY | | | | | |
| 4 | VIEW | | 40617 | 475K| 98 (0)| 00:00:02 |
| 5 | INDEX FULL SCAN DESCENDING| T_IDX | 40617 | 793K| 98 (0)| 00:00:02 |
| 6 | TABLE ACCESS FULL | T | 40617 | 2022K| 80 (2)| 00:00:01 |
Predicate Information (identified by operation id):
1 - access("T".ROWID="T1"."RID")
2 - filter("RN">=1190)
3 - filter(ROWNUM<=1200)
Statistics
0 recursive calls
0 db block gets
349 consistent gets
0 physical reads
0 redo size
1063 bytes sent via SQL*Net to client
385 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
11 rows processed
SQL> select object_id, object_name, last_ddl_time from (select t1.*, rownum rn from (select * from t order by last_ddl_time desc) t1 where rownum <= 1200) where rn >= 1190 order by last_ddl_time desc ;
11 rows selected.
Execution Plan
Plan hash value: 882605040
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1200 | 62400 | 80 (2)| 00:00:01 |
|* 1 | VIEW | | 1200 | 62400 | 80 (2)| 00:00:01 |
|* 2 | COUNT STOPKEY | | | | | |
| 3 | VIEW | | 40617 | 1546K| 80 (2)| 00:00:01 |
|* 4 | SORT ORDER BY STOPKEY| | 40617 | 2062K| 80 (2)| 00:00:01 |
| 5 | TABLE ACCESS FULL | T | 40617 | 2062K| 80 (2)| 00:00:01 |
Predicate Information (identified by operation id):
1 - filter("RN">=1190)
2 - filter(ROWNUM<=1200)
4 - filter(ROWNUM<=1200)
Statistics
175 recursive calls
0 db block gets
388 consistent gets
0 physical reads
0 redo size
1063 bytes sent via SQL*Net to client
385 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
4 sorts (memory)
0 sorts (disk)
11 rows processed
SQL> set autotrace off
SQL> spool offAs you will see, the join query here has to have an ORDER BY clause at the end to ensure that records are correctly sorted. You can not rely on optimizer choosing NESTED LOOP join method and, as above example shows, when optimizer chooses HASH JOIN, oracle is free to return rows in no particular order.
The query that does not involve join always returns rows in the desired order. Adding an ORDER BY does add a step in the plan for the query using join but does not affect the other query. -
Hello there. As I have sought out a reasonable solution for paging nagivation and compared designs such as Google's search result paging to designs such as this forum's paging navigation, I have decided to go with this forum's design which I found somewhat better and more of a challenge. I did however, step it up a notch and attempt to improve it by acheiving a constant page group return size (with the exception of undersized page group lists and end groups that don't span the default page group size). This is one behaviour I noticed this forum's paging lacking. You can notice it when you are first starting your paging through the forum, the number of pages listed varies each time you page forward/backward until you reach a stable point deeper into the pages.
This paging utility, however, maintains a constant page group list size which may be preferred when looking to fit the navigator into a constrained area.
Anyhow, the following is a complete working example:
package web.util;
import java.util.ArrayList;
import java.util.List;
* @author javious
public class Pagination {
/** Creates a new instance of Pagination */
public Pagination() {
* @param totalItems is the total of all items to be paged.
* @param currentPage is a page from the returning list to be currently displayed.
* @param defaultCursorPosition (zero based) is the usual position within the
* returning list in which
* we want to display the current page. Should the current page be less than
* this position, then this parameter gets overridden with the page's position.
* Should the current page be greater than the final(of the last page group)
* page position minus the preferred page position, then this
* parameter gets overridden with the page's position.
* @return List of page numbers in relation to the supplied parameters.
public static List<Integer> getList(int totalItems,
int currentPage,
int resultPageSize,
int pageGroupSize,
int defaultCursorPosition)
List<Integer> pageList = new ArrayList<Integer>();
// first obtain the first item index of the absolute last page of
// all known records.
int finalPageItemStartIndex = (totalItems - totalItems % resultPageSize);
if(totalItems % resultPageSize == 0)
finalPageItemStartIndex-=resultPageSize;
// Now obtain the final page index
int finalPage = 0;
if(finalPageItemStartIndex > 0)
finalPage = 1+(int)Math.ceil((double)finalPageItemStartIndex/resultPageSize);
int offset = pageGroupSize;
if(currentPage > defaultCursorPosition)
offset -= defaultCursorPosition;
else
offset -= (int)Math.min(pageGroupSize, currentPage);
int endPage = Math.min(finalPage, currentPage + offset);
int startPage = 0;
if(currentPage > defaultCursorPosition && finalPage >= endPage)
startPage = Math.max(1,endPage - pageGroupSize + 1);
pageList.add(0);
for(int i=startPage;i<endPage;i++)
pageList.add(i);
return pageList;
}and the initial servlet
package web;
import java.io.*;
import java.net.*;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.*;
import javax.servlet.http.*;
import web.util.Pagination;
* @author javious
* @version
public class PaginationTest extends HttpServlet {
private static final int testItems[][] = {new int[210],
new int[133],
new int[7], // good test for within boundaries
new int[111],
new int[10], // good test of matching group size.
new int[20] // good test of divisible
static {
for(int i=0;i<testItems.length;i++)
for(int j=0;j<testItems.length;j++){
testItems[i][j] = (int)Math.ceil(Math.random()*10000);
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
int resultPageSize = 10;
int pageGroupSize = 10;
int defaultPageCursorPosition = 3;
response.setContentType("text/html;charset=UTF-8");
// add parent total so jsp can list links for them.
request.setAttribute("parentTotal", testItems.length);
String sParentIndx = request.getParameter("parentId");
String sCurrentPage = request.getParameter("itemPg");
int parentIndex = (sParentIndx != null ? Integer.parseInt(sParentIndx) : 0);
int currentPage = (sCurrentPage != null ? Integer.parseInt(sCurrentPage) : 0);
request.setAttribute("parentId", parentIndex);
request.setAttribute("itemPg", currentPage);
int targetItems[] = testItems[parentIndex];
int totalItems = targetItems.length;
int startIndex = currentPage*resultPageSize;
request.setAttribute("pageStart", startIndex+1);
int maxResultIndex = Math.min(totalItems, startIndex + resultPageSize);
List pageItems = new ArrayList();
for(int i=currentPage*resultPageSize;i<maxResultIndex;i++)
pageItems.add(targetItems[i]);
request.setAttribute("pageItems", pageItems);
// add totalPages so jsp can determine whether or not
// to show "previous" link
int totalPages = totalItems/resultPageSize; // 2 pages = 0 to 1
if(totalItems % resultPageSize > 0)
totalPages++;
request.setAttribute("totalPages", totalPages);
// add this so jsp can tell when to add "..."
request.setAttribute("defaultPageCursorPosition", defaultPageCursorPosition);
List pageList = Pagination.getList(totalItems, currentPage,
resultPageSize, pageGroupSize, defaultPageCursorPosition);
request.setAttribute("pageList", pageList);
request.getRequestDispatcher("pagination_test.jsp").forward(request,response);
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
public String getServletInfo() {
return "Short description";
and now for the nagivator portion of your JSP/JSTL
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%--
The taglib directive below imports the JSTL library. If you uncomment it,
you must also add the JSTL library to the project. The Add Library... action
on Libraries node in Projects view can be used to add the JSTL 1.1 library.
--%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
<STYLE type="text/css">
.pagingLink {text-decoration: none}
</STYLE>
</head>
<body>
<h1>Parent Lists</h1>
<c:forEach begin="0" end="${parentTotal-1}" var="indx" varStatus="loopStat">
<c:choose>
<c:when test="${parentId == indx}">
<b>${loopStat.count}</b>
</c:when>
<c:otherwise>
<a href="PaginationTest?parentId=${indx}">${loopStat.count}</a>
</c:otherwise>
</c:choose>
</c:forEach>
<h1>Items</h1>
<ol start="${pageStart}">
<c:forEach var="item" items="${pageItems}" varStatus="loopStat">
<li>${item}
</c:forEach>
</ol>
<table border="0" cellpadding="2" cellspacing="1">
<tr>
<c:if test="${itemPg-1 >= 0}">
<td><a class="pagingLink" href="PaginationTest?parentId=${parentId}&itemPg=${itemPg-1}"><<</a>
</td>
</c:if>
<%-- Loop through paging numbers list --%>
<c:forEach var="pg" items="${pageList}" varStatus="loopStat">
<c:if test="${!(loopStat.index eq 0 and loopStat.last)}">
<td>
<c:if test="${loopStat.count > 1}">
|
</c:if>
<c:choose>
<c:when test="${itemPg == pg}">
<b>${pg+1}</b>
</c:when>
<c:otherwise>
<a class="pagingLink" href="PaginationTest?parentId=${parentId}&itemPg=${pg}">${pg+1}</a>
<c:if test="${loopStat.count == 1 && itemPg > defaultPageCursorPosition}">...</c:if>
</c:otherwise>
</c:choose>
</td>
</c:if>
</c:forEach>
<c:if test="${itemPg+1 < totalPages}">
<td><a class="pagingLink" href="PaginationTest?parentId=${parentId}&itemPg=${itemPg+1}">>></a>
</td>
</c:if>
</tr>
</table>
</body>
</html>hi
I m giving a code for pagination. this is for displaying 5 records per page i think it may help ful to you
<html>
<body>
<link href="Stylesheet/style.css" rel="stylesheet" type="text/css">
<script language="javascript" src="TableSort.js">
</script>
<br>
<br>
<center><H2> Student Details </H2></center>
<%
int loop_var=Integer.parseInt(request.getParameter("i"));
Vector vecResults=new Vector();
// store the records in vector
vecResults=dataAccessLayer.readObjects("QueryToAllStudents");
String strSortable="sortable";
int rec=vecResults.size();
int i=0,roll_number;
HashMap hmRecord;
if (rec==0)
roll_number=1;
else
hmRecord = (HashMap)vecResults.elementAt(rec-1);
roll_number=Integer.parseInt((String )hmRecord.get("std_rno"))+1;
session.setAttribute("roll_number",roll_number+"");
if (rec==0)
out.println("There are no records in database please enter");
%>
<br>
Add  
<%
else
%>
<table border="1" width="70%" align="center" id="studentdetails" class=<%=strSortable%>>
<tr>
<th bgcolor="PINK" sort="true" align=center>Roll No</th>
<th bgcolor="PINK" sort="true" align=center>Name </th>
<th bgcolor="PINK" sort="true" align=center>Date Of Birth </th>
<th bgcolor="PINK" sort="true" align=center>Subject1 </th>
<th bgcolor="PINK" sort="true" align=center>Subject2 </th>
<th bgcolor="PINK" sort="true" align=center>Subject3 </th>
<th bgcolor="PINK" sort="true" align=center>Total </th>
<th bgcolor="PINK" sort="true" align=center>Modby </th>
</tr>
<%
String s;
while (i<5 && loop_var<rec)
hmRecord = (HashMap)vecResults.elementAt(loop_var);
s=((String )hmRecord.get("std_dob")).substring(1,10);
%>
<tr>
<td><center><%=hmRecord.get("std_rno")%></center></td>
<td><center><%=hmRecord.get("std_name")%></center></td>
<td><center><%=s%></center></td>
<td><center><%=hmRecord.get("std_sub1")%></center></td>
<td><center><%=hmRecord.get("std_sub2")%></center></td>
<td><center><%=hmRecord.get("std_sub3")%></center></td>
<td><center><%=hmRecord.get("std_tot")%></center></td>
<td><center><%=hmRecord.get("std_modby")%></center></td>
</tr>
<%
loop_var++;
i++;
%>
</table>
<center>
<br>
<br>
<%
if (loop_var>=11)
%>
<a href="List.jsp?i=<%=(((loop_var/5)*5)-5)%>">Prev  |</a>
<% }
else
%>
<a href="List.jsp?i=<%=0%>">Prev  |</a>
<% }
int j=1;
for (i=0;i<rec/5;i++,j++)
%>
<a href="List.jsp?i=<%=(i*5)%>"><%=j%> |</a>
<%
if (rec%5!=0)
%>
<a href="List.jsp?i=<%=(i*5)%>"><%=j%></a>
<%
if (loop_var<rec)
%>
<a href="List.jsp?i=<%=loop_var%>">|   Next</a>
<% }
else
if (rec%5==0)
%>
<a href="List.jsp?i=<%=(loop_var-5)%>">|   Next</a>
<% }
else
%>
<a href="List.jsp?i=<%=(loop_var-rec%5)%>">|   Next</a>
<%
%>
</center>
<br>
<br>
Add  
Edit / Delete  
List
<%
%>
</body>
</html> -
Using the example I found at http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf64a29-7fdb.html, I modified my Flex app to listen for keyboard shortcuts being pressed. It works but only after the user clicks on a blank spot on the web page. Why? This is for accessibility and if I make my blind users click using a mouse, it defeats the purpose... Is there a fix for this so that the keystrokes are detected without clicking on the page or am I doing something wrong?
Here is my code:
<?xml version="1.0" encoding="utf-8"?>
<s:Application
xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="
library://ns.adobe.com/flex/spark" xmlns:mx="
library://ns.adobe.com/flex/mx"creationComplete="init()"
minWidth="
955" minHeight="600">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<fx:Script source="BGBasicPlay.as" >
</fx:Script>
<fx:Script>
<![CDATA[
import mx.core.FlexGlobals;
protected function init():void {FlexGlobals.topLevelApplication.addEventListener(KeyboardEvent.KEY_DOWN,keysPressed);
// has to set focus then click to work!!!
protected function keysPressed(evt:KeyboardEvent):void {txtKeys.text = evt.keyCode +
"/" + evt.charCode;
var nKeyPressed:int = evt.keyCode;
if (nKeyPressed == 80 && evt.shiftKey == true){
PlaySong2();
else {
if (nKeyPressed == 80 && evt.shiftKey == false){
PlaySong();
]]>
</fx:Script>
<s:Button x="250" y="105" label="Play Song" id="btnPlay" />
<s:TextInput x="224" y="63" id="txtKeys"/></s:Application>After wading through over 100 posts, most were either unanswered or had general replies such as yours with no real useful information on how to do this.
The closest answer I found was this:
"This is a known bug of Flash Player/Mozilla browsers - SWF does not receive focus at start-up.
I am not aware about any suitable workaround available. The closest workaround is to place a button and allow user to click on it which will give SWF a focus.PS It works in IE without any problem. Good old MS "
That answer was posted in 2008. It is now 2011 and you would think that this would have a fix by now... especially with all of the pressure for accessibility. IE 8 apparently now has this problem as well.
So, instead of sending me on a wild goose chase, it would really have been more helpful to have received an actual answer from you. -
New to flex, need some help
Hello, I am a new user of Flex 4 and have recently gone thru the training courses available here (Flex in a week). I have been tasked with moving some of our firm's webpages that use jsp and spring to connect to a mysql database to a flex frontend.
I've been looking over the BlazeDS tutorial (http://www.adobe.com/devnet/flex/articles/spring_blazeds_testdrive.html) and it seems rather helpful, but I could use some help in how to make a connection to a mysql database on an external server-- where does the connection info go, user name, password, etc.
In a nutshell, the application I am to design would need to be able to go out to a database to first verify user credentials, then to upload csv files and store the data into a database, and finally allow users to retrieve the data in datagirds and display in basic bar charts. Thanks to the training, I have a good understanding on using the datagrid, but the connecting to an external database is where I'm having trouble.
Also, I have seen a flex webpage where data is displayed in a chart and the user can export the chart as a jpg or export the input data to a csv file. Is anyone familiar with this capability?
Thanks for your help-- I am excited to learn all there is to know about Flex!I would you should read the following link completely.
http://www.adobe.com/devnet/flex/articles/flex_hibernate.html
You need to create an Client/Server-application with 3-tiers client, application server (Java/Hibernate/Spring) and database server (MySQL for example).
Just buy a book over Flex and Java and read it. -
Problem with Multi File upload example, help needed
I got the code from the following location.....
http://www.adobe.com/devnet/coldfusion/articles/multifile_upload.html
And I've got it to work to some degree except I cant get the file transfer to work when pressing, Upload. Below is what my debugger outputs. Any thoughts on how to fix this or even what it means?
At the very bottom of this message is the upload.cfm code.......
Thanks in advance for the help
<html>
<head>
<title>Products - Error</title>
</head>
<body>
<h2>Sorry</h2>
<p>An error occurred when you requested this page.
Please email the Webmaster to report this error.
We will work to correct the problem and apologize
for the inconvenience.</p>
<table border=1>
<tr><td><b>Error Information</b> <br>
Date and time: 12/07/09 22:25:51 <br>
Page: <br>
Remote Address: 67.170.79.241 <br>
HTTP Referer: <br>
Details: ColdFusion cannot determine how to process the tag <CFDOCUMENT>. The tag name may be misspelled.<p>If you are using tags whose names begin with CF but are not ColdFusion tags you should contact Allaire Support. <p>The error occurred while processing an element with a general identifier of (CFDOCUMENT), occupying document position (41:4) to (41:70).<p>The specific sequence of files included or processed is:<code><br><strong>D:\hshome\edejham7\edeweb.com\MultiFileUpload\upload.cfm </strong></code><br>
<br>
</td></tr></table>
</body>
</html>
<!---
Flex Multi-File Upload Server Side File Handler
This file is where the upload action from the Flex Multi-File Upload UI points.
This is the handler the server side half of the upload process.
--->
<cftry>
<!---
Because flash uploads all files with a binary mime type ("application/ocet-stream") we cannot set cffile to accept specfic mime types.
The workaround is to check the file type after it arrives on the server and if it is non desireable delete it.
--->
<cffile action="upload"
filefield="filedata"
destination="#ExpandPath('\')#MultiFileUpload\uploadedfiles\"
nameconflict="makeunique"
accept="application/octet-stream"/>
<!--- Begin checking the file extension of uploaded files --->
<cfset acceptedFileExtensions = "jpg,jpeg,gif,png,pdf,flv,txt,doc,rtf"/>
<cfset filecheck = listFindNoCase(acceptedFileExtensions,File.ServerFileExt)/>
<!---
If the variable filecheck equals false delete the uploaded file immediatley as it does not match the desired file types
--->
<cfif filecheck eq false>
<cffile action="delete" file="#ExpandPath('\')#MultiFileUpload\uploadedfiles\#File.ServerFile#"/>
</cfif>
<!---
Should any error occur output a pdf with all the details.
It is difficult to debug an error from this file because no debug information is
diplayed on page as its called from within the Flash UI. If your files are not uploading check
to see if an errordebug.pdf has been generated.
--->
<cfcatch type="any">
<cfdocument format="PDF" overwrite="yes" filename="errordebug.pdf">
<cfdump var="#cfcatch#"/>
</cfdocument>
</cfcatch>
</cftry>Just 2 things in my test:
1) I use no accept attribute. Coldfusion is then free to upload any extenstion.
Restricting the type to application/octet-stream may generate errors. Also, it is unnecessary, because we perform a type check anyway.
2) I have used #ExpandPath('.')#\ in place of #ExpandPath('\')#
<cfif isdefined("form.filedata")>
<cftry>
<cffile action="upload"
filefield="filedata"
destination="#expandPath('.')#\MultiFileUpload\uploadedfiles\"
nameconflict="makeunique">
<!--- Begin checking the file extension of uploaded files --->
<cfset acceptedFileExtensions = "jpg,jpeg,gif,png,pdf,flv,txt,doc,rtf"/>
<cfset filecheck = listFindNoCase(acceptedFileExtensions,File.ServerFileExt)/>
<!---
If the variable filecheck equals false delete the uploaded file immediatley as it does not match the desired file types
--->
<cfif filecheck eq false>
<cffile action="delete" file="#ExpandPath('.')#\MultiFileUpload\uploadedfiles\#File.ServerFile#"/>
<cfoutput>Uploaded file deleted -- unacceptable extension (#ucase(File.ServerFileExt)#)</cfoutput>.<br>
</cfif>
Upload process done!
<cfcatch type="any">
There was an error!
<cfdocument format="PDF" overwrite="yes" filename="errordebug.pdf">
<cfdump var="#cfcatch#"/>
</cfdocument>
</cfcatch>
</cftry>
<cfelse>
<form method="post" action=<cfoutput>#cgi.script_name#</cfoutput>
name="uploadForm" enctype="multipart/form-data">
<input name="filedata" type="file">
<br>
<input name="submit" type="submit" value="Upload File">
</form>
</cfif> -
Pagination problem, help needed to finish it
Hi friends,
I am in need to use pagination in my Web Application, since i have a tons of values to display as a report. I develop a pagination logic, tested it seperately and it works fine.When i try to implement it to current project it works, but no result was displayed as it displayed in testing..
Here is the file i tested seperately..
<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
<%@ page import="com.rajk.javacode.servlets.dbmodel"%>
<%
int count=0;
int userid = 0;
String g = null;
dbmodel db=new dbmodel();
Statement ps = null;
ResultSet rs = null;
db.connect();
String SQL = "select * from tbl_rmadetails";
ps=db.con.createStatement();
rs=ps.executeQuery(SQL);
rs.last();
count= rs.getRow();
rs.beforeFirst();
int currentrs;
int pagecount=(count/2);
if((pagecount*2)+1>=count)
pagecount++;
out.println("<table width=363 height=20 align=center border=0 cellpadding=0 cellspacing=0><tr><td>");
for(int i=1;i<pagecount;i++)
out.println("<font face=verdana size=1><a href=pagination.jsp?pagenum="+ i +"&userid="+ userid +">["+ i +"]</a></font>");
String pagenum=request.getParameter("pagenum");
if(pagenum==null)
out.println("<br><strong><font face=verdana size=1 color=white>Page 1 of " + (pagecount-1) +"</font></strong>");
currentrs=0;
else
out.println("<br><strong><font face=verdana size=1 color=white>Page " + pagenum + " of " + (pagecount-1) + "</font></strong>");
pagecount=Integer.parseInt(pagenum);
currentrs=(2*(pagecount-1));
out.println("</td></tr></table>");
//messageboard
String sql="select * from tbl_rmadetails order by date LIMIT " + currentrs + ",2";
rs=ps.executeQuery(sql);
while(rs.next())
%>
<br>
<table width="363" height="64" border="1" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
</td>
<td width="126" height="19" align="center" valign="top"><font face="verdana" size="1"><strong><%=rs.getString("serial_no")%></strong></font></td>
<td width="126" height="19" align="center" valign="top"><font face="verdana" size="1"><strong><%=rs.getString("status")%></strong></font></td>
</tr>
</table></td>
</tr>
</table>
<%
rs.close();
%> And here is the file in which i want to implement the pagination..
<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
<%@ page import="com.rajk.javacode.servlets.dbmodel"%>
<%
int x1=0;
int userid = 0;
int count = 0;
String raj=request.getParameter("q");
String temp=null;
String SQL = null;
String SQLX = null;
int currentrs;
try
dbmodel db=new dbmodel();
Statement ps = null;
ResultSet rs = null;
db.connect();
if(raj.equals("All Vendor"))
SQL = "SELECT * FROM tbl_rmadetails,tbl_customer,tbl_item,tbl_vendor WHERE tbl_rmadetails.customer_id=tbl_customer.customer_id AND tbl_rmadetails.item_id=tbl_item.item_id AND tbl_rmadetails.vendor_id=tbl_vendor.vendor_id AND tbl_rmadetails.status='STS'";
else
SQL = "SELECT * FROM tbl_rmadetails,tbl_customer,tbl_item,tbl_vendor WHERE tbl_rmadetails.customer_id=tbl_customer.customer_id AND tbl_rmadetails.item_id=tbl_item.item_id AND tbl_rmadetails.status='STS' AND tbl_rmadetails.vendor_id=tbl_vendor.vendor_id AND tbl_rmadetails.vendor_id='"+raj+"'";
ps=db.con.createStatement();
rs=ps.executeQuery(SQL);
rs.last();
count= rs.getRow();
rs.beforeFirst();
rs.close();
int pagecount=(count/6)+1;
if((pagecount*6)+1>=count)
pagecount++;
//out.print(count);
%>
<%
for(int i=1;i<pagecount;i++)
out.println("<font face=verdana size=1><a href=http://localhost:8080/rmanew/sendtovendor.jsp?pagenum="+ i +"&userid="+ userid +">["+ i +"]</a></font>");
String pagenum=request.getParameter("pagenum");
if(pagenum==null)
out.println("<br><strong><font face=verdana size=1 color=white>Page 1 of " + (pagecount-1) +"</font></strong>");
currentrs=0;
else
out.println("<br><strong><font face=verdana size=1 color=white>Page " + pagenum + " of " + (pagecount-1) + "</font></strong>");
pagecount=Integer.parseInt(pagenum);
currentrs=(6*(pagecount-1));
if(raj.equals("All Vendor"))
SQLX = "SELECT * FROM tbl_rmadetails,tbl_customer,tbl_item,tbl_vendor WHERE tbl_rmadetails.customer_id=tbl_customer.customer_id AND tbl_rmadetails.item_id=tbl_item.item_id AND tbl_rmadetails.vendor_id=tbl_vendor.vendor_id AND tbl_rmadetails.status='STS' LIMIT"+currentrs+",6";
else
SQLX = "SELECT * FROM tbl_rmadetails,tbl_customer,tbl_item,tbl_vendor WHERE tbl_rmadetails.customer_id=tbl_customer.customer_id AND tbl_rmadetails.item_id=tbl_item.item_id AND tbl_rmadetails.status='STS' AND tbl_rmadetails.vendor_id=tbl_vendor.vendor_id AND tbl_rmadetails.vendor_id='"+raj+"' LIMIT"+currentrs+",6";
rs=ps.executeQuery(SQLX);
if(rs!=null)
while(rs.next())
%>
<link rel="stylesheet" type="text/css" href="chromejs/stvcss.css" />
<table width="100%" border="0">
<tr bgcolor="#0066CC">
<td align="center"><span class="style2">Date</span></td>
<td align="center" class="style2">Product Details</td>
<td align="center" class="style2">Serial No</td>
<td align="center" class="style2">Fault Desc</td>
<td align="center" class="style2">Customer Name</td>
<td align="center" class="style2">Vendor Name</td>
<tr>
<tr bgcolor="#CCCCCC">
<td align="center"><%=rs.getDate("date")%></td>
<td align="center"><%=rs.getString("item_description")%></td>
<td align="center"><%=rs.getString("serial_no")%></td>
<td align="center"><%=rs.getString("fault_desc")%></td>
<td align="center"><%=rs.getString("customer_name")%></td>
<td align="center"><%=rs.getString("vendor_name")%></td>
</tr>
</table>
<%
else
out.println("Result Set is empty");
catch(Exception e)
System.out.println("Error: " + e);
response.setContentType("text/xml");
response.setHeader("Cache-Control", "no-cache");
%>The output i got when i ran this page is..
[1]
And no records displayed matching the query, but there is a lot of datas in DB as a result of the queries i mentioned here..
Please help me friends...Debug your code. Check what happens and what happens not.
You could make it much easier if you wrote Java code in Java classes rather than JSP files. Now it's one big heap of mingled -and thus hard to maintain/test/reuse- code. -
A MVC datatable with dropdown filtering per column search with pagination example?
Hello All,
Just starting out a big project with MVC 3 and I've been searching for a while for any step by step example of creatintg a dynamic/ajax datatable that has real time filtering of the result set via dropdowns for mvc? Is there a ready made solution already
available for the MVC framework?
Thanks,Hello,
Thank you for your post.
Glad to see this issue has been resolved and thank you for sharing your solutions & experience here. It will be very beneficial for other community members who have similar questions.
Your issue is out of support range of VS General Question forum which mainly discusses
WPF & SL designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System
and Visual Studio Editor.
If you have issues about ASP.NET MVC app in the future, I suggest that you can consult your issue on ASP.NET forum:
http://forums.asp.net/
for better solution and support.
Best regards,
Amanda Zhu [MSFT]
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help. -
Flex upload problem - Help!
Hi. I've got a JSP page that works fine when I upload a file
to it from another JSP page, using simple Browse and Submit
buttons. I've deployed the Flex 3 SWF to the same folder as the JSP
page and am trying to upload a file from the Flex app and keep
getting this error:
Error #2044: Unhandled IOErrorEvent:. text=Error #2038: File
I/O Error.
at
TV_Schedule()[C:\flexTest\_workspace\TV_Schedule\src\TV_Schedule.mxml:9]
at _TV_Schedule_mx_managers_SystemManager/create()
at
mx.managers::SystemManager/initializeTopLevelWindow()[E:\dev\3.0.x\frameworks\projects\fr amework\src\mx\managers\SystemManager.as:2438]
at mx.managers::SystemManager/
http://www.adobe.com/2006/flex/mx/internal::docFrameHandler()[E:\dev\3.0.x\frameworks\proj ects\framework\src\mx\managers\SystemManager.as:2330
On the Tomcat server's error log, it has the following,
[Fri Aug 22 12:16:19 2008] [error] [client xxx.xxx.xx.xxx]
mod_security: Access denied with code 403.
Error processing request body: Multipart: final boundary
missing [hostname "myhost.mydomain.org"] [uri
"/myfolder/upload.jsp"]
I've read that if we put the following in an .htaccess file
in the root, it will get rid of the problem,
SecFilterEngine Off
SecFilterScanPOST Off
However, this opens us up to all kinds of attacks. I've read
that the "Multipart: final boundary missing" is a known issue. Is
this true? Are there documents on this? Will the next version of
Flex fix this?Adobe Newsbot hopes that the following resources helps you.
NewsBot is experimental and any feedback (reply to this post) on
its utility will be appreciated:
All Classes (Flex 3):
mx.automation, The Flex automation framework uses the
AutomationID class to ..... The FileReference class provides a
means to upload and download files
Link:
http://livedocs.adobe.com/flex/3/langref/class-summary.html
Flex cookbook beta - Uploading files from Flex using PHP:
Flex cookbook beta - Code a control so that end users can
upload a file ... text=Error #2038: File I/O Error. And the
permissions for the folder are 777 so
Link:
http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&postId=5241&produ ctId=2
F (Flex 3):
The FileReference class provides a means to upload and
download files ...... handle error messages, and bind your form
data to the Flex data model to
Link:
http://livedocs.adobe.com/flex/3/langref/all-index-F.html
Flex Solutions:
MORE FLEX FRAMEWORK LIBRARIES AND UTILITIES. 709. 12.
Excerpted from Flex Solutions, .... invoked if an error occurs in
the upload phase of the file:
Link:
http://www.adobe.com/devnet/flex/articles/upload_files/uploading_files_to_the_server.pdf
[#FP-292] uploading of files: io error 2038 on Apache - app
ok on:
Actual Results: Expected Results: Upload file Workaround (if
any): ... This error is also seen when using Flex 3 and has been
pending for a really long time
Link:
http://bugs.adobe.com/jira/browse/FP-292
Disclaimer: This response is generated automatically by the
Adobe NewsBot based on Adobe
Community
Engine. -
Flex with Red5 Help.....
Hi everybody.... I need information about using Red5 with
Flex.... Im newbie about it. Does anybody know about tutorials or
something that it can help me....I guess you can find some information at http://www.red5chat.com
-
I think I have gotten around the javai.dll problem by starting weblogic
server from the setenv.cmd and startWeblogic.cmd. Is this right?
I am trying to get the example appps to work but tehy won't. It keeps
telling me the classes are not found. I have set JAVA_HOME to c:\jdk1.3 and
I am using v.5.1. I have gone through the "Setting Your Development
Environment" helpfile and none of that has seemed to help me. I am running
this on NT server sp6. Can anyone point me in the right direction?"Jesse E Tilly" <[email protected]> wrote in message
news:[email protected]..
>
But, to your problem. Things I would like to know include which JRE's are
installed and which one was the last installed. I'd also like to knowyour
system PATH (another thing configurable in a script, and thus easily
changed or debugged). Here are the things I'll be looking for: multiple
JRE's in the path, JRE registry confusion.WL_HOME is set as c:\weblogic
JAVA_HOME is set as c:\jdk1.3
PATH is set as %WL_HOME%\bin;%JAVA_HOME%:PATH
So after running setenv.cmd my PATH is
c:\weblogic\bin;c:\jdk1.3\bin;c:\WINNT\system32;c:\WINNT;c:\programfiles\MTS
;e:\MSSQL7\bin
e is my other drive
You can try this for kicks. Uninstall WebLogic and your JDK/JREs (JDK's
include JREs). Install JDK 1.2.2 and WebLogic. (Make no properties
changes) Start WebLogic from the Start menu and open a browser. Go to
http://localhost:7001/session (one of the example servlets already
installed and registered). This should work. If not either my memory
about the base install is off (unlikely) or you have a registry conflict
(previous installation of WebLogic, JDK, etc). Search the machine for
javai.dll and see what you find.I have never been able to find Javai.dll, before or after changing JAVA_HOME
which is what starts the problem.
When I run the localhost URL it works fine(thanks) but none of the examples
do. What could I be setting incorrectly for the Development environment?
Thanks for your help
Maybe you are looking for
-
New Quicktime 7.1 - What are the changes exactly? I am looking...
May 11, 2006 - QuickTime 7.1 is an important release that delivers numerous bug fixes, support for iLife ’06, and H.264 performance improvements. This update is highly recommended for all QuickTime 7 users. Thanks to Karl Peterson: What’s new in Quic
-
Sap 4.6c installation sapdb 7.2.5 win error
Hello all. I have installed one sap 4.6c installation sapdb 7.2.5 win. When I try to install another one such system on the same server I get such error: INFO 2008-10-22 14:36:03 SAPDBINSTALL_NT_ADA SyCoprocessCreate:931 Creating coprocess D:\Dis
-
How to bring the browser window from background/minimized to on top of all windows in Flex
Hi I have the requireemnt where based on some condition I am opening a JSP in a new window by calling navigateToURL(myFormData, _MYWINDOW); Calling this will open a new browser window. My requirement is when the new window if minimized or behind ot
-
Page cannot run normally on EBS 11i
I developed an OAF page and it is used to search data and insert data into base table for those records user checked the checkbox. I run this page per my JDeveloper 9i and debug it. The page runs well and the data are inserted into base table success
-
Best way to increase wifi range
I am accessing a router that is a good distance away ~50feet or so. I've never had a big problem with conectivity in the past, but recently I'm lucky just to connect. I'm wondering if there is a good way to boost the chip strength in the computer or