Re: Stale Link Exception on Disabled Select Component
This worked. Thank you. Andreas Andreou-4 wrote: > > try setting volatile to true in the @For component > > > -- View this message in context: http://www.nabble.com/Stale-Link-Exception-on-Disabled-Select-Component-tp23964397p23970088.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
Stale Link Exception on Disabled Select Component
I've got a page where I want to disable a @Select component. However when rewinding the form, it generates a StaleLink because the @For loop which populates the select doesn't get rewound due to the @Select being disabled: < span jwcid="@For" source="ognl:customers" value="ognl:currentCustomer" index="ognl:currentCustomerIndex" > < /span> Since the @Select component doesn't overide the getRenderBodyOnRewind method, it doesn't rewind the For loop, and therefore generates a SLE. Does anyone have any ideas on how to get around this or fix it? Thanks! -B -- View this message in context: http://www.nabble.com/Stale-Link-Exception-on-Disabled-Select-Component-tp23964397p23964397.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: Problems with LinkSubmit and/or EventListener
Hello, I understand what you mean however the problem is that the LinkSubmits are being generated by an asynchronous call. Since they never existed on the Form originally, their rewind causes issues with any already-existing LinkSubmits which were never re-rendered. So I have two LinkSubmits on the page, one which is rendered at page load, during normal navigation. A second is generated through an async call via a DirectLink component update. The second link always creates a stale link on the browser due to clientid java-script functionality collisions. Hope this clarifies things, doubt it though. -B Andreas Andreou-2 wrote: > > Hi, > the problem with such reports is that it isn't easy for others to > start from somewhere. > But i'd take a shot and suggest going with the LinkSubmit approach and > making it so that > they aren't automatically "stale" - i'm sure that if you identify why > they go stale you can solve > this. > > Perhaps you're using a bunch of @If and @Else components and perhaps > some property is not > persisted correctly so that rewind fails to go through the same > conditionals? Could it be inappropriate > use of the volatile parameter of those components? > > > > -- View this message in context: http://n2.nabble.com/Problems-with-LinkSubmit-and-or-EventListener-tp2302994p2305547.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
Problems with LinkSubmit and/or EventListener
The following is in Tapestry 4.1 (if the component references don't give it away). I have an application which generates and renders a section of links on the page based on some other selected (DirectLink) link. The problem I am having is the new links must submit the form in order to accomplish their functionality. I have tried to accomplish this one of two ways: Using an LinkSubmit However the links that are generated are automatically "Stale". There are other LinkSubmits on the page which aren't rerendered upon selection of the DirectLink. So bascially that route doesn't work. What I tried next was a bit of a hack, but i dropped an EventListener method which listened for the clicks on a GenericLink component. I set it up for submitting my form, using the "submitForm" attribute. The form gets submitted but the event listener is never called. If i remove the "submitForm" attribute, the listener is called but the form isn't submitted. Another problem lies in the fact that my listener tells the page to refresh but the page never does (return void with async=false). The whole point is need the form rewind cycle to occur so that when my listener is called it will have all of the form input. The listener redirects the user to another page. Once the user has completed their work on that page, they return to the original page. The form data is lost in the navigation but it shouldn't be. I must be doing something wrong but I can't see it. Can anyone help? Thank you. -B -- View this message in context: http://n2.nabble.com/Problems-with-LinkSubmit-and-or-EventListener-tp2302994p2302994.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