Re: How to add new entries to the global message catalog
I think Peter wants to edit the message catalog programmatically. yes, sorry I see now that may not have been obvious - Original Message - From: Ulrich Stärk u...@spielviel.de To: Tapestry users users@tapestry.apache.org Sent: Wednesday, 24 June, 2009 18:40:47 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: How to add new entries to the global message catalog I think Peter wants to edit the message catalog programmatically. On 24.06.2009 17:07 schrieb Thiago H. de Paula Figueiredo: On Wed, Jun 24, 2009 at 11:53 AM, Peter Stavrinidesp.stavrini...@albourne.com wrote: Not right. :) The whole properties file is reloaded. Good, glad to be wrong :), so how then do you add (*not update) and remove entries from the global message catalog? I just edit the properties file and save it. I'm not using any other source for the global message catalog besides app*.properties. - 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
Access Control for events
Hi, I'm on T5.1.0.5. I have installed 2 AccessControlDispatchers in my application. One for PageRendering and one for event handling. Both Dispatchers just redirect to the start page with an error message in the case that e.g. no user was logged in. This works nicely with all pages and event links. The problem is that AJAX calls also get intercepted and the response is obviousely the rendered StartPage. So for a click on an inPlace Table when the user was not logged in anymore, he gets a Blackbird- Console Popup with a not-so-user-friendly error message. Does anyone have an idea about possible solutions to this? Thanks Moritz - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Access Control for events
You can have a component named Reporter with some javascript code, in your ajax case, handle the event and record any helpful Block, return MultiZoneUpdate(reporter.getZone(), reporter). So, you can control any responses in this component, redirect to login page, display a error message or pop a login panel by javascript Reporter.java public interface Reporter { public static final String PARAM_NAME = Reporter; public static final byte SUCCESS = 0x04; public static final byte INFO = 0x08; public static final byte WARN = 0x16; public static final byte ERROR = 0x32; public CollectionRecord getRecords(); public void error(Object message); public void warn(Object message); public void info(Object message); public void success(Object message); public boolean hasRecord(); public String getZone(); } tml: t:If test=block div class=record-blockt:Delegate to=message //div t:parameter name=else div class=record-messaget:RenderObject object=${message} //div /t:parameter /t:If On Thu, Jun 25, 2009 at 2:41 PM, Moritz Gmelin moritz.gme...@gmx.de wrote: Hi, I'm on T5.1.0.5. I have installed 2 AccessControlDispatchers in my application. One for PageRendering and one for event handling. Both Dispatchers just redirect to the start page with an error message in the case that e.g. no user was logged in. This works nicely with all pages and event links. The problem is that AJAX calls also get intercepted and the response is obviousely the rendered StartPage. So for a click on an inPlace Table when the user was not logged in anymore, he gets a Blackbird-Console Popup with a not-so-user-friendly error message. Does anyone have an idea about possible solutions to this? Thanks Moritz - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Regards, Donf Yang -- To be surprised,to wonder,is to begin to understand.
Re: Tapestry 5 and JSR-303 plans?
Ideally, there should be a pluggability layer here. I started using Hibernate Validator a couple of years ago, but abandoned it since it's not multi-lingual. (see http://opensource.atlassian.com/projects/hibernate/browse/HV-44). Now I use JaValid instead. Similar feature set, but better implementation. JSR-303 is yet another validation framework. Just my 2c. Olle 2009/6/24 Thiago H. de Paula Figueiredo thiag...@gmail.com Em Wed, 24 Jun 2009 15:17:56 -0300, Patrick Moore patmo...@amplafi.com escreveu: Hi there -- Hi! I just found out about JSR-303 ( bean validation JSR ). It may be too soon to ask. A little bit, as it was not approved tyet.. but any plans on implementing this JSR inside of Tapestry? I implemented something very similar, but with Hibernate Validator, so it must be easy, as JSR 303 looks like Hibernate Validator standerdized and more powerful :). It is in an unreleased version of Tapestry CRUD-Hibernate Validator ( http://www.arsmachina.com.br/project/tapestrycrudhibernatevalidator, you can find sources there) It has two parts: some classes that implement ValidationConstraintGenerator, automatically adding the required validation for properties annotated with @NotNull, for example, and a mixin, HibernateValidatorMixin, that executes all the validations again, including the ones defined by @AssertTrue and @AssertFalse, in BaseEditPage (from Tapestry CRUD) subclasses. -- Thiago H. de Paula Figueiredo Independent Java consultant, developer, and instructor http://www.arsmachina.com.br/thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Olle Hallin Senior Java Developer and Architect olle.hal...@crisp.se www.crisp.se
Re: [Announce] Tapestry Testify project
Hi Paul, Thanks for following up on this! Next, I think my documentation is misleading you... try: private static final TapestryTester SHARED_TESTER = new TapestryTester(demo); Tried this with no luck The documentation's example with MyCoreModule.class is meant to show you how to include your own core IOC module Right, and this is what I am doing, but with or without the IoC module I can't get it running, it fails inside TapestryTester? First thing, the Testify sources are published to the Maven repository FYI I am using maven, Hmmm... I see now that there are sources in the repo, sorry my bad! I don't know why the sources are not being pulled on my side, I do use a nexus repository locally so there must be something going wrong there. I will try to get at the sources to figure out what is happening, I will let you know. Just curious if anyone has testify working with JUnit 4? Thanks Peter - Original Message - From: Paul Field paul.fi...@db.com To: Tapestry users users@tapestry.apache.org Sent: Wednesday, 24 June, 2009 18:44:30 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: [Announce] Tapestry Testify project p.stavrini...@albourne.com wrote on 24/06/2009 15:35:00: I seem to be too stupid to get testify working with JUnit 4, I can't get even past the gate: I prefer to see it as a failure of my documentation :-) First thing, the Testify sources are published to the Maven repository, so you can pick them up manually from: http://tapestry.formos.com/maven-snapshot-repository/com/formos/tapestry/tapestry-testify/1.0.0-SNAPSHOT/ Or just ask Maven to download them for you: mvn [goal] -DdownloadSources=true (The m2eclipse plugin for eclipse can download them and bind them to the jar for you, which makes life very pleasant). Next, I think my documentation is misleading you... try: private static final TapestryTester SHARED_TESTER = new TapestryTester(demo); The documentation's example with MyCoreModule.class is meant to show you how to include your own core IOC module (see: http://tapestry.formos.com/nightly/tapestry-testify/#Integration_testing ). Alternatively, you might need to include your AppModule as the parameter - if you do then read the link above about integration testing and break up your AppModule. Let me know how you get on! Paul -- Paul Field Research IT Deutsche Bank --- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Access Control for events
Hi, I'm sorry but I don't understand the idea of your proposal. This Reporter component should it be placed on every page? How will it intercept the AJAX communication between the inPlace Grid (or any other AJAX-using-component) and the server and therefore handle the response and finally forward the response to the inPlace Grid that is waiting for it? Thanks for more insight. Moritz Am 25.06.2009 um 09:09 schrieb donf yang: You can have a component named Reporter with some javascript code, in your ajax case, handle the event and record any helpful Block, return MultiZoneUpdate(reporter.getZone(), reporter). So, you can control any responses in this component, redirect to login page, display a error message or pop a login panel by javascript Reporter.java public interface Reporter { public static final String PARAM_NAME = Reporter; public static final byte SUCCESS = 0x04; public static final byte INFO = 0x08; public static final byte WARN = 0x16; public static final byte ERROR = 0x32; public CollectionRecord getRecords(); public void error(Object message); public void warn(Object message); public void info(Object message); public void success(Object message); public boolean hasRecord(); public String getZone(); } tml: t:If test=block div class=record-blockt:Delegate to=message //div t:parameter name=else div class=record-messaget:RenderObject object=${message} //div /t:parameter /t:If On Thu, Jun 25, 2009 at 2:41 PM, Moritz Gmelin moritz.gme...@gmx.de wrote: Hi, I'm on T5.1.0.5. I have installed 2 AccessControlDispatchers in my application. One for PageRendering and one for event handling. Both Dispatchers just redirect to the start page with an error message in the case that e.g. no user was logged in. This works nicely with all pages and event links. The problem is that AJAX calls also get intercepted and the response is obviousely the rendered StartPage. So for a click on an inPlace Table when the user was not logged in anymore, he gets a Blackbird-Console Popup with a not-so-user-friendly error message. Does anyone have an idea about possible solutions to this? Thanks Moritz - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Regards, Donf Yang -- To be surprised,to wonder,is to begin to understand. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [Announce] Tapestry Testify project
Hi Paul, This is the cause: java.lang.ClassNotFoundException: org.apache.tapestry5.test.TapestryTestConstants bubbles up from from Pagetester line 111: globals.storeContext(new PageTesterContext(contextPath));) from PageTesterContext line 32: this.contextRoot = new File(TapestryTestConstants.MODULE_BASE_DIR, contextRoot); What is TapestryTestConstants its not packaged with the jars? so I don't see how this can possibly work. Kind regards, Peter - Original Message - From: P Stavrinides p.stavrini...@albourne.com To: Tapestry users users@tapestry.apache.org Sent: Thursday, 25 June, 2009 10:38:32 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: [Announce] Tapestry Testify project Hi Paul, Thanks for following up on this! Next, I think my documentation is misleading you... try: private static final TapestryTester SHARED_TESTER = new TapestryTester(demo); Tried this with no luck The documentation's example with MyCoreModule.class is meant to show you how to include your own core IOC module Right, and this is what I am doing, but with or without the IoC module I can't get it running, it fails inside TapestryTester? First thing, the Testify sources are published to the Maven repository FYI I am using maven, Hmmm... I see now that there are sources in the repo, sorry my bad! I don't know why the sources are not being pulled on my side, I do use a nexus repository locally so there must be something going wrong there. I will try to get at the sources to figure out what is happening, I will let you know. Just curious if anyone has testify working with JUnit 4? Thanks Peter - Original Message - From: Paul Field paul.fi...@db.com To: Tapestry users users@tapestry.apache.org Sent: Wednesday, 24 June, 2009 18:44:30 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: [Announce] Tapestry Testify project p.stavrini...@albourne.com wrote on 24/06/2009 15:35:00: I seem to be too stupid to get testify working with JUnit 4, I can't get even past the gate: I prefer to see it as a failure of my documentation :-) First thing, the Testify sources are published to the Maven repository, so you can pick them up manually from: http://tapestry.formos.com/maven-snapshot-repository/com/formos/tapestry/tapestry-testify/1.0.0-SNAPSHOT/ Or just ask Maven to download them for you: mvn [goal] -DdownloadSources=true (The m2eclipse plugin for eclipse can download them and bind them to the jar for you, which makes life very pleasant). Next, I think my documentation is misleading you... try: private static final TapestryTester SHARED_TESTER = new TapestryTester(demo); The documentation's example with MyCoreModule.class is meant to show you how to include your own core IOC module (see: http://tapestry.formos.com/nightly/tapestry-testify/#Integration_testing ). Alternatively, you might need to include your AppModule as the parameter - if you do then read the link above about integration testing and break up your AppModule. Let me know how you get on! Paul -- Paul Field Research IT Deutsche Bank --- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures. - 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: T5: Grid#setupDataSource and GridDataSource
Dnia 2009-06-24, śro o godzinie 12:19 -0300, Thiago H. de Paula Figueiredo pisze: Why Grid#setupDataSource() is calculating endIndex and not allowing for GridDataSource to do it? Why GridDataSource#prepare method have startIndex and endIndex parameters and not offset/limit pair? As offset = startIndex and limit = endIndex - startIndex + 1, I think their interchangeable for most scenarios. I'm asking, because if GridDataSource could calculate endIndex (or use limit instead) for itself, then there would be no need to call getAvailableRows() before prepare(), which is a problem (at least IMHO). I guess getAvailableRows() is used for calculating the number of pages and then display the pager. When pager is used, then GDS#prepare() was already called, so getAvaialbleRows() can return correct value. My point is that the current implementation of Grid#setupDataSource() uses getAvailableRows() to calculate exact values for start and end indices. Shouldn't this be responsibility of GridDataSource? Grid#setupDataSource() could pass just logical (exact available rows would be calculated by GDS) values calculated as I wrote in previous post. IMHO this would also allow for GDS to handle rows deletions for itself. This would allow for single-call (those which receive number of available rows, columns definitions, and columns values in one expensive call) datasources to work. Please file a JIRA about this. Maybe we could use some special return value in GridDataSource.getAvailableRows() to indicate that it is not available yet and then call it again after GridDataSource.prepare(), thus solving your problem. IMHO there is no need for special value. It's just matter of the current implementation of Grid#setupDataSource(). For now, to make Grid working with single-call GridDataSource, I had to copy Grid.java only to replace setupDataSource(). Best regards, Przemysław Wojnowski - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Feedback on application status page
I've created an application status page that it's very similar to the service status that is bunbled with the framework but instead of showing information on services it shows information on the web application itself. You can check out the code for it and a screenshot here http://hugopalma.wordpress.com/2009/06/24/tapestry-application-status-page/ I would also like to know if you guys think that such a page should be included in the framework itself. If so i'll gladly create the issue and appropriate patch. Cheers, Hugo
Re: Feedback on application status page
I think this is useful - maybe you should include it as a component so we can add it an appropriately private area of our sites. It is in general a bad idea to leave such pages on in production - but they are handy for development or as protected diagnostic pages. Ben Gidley www.gidley.co.uk b...@gidley.co.uk On Thu, Jun 25, 2009 at 10:04 AM, Hugo Palma hugo.m.pa...@gmail.com wrote: I've created an application status page that it's very similar to the service status that is bunbled with the framework but instead of showing information on services it shows information on the web application itself. You can check out the code for it and a screenshot here http://hugopalma.wordpress.com/2009/06/24/tapestry-application-status-page/ I would also like to know if you guys think that such a page should be included in the framework itself. If so i'll gladly create the issue and appropriate patch. Cheers, Hugo
Re: Feedback on application status page
I was thinking of following the same principle that the ServiceStatus page uses, which is to only be displayed when not in production mode. On Thu, Jun 25, 2009 at 10:16, Ben Gidley b...@gidley.co.uk wrote: I think this is useful - maybe you should include it as a component so we can add it an appropriately private area of our sites. It is in general a bad idea to leave such pages on in production - but they are handy for development or as protected diagnostic pages. Ben Gidley www.gidley.co.uk b...@gidley.co.uk On Thu, Jun 25, 2009 at 10:04 AM, Hugo Palma hugo.m.pa...@gmail.com wrote: I've created an application status page that it's very similar to the service status that is bunbled with the framework but instead of showing information on services it shows information on the web application itself. You can check out the code for it and a screenshot here http://hugopalma.wordpress.com/2009/06/24/tapestry-application-status-page/ I would also like to know if you guys think that such a page should be included in the framework itself. If so i'll gladly create the issue and appropriate patch. Cheers, Hugo
Re: Feedback on application status page
Hi Hugo! This is very useful! Just gave it a try and found a bug: ${currentSessionAttribute.size} seems to be empty or NULL for SSOs. This leads to a NullPointerException within formatBytes(). Piero Am Donnerstag, 25. Juni 2009 11:04:09 schrieb Hugo Palma: I've created an application status page that it's very similar to the service status that is bunbled with the framework but instead of showing information on services it shows information on the web application itself. You can check out the code for it and a screenshot here http://hugopalma.wordpress.com/2009/06/24/tapestry-application-status-page/ I would also like to know if you guys think that such a page should be included in the framework itself. If so i'll gladly create the issue and appropriate patch. Cheers, Hugo - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Feedback on application status page
Thanks for sharing, nice idea! I was thinking of following the same principle that the ServiceStatus page uses, which is to only be displayed when not in production mode. +1 that should be good enough, the only consideration is to decide what follow up action to take Peter - Original Message - From: Hugo Palma hugo.m.pa...@gmail.com To: Tapestry users users@tapestry.apache.org Sent: Thursday, 25 June, 2009 12:18:07 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: Feedback on application status page I was thinking of following the same principle that the ServiceStatus page uses, which is to only be displayed when not in production mode. On Thu, Jun 25, 2009 at 10:16, Ben Gidley b...@gidley.co.uk wrote: I think this is useful - maybe you should include it as a component so we can add it an appropriately private area of our sites. It is in general a bad idea to leave such pages on in production - but they are handy for development or as protected diagnostic pages. Ben Gidley www.gidley.co.uk b...@gidley.co.uk On Thu, Jun 25, 2009 at 10:04 AM, Hugo Palma hugo.m.pa...@gmail.com wrote: I've created an application status page that it's very similar to the service status that is bunbled with the framework but instead of showing information on services it shows information on the web application itself. You can check out the code for it and a screenshot here http://hugopalma.wordpress.com/2009/06/24/tapestry-application-status-page/ I would also like to know if you guys think that such a page should be included in the framework itself. If so i'll gladly create the issue and appropriate patch. Cheers, Hugo - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Feedback on application status page
Thanks Piero, that is indeed a bug. That happens because your SSO is not serializable. I've updated my post with the fix. On Thu, Jun 25, 2009 at 10:22, Piero Sartini li...@pierosartini.de wrote: Hi Hugo! This is very useful! Just gave it a try and found a bug: ${currentSessionAttribute.size} seems to be empty or NULL for SSOs. This leads to a NullPointerException within formatBytes(). Piero Am Donnerstag, 25. Juni 2009 11:04:09 schrieb Hugo Palma: I've created an application status page that it's very similar to the service status that is bunbled with the framework but instead of showing information on services it shows information on the web application itself. You can check out the code for it and a screenshot here http://hugopalma.wordpress.com/2009/06/24/tapestry-application-status-page/ I would also like to know if you guys think that such a page should be included in the framework itself. If so i'll gladly create the issue and appropriate patch. Cheers, Hugo - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Feedback on application status page
Glad i can be of help :o) On Thu, Jun 25, 2009 at 10:37, p.stavrini...@albourne.com wrote: Thanks for sharing, nice idea! I was thinking of following the same principle that the ServiceStatus page uses, which is to only be displayed when not in production mode. +1 that should be good enough, the only consideration is to decide what follow up action to take I think the next step if no more obvious bugs are found is for me to create a patch and submit an issue for inclusion in Tapestry. Peter - Original Message - From: Hugo Palma hugo.m.pa...@gmail.com To: Tapestry users users@tapestry.apache.org Sent: Thursday, 25 June, 2009 12:18:07 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: Feedback on application status page I was thinking of following the same principle that the ServiceStatus page uses, which is to only be displayed when not in production mode. On Thu, Jun 25, 2009 at 10:16, Ben Gidley b...@gidley.co.uk wrote: I think this is useful - maybe you should include it as a component so we can add it an appropriately private area of our sites. It is in general a bad idea to leave such pages on in production - but they are handy for development or as protected diagnostic pages. Ben Gidley www.gidley.co.uk b...@gidley.co.uk On Thu, Jun 25, 2009 at 10:04 AM, Hugo Palma hugo.m.pa...@gmail.com wrote: I've created an application status page that it's very similar to the service status that is bunbled with the framework but instead of showing information on services it shows information on the web application itself. You can check out the code for it and a screenshot here http://hugopalma.wordpress.com/2009/06/24/tapestry-application-status-page/ I would also like to know if you guys think that such a page should be included in the framework itself. If so i'll gladly create the issue and appropriate patch. Cheers, Hugo - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
SessionState values in url
I need to exchange small amount of data (for now one string value) between majority of my app pages, but I want to store this value in the page url. AFAIK SessionState offers only 'session' strategy. Moreover I don't want to handle this single value in each page's onActivate. I thought I could create base class which handles this parameter and then subclass it in other page classes. But maybe there is another, better solution? -- View this message in context: http://n2.nabble.com/SessionState-values-in-url-tp3154400p3154400.html Sent from the Tapestry Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5: Grid#setupDataSource and GridDataSource
2009/6/25 Przemysław Wojnowski przemyslaw.wojnow...@nask.pl: My point is that the current implementation of Grid#setupDataSource() uses getAvailableRows() to calculate exact values for start and end indices. Shouldn't this be responsibility of GridDataSource? Nice points in the whole message. :) One solution would be to create another interface, because Grid needs to know the number of available rows (regardless if before or after prepare()) and changing GridDataSource now would break backward compatibility quite badly. IMHO there is no need for special value. It's just matter of the current implementation of Grid#setupDataSource(). You're suggesting the reversal of invokating order of prepare() and getAvailableRows()? I don't see any way of Grid working without getAvailableRows(), as it's needed to handle paging. -- Thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tapestry 5 and JSR-303 plans?
On Thu, Jun 25, 2009 at 4:21 AM, Olle Hallinolle.hal...@gmail.com wrote: Ideally, there should be a pluggability layer here. As long as the validation is defined by an annotation in a getter or field and it doesn't depend on other properties (@NotNull, @Length, etc), the plugabillity layer is already there: ValidationConstraintsGenerator. What's not pluggable yet cross-property validation (@AssertTrue, @AssertFalse, etc). For validation framework-independency, I don't think tapestry-core should support any framework. This support should come as separate drop-in packages (tapestry-beans-validation, etc). I started using Hibernate Validator a couple of years ago, but abandoned it since it's not multi-lingual. (see http://opensource.atlassian.com/projects/hibernate/browse/HV-44). I used the Hibernate Validator support basically as a proof-of-concept and an example to anyone who wants to support other validation frameworks. -- Thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5: Grid#setupDataSource and GridDataSource
2009-06-25 Thiago H. de Paula Figueiredo: 2009/6/25 Przemysław Wojnowski przemyslaw.wojnow...@nask.pl: My point is that the current implementation of Grid#setupDataSource() uses getAvailableRows() to calculate exact values for start and end indices. Shouldn't this be responsibility of GridDataSource? Nice points in the whole message. :) One solution would be to create another interface, because Grid needs to know the number of available rows (regardless if before or after prepare()) and changing GridDataSource now would break backward compatibility quite badly. IMHO there is no need for special value. It's just matter of the current implementation of Grid#setupDataSource(). You're suggesting the reversal of invokating order of prepare() and getAvailableRows()? I don't see any way of Grid working without getAvailableRows(), as it's needed to handle paging. I think i was misunderstood. I don't want to change any interface, especially GridDataSource. I'm just writing about current (Tapestry 5.2.0-snapshot) implementation of one method: Grid#setupDataSource(). The source code for this method is as follows: --- code --- void setupDataSource() { // TAP5-34: (...) cachingSource = new CachingDataSource(source); int availableRows = cachingSource.getAvailableRows(); if (availableRows == 0) return; int maxPage = ((availableRows - 1) / rowsPerPage) + 1; // This captures when the number of rows has decreased, typically due to deletions. int effectiveCurrentPage = getCurrentPage(); if (effectiveCurrentPage maxPage) effectiveCurrentPage = maxPage; int startIndex = (effectiveCurrentPage - 1) * rowsPerPage; int endIndex = Math.min(startIndex + rowsPerPage - 1, availableRows - 1); dataModel = null; cachingSource.prepare(startIndex, endIndex, sortModel.getSortConstraints()); } --- code --- Here getAvailableRows() is used only to calculate start and end indices. But their exact values (taking into account decreased number of rows) can (maybe should?) be calculated in implementation of GridDataSource and then implementation of Grid#setupDataSource() could look like this: --- code --- void setupDataSource() { cachingSource = new CachingDataSource(source); int startIndex = (getCurrentPage()-1) * rowsPerPage; cachingSource.prepare(startIndex, startIndex+rowsPerPage, sortModel.getSortConstraints()); } --- code --- Grid still uses getAvailableRows() but not in setupDataSource() method, and not before prepare(). Maybe I misunderstood something or not seeing something. In that case I would like to know what. :-) Best regards and thanks for response! Przemysław Wojnowski - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Feedback on application status page
Nice!!! BTW see here: https://issues.apache.org/jira/browse/TAP5-570 On Thu, Jun 25, 2009 at 11:04 AM, Hugo Palma hugo.m.pa...@gmail.com wrote: I've created an application status page that it's very similar to the service status that is bunbled with the framework but instead of showing information on services it shows information on the web application itself. You can check out the code for it and a screenshot here http://hugopalma.wordpress.com/2009/06/24/tapestry-application-status-page/ I would also like to know if you guys think that such a page should be included in the framework itself. If so i'll gladly create the issue and appropriate patch. Cheers, Hugo -- Best regards, Igor Drobiazko
Re: Tapestry 5 and Event component.
Thanks for your quick answer. I tried to rename this method ButtonClicked instead, but it did not fix the problem : the request event is still not handled. Any other idea ? Howard Lewis Ship wrote: I suspect Tapestry got confused because your method is both the naming convention (onButtonClicked) and has @OnEvent ... and they are in conflict. Rename the method to not start with on. On Wed, Jun 24, 2009 at 1:26 PM, b...@umd bben...@umd.edu wrote: I am getting this error when clicking on my searchbutton. What is my problem exactly ? Request event 'clicked' (on component Gentoo:button) was not handled; you must provide a matching event handler method in the component or in one of its containers. gentoo.tml : t:button type=button t:id=button value=search event=clicked / gentoo.java : @Component(parameters = {type=button}) private Button button; @OnEvent(component = button, value = clicked) public JSONObject onButtonClicked(String value) { System.out.println(Event Caught !); } Thanks -- View this message in context: http://www.nabble.com/Tapestry-5-and-Event-component.-tp24192270p24192270.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator of Apache Tapestry Director of Open Source Technology at Formos -- View this message in context: http://www.nabble.com/Tapestry-5-and-Event-component.-tp24192270p24203394.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [Announce] Tapestry Testify project
Hi Peter, This is the cause: java.lang.ClassNotFoundException: org.apache.tapestry5.test. TapestryTestConstants What is TapestryTestConstants its not packaged with the jars? so I don't see how this can possibly work. TapestryTestConstants is an object from org.apache.tapestry5.test: http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/test/TapestryTestConstants.html So, you need to add a dependency on the tapestry-test module (and I need to check what's going on in the Testify POM because you should've got that automatically... ). This is the Maven dependency I suggest, as you probably don't want the Selenium dependencies: dependency groupIdorg.apache.tapestry/groupId artifactIdtapestry-test/artifactId version${tapestry.version}/version scopetest/scope exclusions exclusion groupIdorg.openqa.selenium.client-drivers/ groupId artifactIdselenium-java-client-driver/ artifactId /exclusion exclusion groupIdorg.openqa.selenium.server/groupId artifactIdselenium-server/artifactId /exclusion exclusion groupIdorg.openqa.selenium.server/groupId artifactIdselenium-server-coreless/artifactId /exclusion /exclusions /dependency FYI, I'm not convinced that you should have to have this dependency at all. See: https://issues.apache.org/jira/browse/TAP5-758 Paul -- Paul Field Research IT Deutsche Bank Kind regards, Peter - Original Message - From: P Stavrinides p.stavrini...@albourne.com To: Tapestry users users@tapestry.apache.org Sent: Thursday, 25 June, 2009 10:38:32 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: [Announce] Tapestry Testify project Hi Paul, Thanks for following up on this! Next, I think my documentation is misleading you... try: private static final TapestryTester SHARED_TESTER = new TapestryTester(demo); Tried this with no luck The documentation's example with MyCoreModule.class is meant to show you how to include your own core IOC module Right, and this is what I am doing, but with or without the IoC module I can't get it running, it fails inside TapestryTester? First thing, the Testify sources are published to the Maven repository FYI I am using maven, Hmmm... I see now that there are sources in the repo, sorry my bad! I don't know why the sources are not being pulled on my side, I do use a nexus repository locally so there must be something going wrong there. I will try to get at the sources to figure out what is happening, I will let you know. Just curious if anyone has testify working with JUnit 4? Thanks Peter - Original Message - From: Paul Field paul.fi...@db.com To: Tapestry users users@tapestry.apache.org Sent: Wednesday, 24 June, 2009 18:44:30 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: [Announce] Tapestry Testify project p.stavrini...@albourne.com wrote on 24/06/2009 15:35:00: I seem to be too stupid to get testify working with JUnit 4, I can't get even past the gate: I prefer to see it as a failure of my documentation :-) First thing, the Testify sources are published to the Maven repository, so you can pick them up manually from: http://tapestry.formos.com/maven-snapshot- repository/com/formos/tapestry/tapestry-testify/1.0.0-SNAPSHOT/ Or just ask Maven to download them for you: mvn [goal] -DdownloadSources=true (The m2eclipse plugin for eclipse can download them and bind them to the jar for you, which makes life very pleasant). Next, I think my documentation is misleading you... try: private static final TapestryTester SHARED_TESTER = new TapestryTester(demo); The documentation's example with MyCoreModule.class is meant to show you how to include your own core IOC module (see: http://tapestry.formos.com/nightly/tapestry-testify/#Integration_testing ). Alternatively, you might need to include your AppModule as the parameter - if you do then read the link above about integration testing and break up your AppModule. Let me know how you get on! Paul -- Paul Field Research IT Deutsche Bank --- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e- mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures. - To unsubscribe, e-mail:
Re: Feedback on application status page
Hi Igor, thanks for pointing that issue out. Indeed it would be cool if we could be view all session data organized in terms of ASOs and persistent fields. I'll give it a go. On Thu, Jun 25, 2009 at 14:17, Igor Drobiazko igor.drobia...@gmail.comwrote: Nice!!! BTW see here: https://issues.apache.org/jira/browse/TAP5-570 On Thu, Jun 25, 2009 at 11:04 AM, Hugo Palma hugo.m.pa...@gmail.com wrote: I've created an application status page that it's very similar to the service status that is bunbled with the framework but instead of showing information on services it shows information on the web application itself. You can check out the code for it and a screenshot here http://hugopalma.wordpress.com/2009/06/24/tapestry-application-status-page/ I would also like to know if you guys think that such a page should be included in the framework itself. If so i'll gladly create the issue and appropriate patch. Cheers, Hugo -- Best regards, Igor Drobiazko
Re: Tapestry 5 and Event component.
On Wed, Jun 24, 2009 at 5:26 PM, b...@umdbben...@umd.edu wrote: gentoo.tml : t:button type=button t:id=button value=search event=clicked / You haven't used the ck/OnEvent mixin in the button, so the event is not fired. Try t:button type=button t:id=button value=search mixins=ck/OnEvent event=clicked / -- Thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Feedback on application status page
Indeed it would be cool if we could be view all session data organized in terms of ASOs and persistent fields. I'll give it a go. If I am reading this right, you are trying to view this data for 'all sessions'... Hopefully it saves you some time, but the HttpSessionContext interface was the given way of doing this via the ServletAPI but was deprecated as of 2.1 because it was seen as a security risk: http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpSessionContext.html It just so happens that earlier today I modified your page to do exactly this... since I already store the HttpSession object in my application in a map it was trivial, but I don't know if Tapestry gives you access to this interface. Cheers Peter - Original Message - From: Hugo Palma hugo.m.pa...@gmail.com To: Tapestry users users@tapestry.apache.org Sent: Thursday, 25 June, 2009 16:36:37 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: Feedback on application status page Hi Igor, thanks for pointing that issue out. Indeed it would be cool if we could be view all session data organized in terms of ASOs and persistent fields. I'll give it a go. On Thu, Jun 25, 2009 at 14:17, Igor Drobiazko igor.drobia...@gmail.comwrote: Nice!!! BTW see here: https://issues.apache.org/jira/browse/TAP5-570 On Thu, Jun 25, 2009 at 11:04 AM, Hugo Palma hugo.m.pa...@gmail.com wrote: I've created an application status page that it's very similar to the service status that is bunbled with the framework but instead of showing information on services it shows information on the web application itself. You can check out the code for it and a screenshot here http://hugopalma.wordpress.com/2009/06/24/tapestry-application-status-page/ I would also like to know if you guys think that such a page should be included in the framework itself. If so i'll gladly create the issue and appropriate patch. Cheers, Hugo -- Best regards, Igor Drobiazko - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Feedback on application status page
This page only shows information about the current session. The only way to show this infomation about all sessions with recent servlet implementations AFAIK is to use a session filter that stores every created session in a static manner. But as this solution would be more intrusive in your application i decided to go with the current session only implementation. On Thu, Jun 25, 2009 at 15:01, p.stavrini...@albourne.com wrote: Indeed it would be cool if we could be view all session data organized in terms of ASOs and persistent fields. I'll give it a go. If I am reading this right, you are trying to view this data for 'all sessions'... Hopefully it saves you some time, but the HttpSessionContext interface was the given way of doing this via the ServletAPI but was deprecated as of 2.1 because it was seen as a security risk: http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpSessionContext.html It just so happens that earlier today I modified your page to do exactly this... since I already store the HttpSession object in my application in a map it was trivial, but I don't know if Tapestry gives you access to this interface. Cheers Peter - Original Message - From: Hugo Palma hugo.m.pa...@gmail.com To: Tapestry users users@tapestry.apache.org Sent: Thursday, 25 June, 2009 16:36:37 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: Feedback on application status page Hi Igor, thanks for pointing that issue out. Indeed it would be cool if we could be view all session data organized in terms of ASOs and persistent fields. I'll give it a go. On Thu, Jun 25, 2009 at 14:17, Igor Drobiazko igor.drobia...@gmail.com wrote: Nice!!! BTW see here: https://issues.apache.org/jira/browse/TAP5-570 On Thu, Jun 25, 2009 at 11:04 AM, Hugo Palma hugo.m.pa...@gmail.com wrote: I've created an application status page that it's very similar to the service status that is bunbled with the framework but instead of showing information on services it shows information on the web application itself. You can check out the code for it and a screenshot here http://hugopalma.wordpress.com/2009/06/24/tapestry-application-status-page/ I would also like to know if you guys think that such a page should be included in the framework itself. If so i'll gladly create the issue and appropriate patch. Cheers, Hugo -- Best regards, Igor Drobiazko - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [Announce] Tapestry Testify project
So, you need to add a dependency on the tapestry-test module (and I need to check what's going on in the Testify POM because you should've got that automatically... ). Thanks Paul, up and running now! please keep me posted once you have the pom sorted. Cheers Peter Testify POM because you should've got that automatically... ) - Original Message - From: Paul Field paul.fi...@db.com To: Tapestry users users@tapestry.apache.org Sent: Thursday, 25 June, 2009 16:36:07 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: [Announce] Tapestry Testify project Hi Peter, This is the cause: java.lang.ClassNotFoundException: org.apache.tapestry5.test. TapestryTestConstants What is TapestryTestConstants its not packaged with the jars? so I don't see how this can possibly work. TapestryTestConstants is an object from org.apache.tapestry5.test: http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/test/TapestryTestConstants.html So, you need to add a dependency on the tapestry-test module (and I need to check what's going on in the Testify POM because you should've got that automatically... ). This is the Maven dependency I suggest, as you probably don't want the Selenium dependencies: dependency groupIdorg.apache.tapestry/groupId artifactIdtapestry-test/artifactId version${tapestry.version}/version scopetest/scope exclusions exclusion groupIdorg.openqa.selenium.client-drivers/ groupId artifactIdselenium-java-client-driver/ artifactId /exclusion exclusion groupIdorg.openqa.selenium.server/groupId artifactIdselenium-server/artifactId /exclusion exclusion groupIdorg.openqa.selenium.server/groupId artifactIdselenium-server-coreless/artifactId /exclusion /exclusions /dependency FYI, I'm not convinced that you should have to have this dependency at all. See: https://issues.apache.org/jira/browse/TAP5-758 Paul -- Paul Field Research IT Deutsche Bank Kind regards, Peter - Original Message - From: P Stavrinides p.stavrini...@albourne.com To: Tapestry users users@tapestry.apache.org Sent: Thursday, 25 June, 2009 10:38:32 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: [Announce] Tapestry Testify project Hi Paul, Thanks for following up on this! Next, I think my documentation is misleading you... try: private static final TapestryTester SHARED_TESTER = new TapestryTester(demo); Tried this with no luck The documentation's example with MyCoreModule.class is meant to show you how to include your own core IOC module Right, and this is what I am doing, but with or without the IoC module I can't get it running, it fails inside TapestryTester? First thing, the Testify sources are published to the Maven repository FYI I am using maven, Hmmm... I see now that there are sources in the repo, sorry my bad! I don't know why the sources are not being pulled on my side, I do use a nexus repository locally so there must be something going wrong there. I will try to get at the sources to figure out what is happening, I will let you know. Just curious if anyone has testify working with JUnit 4? Thanks Peter - Original Message - From: Paul Field paul.fi...@db.com To: Tapestry users users@tapestry.apache.org Sent: Wednesday, 24 June, 2009 18:44:30 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: [Announce] Tapestry Testify project p.stavrini...@albourne.com wrote on 24/06/2009 15:35:00: I seem to be too stupid to get testify working with JUnit 4, I can't get even past the gate: I prefer to see it as a failure of my documentation :-) First thing, the Testify sources are published to the Maven repository, so you can pick them up manually from: http://tapestry.formos.com/maven-snapshot- repository/com/formos/tapestry/tapestry-testify/1.0.0-SNAPSHOT/ Or just ask Maven to download them for you: mvn [goal] -DdownloadSources=true (The m2eclipse plugin for eclipse can download them and bind them to the jar for you, which makes life very pleasant). Next, I think my documentation is misleading you... try: private static final TapestryTester SHARED_TESTER = new TapestryTester(demo); The documentation's example with MyCoreModule.class is meant to show you how to include your own core IOC module (see: http://tapestry.formos.com/nightly/tapestry-testify/#Integration_testing ). Alternatively, you might need to include your AppModule as the parameter - if you do then read the link above about integration testing and break up your AppModule. Let me know how you get on! Paul -- Paul Field Research IT Deutsche Bank
Environmental annotation
Hi, is it ok, that @Environmental does not work for user defined classes? I expected it to work after reading http://tapestry.apache.org/tapestry5.1/guide/env.html. But it does not. I use environment.peek() instead. Regards, Sergey. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tapestry 5 and Event component.
Actually I did. I first tried to use it with the OnEvent mixins, but the problem was the same. Then by checking on the ck component reference, I noticed that the component t:button has already a parameter named event. That's why I removed the parameter mixins. I have just tried again with Try t:button type=button t:id=button value=search mixins=ck/OnEvent event=clicked /, and I got the same exception. Thiago H. de Paula Figueiredo wrote: On Wed, Jun 24, 2009 at 5:26 PM, b...@umdbben...@umd.edu wrote: gentoo.tml : t:button type=button t:id=button value=search event=clicked / You haven't used the ck/OnEvent mixin in the button, so the event is not fired. Try t:button type=button t:id=button value=search mixins=ck/OnEvent event=clicked / -- Thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- View this message in context: http://www.nabble.com/Tapestry-5-and-Event-component.-tp24192270p24205124.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
parent rendering phases: must be called explicitly
Is it ok that parent render phases must be called explicitly from my components? I.e. I must create DerivedComponent.java: protected void beginRender() { super.beginRender(); } otherwise BaseComponent beginRender() is not called. This behaviour seems to contradict http://tapestry.apache.org/tapestry5.1/guide/rendering.html, Parents before Child Regards, Sergey. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Environmental annotation
@Environmental only works for component classes. On Thu, Jun 25, 2009 at 7:51 AM, Sergey Didenko sergey.dide...@gmail.comwrote: Hi, is it ok, that @Environmental does not work for user defined classes? I expected it to work after reading http://tapestry.apache.org/tapestry5.1/guide/env.html. But it does not. I use environment.peek() instead. Regards, Sergey. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator of Apache Tapestry Director of Open Source Technology at Formos
Re: parent rendering phases: must be called explicitly
On Thu, Jun 25, 2009 at 12:26 PM, Sergey Didenkosergey.dide...@gmail.com wrote: This behaviour seems to contradict http://tapestry.apache.org/tapestry5.1/guide/rendering.html, Parents before Child It doesn't: When a sub-class overrides an render phase method of a base class, the method is only invoked once, along with any other base class methods. The subclass can change the implementation of the base class method via an override, but can't change the timing of when that method is invoked. -- Thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Environmental annotation
is it ok, that @Environmental does not work for user defined classes? I expected it to work after reading http://tapestry.apache.org/tapestry5.1/guide/env.html. But it does not. I use environment.peek() instead. The answer should be in the very last paragraph of that page. regards, Onno
Re: Tapestry 5 and Event component.
I don't have source of ck lib. What about removing the parameter 'value' of the method? BTW what does the parameter mean? DH - Original Message - From: b...@umd To: users@tapestry.apache.org Sent: Thursday, June 25, 2009 11:11 PM Subject: Re: Tapestry 5 and Event component. Actually I did. I first tried to use it with the OnEvent mixins, but the problem was the same. Then by checking on the ck component reference, I noticed that the component t:button has already a parameter named event. That's why I removed the parameter mixins. I have just tried again with Try t:button type=button t:id=button value=search mixins=ck/OnEvent event=clicked /, and I got the same exception. Thiago H. de Paula Figueiredo wrote: On Wed, Jun 24, 2009 at 5:26 PM, b...@umdbben...@umd.edu wrote: gentoo.tml : t:button type=button t:id=button value=search event=clicked / You haven't used the ck/OnEvent mixin in the button, so the event is not fired. Try t:button type=button t:id=button value=search mixins=ck/OnEvent event=clicked / -- Thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- View this message in context: http://www.nabble.com/Tapestry-5-and-Event-component.-tp24192270p24205124.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: parent rendering phases: must be called explicitly
Sorry, that was the other bug. It works as it is documented. On Thu, Jun 25, 2009 at 6:34 PM, Thiago H. de Paula Figueiredothiag...@gmail.com wrote: On Thu, Jun 25, 2009 at 12:26 PM, Sergey Didenkosergey.dide...@gmail.com wrote: This behaviour seems to contradict http://tapestry.apache.org/tapestry5.1/guide/rendering.html, Parents before Child It doesn't: - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tapestry 5 and Event component.
Here is the component reference : http://www.chenillekit.org/chenillekit-tapestry/ref/org/chenillekit/tapestry/core/components/Button.html Indeed the parameter value is useless. So I remove it. But it does not work. DH-14 wrote: I don't have source of ck lib. What about removing the parameter 'value' of the method? BTW what does the parameter mean? DH - Original Message - From: b...@umd To: users@tapestry.apache.org Sent: Thursday, June 25, 2009 11:11 PM Subject: Re: Tapestry 5 and Event component. Actually I did. I first tried to use it with the OnEvent mixins, but the problem was the same. Then by checking on the ck component reference, I noticed that the component t:button has already a parameter named event. That's why I removed the parameter mixins. I have just tried again with Try t:button type=button t:id=button value=search mixins=ck/OnEvent event=clicked /, and I got the same exception. Thiago H. de Paula Figueiredo wrote: On Wed, Jun 24, 2009 at 5:26 PM, b...@umdbben...@umd.edu wrote: gentoo.tml : t:button type=button t:id=button value=search event=clicked / You haven't used the ck/OnEvent mixin in the button, so the event is not fired. Try t:button type=button t:id=button value=search mixins=ck/OnEvent event=clicked / -- Thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- View this message in context: http://www.nabble.com/Tapestry-5-and-Event-component.-tp24192270p24205124.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- View this message in context: http://www.nabble.com/Tapestry-5-and-Event-component.-tp24192270p24206567.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Environmental annotation
Inner classes are not component classes and are not transformed (component class transformation is the hook that allows @Environmental to work). On Thu, Jun 25, 2009 at 9:48 AM, Sergey Didenko sergey.dide...@gmail.comwrote: Sure, I talk about component classes. Sorry for the unclear message. I played with the bug and reproduced it in the simple form. It happens when I put an inner class of the page into environment and use @Environmental. It does not happen when I refactor that inner class out of the page. It does not happen when I use environment.peek() SimplePage.java package mytapp.pages; import org.apache.tapestry5.ioc.annotations.Inject; import org.apache.tapestry5.services.Environment; public class SimplePage { public class InnerClass { public String toString() { return InnerClass; } } @Inject private Environment environment; void beginRender() { environment.push( InnerClass.class, new InnerClass() ); } void afterRender() { environment.pop( InnerClass.class ); } } SimplePage.tml !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN http://www.w3.org/TR/html4/strict.dtd; html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_1_0.xsd; head titleSimple title/title /head body pSimple text/p pt:SimpleComponent//p /body /html SimpleComponent.java package mytapp.components; import mytapp.pages.SimplePage.InnerClass; import org.apache.tapestry5.MarkupWriter; import org.apache.tapestry5.annotations.Environmental; public class SimpleComponent { @Environmental private InnerClass innerClass; // UNCOMMENT THIS TO WORK // @Inject // private Environment environment; void beginRender( MarkupWriter writer ) { // UNCOMMENT THIS TO WORK // InnerClass innerClass = environment.peek( InnerClass.class ); writer.write( SimpleComponent + innerClass.toString() ); } } - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator of Apache Tapestry Director of Open Source Technology at Formos
Re: Tapestry 5 and Event component.
I just tried t5commons component's Button component, it works. I think the Button in t5commons should be the same as CK lib because CK originates from T5commons. t:commons.button type=button t:id=button value=search event=clicked / void onClicked() { System.out.println(I can get it.); } I don't use annotation here, but they should be the same. DH - Original Message - From: b...@umd To: users@tapestry.apache.org Sent: Friday, June 26, 2009 12:24 AM Subject: Re: Tapestry 5 and Event component. Here is the component reference : http://www.chenillekit.org/chenillekit-tapestry/ref/org/chenillekit/tapestry/core/components/Button.html Indeed the parameter value is useless. So I remove it. But it does not work. DH-14 wrote: I don't have source of ck lib. What about removing the parameter 'value' of the method? BTW what does the parameter mean? DH - Original Message - From: b...@umd To: users@tapestry.apache.org Sent: Thursday, June 25, 2009 11:11 PM Subject: Re: Tapestry 5 and Event component. Actually I did. I first tried to use it with the OnEvent mixins, but the problem was the same. Then by checking on the ck component reference, I noticed that the component t:button has already a parameter named event. That's why I removed the parameter mixins. I have just tried again with Try t:button type=button t:id=button value=search mixins=ck/OnEvent event=clicked /, and I got the same exception. Thiago H. de Paula Figueiredo wrote: On Wed, Jun 24, 2009 at 5:26 PM, b...@umdbben...@umd.edu wrote: gentoo.tml : t:button type=button t:id=button value=search event=clicked / You haven't used the ck/OnEvent mixin in the button, so the event is not fired. Try t:button type=button t:id=button value=search mixins=ck/OnEvent event=clicked / -- Thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- View this message in context: http://www.nabble.com/Tapestry-5-and-Event-component.-tp24192270p24205124.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- View this message in context: http://www.nabble.com/Tapestry-5-and-Event-component.-tp24192270p24206567.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Environmental annotation
Sure, I talk about component classes. Sorry for the unclear message. I played with the bug and reproduced it in the simple form. It happens when I put an inner class of the page into environment and use @Environmental. It does not happen when I refactor that inner class out of the page. It does not happen when I use environment.peek() SimplePage.java package mytapp.pages; import org.apache.tapestry5.ioc.annotations.Inject; import org.apache.tapestry5.services.Environment; public class SimplePage { public class InnerClass { public String toString() { return InnerClass; } } @Inject private Environment environment; void beginRender() { environment.push( InnerClass.class, new InnerClass() ); } void afterRender() { environment.pop( InnerClass.class ); } } SimplePage.tml !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN http://www.w3.org/TR/html4/strict.dtd; html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_1_0.xsd; head titleSimple title/title /head body pSimple text/p pt:SimpleComponent//p /body /html SimpleComponent.java package mytapp.components; import mytapp.pages.SimplePage.InnerClass; import org.apache.tapestry5.MarkupWriter; import org.apache.tapestry5.annotations.Environmental; public class SimpleComponent { @Environmental private InnerClass innerClass; // UNCOMMENT THIS TO WORK // @Inject // private Environment environment; void beginRender( MarkupWriter writer ) { // UNCOMMENT THIS TO WORK // InnerClass innerClass = environment.peek( InnerClass.class ); writer.write( SimpleComponent + innerClass.toString() ); } } - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Environmental annotation
Well, I don't use @Environmental inside the inner class. Ok, then why @Environmental works for OuterClass which is placed outside .base, .page, .component packages? To reproduce just replace InnerClass for OuterClass in the previous example. And add OuterClass.java: package mytapp; public class OuterClass { public String toString() { return OuterClass; } } On Thu, Jun 25, 2009 at 7:53 PM, Howard Lewis Ship hls...@gmail.com wrote: Inner classes are not component classes and are not transformed (component class transformation is the hook that allows @Environmental to work).
Re: Feedback on application status page
Ok, i think i got it working. Check out the new screenshot and code on the blog http://hugopalma.wordpress.com/2009/06/24/tapestry-application-status-page/ On Thu, Jun 25, 2009 at 14:36, Hugo Palma hugo.m.pa...@gmail.com wrote: Hi Igor, thanks for pointing that issue out. Indeed it would be cool if we could be view all session data organized in terms of ASOs and persistent fields. I'll give it a go. On Thu, Jun 25, 2009 at 14:17, Igor Drobiazko igor.drobia...@gmail.comwrote: Nice!!! BTW see here: https://issues.apache.org/jira/browse/TAP5-570 On Thu, Jun 25, 2009 at 11:04 AM, Hugo Palma hugo.m.pa...@gmail.com wrote: I've created an application status page that it's very similar to the service status that is bunbled with the framework but instead of showing information on services it shows information on the web application itself. You can check out the code for it and a screenshot here http://hugopalma.wordpress.com/2009/06/24/tapestry-application-status-page/ I would also like to know if you guys think that such a page should be included in the framework itself. If so i'll gladly create the issue and appropriate patch. Cheers, Hugo -- Best regards, Igor Drobiazko
Re: Tapestry 5 and Event component.
Ok, it seems to come from the parameter String value in my onButtonClicked statement. I removed it and the event is now handled. However it appears that I am not allowed to return a JSONObject from the OnButtonClicked method. May be is it not possible with this kind of component. But perhaps you can still help me. I am trying to make a research function for my interface. For the moment, it works great with the following code : gentoo.tml : t:textfield t:id=textfield t:value=textFieldValue t:mixins=OnEvent event=blur onCompleteCallback=onSearchRequest / gentoo.java : @OnEvent(component = textfield, value = blur) public JSONObject onBlurEvent(String value) { System.out.println(Event Caught !); String translatedValue = Package not found !; try { String category=applicationManager.getCategoryFromApplication(value); if (category != null) { translatedValue = This package is located in category strong+category+/strong.; } return new JSONObject().put(translatedValue, translatedValue);} catch(Exception e){} return new JSONObject().put(translatedValue, translatedValue); } gentoo.js : /* This is to update the Textfield component 'result' */ function onSearchRequest(response) { $('result').update(Search result(s) : +response.translatedValue); } My problem is that the search is performed on blur event (when the user click anywhere outside the textfield box) whereas I would like to perform it when the user click on a button instead. So that is why I believed I could trigger this event by changing the blur event into a clicked event. Does anyone know how I can simply do that ? -- View this message in context: http://www.nabble.com/Tapestry-5-and-Event-component.-tp24192270p24209012.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: matriz
I have written a component to input a matrix. The following page has an example to input a square matrix. (The component can input a non-square matrix as well.) http://lombok.demon.co.uk/mathToolkit/algebra/linear/eigenvalue If you like, I can email you the component source files. Shing --- On Thu, 25/6/09, Gutemberg Albuquerque Da Silva sag@gmail.com wrote: From: Gutemberg Albuquerque Da Silva sag@gmail.com Subject: matriz To: Tapestry users users@tapestry.apache.org Date: Thursday, 25 June, 2009, 3:48 AM anybody knows some solution for working editable matriz? I need to catch cell of table. thanks. -- Gutemberg Albuquerque Da Silva - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
creating a component event link for another page...
i have an admin page that creates a link that would reside on another page and refer to a component on that other page. i implemented it by injecting the page loader and the link source and creating the link that way. however, both the page loader and link source are internal services which we are advised against using. my question is, what is the proper way to do this? thanks, tom - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: creating a component event link for another page...
Create the event link for your own page, and then obtain the target page and invoke a method on it. On Thu, Jun 25, 2009 at 1:40 PM, Tom Zurkan tzur...@citizensportsinc.comwrote: i have an admin page that creates a link that would reside on another page and refer to a component on that other page. i implemented it by injecting the page loader and the link source and creating the link that way. however, both the page loader and link source are internal services which we are advised against using. my question is, what is the proper way to do this? thanks, tom - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator of Apache Tapestry Director of Open Source Technology at Formos
Re: Environmental annotation
@Environmental only works on component classes, period. If you are finding otherwise, there's something wrong with your tests or observations. On Thu, Jun 25, 2009 at 10:19 AM, Sergey Didenko sergey.dide...@gmail.comwrote: Well, I don't use @Environmental inside the inner class. Ok, then why @Environmental works for OuterClass which is placed outside .base, .page, .component packages? To reproduce just replace InnerClass for OuterClass in the previous example. And add OuterClass.java: package mytapp; public class OuterClass { public String toString() { return OuterClass; } } On Thu, Jun 25, 2009 at 7:53 PM, Howard Lewis Ship hls...@gmail.com wrote: Inner classes are not component classes and are not transformed (component class transformation is the hook that allows @Environmental to work). -- Howard M. Lewis Ship Creator of Apache Tapestry Director of Open Source Technology at Formos
Re: Feedback on application status page
I implemented this code as a component that could be used on any page (or in my case, at the bottom of Layout.tml). This component also checks the Tapestry mode to determine whether or not to show itself. The other primary change that I made is that I'm using in-line styles so that it is completely portable. While this wasn't rocket science, I'm always looking for a way to give back to such a great community. If anyone wants this version, fire off an email and I'll send it your way. Obviously, all the credit goes to Hugo. I simply modified it to fit my needs. Thanks! Jason On Thu, Jun 25, 2009 at 1:21 PM, Hugo Palma hugo.m.pa...@gmail.com wrote: Ok, i think i got it working. Check out the new screenshot and code on the blog http://hugopalma.wordpress.com/2009/06/24/tapestry-application-status-page/ On Thu, Jun 25, 2009 at 14:36, Hugo Palma hugo.m.pa...@gmail.com wrote: Hi Igor, thanks for pointing that issue out. Indeed it would be cool if we could be view all session data organized in terms of ASOs and persistent fields. I'll give it a go. On Thu, Jun 25, 2009 at 14:17, Igor Drobiazko igor.drobia...@gmail.com wrote: Nice!!! BTW see here: https://issues.apache.org/jira/browse/TAP5-570 On Thu, Jun 25, 2009 at 11:04 AM, Hugo Palma hugo.m.pa...@gmail.com wrote: I've created an application status page that it's very similar to the service status that is bunbled with the framework but instead of showing information on services it shows information on the web application itself. You can check out the code for it and a screenshot here http://hugopalma.wordpress.com/2009/06/24/tapestry-application-status-page/ I would also like to know if you guys think that such a page should be included in the framework itself. If so i'll gladly create the issue and appropriate patch. Cheers, Hugo -- Best regards, Igor Drobiazko
Re: Feedback on application status page
Yes, very useful and would make sense to have this data/page available in non-production mode out-of-the-box. Kalle On Thu, Jun 25, 2009 at 2:18 AM, Hugo Palmahugo.m.pa...@gmail.com wrote: I was thinking of following the same principle that the ServiceStatus page uses, which is to only be displayed when not in production mode. On Thu, Jun 25, 2009 at 10:16, Ben Gidley b...@gidley.co.uk wrote: I think this is useful - maybe you should include it as a component so we can add it an appropriately private area of our sites. It is in general a bad idea to leave such pages on in production - but they are handy for development or as protected diagnostic pages. Ben Gidley www.gidley.co.uk b...@gidley.co.uk On Thu, Jun 25, 2009 at 10:04 AM, Hugo Palma hugo.m.pa...@gmail.com wrote: I've created an application status page that it's very similar to the service status that is bunbled with the framework but instead of showing information on services it shows information on the web application itself. You can check out the code for it and a screenshot here http://hugopalma.wordpress.com/2009/06/24/tapestry-application-status-page/ I would also like to know if you guys think that such a page should be included in the framework itself. If so i'll gladly create the issue and appropriate patch. Cheers, Hugo - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org