Notification of stale session?
Is there some way to receive notification that a session has become stale? I'm looking for something like the javax.servlet interface HttpSessionBindingListener. I have various resources associated with a session and I'd like to free them up when the session times out not waiting for somebody to hit the session (and notice it is stale). Thanks, Kevin Whitley podtech.net - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OGNL Notation for accessing List Element
I have one page (Home.html) with its Class (Home.java) and in the class I have the two methods public String getName(String which){ return which;} public void setName(String which){return;} In the html I have just one tag for the test: jwcid=@Insert value=ognl:name['titi'] I have attached the error message that Tapestry gives me http://www.nabble.com/file/4033/errorMessage.htm errorMessage.htm Martin Strand-4 wrote: How does the code for that method look? it's supposed to look like this: public PropertyType getPropertyName(IndexType index) public void setPropertyName(IndexType index, PropertyType value) On Tue, 07 Nov 2006 13:41:10 +0100, Micha Roon wrote: I am trying to get at a specific element in a list that is return by a GET method in my page. I went to the OGNL home page and saw that the notation session.attribute[foo] will get the foo element of the attribute list ( http://www.ognl.org/2.6.9/Documentation/html/LanguageGuide/indexing.html see here ) I tried this notation in Tapestry and it told me back that it did not understand: Where did I go wrong? thanks for your help, Micha - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/OGNL-Notation-for-accessing-List-Element-tf2588481.html#a7234561 Sent from the Tapestry - User mailing list archive at Nabble.com.
Re: Notification of stale session?
There are many ways to do this, the most common and simplest is using a simple pageValidate, but if you need something more complex for whatever reason, you can also wire a listener using hivemind or even use your web.xml file i.e. web.xml listener listener-class com.test.application.SessionListener /listener-class /listener public class SessionListener implements HttpSessionListener,HttpSessionAttributeListener { } or using hivemind: implementation service-id=tapestry.error.StaleSessionExceptionPresenter invoke-factory construct class=application.StaleSessionListener/construct /invoke-factory /implementation public class StaleSessionListener implements StaleSessionExceptionPresenter{ public StaleSessionListener(){ } public void presentStaleSessionException(IRequestCycle cycle, StaleSessionException exception) throws IOException { System.out.println(a stale session was detected); } } Regards Peter Kevin Whitley wrote: Is there some way to receive notification that a session has become stale? I'm looking for something like the javax.servlet interface HttpSessionBindingListener. I have various resources associated with a session and I'd like to free them up when the session times out not waiting for somebody to hit the session (and notice it is stale). Thanks, Kevin Whitley podtech.net - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Peter Stavrinides Albourne Partners (Cyprus) Ltd Tel: +357 22 750652 If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Please visit http://www.albourne.com/email.html for important additional terms relating to this e-mail. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to handle image upload in FCKeditorTA
Hi, I have a question about the image upload functionallity in FCKeditorTA. Does anybody know if it is posible to configure this to take a image location from the local browser instead of Image URL? Can I control the other tabs in the dialog box also? I don't want my clients to have the ability to edit all of the options that is availible. Thanks, Jacob -- View this message in context: http://www.nabble.com/How-to-use-the-FCKEditor-tf2590543.html#a7239642 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
@DropdownDatePicker not working in IE with lastest snapshot
the widget is not rendered at all under IE6. I get the error message : could not locate implementation for dropdowndatepicker in dojowidget registered to namespace dojo. Works OK with firefox 2.0 Anyone experiencing the same?
Re: @DropdownDatePicker not working in IE with lastest snapshot
Christian Dutaret wrote: the widget is not rendered at all under IE6. I get the error message : could not locate implementation for dropdowndatepicker in dojowidget registered to namespace dojo. Works OK with firefox 2.0 Anyone experiencing the same? what's your djConfig ? -- Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr Tapestry / Tacos developer Open Source / J2EE Consulting - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
need help with design of a component
Hi, I am thinking about a component with a specific behaviour, but have no idea how to implement it. I am using 4.1.1-SNAPSHOT. I need to display a list of items. Most of the data about the items is stored in a local relational database, but some other data about the items is retrieved in a remote call that can take significantly longer than retrieving items from the database. My plan was: 1. get data about items from database 2. render the items inside a loop, with a placeholder for the data to be retrieved 3. retrieve the data from the remote source 4. onLoad of the page, asynch udate of the items, replacing the placeholders with the actual data I think, that would work, but I don't know the items's component-ids as they are rendered inside a loop and I haven't assigned them explicitly. How could I update those components asynchronously without knowing their id's? Do you have any suggestions or a better solution for my problem? Thanks, Andy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
help : displaying Images that are stored outside the Web application
Hi, I am a newbie to Tapestry. I need help on how to display the Images stored outside the Web application. Say my application HTML path -- c:/jboss/deploy/webapps/TapestryApp/Home.html But Images are stored outside-- : c:/appImages/test1.jpeg How can I load the Image dynamically in the SRC attribute of Image tag ? any suggestions or pointers will be of great help. Thanks, Sunil -- View this message in context: http://www.nabble.com/help-%3A-displaying-Images-that-are-stored-outside-the-Web-application-tf2597572.html#a7246079 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: need help with design of a component
could you send some javascript with the data implying the id's e.g head script language=javascript var idsToUpdate = []; function addToIdsToUpdate(andId) { idsToUpdate.push(anId) } /script /head div id=someData some data div script language=javascript addToIdsToUpdate(someData); /script may not be what you are after though On 08/11/06, Andy Pahne [EMAIL PROTECTED] wrote: Hi, I am thinking about a component with a specific behaviour, but have no idea how to implement it. I am using 4.1.1-SNAPSHOT. I need to display a list of items. Most of the data about the items is stored in a local relational database, but some other data about the items is retrieved in a remote call that can take significantly longer than retrieving items from the database. My plan was: 1. get data about items from database 2. render the items inside a loop, with a placeholder for the data to be retrieved 3. retrieve the data from the remote source 4. onLoad of the page, asynch udate of the items, replacing the placeholders with the actual data I think, that would work, but I don't know the items's component-ids as they are rendered inside a loop and I haven't assigned them explicitly. How could I update those components asynchronously without knowing their id's? Do you have any suggestions or a better solution for my problem? Thanks, Andy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -- e
Re: help : displaying Images that are stored outside the Web application
When using JSPs or PHP this would be accomplished by setting the content-type and then outputting the contents of the picture. I could then have something like img src=displayimage.jsp? image=whatever.png. I'm not sure exactly how to do it in Tapestry but I would assume it would be something like an inject page as long as you set the content type. Good luck. On Nov 8, 2006, at 3:21 PM, sunilmanu wrote: Hi, I am a newbie to Tapestry. I need help on how to display the Images stored outside the Web application. Say my application HTML path -- c:/jboss/deploy/webapps/TapestryApp/Home.html But Images are stored outside-- : c:/appImages/test1.jpeg How can I load the Image dynamically in the SRC attribute of Image tag ? any suggestions or pointers will be of great help. Thanks, Sunil -- View this message in context: http://www.nabble.com/help-%3A- displaying-Images-that-are-stored-outside-the-Web-application- tf2597572.html#a7246079 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]
users want to load same page with different entities in parallel. How?
Say I have a page to edit an entity, and that includes a table component. When the page is rendered, various bits of state about components of the page are stored in the session, especially for the table component, since it stores current page and various other things in the session. Now, my users want to bring up the EditObject page for an object with id 1, then bring up the same page for an object with id 2 in a different window. Now they make some edits to object 1 based on information visible in the entity 2 page. When they click submit, however, they will get a stale link exception (if they are lucky. If they are unlucky, they could wind up making their changes to entity 2 instead of entity 1). Is there any way to prevent this. Multiple similar windows is fundamental to the way my users want to work (of course, they didn't tell me this until the app was all the way through testing and had been released), and it appears as though Tapestry's persistence mechanism makes it utterly impossible to provide, since I would need some kind of mechanism that would ensure that all state about a page were persisted to the client, rather than to the session, and I don't have any way to do that for components that I don't control. I could rewrite every component I use which has persistent properties, I guess, but that's a huge amount of work and code duplication. I don't suppose there is some kind of undocumented method of associating a unique id with a page instance so that all session persistent data associated with the page were stored under a page:uniqueId combination, preventing conflicts with other instances of the same page. Of course, then I need some way to clean the session of state for a single instance, as well as for all instances of a given page, and that method clearly doesn't exist in the API, so I am concerned that this isn't possible at all. I'm in tap 4.0 for now, but likely negotiating an upgrade to tap 4.1 in the near future. While I'm at it, I haven't seen anyone complain about the inherent security vulnerabilities that come along with client side persistence, as implemented . Storing the true or false values for every conditional in a form as an (unsigned/unencrypted) hidden field is just asking for a user to change an F to a T in order to gain access to something they shouldn't. It seems strange to me that the default would be to store the state in the form, and you have to explicitly request tapestry not to do so. I'd love an override which would cause tapestry to assume conditionals and iterations are volatile unless I explicitly request otherwise. To my mind, defaults should always be the MORE secure option, and then on those conditions and iterations which aren't at risk, set volatile to false. But really, I want all client side persistence to include a hash of the values (or encrypt them) so that we can automatically detect malicious modifications on the part of a user. --sam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: users want to load same page with different entities in parallel. How?
ok, some investigation into the version of contrib:Table that comes with tacos shows that you can specify that a table stores its persistent state to the client on a page or app basis, so it would appear that that is solved for the table component. Are there other components in the core libraries (tapestry, contrib, tacos) which have persistent properties stored in the session? If not, then I can just modify my forms to store the entity id in the form (currently, I've got them in a session state object) and force the correct entity to be reloaded when the page is submitted and everything else should come together with minimal fuss, I think. --sam On 11/8/06, Sam Gendler [EMAIL PROTECTED] wrote: Say I have a page to edit an entity, and that includes a table component. When the page is rendered, various bits of state about components of the page are stored in the session, especially for the table component, since it stores current page and various other things in the session. Now, my users want to bring up the EditObject page for an object with id 1, then bring up the same page for an object with id 2 in a different window. Now they make some edits to object 1 based on information visible in the entity 2 page. When they click submit, however, they will get a stale link exception (if they are lucky. If they are unlucky, they could wind up making their changes to entity 2 instead of entity 1). Is there any way to prevent this. Multiple similar windows is fundamental to the way my users want to work (of course, they didn't tell me this until the app was all the way through testing and had been released), and it appears as though Tapestry's persistence mechanism makes it utterly impossible to provide, since I would need some kind of mechanism that would ensure that all state about a page were persisted to the client, rather than to the session, and I don't have any way to do that for components that I don't control. I could rewrite every component I use which has persistent properties, I guess, but that's a huge amount of work and code duplication. I don't suppose there is some kind of undocumented method of associating a unique id with a page instance so that all session persistent data associated with the page were stored under a page:uniqueId combination, preventing conflicts with other instances of the same page. Of course, then I need some way to clean the session of state for a single instance, as well as for all instances of a given page, and that method clearly doesn't exist in the API, so I am concerned that this isn't possible at all. I'm in tap 4.0 for now, but likely negotiating an upgrade to tap 4.1 in the near future. While I'm at it, I haven't seen anyone complain about the inherent security vulnerabilities that come along with client side persistence, as implemented . Storing the true or false values for every conditional in a form as an (unsigned/unencrypted) hidden field is just asking for a user to change an F to a T in order to gain access to something they shouldn't. It seems strange to me that the default would be to store the state in the form, and you have to explicitly request tapestry not to do so. I'd love an override which would cause tapestry to assume conditionals and iterations are volatile unless I explicitly request otherwise. To my mind, defaults should always be the MORE secure option, and then on those conditions and iterations which aren't at risk, set volatile to false. But really, I want all client side persistence to include a hash of the values (or encrypt them) so that we can automatically detect malicious modifications on the part of a user. --sam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: users want to load same page with different entities in parallel. How?
Storing data to the client is always an option but for larger amounts of data this becomes a problem due to large amount of data that needs to be encoded in the urls of every link or in hidden fields of a form. I think what you are looking for is a way to scope the session data so that you can have separate threads referencing distinct data. If I recall correctly, this type of scope is not directly supported by tapestry natively as it is in other frameworks (like Jboss Seam for example). I find the Conversation strategy very useful and I implement it pretty easily yourself. What I do is I generate a numeric ConversationId at the beginning of a new wizard. I store this Id in a property with @Persist(client). I then have a HashMap that is stored to the session and use this id as the key to store whatever data I need (for example storing a state object). You can then automate the retriaval of this state object from the session on each request by attaching a listener before the page begins to render. This has proven to work good at least for me. I'm sure you could also try to implement a new persistent scope in hivemind to somewhat automate this better and make it more clean. But this seemed easy enough to do that I didn't feel it necessary to go that far. I think it'd be really good if in the future such functionality was integrated into the framework. The idea is to have some way to easily delineate when the scope of a conversation starts/stops some method for expiring dead conversations and of course, allowing multiple independent concurrent conversations at the same time. Although I have never actually used it, I think Seam is based around the idea of contextual conversations and might serve as a good starting point for seeing this idea in action. On 11/8/06, Sam Gendler [EMAIL PROTECTED] wrote: ok, some investigation into the version of contrib:Table that comes with tacos shows that you can specify that a table stores its persistent state to the client on a page or app basis, so it would appear that that is solved for the table component. Are there other components in the core libraries (tapestry, contrib, tacos) which have persistent properties stored in the session? If not, then I can just modify my forms to store the entity id in the form (currently, I've got them in a session state object) and force the correct entity to be reloaded when the page is submitted and everything else should come together with minimal fuss, I think. --sam On 11/8/06, Sam Gendler [EMAIL PROTECTED] wrote: Say I have a page to edit an entity, and that includes a table component. When the page is rendered, various bits of state about components of the page are stored in the session, especially for the table component, since it stores current page and various other things in the session. Now, my users want to bring up the EditObject page for an object with id 1, then bring up the same page for an object with id 2 in a different window. Now they make some edits to object 1 based on information visible in the entity 2 page. When they click submit, however, they will get a stale link exception (if they are lucky. If they are unlucky, they could wind up making their changes to entity 2 instead of entity 1). Is there any way to prevent this. Multiple similar windows is fundamental to the way my users want to work (of course, they didn't tell me this until the app was all the way through testing and had been released), and it appears as though Tapestry's persistence mechanism makes it utterly impossible to provide, since I would need some kind of mechanism that would ensure that all state about a page were persisted to the client, rather than to the session, and I don't have any way to do that for components that I don't control. I could rewrite every component I use which has persistent properties, I guess, but that's a huge amount of work and code duplication. I don't suppose there is some kind of undocumented method of associating a unique id with a page instance so that all session persistent data associated with the page were stored under a page:uniqueId combination, preventing conflicts with other instances of the same page. Of course, then I need some way to clean the session of state for a single instance, as well as for all instances of a given page, and that method clearly doesn't exist in the API, so I am concerned that this isn't possible at all. I'm in tap 4.0 for now, but likely negotiating an upgrade to tap 4.1 in the near future. While I'm at it, I haven't seen anyone complain about the inherent security vulnerabilities that come along with client side persistence, as implemented . Storing the true or false values for every conditional in a form as an (unsigned/unencrypted) hidden field is just asking for a user to change an F to a T in order to gain access to something they shouldn't. It seems strange to me that the default would be to store the state in
Re: users want to load same page with different entities in parallel. How?
Yeah, it is easy to do it with session state that I control. My concern is purely with components that have their own persistent fields, so I can't make them 'conversation-aware' without some amount of hacking. This bothers my sense of elegance. Sure, it is doable, especially since every tap components I have ever seen is open source, but I sure don't want to have to do it. Being able to associate all session state with a conversation in the framework itself would be fantastic, especially if the conversation id were part of the request cycle, so it could be discovered automagically whenever anything is persisted to the session. The real trick then, of course, is to make it simple to determine when a new conversation should be started vs using a previously existing one. At least in my app, however, it would be acceptable to force users to click an 'edit in new window' link in order to start a new conversation. I'll have to look into doing a persistence strategy like that. --sam On 11/8/06, Daniel Tabuenca [EMAIL PROTECTED] wrote: Storing data to the client is always an option but for larger amounts of data this becomes a problem due to large amount of data that needs to be encoded in the urls of every link or in hidden fields of a form. I think what you are looking for is a way to scope the session data so that you can have separate threads referencing distinct data. If I recall correctly, this type of scope is not directly supported by tapestry natively as it is in other frameworks (like Jboss Seam for example). I find the Conversation strategy very useful and I implement it pretty easily yourself. What I do is I generate a numeric ConversationId at the beginning of a new wizard. I store this Id in a property with @Persist(client). I then have a HashMap that is stored to the session and use this id as the key to store whatever data I need (for example storing a state object). You can then automate the retriaval of this state object from the session on each request by attaching a listener before the page begins to render. This has proven to work good at least for me. I'm sure you could also try to implement a new persistent scope in hivemind to somewhat automate this better and make it more clean. But this seemed easy enough to do that I didn't feel it necessary to go that far. I think it'd be really good if in the future such functionality was integrated into the framework. The idea is to have some way to easily delineate when the scope of a conversation starts/stops some method for expiring dead conversations and of course, allowing multiple independent concurrent conversations at the same time. Although I have never actually used it, I think Seam is based around the idea of contextual conversations and might serve as a good starting point for seeing this idea in action. On 11/8/06, Sam Gendler [EMAIL PROTECTED] wrote: ok, some investigation into the version of contrib:Table that comes with tacos shows that you can specify that a table stores its persistent state to the client on a page or app basis, so it would appear that that is solved for the table component. Are there other components in the core libraries (tapestry, contrib, tacos) which have persistent properties stored in the session? If not, then I can just modify my forms to store the entity id in the form (currently, I've got them in a session state object) and force the correct entity to be reloaded when the page is submitted and everything else should come together with minimal fuss, I think. --sam On 11/8/06, Sam Gendler [EMAIL PROTECTED] wrote: Say I have a page to edit an entity, and that includes a table component. When the page is rendered, various bits of state about components of the page are stored in the session, especially for the table component, since it stores current page and various other things in the session. Now, my users want to bring up the EditObject page for an object with id 1, then bring up the same page for an object with id 2 in a different window. Now they make some edits to object 1 based on information visible in the entity 2 page. When they click submit, however, they will get a stale link exception (if they are lucky. If they are unlucky, they could wind up making their changes to entity 2 instead of entity 1). Is there any way to prevent this. Multiple similar windows is fundamental to the way my users want to work (of course, they didn't tell me this until the app was all the way through testing and had been released), and it appears as though Tapestry's persistence mechanism makes it utterly impossible to provide, since I would need some kind of mechanism that would ensure that all state about a page were persisted to the client, rather than to the session, and I don't have any way to do that for components that I don't control. I could rewrite every component I use which has persistent properties, I guess, but that's a
Re: help : displaying Images that are stored outside the Web application
Craig St Jean wrote: When using JSPs or PHP this would be accomplished by setting the content-type and then outputting the contents of the picture. I could then have something like img src=displayimage.jsp?image=whatever.png. I'm not sure exactly how to do it in Tapestry but I would assume it would be something like an inject page as long as you set the content type. Good luck. On Nov 8, 2006, at 3:21 PM, sunilmanu wrote: Hi, I am a newbie to Tapestry. I need help on how to display the Images stored outside the Web application. Say my application HTML path -- c:/jboss/deploy/webapps/TapestryApp/Home.html But Images are stored outside-- : c:/appImages/test1.jpeg How can I load the Image dynamically in the SRC attribute of Image tag ? any suggestions or pointers will be of great help. Thanks, Sunil --View this message in context: http://www.nabble.com/help-%3A-displaying-Images-that-are-stored-outside-the-Web-application-tf2597572.html#a7246079 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] http://tapestry.apache.org/tapestry4/tapestry/ComponentReference/Image.html If you want to serve your images outside of your web app, you can define image as a external asset, instead of a context asset. hth, Dennis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]