Re: [5.3.6] GridDataSource provided row index to getRowValue(int)

2012-12-16 Thread Dmitry Gusev
No, they're not the same: index 9 startIndex 9 rowsPerPage 5 index-startIndex 0 index%rowsPerPage 4 On Mon, Dec 17, 2012 at 4:17 AM, Muhammad Gelbana wrote: > I did, they are the same. Although modulating tolerates a glitch I'm trying > to understand why is it happening. I have 20 rows per p

Re: Best way to prevent page to be accessed without context?

2012-12-16 Thread Dmitry Gusev
Yes, this is correct. On Sun, Dec 16, 2012 at 10:34 PM, bhorvat wrote: > Dmitry Gusev wrote > > +1 for HTTP 404. > > > > But you don't have to use StreamResponse for that, just return new > > org.apache.tapestry5.services.HttpError(404, "Page Not Found"); from > > onActivate. > > I really like t

[5.3.6] Grid JS erorr: cannot call method 'getStorage' of null at $T

2012-12-16 Thread Muhammad Gelbana
I'm testing my my grid if it's operating well but rarely, a JS error rises on the client side, nothing is thrown on the server side though. The error indication is attached as a screenshot. All I do is jumping through the grid's pages randomly. To make sure the custom grid data source works fine. T

Re: [5.3.6] GridDataSource provided row index to getRowValue(int)

2012-12-16 Thread Muhammad Gelbana
I did, they are the same. Although modulating tolerates a glitch I'm trying to understand why is it happening. I have 20 rows per page. The thing is that, sometimes, the passed index to the getRowValue method is like 0, while the startindex is 20 ! On Mon, Dec 17, 2012 at 12:00 AM, Geoff Callender

Re: [5.3.6] GridDataSource provided row index to getRowValue(int)

2012-12-16 Thread Geoff Callender
On 17/12/2012, at 3:10 AM, Muhammad Gelbana wrote: > Marvelous ! You deserve a medal or something :D > Although I know "jumpstart" is a very resourceful project for tapestry > beginners including me, I don't why I keep forgetting about it ! May be I > should have it as my homepage instead of googl

Re: [5.3.6] Listening to native tapestry ajax events

2012-12-16 Thread Geoff Callender
Sorry, I shouldn't have suggested subclassing. The preferred way to extend and/or override a Tapestry component's functionality is to "wrap" it. If you can't achieve what you want with wrapping then maybe create your own component by copying DateField? It might not be much work. As for your las

Re: Best way to prevent page to be accessed without context?

2012-12-16 Thread bhorvat
Dmitry Gusev wrote > +1 for HTTP 404. > > But you don't have to use StreamResponse for that, just return new > org.apache.tapestry5.services.HttpError(404, "Page Not Found"); from > onActivate. I really like this solution. Thanks Now my web.xml looks like this app org

Re: Best way to prevent page to be accessed without context?

2012-12-16 Thread Dmitry Gusev
+1 for HTTP 404. But you don't have to use StreamResponse for that, just return new org.apache.tapestry5.services.HttpError(404, "Page Not Found"); from onActivate. Note: If you deploy your app on tomcat, you should also add ERROR dispatcher to the tapestry filter mapping in web.xml (if you don't

Re: Best way to prevent page to be accessed without context?

2012-12-16 Thread trsvax
Maybe, but they could come from anywhere including just typing in the URL (ie no where). The only way that might work sometimes is get the referring URL from the request and send them back there. You could also return a 404 "Page not found" with a StreamResponse and that might make the most sense.

Re: [5.3.6] Listening to native tapestry ajax events

2012-12-16 Thread Muhammad Gelbana
I should try extedning the datefield component but I have a question, is it just about my component class "extending" tapestry's component class and that's it ? No other wiring needed ? Just a plain java "extends" and referring to my component instead ? A question to the developers, why isn't tap

Re: [5.3.6] GridDataSource provided row index to getRowValue(int)

2012-12-16 Thread Muhammad Gelbana
Marvelous ! You deserve a medal or something :D Although I know "jumpstart" is a very resourceful project for tapestry beginners including me, I don't why I keep forgetting about it ! May be I should have it as my homepage instead of google ehehe About the getRowValue(int) method: preparedResults

Re: [5.3.6] GridDataSource provided row index to getRowValue(int)

2012-12-16 Thread Geoff Callender
Newly added: a working example using GridDataSource here: http://jumpstart.doublenegative.com.au/jumpstart/examples/tables/griddatasources Cheers, Geoff On 15/12/2012, at 2:46 AM, Lance Java wrote: > Basically, the prepare() method is used to fetch the rows between startIndex > and