Re: Configuration.addPackage(...)
On Thu, 16 Jan 2014 03:21:53 -0200, nhhockeyplayer nashua nhhockeypla...@hotmail.com wrote: I know this might be the wrong board. So why did you still post the message? You're just polluting the mailing list with off-topic stuff in this thread. But the hibernate support in tapestry is relevent. What you've posted isn't related to Hibernate support in Tapestry at all. It's just about Hibernate. -- Thiago H. de Paula Figueiredo Tapestry, Java and Hibernate consultant and developer http://machina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: redirect from render phase
On Thu, 16 Jan 2014 05:49:09 -0200, Andrey andreus...@gmail.com wrote: Hello! Hi! We are in need of redirect from render phase. Reasons are: we cannot fetch all required data in onActivate method of page, because onActivate is called for page even for component events inside page. So we load data in setupRender. But there can be problems like data not found, service unavailable etc. You don't need to load data in setupRender or onActivate() in most cases. Suppose you're using Grid to list some data fetched from a database. Instead of @Property private ListUser data; void setupRender() { data = someMethodThatReturnsYourData(); } and a template like this: table t:type=Grid t:source=data/, you can keep the template and fetch the data in a getter: // this annotation guarantees the method body will be actually called only once per // request, even if the method is called many times in the same request @Cached public ListUser getData() { return someMethodThatReturnsYourData(); } In onActivate(), or any other method, you can check whether it's a page request or not: @Inject private Request request; @Inject private ComponentEventLinkEncoder componentEventLinkEncoder; boolean pageRequest = componentEventLinkEncoder.decodePageRenderRequest(request) != null; Is there any correct way in tapestry to redirect during render? No. -- Thiago H. de Paula Figueiredo Tapestry, Java and Hibernate consultant and developer http://machina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Is Zone.getBody() obsolete?
Yes, but my question is whether there is any downside to using AjaxResponseRenderer#addRender(zone), instead of Zone.getBody(), for single-zone updates? On 14/01/2014, at 11:06 PM, Lance Java wrote: Returning zone.getBody() from a component event is still perfectly valid. On 14 Jan 2014 11:41, Geoff Callender geoff.callender.jumpst...@gmail.com wrote: Is there any downside to using AjaxResponseRenderer#addRender(zone) for single-zone updates instead of Zone.getBody()? Can I treat Zone.getBody() as deprecated? Cheers, Geoff - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: redirect from render phase
This may help: http://jumpstart.doublenegative.com.au/jumpstart/examples/infrastructure/handlingabadcontext/1 Geoff On 16/01/2014, at 6:49 PM, Andrey wrote: Hello! We are in need of redirect from render phase. Reasons are: we cannot fetch all required data in onActivate method of page, because onActivate is called for page even for component events inside page. So we load data in setupRender. But there can be problems like data not found, service unavailable etc. To solve this we've made our own RedirectException, and exception handler that catches it and performs redirect. The last problem we have is spam in logs, that goes from RenderQueueImpl class. Is there any correct way in tapestry to redirect during render? With best regards, Andrey. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
RE: what happened to HibernateCoreMessages in T5.4 ?
so do I just throw this out ? logger.info(HibernateCore.startupTiming(configurationComplete - startTime, factoryCreated - startTime)); logger.info(HibernateCore.entityCatalog(sessionFactory.getAllClassMetadata().keySet()));
Re: Is Zone.getBody() obsolete?
On Thu, 16 Jan 2014 09:15:52 -0200, Geoff Callender geoff.callender.jumpst...@gmail.com wrote: Yes, but my question is whether there is any downside to using AjaxResponseRenderer#addRender(zone), instead of Zone.getBody(), for single-zone updates? I cannot check the code right now, but my guess is that both forms end up being treated by the same Tapestry code in the end, so it doesn't matter which one you use. -- Thiago H. de Paula Figueiredo Tapestry, Java and Hibernate consultant and developer http://machina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: redirect from render phase
Finally we've solved spam problem (but my collegues are not very happy with this entire approach): we use log4j matcher to skip error log message from RenderQueueImpl, and log it if needed in our exception handler. p.s. getters do not help, because they will throw exceptions too when data unavailable. page request check looks better but, imho, code would become much harder to understand and support. 2014/1/16 Thiago H de Paula Figueiredo thiag...@gmail.com On Thu, 16 Jan 2014 05:49:09 -0200, Andrey andreus...@gmail.com wrote: Hello! Hi! We are in need of redirect from render phase. Reasons are: we cannot fetch all required data in onActivate method of page, because onActivate is called for page even for component events inside page. So we load data in setupRender. But there can be problems like data not found, service unavailable etc. You don't need to load data in setupRender or onActivate() in most cases. Suppose you're using Grid to list some data fetched from a database. Instead of @Property private ListUser data; void setupRender() { data = someMethodThatReturnsYourData(); } and a template like this: table t:type=Grid t:source=data/, you can keep the template and fetch the data in a getter: // this annotation guarantees the method body will be actually called only once per // request, even if the method is called many times in the same request @Cached public ListUser getData() { return someMethodThatReturnsYourData(); } In onActivate(), or any other method, you can check whether it's a page request or not: @Inject private Request request; @Inject private ComponentEventLinkEncoder componentEventLinkEncoder; boolean pageRequest = componentEventLinkEncoder.decodePageRenderRequest(request) != null; Is there any correct way in tapestry to redirect during render? No. -- Thiago H. de Paula Figueiredo Tapestry, Java and Hibernate consultant and developer http://machina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- откланиваюсь, Андрюха
Re: redirect from render phase
On Thu, 16 Jan 2014 10:41:55 -0200, Andrey andreus...@gmail.com wrote: Finally we've solved spam problem (but my collegues are not very happy with this entire approach): we use log4j matcher to skip error log message from RenderQueueImpl, and log it if needed in our exception handler. p.s. getters do not help, because they will throw exceptions too when data unavailable. Then this is normal exception handling. -- Thiago H. de Paula Figueiredo Tapestry, Java and Hibernate consultant and developer http://machina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: redirect from render phase
But in addition our exception handler extracts redirect destination from our custom exception and performs redirect. 16.01.2014 17:08 пользователь Thiago H de Paula Figueiredo thiag...@gmail.com написал: On Thu, 16 Jan 2014 10:41:55 -0200, Andrey andreus...@gmail.com wrote: Finally we've solved spam problem (but my collegues are not very happy with this entire approach): we use log4j matcher to skip error log message from RenderQueueImpl, and log it if needed in our exception handler. p.s. getters do not help, because they will throw exceptions too when data unavailable. Then this is normal exception handling. -- Thiago H. de Paula Figueiredo Tapestry, Java and Hibernate consultant and developer http://machina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
How to use grid with large data sets.
Hello, I'm wondering how to use the grid component with large data sets. Currently the grid is grabbing the entire data set rather than a sub set. How do I pass back the current page and row count as well as the sorts? Can this be done with the grid component, or would I need to builds something custom with a loop? -- George Christman www.CarDaddy.com P.O. Box 735 Johnstown, New York
Re: How to use grid with large data sets.
Hello, did you try to set the datasource parameter http://tapestry.apache.org/5.3/apidocs/org/apache/tapestry5/grid/GridDataSource.html have a look at this great sample http://jumpstart.doublenegative.com.au/jumpstart/examples/tables/griddatasources Also http://packtlib.packtpub.com/library/9781847193070/ch05lvl1sec04 François 2014/1/16 George Christman gchrist...@cardaddy.com Hello, I'm wondering how to use the grid component with large data sets. Currently the grid is grabbing the entire data set rather than a sub set. How do I pass back the current page and row count as well as the sorts? Can this be done with the grid component, or would I need to builds something custom with a loop? -- George Christman www.CarDaddy.com P.O. Box 735 Johnstown, New York
Re: How to use grid with large data sets.
On Thu, 16 Jan 2014 14:34:17 -0200, George Christman gchrist...@cardaddy.com wrote: Hello, I'm wondering how to use the grid component with large data sets. Implement a GridDataSource and pass it to the source parameter of Grid instead of a List. If you're using tapestry-hibernate, there's HibernateGridDataSource ready to be used. If you're using something else, check the class source for inspiration. Currently the grid is grabbing the entire data set rather than a sub set. Actually, your code is grabbing the entire data set, not Grid. -- Thiago H. de Paula Figueiredo Tapestry, Java and Hibernate consultant and developer http://machina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
VS: How to use grid with large data sets.
Hi, here is one example: http://jumpstart.doublenegative.com.au/jumpstart7/examples/tables/griddataso urces Ville -Alkuperäinen viesti- Lähettäjä: George Christman [mailto:gchrist...@cardaddy.com] Lähetetty: 16. tammikuuta 2014 18:34 Vastaanottaja: Tapestry users Aihe: How to use grid with large data sets. Hello, I'm wondering how to use the grid component with large data sets. Currently the grid is grabbing the entire data set rather than a sub set. How do I pass back the current page and row count as well as the sorts? Can this be done with the grid component, or would I need to builds something custom with a loop? -- George Christman www.CarDaddy.com P.O. Box 735 Johnstown, New York - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: How to use grid with large data sets.
I guys, thanks for the help, I'm using hibernate-search with lucene. On Thu, Jan 16, 2014 at 12:10 PM, Ville Virtanen ville.virta...@orientimport.fi wrote: Hi, here is one example: http://jumpstart.doublenegative.com.au/jumpstart7/examples/tables/griddataso urces Ville -Alkuperäinen viesti- Lähettäjä: George Christman [mailto:gchrist...@cardaddy.com] Lähetetty: 16. tammikuuta 2014 18:34 Vastaanottaja: Tapestry users Aihe: How to use grid with large data sets. Hello, I'm wondering how to use the grid component with large data sets. Currently the grid is grabbing the entire data set rather than a sub set. How do I pass back the current page and row count as well as the sorts? Can this be done with the grid component, or would I need to builds something custom with a loop? -- George Christman www.CarDaddy.com P.O. Box 735 Johnstown, New York - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- George Christman www.CarDaddy.com P.O. Box 735 Johnstown, New York
Re: How to use grid with large data sets.
So I'm playing with the GridDateSource and was wondering how you are suppose to get the filtered result count for availableRows()? With hibernate search you get this count after the results have been filtered, but the way the methods are called in GridDataSource, the availableRows method is called before prepare. The next question is how do you get your filters back to GridDataSouce prepare? I'm wondering if I'm going about this the right way. Example I'm working from http://jumpstart.doublenegative.com.au/jumpstart/examples/tables/griddatasources On Thu, Jan 16, 2014 at 12:26 PM, George Christman gchrist...@cardaddy.comwrote: I guys, thanks for the help, I'm using hibernate-search with lucene. On Thu, Jan 16, 2014 at 12:10 PM, Ville Virtanen ville.virta...@orientimport.fi wrote: Hi, here is one example: http://jumpstart.doublenegative.com.au/jumpstart7/examples/tables/griddataso urces Ville -Alkuperäinen viesti- Lähettäjä: George Christman [mailto:gchrist...@cardaddy.com] Lähetetty: 16. tammikuuta 2014 18:34 Vastaanottaja: Tapestry users Aihe: How to use grid with large data sets. Hello, I'm wondering how to use the grid component with large data sets. Currently the grid is grabbing the entire data set rather than a sub set. How do I pass back the current page and row count as well as the sorts? Can this be done with the grid component, or would I need to builds something custom with a loop? -- George Christman www.CarDaddy.com P.O. Box 735 Johnstown, New York - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- George Christman www.CarDaddy.com P.O. Box 735 Johnstown, New York -- George Christman www.CarDaddy.com P.O. Box 735 Johnstown, New York
Re: How to use grid with large data sets.
I found the following documentation http://wiki.apache.org/tapestry/Tapestry5HibernateGridDatasource2 However I'm still a little confused, I'm seeing two queries needed to get this to work, one containing the filtered results to get the availableRow count and the second one to get the prepare filtered result set containing startindex / endindex for get getRowValue(); With my hibernate search service, I'm able to get everything in a single query, is there anyway to do this in a single query? On Thu, Jan 16, 2014 at 2:48 PM, George Christman gchrist...@cardaddy.comwrote: So I'm playing with the GridDateSource and was wondering how you are suppose to get the filtered result count for availableRows()? With hibernate search you get this count after the results have been filtered, but the way the methods are called in GridDataSource, the availableRows method is called before prepare. The next question is how do you get your filters back to GridDataSouce prepare? I'm wondering if I'm going about this the right way. Example I'm working from http://jumpstart.doublenegative.com.au/jumpstart/examples/tables/griddatasources On Thu, Jan 16, 2014 at 12:26 PM, George Christman gchrist...@cardaddy.com wrote: I guys, thanks for the help, I'm using hibernate-search with lucene. On Thu, Jan 16, 2014 at 12:10 PM, Ville Virtanen ville.virta...@orientimport.fi wrote: Hi, here is one example: http://jumpstart.doublenegative.com.au/jumpstart7/examples/tables/griddataso urces Ville -Alkuperäinen viesti- Lähettäjä: George Christman [mailto:gchrist...@cardaddy.com] Lähetetty: 16. tammikuuta 2014 18:34 Vastaanottaja: Tapestry users Aihe: How to use grid with large data sets. Hello, I'm wondering how to use the grid component with large data sets. Currently the grid is grabbing the entire data set rather than a sub set. How do I pass back the current page and row count as well as the sorts? Can this be done with the grid component, or would I need to builds something custom with a loop? -- George Christman www.CarDaddy.com P.O. Box 735 Johnstown, New York - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- George Christman www.CarDaddy.com P.O. Box 735 Johnstown, New York -- George Christman www.CarDaddy.com P.O. Box 735 Johnstown, New York -- George Christman www.CarDaddy.com P.O. Box 735 Johnstown, New York
Re: How to use grid with large data sets.
One query is for the rowcount, the other is for the results (for a single page). The only way to do it with one query is to add an extra column to the result set for the row count. This value will be exactly the same for every row in the result set. I personally don't see an issue with 2 queries... premature optimisation perhaps ;) On 16 January 2014 20:23, George Christman gchrist...@cardaddy.com wrote: I found the following documentation http://wiki.apache.org/tapestry/Tapestry5HibernateGridDatasource2 However I'm still a little confused, I'm seeing two queries needed to get this to work, one containing the filtered results to get the availableRow count and the second one to get the prepare filtered result set containing startindex / endindex for get getRowValue(); With my hibernate search service, I'm able to get everything in a single query, is there anyway to do this in a single query? On Thu, Jan 16, 2014 at 2:48 PM, George Christman gchrist...@cardaddy.comwrote: So I'm playing with the GridDateSource and was wondering how you are suppose to get the filtered result count for availableRows()? With hibernate search you get this count after the results have been filtered, but the way the methods are called in GridDataSource, the availableRows method is called before prepare. The next question is how do you get your filters back to GridDataSouce prepare? I'm wondering if I'm going about this the right way. Example I'm working from http://jumpstart.doublenegative.com.au/jumpstart/examples/tables/griddatasources On Thu, Jan 16, 2014 at 12:26 PM, George Christman gchrist...@cardaddy.com wrote: I guys, thanks for the help, I'm using hibernate-search with lucene. On Thu, Jan 16, 2014 at 12:10 PM, Ville Virtanen ville.virta...@orientimport.fi wrote: Hi, here is one example: http://jumpstart.doublenegative.com.au/jumpstart7/examples/tables/griddataso urces Ville -Alkuperäinen viesti- Lähettäjä: George Christman [mailto:gchrist...@cardaddy.com] Lähetetty: 16. tammikuuta 2014 18:34 Vastaanottaja: Tapestry users Aihe: How to use grid with large data sets. Hello, I'm wondering how to use the grid component with large data sets. Currently the grid is grabbing the entire data set rather than a sub set. How do I pass back the current page and row count as well as the sorts? Can this be done with the grid component, or would I need to builds something custom with a loop? -- George Christman www.CarDaddy.com P.O. Box 735 Johnstown, New York - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- George Christman www.CarDaddy.com P.O. Box 735 Johnstown, New York -- George Christman www.CarDaddy.com P.O. Box 735 Johnstown, New York -- George Christman www.CarDaddy.com P.O. Box 735 Johnstown, New York
Re: How to use grid with large data sets.
If there's a concept in lucene that allows you to bring back the total rowcount and a page of data in a single query then the GridDataSource interface can support that. On 16 January 2014 22:36, Lance Java lance.j...@googlemail.com wrote: One query is for the rowcount, the other is for the results (for a single page). The only way to do it with one query is to add an extra column to the result set for the row count. This value will be exactly the same for every row in the result set. I personally don't see an issue with 2 queries... premature optimisation perhaps ;) On 16 January 2014 20:23, George Christman gchrist...@cardaddy.comwrote: I found the following documentation http://wiki.apache.org/tapestry/Tapestry5HibernateGridDatasource2 However I'm still a little confused, I'm seeing two queries needed to get this to work, one containing the filtered results to get the availableRow count and the second one to get the prepare filtered result set containing startindex / endindex for get getRowValue(); With my hibernate search service, I'm able to get everything in a single query, is there anyway to do this in a single query? On Thu, Jan 16, 2014 at 2:48 PM, George Christman gchrist...@cardaddy.comwrote: So I'm playing with the GridDateSource and was wondering how you are suppose to get the filtered result count for availableRows()? With hibernate search you get this count after the results have been filtered, but the way the methods are called in GridDataSource, the availableRows method is called before prepare. The next question is how do you get your filters back to GridDataSouce prepare? I'm wondering if I'm going about this the right way. Example I'm working from http://jumpstart.doublenegative.com.au/jumpstart/examples/tables/griddatasources On Thu, Jan 16, 2014 at 12:26 PM, George Christman gchrist...@cardaddy.com wrote: I guys, thanks for the help, I'm using hibernate-search with lucene. On Thu, Jan 16, 2014 at 12:10 PM, Ville Virtanen ville.virta...@orientimport.fi wrote: Hi, here is one example: http://jumpstart.doublenegative.com.au/jumpstart7/examples/tables/griddataso urces Ville -Alkuperäinen viesti- Lähettäjä: George Christman [mailto:gchrist...@cardaddy.com] Lähetetty: 16. tammikuuta 2014 18:34 Vastaanottaja: Tapestry users Aihe: How to use grid with large data sets. Hello, I'm wondering how to use the grid component with large data sets. Currently the grid is grabbing the entire data set rather than a sub set. How do I pass back the current page and row count as well as the sorts? Can this be done with the grid component, or would I need to builds something custom with a loop? -- George Christman www.CarDaddy.com P.O. Box 735 Johnstown, New York - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- George Christman www.CarDaddy.com P.O. Box 735 Johnstown, New York -- George Christman www.CarDaddy.com P.O. Box 735 Johnstown, New York -- George Christman www.CarDaddy.com P.O. Box 735 Johnstown, New York
Re: Tapestry 5.4-beta-2 GoogleClosureCompiler
What are you looking for? Advanced minimization, unfortunately, doesn't make sense when you are minimizing multiple files (there can always be a mix of stacks, libraries, and modules). On Mon, Jan 13, 2014 at 12:29 PM, Kristian Marinkovic kristian.marinko...@gmail.com wrote: Hi all, how do i set additional GoogleClosureMinimizer options? The current implementation in tapestry-webresources doesn't seem to offer any configuration possibilities besides replacing the whole service. cheers, Kris -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com