Re: Question about ApplicationInitializerFilter
Thank you Howard, It was a typo after a refactoring (DatabaseManager |- DatabaseUpdateManager). I didn't check the update textual occurences in eclipse. Lewis Ship schrieb: The most common case for this is that the module class defining the service, or the module class containing the contribution to the service, is not being loaded. Please refer to the docs on how to ensure that modules are loaded. On Tue, Apr 29, 2008 at 2:10 AM, Michael Gerzabek [EMAIL PROTECTED] wrote: Hi, I've a Service that extends ApplicationInitializerFilter: public interface DatabaseUpdateManager extends ApplicationInitializerFilter { public void update() throws SQLException; } I made it a service because I thought then it would be easy to collect contributions from other modules. In my module I declare a bulder with public static DatabaseUpdateManager build( final Logger logger, final CollectionDatabaseModuleDef contributions ) { return new DatabaseUpdateManagerImpl( logger, contributions ); } and contribute to the ApplicationInitializer with public static void contributeApplicationInitializer( OrderedConfigurationApplicationInitializerFilter configuration, final DatabaseUpdateManager manager ) { configuration.add( DatabaseManager, manager ); } Another module tries to contribute to this class with public static void contributeDatabaseManager( ConfigurationDatabaseModuleDef configuration ) { System.out.println( contributeDatabaseManager()); .. contributions .. } But method contributeDatabaseManager(..) is never called. What am I missing? Thanks in advance Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Question about ApplicationInitializerFilter
You can see that there are a few issues in JIRA to make the IoC stuff (even) more refactoring-safe. On Sun, May 4, 2008 at 11:06 PM, Michael Gerzabek [EMAIL PROTECTED] wrote: Thank you Howard, It was a typo after a refactoring (DatabaseManager |- DatabaseUpdateManager). I didn't check the update textual occurences in eclipse. Lewis Ship schrieb: The most common case for this is that the module class defining the service, or the module class containing the contribution to the service, is not being loaded. Please refer to the docs on how to ensure that modules are loaded. On Tue, Apr 29, 2008 at 2:10 AM, Michael Gerzabek [EMAIL PROTECTED] wrote: Hi, I've a Service that extends ApplicationInitializerFilter: public interface DatabaseUpdateManager extends ApplicationInitializerFilter { public void update() throws SQLException; } I made it a service because I thought then it would be easy to collect contributions from other modules. In my module I declare a bulder with public static DatabaseUpdateManager build( final Logger logger, final CollectionDatabaseModuleDef contributions ) { return new DatabaseUpdateManagerImpl( logger, contributions ); } and contribute to the ApplicationInitializer with public static void contributeApplicationInitializer( OrderedConfigurationApplicationInitializerFilter configuration, final DatabaseUpdateManager manager ) { configuration.add( DatabaseManager, manager ); } Another module tries to contribute to this class with public static void contributeDatabaseManager( ConfigurationDatabaseModuleDef configuration ) { System.out.println( contributeDatabaseManager()); .. contributions .. } But method contributeDatabaseManager(..) is never called. What am I missing? Thanks in advance Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Question about ApplicationInitializerFilter
Interesting, espscially https://issues.apache.org/jira/browse/TAPESTRY-1904 and https://issues.apache.org/jira/browse/TAPESTRY-1679. I've another question. Do you think there's a need for loading/ unloading modules? This would add a very powerful feature the Java world does leak in comparison to php. Think of WordPress or drupal. There you can add modules to your installation, activate (load) them, uninstall (unload) them and everything is neatly integrated into the GUI. I think some apps also allow for autodetection of new module versions. I researched T5 a little and found that from many points (UI, Services, Configuration) it should be able to make modules loadable. But I'm an T5-IoC beginner and know far to less to get my hands dirty now. Though from user perspective I would love to see this. Dreammode: Have eclipse/ OSGi like T5 where I can drop a jar file and the next time I log into the admin area everything is loaded, could be configured and activated. My basic questions here are ALL: i.) Would it be of benefit to make modules loadable (deployable, etc.)? HLS/ ALL: ii.) Where would I have to look into to get things on go? Michael Howard Lewis Ship schrieb: You can see that there are a few issues in JIRA to make the IoC stuff (even) more refactoring-safe. On Sun, May 4, 2008 at 11:06 PM, Michael Gerzabek [EMAIL PROTECTED] wrote: Thank you Howard, It was a typo after a refactoring (DatabaseManager |- DatabaseUpdateManager). I didn't check the update textual occurences in eclipse. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: Persistence pains
The problem in client strategy that it used Serializable mechanism of jvm. Of cause it produce a lot of data (not getting in mind that most domain objects are not Serializable). I use own persistent strategy called 'parameter'. It is similar to client with follow exceptions. * It uses ValueEncoder to convert from Object to String and from String to Object. It save a lot of space, because for domain object only it id is persistent, which is rarely longer than 6 characters. * It persist each field in separate parameters (when client persist all data in parameter t:ac) . In this way it is similar to activation context's friendly url behavior. User see somethings like this http://somewhere.com/page?user=123order=12item=5 With help of this strategy I persist data between request to the same page. It solves both: problem with multiple browser tabs and problem with too many persistent fields in session. Ivan Dubrov wrote: Right. Most annoying things for us about “session” and “flash” scopes was that they don’t work in several tabs. And “client” can’t hold too much data. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Probable zone update bug
Hi Tapestry team, Is there any chance of this bug: https://issues.apache.org/jira/browse/TAPESTRY-2369 being fixed... a patch is available, so all thats required is to include it in the next build, sorry for being a bit petulant for this fix, its just that it affects a number of sections in our site and we have reached our due date for release. It would really help us out as we have a requirement to freeze the version we release with, even if only a snapshot. Thanks so much, Peter - Original Message - From: Alex.Hon [EMAIL PROTECTED] To: users@tapestry.apache.org Sent: Friday, 25 April, 2008 6:16:25 AM GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: Probable zone update bug https://issues.apache.org/jira/browse/TAPESTRY-2369 Peter Stavrinides wrote: Hi All, A colleague of mine has discovered an anomaly with the the latest t5 snapshot, it came up from April 23's nightly build jars. Here's a simple example where this happens. If the action link is moved anywhere above the t:zone in the .tml it works. If it is below the zone it does not work. Java file: public class Zones { @Persist @Property private int data = 0; @Inject private Block someBlock; @OnEvent(component = theLink) Object onEvent() { return someBlock; } void onAction() { data++; } } tml file: html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd; headtitleAjax test/title/head body t:zone t:id=zoneToUpdate t:delegate to=block:someBlock / /t:zone t:block t:id=someBlock t:actionlink t:id=theLink t:zone=zoneToUpdateclick/t:actionlink br/ ${data} /t:block /body /html It appears as if Zones are not properly linked in some cases. The Tapestry.linkZone javascript function, 2nd line (var zone = $(zoneDiv).zone) returns undefined. Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Probable-zone-update-bug-tp16877437p16884119.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Timeout component problem
Hi all, We are upgrading from T 4.0.2 to T 4.1.5.How to use Timeout component is 4.1.some where in out code we are using span jwcid=@TimeOut/ The below code will be generated by Timeout component.But it says ' tapestry ' is undefined , which is generating javascript errors on page. tapestry.TimeoutTimerConfirm=function(){}; tapestry.TimeoutProlongSessionTime=function(){}; tapestry.TimeoutExpirationTime=function(){}; tapestry.addOnLoad(function(e) { dojo.require(tapestry.form);tapestry.form.registerForm(Form);});
[ANN] equanda 0.9 released
equanda, a open source project to generate a JEE application based on a domain model, has released version 0.9. equanda generates the EJB3 access objects with possibility for powerful declarative constraints and added programmatic constraints. equanda also generates a tapestry5 based user interface with powerful options for customizations. All this (and quite a few other bots and pieces) are generated at compile time from a XML description of the data and constraints. The customizations remain intact in the generation process. This is the first useable release of equanda since the project started (though the user interface still lacks features). Notable changes include : - initial tapestry5 user interface - type handling in field templates now also interprets subtags - filter string per table - improved form traversal in user interface, which also auto switches to the next tab - allow templates to define extra key-value pairs, possibly overwritten by user - fields named Reference or Description should automatically be marked as is-reference or is-description - generate UML and OWL from the domain model - Improve xml reading/handling in domain model parsing code - add selectors on proxies - create archetype for empty equanda project - tapestry5 accordion component - tapestry5 tabs component - tapestry5 FormTraversal component - add equandaReset() method in proxies to revert the state to the database values - tapestry5 create manifest binding prefix - Should allow a table type (in the inheritance tree) to be impossible to create For more information, visit the project web site : http:// equanda.org/ -- Joachim Van der Auwera http://blog.progs.be - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: Persistence pains
We use a serialization strategy that zips the serialized form and base64 encodes it. We're yet to see a performance issue with the solution. The issue with persisting each field in separate parameter is obviously that of the number of such fields you are able to persist. - Original Message - From: Dmitry Shyshkin [EMAIL PROTECTED] To: Tapestry users users@tapestry.apache.org Sent: Monday, May 05, 2008 4:48 AM Subject: Re: T5: Persistence pains The problem in client strategy that it used Serializable mechanism of jvm. Of cause it produce a lot of data (not getting in mind that most domain objects are not Serializable). I use own persistent strategy called 'parameter'. It is similar to client with follow exceptions. * It uses ValueEncoder to convert from Object to String and from String to Object. It save a lot of space, because for domain object only it id is persistent, which is rarely longer than 6 characters. * It persist each field in separate parameters (when client persist all data in parameter t:ac) . In this way it is similar to activation context's friendly url behavior. User see somethings like this http://somewhere.com/page?user=123order=12item=5 With help of this strategy I persist data between request to the same page. It solves both: problem with multiple browser tabs and problem with too many persistent fields in session. Ivan Dubrov wrote: Right. Most annoying things for us about “session” and “flash” scopes was that they don’t work in several tabs. And “client” can’t hold too much data. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: T5: Persistence pains
Howard, I totally get the two request pattern. A user shouldn't have to decide whether to re-submit their information. Great feature of the framework. So let's say that the request scope I'm referring to would be browser round-trip scope. As people on the forum have pointed out, combinations of the back button, refreshing, spawning new browser instances (which share session information) all can create chaos for any session-interacting web application. Just seems strange that seasoned web developers who use Tapestry are baking their own persistence mechanisms. Some are even making protocol-ish marker-based activation context constructs (/editdoohickeys/d1/keyval1/keyval2/d2/keyval1/keyval2). Sounds like what most of us are requesting is to at least permit the developer to not have to persist their components in the session (something like ServletRequest.setAttribute/getAttribute instead). Now that I've thoroughly beaten it, I'll just let the dead horse decompose for a while until it starts to smell (no Eight Belles reference intended). Joel -Original Message- From: Howard Lewis Ship [mailto:[EMAIL PROTECTED] Sent: Saturday, May 03, 2008 5:38 PM To: Tapestry users Subject: Re: T5: Persistence pains On Fri, May 2, 2008 at 6:36 PM, Joel Wiegman [EMAIL PROTECTED] wrote: Josh, Thanks for the great suggestions. I guess I'm still befuddled as to why a web framework would resist having a request scope so dilligently. It's not resistance, it's a different mindset, one that states that URLs should stand on their own in the browser and represent data to be presented to the user (i.e., render page requests) rather than behaviors to execute (the action requests). From what you describe, your activate event handler method should be able to load whatever additional data is needed and store it in simple component fields: that's your request scope. The fact that Tapestry links action requests to page requests is a separate issue. The goal is that if the user clicks the refresh button (the other annoying thing users do, besides hit the browser back button) that there won't be unexpected side-effects (such as, for instance, re-submitting an order, re-sending an email, etc., etc.). The flash scope appears to makes some intelligent guesses as to when you want your objects removed from the session, but the back-button-example I listed is one of quite a few reasons why making such guesses is a fools game. As we all know, HTTP is a request-response, stateless protocol, but Tapestry appears to be resisting storing state in one of the most basic constructs available in HTTP... the request. Anyone know why this is? Because we can store it inside ordinary fields instead? As you illustrated, I'm sure there are quite a few elaborate ways of dancing around the issue in any application (redundant checking, re-verification, passing clearThisValue flags around, etc.). None seem very elegant though (and would probably be associated with this is why I'm doing this comments). As for your activation context suggestions, those are some neat ideas. I hadn't considered your marking suggestion. I'm a little afraid to use it though. I can see a Tapestry pattern evolving from that that yields (String... stuff) as your parameter to your onActivate with a boatload of extravagant logic. Anyway, still haven't heard a useful suggestion to get objects into a request only scope. If anyone can think of something please post! It would be interesting to see what some of these values are that can only be set inside an action request but must then span into a render request. Thanks, Joel -Original Message- From: [EMAIL PROTECTED] on behalf of Josh Canfield Sent: Fri 5/2/2008 6:31 PM To: Tapestry users Subject: Re: T5: Persistence pains I generally consider flash persistence as a way to get an object from the action request to the render request... If you're going to set it in the render request you should consider adding code that validates that your data and context match up. You could, for instance, also flash persist your id and check it against the id from the context. If they don't match then null your other properties. While some may argue that this is just poor design, what if the fields I initialize varies by product? I'd get a merging of the two products on the screen depending on what was persisted first. Storing these things in your component smells funny... but I don't know your app. If someone is coming to the page for the first time you want an empty object, if they are posting an update to the form then Tapestry is going to populate the values. If you are navigating within the page using pagelinks, but it's a form then I'd consider posting the form instead... Josh On Fri, May 2, 2008 at 2:39 PM, Joel Wiegman [EMAIL PROTECTED] wrote: Sure Howard. Quite simply, the back button. When loading a page
Tap 5.0.11 : How to get page instance from page
Usually, I could use the following to inject a page into another page @InjectPage private DetailsPage details; How to retrieve an instance of a page if I am given the logical name of a page as a String variable ? In Tap 4, I would use RequestCycle.getPage(pageName). Thanks in advance for any asistance! Shing Home page : http://www.lombok.demon.co.uk/ ___ Yahoo! For Good. Give and get cool things for free, reduce waste and help our planet. Plus find hidden Yahoo! treasure http://green.yahoo.com/uk/earth-day/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tap 5.0.11 : How to get page instance from page
@Inject private RequestPageCache pageCache; pageCache.get(logicalName) g, kris Shing Hing Man [EMAIL PROTECTED] 05.05.2008 15:53 Bitte antworten an Tapestry users users@tapestry.apache.org An tapestry Tapestry [EMAIL PROTECTED] Kopie Thema Tap 5.0.11 : How to get page instance from page Usually, I could use the following to inject a page into another page @InjectPage private DetailsPage details; How to retrieve an instance of a page if I am given the logical name of a page as a String variable ? In Tap 4, I would use RequestCycle.getPage(pageName). Thanks in advance for any asistance! Shing Home page : http://www.lombok.demon.co.uk/ ___ Yahoo! For Good. Give and get cool things for free, reduce waste and help our planet. Plus find hidden Yahoo! treasure http://green.yahoo.com/uk/earth-day/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Can't run Tapestry 5.0.11 project
I am trying to run sample project from Tapestry.5.Building.Web.Applications.Jan.2008. Environment: Eclipse, Tomcat, Tapestry 5.0.11. Error: HTTP Status 404 - /t5first/ type Status report message /t5first/ description The requested resource (/t5first/) is not available. Apache Tomcat/6.0.14 The project consists of /t5first/java/com/packtpub/t5first/pages/Start.java, /t5first/WebContent/Start.tml, /t5first/WebContent/WEB-INF/web.xml I'd be very thankful for a ready source code (in .zip + .war file) of a simple example project for Eclipse/Tomcat environment! (structure, which files are necessary like web.xml, etc.) I also have a java file with arraylist of links, .tml page. How to display each value of that arraylist ? (how to display those values in a form of links or radiobuttons?) Thanks in advance for any help! -- View this message in context: http://www.nabble.com/Can%27t-run-Tapestry-5.0.11-project-tp17062359p17062359.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[ANN] equanda 0.9 released
equanda, a open source project to generate a JEE application based on a domain model, has released version 0.9. equanda generates the EJB3 access objects with possibility for powerful declarative constraints and added programmatic constraints. equanda also generates a tapestry5 based user interface with powerful options for customizations. All this (and quite a few other bots and pieces) are generated at compile time from a XML description of the data and constraints. The customizations remain intact in the generation process. This is the first useable release of equanda since the project started (though the user interface still lacks features). Notable changes include : - initial tapestry5 user interface - type handling in field templates now also interprets subtags - filter string per table - improved form traversal in user interface, which also auto switches to the next tab - allow templates to define extra key-value pairs, possibly overwritten by user - fields named Reference or Description should automatically be marked as is-reference or is-description - generate UML and OWL from the domain model - Improve xml reading/handling in domain model parsing code - add selectors on proxies - create archetype for empty equanda project - tapestry5 accordion component - tapestry5 tabs component - tapestry5 FormTraversal component - add equandaReset() method in proxies to revert the state to the database values - tapestry5 create manifest binding prefix - Should allow a table type (in the inheritance tree) to be impossible to create For more information, visit the project web site : http:// equanda.org/ -- Joachim Van der Auwera http://blog.progs.be/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tap 5.0.11 : How to get page instance from page
thank you for the hint, didn't even notice this service i saw that the BeanBlockSource service was using RequestPageCache, and so did i :) g, kris Filip S. Adamsen [EMAIL PROTECTED] 05.05.2008 16:41 Bitte antworten an Tapestry users users@tapestry.apache.org An Tapestry users users@tapestry.apache.org Kopie Thema Re: Tap 5.0.11 : How to get page instance from page Hi, RequestPageCache is an internal service, it's better to use ComponentSource instead. It has methods to get a component or page by logical name. http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry/services/ComponentSource.html -Filip On 2008-05-05 16:01, Kristian Marinkovic wrote: @Inject private RequestPageCache pageCache; pageCache.get(logicalName) g, kris Shing Hing Man [EMAIL PROTECTED] 05.05.2008 15:53 Bitte antworten an Tapestry users users@tapestry.apache.org An tapestry Tapestry [EMAIL PROTECTED] Kopie Thema Tap 5.0.11 : How to get page instance from page Usually, I could use the following to inject a page into another page @InjectPage private DetailsPage details; How to retrieve an instance of a page if I am given the logical name of a page as a String variable ? In Tap 4, I would use RequestCycle.getPage(pageName). Thanks in advance for any asistance! Shing Home page : http://www.lombok.demon.co.uk/ ___ Yahoo! For Good. Give and get cool things for free, reduce waste and help our planet. Plus find hidden Yahoo! treasure http://green.yahoo.com/uk/earth-day/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tap 5.0.11 : How to get page instance from page
Thanks for all the replies! I have tried it and it works. Shing --- Filip S. Adamsen [EMAIL PROTECTED] wrote: Hi, RequestPageCache is an internal service, it's better to use ComponentSource instead. It has methods to get a component or page by logical name. http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry/services/ComponentSource.html -Filip On 2008-05-05 16:01, Kristian Marinkovic wrote: @Inject private RequestPageCache pageCache; pageCache.get(logicalName) g, kris Shing Hing Man [EMAIL PROTECTED] 05.05.2008 15:53 Bitte antworten an Tapestry users users@tapestry.apache.org An tapestry Tapestry [EMAIL PROTECTED] Kopie Thema Tap 5.0.11 : How to get page instance from page Usually, I could use the following to inject a page into another page @InjectPage private DetailsPage details; How to retrieve an instance of a page if I am given the logical name of a page as a String variable ? In Tap 4, I would use RequestCycle.getPage(pageName). Thanks in advance for any asistance! Shing Home page : http://www.lombok.demon.co.uk/ ___ Yahoo! For Good. Give and get cool things for free, reduce waste and help our planet. Plus find hidden Yahoo! treasure http://green.yahoo.com/uk/earth-day/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Home page : http://www.lombok.demon.co.uk/ ___ Yahoo! For Good. Give and get cool things for free, reduce waste and help our planet. Plus find hidden Yahoo! treasure http://green.yahoo.com/uk/earth-day/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tap 5.0.11 : How to get page instance from page
Hi, RequestPageCache is an internal service, it's better to use ComponentSource instead. It has methods to get a component or page by logical name. http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry/services/ComponentSource.html -Filip On 2008-05-05 16:01, Kristian Marinkovic wrote: @Inject private RequestPageCache pageCache; pageCache.get(logicalName) g, kris Shing Hing Man [EMAIL PROTECTED] 05.05.2008 15:53 Bitte antworten an Tapestry users users@tapestry.apache.org An tapestry Tapestry [EMAIL PROTECTED] Kopie Thema Tap 5.0.11 : How to get page instance from page Usually, I could use the following to inject a page into another page @InjectPage private DetailsPage details; How to retrieve an instance of a page if I am given the logical name of a page as a String variable ? In Tap 4, I would use RequestCycle.getPage(pageName). Thanks in advance for any asistance! Shing Home page : http://www.lombok.demon.co.uk/ ___ Yahoo! For Good. Give and get cool things for free, reduce waste and help our planet. Plus find hidden Yahoo! treasure http://green.yahoo.com/uk/earth-day/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Parameters not using setters?
Hello list, Some time ago (5.0.?) when I had a component with a parameter, I could implement a set method which would do some additional cleaning up. For example: @Parameter(required = true) private RegistryCenter _selectedRegistryCenter; public void setSelectedRegistryCenter(RegistryCenter value) { _role = null; _selectedRegistryCenter = value; } Now, it seems like in the last version(s) of Tapestry, parameter setting is not using the set methods!?! If so (which broke my app BTW), what can I do to recuperate this kind of behavior (e.g. do something when a parameter is set). Thanks, Alex -- Alexander Lamb Founding Associate RODANOTECH Sàrl 4 ch. de la Tour de Champel 1206 Geneva Switzerland Tel: 022 347 77 37 Fax: 022 347 77 38 http://www.rodanotech.ch - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[T5.0.11] ClassCastException
Hi guys, I get this: loader constraint violation: when resolving interface method com.foo.services.AdminDataSource.getConfiguration(Lcom/foo/base/Component;)Lcom/foo/services/ComponentConfiguration; the class loader (instance of org/apache/tapestry/internal/services/ComponentInstantiatorSourceImpl$PackageAwareLoader) of the current class, com/foo/base/AbstractComponent, and the class loader (instance of org/apache/catalina/loader/WebappClassLoader) for resolved class, com/foo/services/AdminDataSource, have different Class objects for the type com/foo/base/Component used in the signature What I can see from this, is two different class loaders load some classes. What I have is a component class trying to use a service of mine. What am I doing wrong? :) Thx in advance! Cheers janos
Re: page activation + components
On Fri, May 2, 2008 at 1:23 PM, János Jarecsni [EMAIL PROTECTED] wrote: hi Josh well I think if I have a reusable (pluggable) component, the ability to configure it comes in handy when putting the site together. Say, I have a voter component. Week by week there's another question, or I'd like to add three instances of a stock monitor each configured to poll a different paper's data. All this can be done in the admin site accompanying the base site. I would not reserve this model for CMS, manageability is an important feature for any application. Yeah, that's all out of the realm of what I would consider Tapestry's area of responsibility. These are application concepts best left to the application designer, whether your application is a portal/cms/or other. Regarding localization, say we have some component C residing in the com.foo.components package. It has its own message catalogue, C.properties. Question is how and where to put a C.properties file to override the factory defaults for this component? Say the component author defined a label like username=User name whereas in the current application I'd like to have this as: username=Employee name. I want to use the component but with a different message catalogue. All this without modifying the component JAR. There is probably room for better support for replacing existing message bundles. As it stands I believe putting your properties files into the classpath in front of your compoent jars would get your desired result. Is there some info on your page cache implementation (and the component version as well)? In my vision caching is also something to be configured on the admin site :) I based my cache off of the ehcache j2ee cache and a request dispatcher. I believe if you search the list you can find out something about the component class. Maybe it's time to cache myself in bed now or I'll miss this night too, and that would be baaad :) Cheers janos 2008/5/2 Josh Canfield [EMAIL PROTECTED]: Hey Janos, Perhaps a building platform on a framework then? :) 1. automatic admin site generation (the administration or configuration of components is an essential aspect of web applications) No, this is definitely platform functionality here. I have no need for managing components like you describe. My web applications read/write data from a database and present them in a consistent way. What you are talking about here sounds like a Content Management System, which you could build using Tapestry. 2. override of resources from top to bottom ... Definitely, and best that I know this is possible with Tapestry. Do you have a specific problem? 3. caching of component UI ... Eh... whether this should be built into the framework is debatable (and has been debated). As I recall Howard isn't a fan of caching at that level. I built a page level cache for my app within the framework (very slow changing data), someone on this list has built a component version. Anyway, good luck getting some sleep tonight! Josh On Fri, May 2, 2008 at 8:25 AM, János Jarecsni [EMAIL PROTECTED] wrote: one more thing :) At that point you're sort of building a framework on a framework. No, really not. I just try to work out some best practices for my own use on how to create truly reusable components, and how to build web sites (not portals, cause I think the normal website let it be an e-commerce site or a blog site or whatever is significantly different from a portal, and there are quite good portal engines out there anyway :)). I like T5 quite much (I don't know a lot of core stuff, I only read Alexander Kolesnikov's book which is a great introduction by the way). But I found a few things which are not supported directly and I would need these for my large scale goal: 1. automatic admin site generation (the administration or configuration of components is an essential aspect of web applications) 2. override of resources from top to bottom (I mean, that the application assembler should be able to replace the i18n and CSS resources of a component with stuff of his/her liking. According to what I currently know this is not possible, only the opposite way) 3. caching of component UI (for instance, I should be able to say in a component which generates graphs that the framework should cache the result for 5 minutes or until a certain event is not triggered) and maybe more as I go ahead. Once more, I definitely don't want to build a new framework, but these issues are quite important if you really after creating a repository of a few dozen components which can save you the bulk of the work when creating a new site. I have finished my second 5 o' clock coffee and still I'm sleepy and tired. Yesterday night there was a party in the appartment above us, and the young guys
Re: Parameters not using setters?
I'm afraid you are mistaken; this aspect of parameter handling has not changed over the lifetime of T5. Tapestry has never used accessor methods to set parameter values. it *is* perfectly valid for your code to implement an accessor method around a parameter-bound field, and for code to invoke the method ... but Tapestry doesn't access it that way. On Mon, May 5, 2008 at 8:26 AM, Alexander Lamb [EMAIL PROTECTED] wrote: Hello list, Some time ago (5.0.?) when I had a component with a parameter, I could implement a set method which would do some additional cleaning up. For example: @Parameter(required = true) private RegistryCenter _selectedRegistryCenter; public void setSelectedRegistryCenter(RegistryCenter value) { _role = null; _selectedRegistryCenter = value; } Now, it seems like in the last version(s) of Tapestry, parameter setting is not using the set methods!?! If so (which broke my app BTW), what can I do to recuperate this kind of behavior (e.g. do something when a parameter is set). Thanks, Alex -- Alexander Lamb Founding Associate RODANOTECH Sàrl 4 ch. de la Tour de Champel 1206 Geneva Switzerland Tel: 022 347 77 37 Fax: 022 347 77 38 http://www.rodanotech.ch - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Parameters not using setters?
You can use ComponentResources.isBound(paramname) to determine if the parameter has been set. Add it to your setupRender method. On Mon, May 5, 2008 at 8:26 AM, Alexander Lamb [EMAIL PROTECTED] wrote: Hello list, Some time ago (5.0.?) when I had a component with a parameter, I could implement a set method which would do some additional cleaning up. For example: @Parameter(required = true) private RegistryCenter _selectedRegistryCenter; public void setSelectedRegistryCenter(RegistryCenter value) { _role = null; _selectedRegistryCenter = value; } Now, it seems like in the last version(s) of Tapestry, parameter setting is not using the set methods!?! If so (which broke my app BTW), what can I do to recuperate this kind of behavior (e.g. do something when a parameter is set). Thanks, Alex -- Alexander Lamb Founding Associate RODANOTECH Sàrl 4 ch. de la Tour de Champel 1206 Geneva Switzerland Tel: 022 347 77 37 Fax: 022 347 77 38 http://www.rodanotech.ch - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Question about ApplicationInitializerFilter
Loading/unloading of modules is tricky. It's something an application server can do, but not necessarily an application framework like Tapestry. Notice the leaky abstractions around components, to support reloading (and transformation) of them. The reloading requires a special class loader, and that makes the component classes incompatible with service layers that don't use the special class loader. Once you get into the IoC layer, with contributions and decorations and services building services etc., etc. ... well, it gets much more complex. Managing the life cycle of the services and other objects becomes overly intrusive (i.e., you aren't allowed to use new anymore) and that's really bad. The IoC code is, by design, incestuous, with objects flowing about and connecting in ways that are both unpredictable and opaque to the container (the Registry). I'm not content with a solution where a live change results in a operational set that is anything but indistinguishable from a full restart. On top of this, Tapestry is a servlet application and servlets have their own framework for redeployment. The bad part of redeployment is the loss of HttpSession data, but other than that, its quite reasonable. A couple of seconds for Tapestry to re-initialize, a few more seconds for Hibernate, and your app is back in business. I suppose anything is possible, but effort vs. benefit is the real question, and I'd rather absorb those few seconds a redeployment requires, rather than add instability and unpredictability to the Tapestry runtime environment. On Mon, May 5, 2008 at 12:59 AM, Michael Gerzabek [EMAIL PROTECTED] wrote: Interesting, espscially https://issues.apache.org/jira/browse/TAPESTRY-1904 and https://issues.apache.org/jira/browse/TAPESTRY-1679. I've another question. Do you think there's a need for loading/ unloading modules? This would add a very powerful feature the Java world does leak in comparison to php. Think of WordPress or drupal. There you can add modules to your installation, activate (load) them, uninstall (unload) them and everything is neatly integrated into the GUI. I think some apps also allow for autodetection of new module versions. I researched T5 a little and found that from many points (UI, Services, Configuration) it should be able to make modules loadable. But I'm an T5-IoC beginner and know far to less to get my hands dirty now. Though from user perspective I would love to see this. Dreammode: Have eclipse/ OSGi like T5 where I can drop a jar file and the next time I log into the admin area everything is loaded, could be configured and activated. My basic questions here are ALL: i.) Would it be of benefit to make modules loadable (deployable, etc.)? HLS/ ALL: ii.) Where would I have to look into to get things on go? Michael Howard Lewis Ship schrieb: You can see that there are a few issues in JIRA to make the IoC stuff (even) more refactoring-safe. On Sun, May 4, 2008 at 11:06 PM, Michael Gerzabek [EMAIL PROTECTED] wrote: Thank you Howard, It was a typo after a refactoring (DatabaseManager |- DatabaseUpdateManager). I didn't check the update textual occurences in eclipse. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: Persistence pains
No, I get that there's an issue here ... I think conversational scope would be helpful. In addition, we need more smarts about what gets stored persistently, something like ValueEncoder but for persisted values; simple values (String, int, etc.) are find, but we need to recognize complex objects, such as Hibernate entities, and store just the entity id in the session, or as client-side data. On Mon, May 5, 2008 at 6:02 AM, Joel Wiegman [EMAIL PROTECTED] wrote: Howard, I totally get the two request pattern. A user shouldn't have to decide whether to re-submit their information. Great feature of the framework. So let's say that the request scope I'm referring to would be browser round-trip scope. As people on the forum have pointed out, combinations of the back button, refreshing, spawning new browser instances (which share session information) all can create chaos for any session-interacting web application. Just seems strange that seasoned web developers who use Tapestry are baking their own persistence mechanisms. Some are even making protocol-ish marker-based activation context constructs (/editdoohickeys/d1/keyval1/keyval2/d2/keyval1/keyval2). Sounds like what most of us are requesting is to at least permit the developer to not have to persist their components in the session (something like ServletRequest.setAttribute/getAttribute instead). Now that I've thoroughly beaten it, I'll just let the dead horse decompose for a while until it starts to smell (no Eight Belles reference intended). Joel -Original Message- From: Howard Lewis Ship [mailto:[EMAIL PROTECTED] Sent: Saturday, May 03, 2008 5:38 PM To: Tapestry users Subject: Re: T5: Persistence pains On Fri, May 2, 2008 at 6:36 PM, Joel Wiegman [EMAIL PROTECTED] wrote: Josh, Thanks for the great suggestions. I guess I'm still befuddled as to why a web framework would resist having a request scope so dilligently. It's not resistance, it's a different mindset, one that states that URLs should stand on their own in the browser and represent data to be presented to the user (i.e., render page requests) rather than behaviors to execute (the action requests). From what you describe, your activate event handler method should be able to load whatever additional data is needed and store it in simple component fields: that's your request scope. The fact that Tapestry links action requests to page requests is a separate issue. The goal is that if the user clicks the refresh button (the other annoying thing users do, besides hit the browser back button) that there won't be unexpected side-effects (such as, for instance, re-submitting an order, re-sending an email, etc., etc.). The flash scope appears to makes some intelligent guesses as to when you want your objects removed from the session, but the back-button-example I listed is one of quite a few reasons why making such guesses is a fools game. As we all know, HTTP is a request-response, stateless protocol, but Tapestry appears to be resisting storing state in one of the most basic constructs available in HTTP... the request. Anyone know why this is? Because we can store it inside ordinary fields instead? As you illustrated, I'm sure there are quite a few elaborate ways of dancing around the issue in any application (redundant checking, re-verification, passing clearThisValue flags around, etc.). None seem very elegant though (and would probably be associated with this is why I'm doing this comments). As for your activation context suggestions, those are some neat ideas. I hadn't considered your marking suggestion. I'm a little afraid to use it though. I can see a Tapestry pattern evolving from that that yields (String... stuff) as your parameter to your onActivate with a boatload of extravagant logic. Anyway, still haven't heard a useful suggestion to get objects into a request only scope. If anyone can think of something please post! It would be interesting to see what some of these values are that can only be set inside an action request but must then span into a render request. Thanks, Joel -Original Message- From: [EMAIL PROTECTED] on behalf of Josh Canfield Sent: Fri 5/2/2008 6:31 PM To: Tapestry users Subject: Re: T5: Persistence pains I generally consider flash persistence as a way to get an object from the action request to the render request... If you're going to set it in the render request you should consider adding code that validates that your data and context match up. You could, for instance, also flash persist your id and check it against the id from the context. If they don't match then null your other properties. While some may argue that this is just poor design, what if the fields I initialize
Re: T5: Persistence pains
Hey Ivan, When you say we, who are you referring to? In my mind, this flow aka conversation support is absolutely the right solution for the problem. Are you planning to share the code or include it with some other project? Various implementations of the conversation concept exists, but I'd gladly take a look at yours as I agree that embedding the flow key to the url is the best way to get support for multiple windows working correctly. Kalle On Sat, May 3, 2008 at 11:03 PM, Ivan Dubrov [EMAIL PROTECTED] wrote: Right. Most annoying things for us about session and flash scopes was that they don't work in several tabs. And client can't hold too much data. That's why we have implemented a new persistence strategy named flow (inspired by the Spring WebFlow). The idea is that every URL has flow key stored in it, and the state is stored in the session under this key. The state is versioned (actually, the state is immutable, every change to the persistent fields introduces new state). We keep about 10 previous states, to keep the session from overburdening. There is still some issues with AJAX calls, though. The biggest argument to be made for request scope state that is automatically (or framework assisted developer code) persisted in the page vs. the flash technique of Tapestry is when considering multiple browsers opened by the user with the same session. Every app that I've developed, we've had to diligently ensure that nothing other than login credentials were stored in the session and everything was persisted within the request. For T3, our team developed an elaborate set of components that made this trivial (including our own annotations based support). The fact that Tap 5 gets in the way of trying to have a very light session is a little disconcerting. The other side-effect of flash would be thrashing in a clustered environment. - Original Message - From: Howard Lewis Ship [EMAIL PROTECTED] To: Tapestry users users@tapestry.apache.org Sent: Saturday, May 03, 2008 5:37 PM Subject: Re: T5: Persistence pains On Fri, May 2, 2008 at 6:36 PM, Joel Wiegman [EMAIL PROTECTED] wrote: Josh, Thanks for the great suggestions. I guess I'm still befuddled as to why a web framework would resist having a request scope so dilligently. It's not resistance, it's a different mindset, one that states that URLs should stand on their own in the browser and represent data to be presented to the user (i.e., render page requests) rather than behaviors to execute (the action requests). From what you describe, your activate event handler method should be able to load whatever additional data is needed and store it in simple component fields: that's your request scope. The fact that Tapestry links action requests to page requests is a separate issue. The goal is that if the user clicks the refresh button (the other annoying thing users do, besides hit the browser back button) that there won't be unexpected side-effects (such as, for instance, re-submitting an order, re-sending an email, etc., etc.). The flash scope appears to makes some intelligent guesses as to when you want your objects removed from the session, but the back-button-example I listed is one of quite a few reasons why making such guesses is a fools game. As we all know, HTTP is a request-response, stateless protocol, but Tapestry appears to be resisting storing state in one of the most basic constructs available in HTTP... the request. Anyone know why this is? Because we can store it inside ordinary fields instead? As you illustrated, I'm sure there are quite a few elaborate ways of dancing around the issue in any application (redundant checking, re-verification, passing clearThisValue flags around, etc.). None seem very elegant though (and would probably be associated with this is why I'm doing this comments). As for your activation context suggestions, those are some neat ideas. I hadn't considered your marking suggestion. I'm a little afraid to use it though. I can see a Tapestry pattern evolving from that that yields (String... stuff) as your parameter to your onActivate with a boatload of extravagant logic. Anyway, still haven't heard a useful suggestion to get objects into a request only scope. If anyone can think of something please post! It would be interesting to see what some of these values are that can only be set inside an action request but must then span into a render request. Thanks, Joel -Original Message- From: [EMAIL PROTECTED] on behalf of Josh Canfield Sent: Fri 5/2/2008 6:31 PM To: Tapestry users Subject: Re: T5: Persistence pains I generally consider flash persistence as a way
Re: Parameters not using setters?
So maybe it was in Tapestry 4... we migrated a rather large app so maybe I am just now discovering some side effects of the migration! Anyhow, I need to know when a parameter has changed. For the time being I do the test in setupRender. Someone suggested ComponentResources.isBound(paramname) but this only tells me when the parameter has been set for the first time, not when it has changed. Alex Le 5 mai 08 à 18:28, Howard Lewis Ship a écrit : I'm afraid you are mistaken; this aspect of parameter handling has not changed over the lifetime of T5. Tapestry has never used accessor methods to set parameter values. it *is* perfectly valid for your code to implement an accessor method around a parameter-bound field, and for code to invoke the method ... but Tapestry doesn't access it that way. On Mon, May 5, 2008 at 8:26 AM, Alexander Lamb [EMAIL PROTECTED] wrote: Hello list, Some time ago (5.0.?) when I had a component with a parameter, I could implement a set method which would do some additional cleaning up. For example: @Parameter(required = true) private RegistryCenter _selectedRegistryCenter; public void setSelectedRegistryCenter(RegistryCenter value) { _role = null; _selectedRegistryCenter = value; } Now, it seems like in the last version(s) of Tapestry, parameter setting is not using the set methods!?! If so (which broke my app BTW), what can I do to recuperate this kind of behavior (e.g. do something when a parameter is set). Thanks, Alex -- Alexander Lamb Founding Associate RODANOTECH Sàrl 4 ch. de la Tour de Champel 1206 Geneva Switzerland Tel: 022 347 77 37 Fax: 022 347 77 38 http://www.rodanotech.ch - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tap 5.0.11 How to store Session id in ASO
I need to retrieve the http session id. One way to get session id is to inject RequestGlobals into my page and then get the HttpRequest from RequestGlobals. For simplicity sake, I try to inject the httpRquest into an exisitng (session) ASO X (which is already injected to my page) and retrieve the session id from X. With the above approach, I found that the ASO X for different users always return identical session id (the id of the first session created.) Is there a way to store HttpRequest (or session id), in ASO X, so that the HtppRequest (or session id) is 'in sync' with the session. In AppModule : public void contributeApplicationStateManager( MappedConfigurationClass, ApplicationStateContribution configuration, final @Inject @Value(${tempDir}) String tempDir, final @Inject RequestGlobals requestGlobals) { HttpServletRequest request = requestGlobals.getHTTPServletRequest(); ApplicationStateCreatorIUserDirManager creator = new UserDirManagerCreator(request, tempDir); configuration.add(IUserDirManager.class, new ApplicationStateContribution(session, creator)); } Thanks in advance for any assistance ! Shing Home page : http://www.lombok.demon.co.uk/ __ Sent from Yahoo! Mail. A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tap 5.0.11 How to store Session id in ASO
Seems like an odd request. Assuming you are storing the ASO in the session (the only option with the default implementatons), then you (or the servlet API) must already know the session id (i.e., from the request object, from cookie in the request). So storing it in the ASO isn't useful. You could just have a String field in your ASO and when you first create your ASO, get the session id from the HttpServletRequest and store it into the ASO. On Mon, May 5, 2008 at 1:24 PM, Shing Hing Man [EMAIL PROTECTED] wrote: I need to retrieve the http session id. One way to get session id is to inject RequestGlobals into my page and then get the HttpRequest from RequestGlobals. For simplicity sake, I try to inject the httpRquest into an exisitng (session) ASO X (which is already injected to my page) and retrieve the session id from X. With the above approach, I found that the ASO X for different users always return identical session id (the id of the first session created.) Is there a way to store HttpRequest (or session id), in ASO X, so that the HtppRequest (or session id) is 'in sync' with the session. In AppModule : public void contributeApplicationStateManager( MappedConfigurationClass, ApplicationStateContribution configuration, final @Inject @Value(${tempDir}) String tempDir, final @Inject RequestGlobals requestGlobals) { HttpServletRequest request = requestGlobals.getHTTPServletRequest(); ApplicationStateCreatorIUserDirManager creator = new UserDirManagerCreator(request, tempDir); configuration.add(IUserDirManager.class, new ApplicationStateContribution(session, creator)); } Thanks in advance for any assistance ! Shing Home page : http://www.lombok.demon.co.uk/ __ Sent from Yahoo! Mail. A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tap 5.0.11 How to store Session id in ASO
I have found a solution. I need to inject the shadow service HttpServletRequest into my ASO. Shing --- Shing Hing Man [EMAIL PROTECTED] wrote: I need to retrieve the http session id. One way to get session id is to inject RequestGlobals into my page and then get the HttpRequest from RequestGlobals. For simplicity sake, I try to inject the httpRquest into an exisitng (session) ASO X (which is already injected to my page) and retrieve the session id from X. With the above approach, I found that the ASO X for different users always return identical session id (the id of the first session created.) Is there a way to store HttpRequest (or session id), in ASO X, so that the HtppRequest (or session id) is 'in sync' with the session. In AppModule : public void contributeApplicationStateManager( MappedConfigurationClass, ApplicationStateContribution configuration, final @Inject @Value(${tempDir}) String tempDir, final @Inject RequestGlobals requestGlobals) { HttpServletRequest request = requestGlobals.getHTTPServletRequest(); ApplicationStateCreatorIUserDirManager creator = new UserDirManagerCreator(request, tempDir); configuration.add(IUserDirManager.class, new ApplicationStateContribution(session, creator)); } Thanks in advance for any assistance ! Shing Home page : http://www.lombok.demon.co.uk/ __ Sent from Yahoo! Mail. A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Home page : http://www.lombok.demon.co.uk/ __ Sent from Yahoo! Mail. A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T5: pass value between components in different pages
I have two pages, list and edit pages. Each page contains one or more components. From list page, I use an actionlink to pass the item id as Long to edit page, which I have a setter to set this id in the component which I like to use (in which I persist this passed id). Everything is working well if you keep working between those two pages, but I found one problem which is the id value will be null if I refresh the edit page after like 10 min. the T5 will throw exception as follows: org.springframework.transaction.UnexpectedRollbackException: Transaction rolled back because it has been marked as rollback-only To me it seems that the id value passed from list page has got lost/cleaned up. I have tried some alternatives, but no of them is working. Any help will be appreciated! David -- View this message in context: http://www.nabble.com/T5%3A-pass-value-between-components-in-different-pages-tp17070690p17070690.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: pass value between components in different pages
Instead of persisting the id in the component, why not keep the id in the page's context and pass it to the component as a @Parameter? If you store stuff in the session then your component needs to be smart about what to do when the @Persist'd object is null after a session timeout. On Mon, May 5, 2008 at 2:19 PM, DavidWei [EMAIL PROTECTED] wrote: I have two pages, list and edit pages. Each page contains one or more components. From list page, I use an actionlink to pass the item id as Long to edit page, which I have a setter to set this id in the component which I like to use (in which I persist this passed id). Everything is working well if you keep working between those two pages, but I found one problem which is the id value will be null if I refresh the edit page after like 10 min. the T5 will throw exception as follows: org.springframework.transaction.UnexpectedRollbackException: Transaction rolled back because it has been marked as rollback-only To me it seems that the id value passed from list page has got lost/cleaned up. I have tried some alternatives, but no of them is working. Any help will be appreciated! David -- View this message in context: http://www.nabble.com/T5%3A-pass-value-between-components-in-different-pages-tp17070690p17070690.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T4.1.5] - Inherited annotations fail
Hi again... still no luck with this one. After an intense night debugging this, I have found that the bug appears consequently the *second* browser instance that hits the same page. The first request to the page runs fine, but the second time (with a new browser instance) will produce the exception. I am really stuck here - is tapestry caching some of my components here or is it something else going on. I have logged out from ComponentSpecification and it actually finds that my component has already been added to the page specification. I really hope someone can shed some light on this because this is a serious blocker to our project. Best, Henrik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]