Re: [Bug] t:zone update loses background style
I've seen an simlar case. We used a js tab lib which opens new page in tab in iframe way. if I switch to other tab before the tab completes loading, the zone manager is not initialized because of this bug. Strangely I didn't see any error in firebug. I have to do manual trace and get the same spot and use the exact same fix. 于 2012/11/1 5:57, Bryan Lewis 写道: Which reminds me... I sent a closely related question to the list two weeks ago (which is why your question caught my eye) but for some reason it never made it. I'll repeat it here: In Tapestry 5.3.6 I've created a page using the new Tree component. The tree is inside a zone and the page is inside an iframe to serve as the content of a subModal window. When the modal window is dismissed (hidden), I see an error in Firebug: this.element.getStyle("background-color") is null. It points to line 1796 of tapestry.js: /* * TAP5-707: store the old background color of the element or take white * as a default */ this.endcolor = this.element.getStyle('background-color').parseColor('#ff'); I can avoid the error by changing that line to: this.endcolor = '#ff'; // default if (this.element.getStyle('background-color')) this.endcolor = this.element.getStyle('background-color').parseColor('#ff'); On Wed, Oct 31, 2012 at 5:53 PM, Bryan Lewis wrote: I wonder if it's related to this issue: https://issues.apache.org/jira/browse/TAP5-707 As of version 5.2, tapestry.js sets the background color inside a zone, trying to prevent a partially faded yellow. On Wed, Oct 31, 2012 at 3:50 PM, membersound wrote: Sometimes if a t:zone is updated, I'm losing any background styling. Firebug then shows: Very strange, is somebody else having this issue? Or moreover: HOW can i prevent this? What do I maybe have to override with css? Thanks -- View this message in context: http://tapestry.1045711.n5.nabble.com/Bug-t-zone-update-loses-background-style-tp5717469.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 - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [5.3.6] RegistryShutdownHub.addRegistryWillShutdownListener cannot refer to injected services
We could possibly do some work so that the necessary locks are only locked after the "will-shutdown" listeners are notified, but before the "did-shutdown" listeners are notified. On Thu, Dec 20, 2012 at 4:50 PM, Thiago H de Paula Figueiredo < thiag...@gmail.com> wrote: > On Thu, 20 Dec 2012 20:24:54 -0200, Muhammad Gelbana > wrote: > > No it's not >> >> binder.bind(ISCMailer.class, SCMailerImpl.class); >> > > Try binder.bind(ISCMailer.class, SCMailerImpl.class).eagerLoad(**); It > seems your service wasn't used nor reallyl instanced (Tapestry services are > proxied, so only the proxy is created at first, with the real service > instance created on demand) before the registry shutdown, so Tapestry ends > up attempting to instance it when the registry is already shutting down. > > > -- > Thiago H. de Paula Figueiredo > > --**--**- > To unsubscribe, e-mail: > users-unsubscribe@tapestry.**apache.org > > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com
Re: [5.3.6] RegistryShutdownHub.addRegistryWillShutdownListener cannot refer to injected services
On Thu, 20 Dec 2012 20:24:54 -0200, Muhammad Gelbana wrote: No it's not binder.bind(ISCMailer.class, SCMailerImpl.class); Try binder.bind(ISCMailer.class, SCMailerImpl.class).eagerLoad(); It seems your service wasn't used nor reallyl instanced (Tapestry services are proxied, so only the proxy is created at first, with the real service instance created on demand) before the registry shutdown, so Tapestry ends up attempting to instance it when the registry is already shutting down. -- Thiago H. de Paula Figueiredo - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Redirect onActivate - how to handle ActionLink requests?
On Thu, 20 Dec 2012 20:52:08 -0200, Cezary Biernacki wrote: On Thu, 20 Dec 2012 16:10:05 -0200, Cezary Biernacki wrote: I am not sure what is preferred method to detect page requests vs. event requests in onActivate methods, but I can imagine that it could be done by decorating ComponentRequestHandler and adding a request attribute with information of kind of request. Please don't do that. Just @Inject ComponentEventLinkEncoder and use its createPageRenderLink() method. If it returns null, it's not a page render request, so it's an event one. createPageRenderLink()? Documentation does not suggest that it works differently during event requests. Maybe you thought about decodePageRenderRequest()? Yep, decodePageRenderRequest(). -- Thiago H. de Paula Figueiredo - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Redirect onActivate - how to handle ActionLink requests?
On Thu, 20 Dec 2012 16:10:05 -0200, Cezary Biernacki wrote: I am not sure what is preferred method to detect page requests vs. event requests in onActivate methods, but I can imagine that it could be done by decorating ComponentRequestHandler and adding a request attribute with information of kind of request. Please don't do that. Just @Inject ComponentEventLinkEncoder and use its createPageRenderLink() method. If it returns null, it's not a page render request, so it's an event one. createPageRenderLink()? Documentation does not suggest that it works differently during event requests. Maybe you thought about decodePageRenderRequest()? Best regards, Cezary - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [5.3.6] RegistryShutdownHub.addRegistryWillShutdownListener cannot refer to injected services
No it's not binder.bind(ISCMailer.class, SCMailerImpl.class); On Thu, Dec 20, 2012 at 11:48 PM, Thiago H de Paula Figueiredo < thiag...@gmail.com> wrote: > Is this ISCMailer server perthread? Just guessing . . . > > > On Thu, 20 Dec 2012 19:37:48 -0200, Muhammad Gelbana > wrote: > > One of my sub-modules registers a "Registry will shutdown" listener. That >> listener is a service that needs to know if the app is shutting down and >> thats how I'm doing this: >> >> >> >> @Startup >> >>> public void startup(final ISCMailer mailer, RegistryShutdownHub >>> registryShutdown) { >>> registryShutdown.**addRegistryWillShutdownListene**r(new >>> Runnable() { >>> @Override >>> public void run() { >>> mailer.shutdown(); >>> } >>> }); >>> } >>> >> >> >> The thing is that tapestry throws an exception whenever the app shuts >> down: >> >> 23:29:04 ERROR (**RecursiveServiceCreationCheckW** >> rapper.java:64)-[Thread-999] >> >>> Construction of service ISCMailer failed: Method >>> org.apache.tapestry5.ioc.**internal.RegistryImpl.** >>> getObject(RegistryImpl.java:**853) >>> may no longer be invoked. >>> org.apache.tapestry5.ioc.**internal.OperationException: Method >>> org.apache.tapestry5.ioc.**internal.RegistryImpl.** >>> getObject(RegistryImpl.java:**853) >>> may no longer be invoked. >>> at >>> org.apache.tapestry5.ioc.**internal.OperationTrackerImpl.** >>> logAndRethrow(**OperationTrackerImpl.java:121) >>> at >>> org.apache.tapestry5.ioc.**internal.OperationTrackerImpl.** >>> invoke(OperationTrackerImpl.**java:88) >>> at >>> org.apache.tapestry5.ioc.**internal.**PerThreadOperationTracker.** >>> invoke(**PerThreadOperationTracker.**java:87) >>> at >>> org.apache.tapestry5.ioc.**internal.RegistryImpl.invoke(** >>> RegistryImpl.java:1124) >>> at >>> org.apache.tapestry5.ioc.**internal.util.InternalUtils.** >>> calculateParameters(**InternalUtils.java:293) >>> at >>> org.apache.tapestry5.ioc.**internal.util.InternalUtils$** >>> 23.invoke(InternalUtils.java:**1488) >>> at >>> org.apache.tapestry5.ioc.**internal.util.InternalUtils$** >>> 23.invoke(InternalUtils.java:**1483) >>> at >>> org.apache.tapestry5.ioc.**internal.OperationTrackerImpl.** >>> invoke(OperationTrackerImpl.**java:74) >>> at >>> org.apache.tapestry5.ioc.**internal.**PerThreadOperationTracker.** >>> invoke(**PerThreadOperationTracker.**java:87) >>> at >>> org.apache.tapestry5.ioc.**internal.RegistryImpl.invoke(** >>> RegistryImpl.java:1124) >>> at >>> org.apache.tapestry5.ioc.**internal.util.InternalUtils.** >>> createConstructorConstructionP**lan(InternalUtils.java:1480) >>> at >>> org.apache.tapestry5.ioc.**internal.**ConstructorServiceCreator.** >>> getPlan(**ConstructorServiceCreator.**java:52) >>> at >>> org.apache.tapestry5.ioc.**internal.**ConstructorServiceCreator.** >>> createObject(**ConstructorServiceCreator.**java:61) >>> at >>> org.apache.tapestry5.ioc.**internal.**OperationTrackingObjectCreator** >>> $1.invoke(**OperationTrackingObjectCreator**.java:45) >>> at >>> org.apache.tapestry5.ioc.**internal.OperationTrackerImpl.** >>> invoke(OperationTrackerImpl.**java:74) >>> at >>> org.apache.tapestry5.ioc.**internal.**PerThreadOperationTracker.** >>> invoke(**PerThreadOperationTracker.**java:87) >>> at >>> org.apache.tapestry5.ioc.**internal.RegistryImpl.invoke(** >>> RegistryImpl.java:1124) >>> at >>> org.apache.tapestry5.ioc.**internal.**OperationTrackingObjectCreator** >>> .createObject(**OperationTrackingObjectCreator**.java:49) >>> at >>> org.apache.tapestry5.ioc.**internal.**SingletonServiceLifecycle.** >>> createService(**SingletonServiceLifecycle.**java:29) >>> at >>> org.apache.tapestry5.ioc.**internal.**LifecycleWrappedServiceCreator** >>> .createObject(**LifecycleWrappedServiceCreator**.java:46) >>> at >>> org.apache.tapestry5.ioc.**internal.AdvisorStackBuilder.**createObject(* >>> *AdvisorStackBuilder.java:63) >>> at >>> org.apache.tapestry5.ioc.**internal.**InterceptorStackBuilder.** >>> createObject(**InterceptorStackBuilder.java:**54) >>> at >>> org.apache.tapestry5.ioc.**internal.**RecursiveServiceCreationCheckW** >>> rapper.createObject(**RecursiveServiceCreationCheckW**rapper.java:60) >>> at >>> org.apache.tapestry5.ioc.**internal.**OperationTrackingObjectCreator** >>> $1.invoke(**OperationTrackingObjectCreator**.java:45) >>> at >>> org.apache.tapestry5.ioc.**internal.OperationTrackerImpl.** >>> invoke(OperationTrackerImpl.**java:74) >>> at >>> org.apache.tapestry5.ioc.**internal.**PerThreadOperationTracker.** >>> invoke(**PerThreadOperationTracker.**java:87) >>> at >>> org.apache.tapestry5.ioc.**internal.RegistryImpl.invoke(** >>> RegistryImpl.java:1124) >>> at >>> org.apache.tapestry5.ioc.**internal.**OperationTrackingObjectCreator** >>> .createObject(**OperationTrackingObjectCreator**.java:49) >>> at >>> org.apache.tapestry5.ioc.**internal.services.**JustInTimeObjectCreator.* >>> *obtainObjectFromCreator(**JustInTimeObjectCreator.java:**66) >>> at
Re: [5.3.6] RegistryShutdownHub.addRegistryWillShutdownListener cannot refer to injected services
Is this ISCMailer server perthread? Just guessing . . . On Thu, 20 Dec 2012 19:37:48 -0200, Muhammad Gelbana wrote: One of my sub-modules registers a "Registry will shutdown" listener. That listener is a service that needs to know if the app is shutting down and thats how I'm doing this: @Startup public void startup(final ISCMailer mailer, RegistryShutdownHub registryShutdown) { registryShutdown.addRegistryWillShutdownListener(new Runnable() { @Override public void run() { mailer.shutdown(); } }); } The thing is that tapestry throws an exception whenever the app shuts down: 23:29:04 ERROR (RecursiveServiceCreationCheckWrapper.java:64)-[Thread-999] Construction of service ISCMailer failed: Method org.apache.tapestry5.ioc.internal.RegistryImpl.getObject(RegistryImpl.java:853) may no longer be invoked. org.apache.tapestry5.ioc.internal.OperationException: Method org.apache.tapestry5.ioc.internal.RegistryImpl.getObject(RegistryImpl.java:853) may no longer be invoked. at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.logAndRethrow(OperationTrackerImpl.java:121) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:88) at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:87) at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1124) at org.apache.tapestry5.ioc.internal.util.InternalUtils.calculateParameters(InternalUtils.java:293) at org.apache.tapestry5.ioc.internal.util.InternalUtils$23.invoke(InternalUtils.java:1488) at org.apache.tapestry5.ioc.internal.util.InternalUtils$23.invoke(InternalUtils.java:1483) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:74) at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:87) at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1124) at org.apache.tapestry5.ioc.internal.util.InternalUtils.createConstructorConstructionPlan(InternalUtils.java:1480) at org.apache.tapestry5.ioc.internal.ConstructorServiceCreator.getPlan(ConstructorServiceCreator.java:52) at org.apache.tapestry5.ioc.internal.ConstructorServiceCreator.createObject(ConstructorServiceCreator.java:61) at org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator$1.invoke(OperationTrackingObjectCreator.java:45) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:74) at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:87) at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1124) at org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator.createObject(OperationTrackingObjectCreator.java:49) at org.apache.tapestry5.ioc.internal.SingletonServiceLifecycle.createService(SingletonServiceLifecycle.java:29) at org.apache.tapestry5.ioc.internal.LifecycleWrappedServiceCreator.createObject(LifecycleWrappedServiceCreator.java:46) at org.apache.tapestry5.ioc.internal.AdvisorStackBuilder.createObject(AdvisorStackBuilder.java:63) at org.apache.tapestry5.ioc.internal.InterceptorStackBuilder.createObject(InterceptorStackBuilder.java:54) at org.apache.tapestry5.ioc.internal.RecursiveServiceCreationCheckWrapper.createObject(RecursiveServiceCreationCheckWrapper.java:60) at org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator$1.invoke(OperationTrackingObjectCreator.java:45) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:74) at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:87) at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1124) at org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator.createObject(OperationTrackingObjectCreator.java:49) at org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.obtainObjectFromCreator(JustInTimeObjectCreator.java:66) at org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.createObject(JustInTimeObjectCreator.java:54) at $ISCMailer_6d6446fae0659.delegate(Unknown Source) at $ISCyMailer_6d6446fae0659.shutdown(Unknown Source) at com.sc.ipk.services.CoreModule$1.run(CoreModule.java:100) Shouldn't it be safe to invoke that method (shutdown) on an injected service since this is expected to run before the registry shuts down ? -- Thiago H. de Paula Figueiredo - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Redirect onActivate - how to handle ActionLink requests?
On Thu, 20 Dec 2012 16:10:05 -0200, Cezary Biernacki wrote: I am not sure what is preferred method to detect page requests vs. event requests in onActivate methods, but I can imagine that it could be done by decorating ComponentRequestHandler and adding a request attribute with information of kind of request. Please don't do that. Just @Inject ComponentEventLinkEncoder and use its createPageRenderLink() method. If it returns null, it's not a page render request, so it's an event one. -- Thiago H. de Paula Figueiredo - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
JQuery PopUp on the Grid.
Hi, I have a Grid that is bound to a underline list as follows Process Teller now clicking on the link in the action cell opens a alert dialog as follows <${context:/statics/images/logo-popup.png}> Processing Remittance ${message:date-sent} ${transactionQuote.dateOfTransaction} ${message:recipient} ${transactionQuote.recipientName} ${message:amount} ${transactionQuote.transactionAmount} ${message:unique-id} ${transactionQuote.transactionId} ${message:sender} ${transactionQuote.senderName} ${message:location} ${transactionQuote.senderCountry} Confirm recipient's identity by reviewing ID Transaction Code Now what happens that when i press the sumit button on grid popup, the underlying Lists gets blank. Now i also want to close the Popup once the Sumit function has finished. This is my underlying function for the Popup submit button public Object onSubmitFromprocessQuoteForm( ) { try { QuoteID temp = new QuoteID( ) { public Long getId( ) { return dispenseCashForQuoteID; } }; pickupManager.processQuotePickup( temp ); } catch ( Exception e ) { e.printStackTrace( ); } return null; } Now what i want is 1) When i press submit button on the Popup, it should close, but the underlying Grid should be affected. What am i doing wrong ? -- View this message in context: http://tapestry.1045711.n5.nabble.com/JQuery-PopUp-on-the-Grid-tp5718897.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: Redirect onActivate - how to handle ActionLink requests?
So your onActivate method does not actually return null but redirects to another page. That explains why handler is not called. I am not sure what is preferred method to detect page requests vs. event requests in onActivate methods, but I can imagine that it could be done by decorating ComponentRequestHandler and adding a request attribute with information of kind of request. However it seems to be quite risky to disable security checks for component requests. Are you going to add a security check to every component request handler? Best regards, Cezary On Thu, Dec 20, 2012 at 6:41 PM, lebenski wrote: > I actually got the problem wrong, it's not the fact that the null return > prevented the handler from firing, but rather my condition to determine if > it was a page request rather than a component request was insufficient: > > protected boolean isPageRequest() { > return !request.isXHR() && request.getMethod()=="GET"; > } > > And it was ending up redirecting. > > What is the preferred way to check in an onActivate method whether the > originating request is a page request or simply a component like an > actionLink making a request? > > > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Redirect-onActivate-how-to-handle-ActionLink-requests-tp5718883p5718894.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: Redirect onActivate - how to handle ActionLink requests?
Hi, Are you sure that your onActivate method is related to your problem with event handler not being called? It can be something quite unrelated. For example the event handler method can be incorrectly named (if you are using naming convention), or with @OnEvent annotation parameters can be wrong. Another possibility is that 'CardLightBox' itself handles the event. Best regards, Cezary On Thu, Dec 20, 2012 at 5:23 PM, lebenski wrote: > Inside a component called 'CardLightBox' in EditCube. When this makes the > following request: > > /editcube.cardlightbox.addcard > > The onActivate method kicks in, returning null and my request is not > fulfilled by the event handler in the page class. >
Re: Redirect onActivate - how to handle ActionLink requests?
I actually got the problem wrong, it's not the fact that the null return prevented the handler from firing, but rather my condition to determine if it was a page request rather than a component request was insufficient: protected boolean isPageRequest() { return !request.isXHR() && request.getMethod()=="GET"; } And it was ending up redirecting. What is the preferred way to check in an onActivate method whether the originating request is a page request or simply a component like an actionLink making a request? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Redirect-onActivate-how-to-handle-ActionLink-requests-tp5718883p5718894.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: Redirect onActivate - how to handle ActionLink requests?
Hi Thiago, Ok but I don't believe that my problem is directly related to inheritance, but point taken on the style preference. Even if I have two separate pages with components I will still need the check in the edit page with the redirect to the view page. In this case, how do I handle actionLink requests hitting the onActivate() and getting null returned without hitting the handler? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Redirect-onActivate-how-to-handle-ActionLink-requests-tp5718883p5718893.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: Layout component
On Thu, 20 Dec 2012 13:56:28 -0200, ZKN __ wrote: Hi Thiago, Hi! I've tried moving the base page to the "pages" package but that didn't work again. Please define 'didn't work'. I'm not sure what you mean with block parameters but if it means using some kind of IF statements in the base template I don't think that's a good solution. It wouldn't be, but block parameters don't involve if statements at all. It's about using the Delegate component inside your Layout to render a Block which is passed as a parameter to Layout. Something like this (not tested): Layout.java: @Parameter @Property private Block something; Layout.tml: ... In any page using the layout: some stuff ... -- Thiago H. de Paula Figueiredo - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Redirect onActivate - how to handle ActionLink requests?
On Thu, 20 Dec 2012 14:23:11 -0200, lebenski wrote: So I have a page 'ViewCube'. This page can be accessed by anyone and does not allow any editing rights. I then have a page 'EditCube' which extends ViewCube I wouldn't do that. A page for viewing is very different from a page for editing. If there's something that is common, put it in a component and use it in both pages. Avoid inheritance, prefer composition. ;) and uses some extension points to allow the user with editing rights to modify the cube (please don't worry about what a "Cube" is!) You're just make me curious about these cubes. :P So - am I doing the redirect in the right way? Is this inheritance sensible? I tried using response.sendRedirect so that I don't need a return value but this fails with the following: Don't use Response.sendRedirect() either. -- Thiago H. de Paula Figueiredo - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Redirect onActivate - how to handle ActionLink requests?
So I have a page 'ViewCube'. This page can be accessed by anyone and does not allow any editing rights. I then have a page 'EditCube' which extends ViewCube and uses some extension points to allow the user with editing rights to modify the cube (please don't worry about what a "Cube" is!) I want to make sure that unauthorised users cannot access the EditCube page, so I have the following redirect onActivate: @OnEvent(EventConstants.ACTIVATE) public Object checkUser() throws IOException { if(isPageRequest()) { if(!userService.isLoggedIn() || !userService.getActiveUser().getId().equals(getCube().getUserId())) { return linkSource.createPageRenderLinkWithContext("ViewCube", getCube().getId()); } } return null; } I don't want to bother doing this checking if the request is XHR or a POST, so I have this check: protected boolean isPageRequest() { return !request.isXHR() && request.getMethod()=="GET"; } Problem is, when I have a normal actionLink component: Just Add Inside a component called 'CardLightBox' in EditCube. When this makes the following request: /editcube.cardlightbox.addcard The onActivate method kicks in, returning null and my request is not fulfilled by the event handler in the page class. So - am I doing the redirect in the right way? Is this inheritance sensible? I tried using response.sendRedirect so that I don't need a return value but this fails with the following: java.lang.NullPointerException org.apache.tapestry5.internal.services.assets.CompressionAnalyzerImpl.isCompressable(CompressionAnalyzerImpl.java:34) $CompressionAnalyzer_13f1db2b6d3d1a.isCompressable(Unknown Source) Any help much appreciated. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Redirect-onActivate-how-to-handle-ActionLink-requests-tp5718883.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: Layout component
Hi Thiago, I've tried moving the base page to the "pages" package but that didn't work again. I'm not sure what you mean with block parameters but if it means using some kind of IF statements in the base template I don't think that's a good solution. First because for each new Subclass I will have to make changes to the base template and second because it will make the base template harder to read. Thanks, Ozkan Оригинално писмо От: "Thiago H de Paula Figueiredo" thiag...@gmail.com Относно: Re: Layout component До: "Tapestry users" Изпратено на: Четвъртък, 2012, Декември 20 17:49:59 EET On Thu, 20 Dec 2012 12:32:51 -0200, ZKN __ z...@abv.bg > wrote: > Hi, Hi! > I have a question regarding Layout component: > http://tapestry.apache.org/layout-component.html > Since pages and components "are more equal than they are different" I > was wondering if base pages (located in the base package) can be used as > layout components? Anything in the base package isn't a component, page or mixin by itself. It's just a superclass for a component, page or mixin. > We already have a Layout component and we need to create a base page > that will be extended multiple times. That base page uses the Layout > component. > Now we need pages that inherit from that base page to override just a > small part of the base page template. You don't need page inheritance for that. Just use block parameters in the Layout component and its template. That's what I recommend. -- Thiago H. de Paula Figueiredo - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Layout component
On Thu, 20 Dec 2012 12:32:51 -0200, ZKN __ wrote: Hi, Hi! I have a question regarding Layout component: http://tapestry.apache.org/layout-component.html Since pages and components "are more equal than they are different" I was wondering if base pages (located in the base package) can be used as layout components? Anything in the base package isn't a component, page or mixin by itself. It's just a superclass for a component, page or mixin. We already have a Layout component and we need to create a base page that will be extended multiple times. That base page uses the Layout component. Now we need pages that inherit from that base page to override just a small part of the base page template. You don't need page inheritance for that. Just use block parameters in the Layout component and its template. That's what I recommend. -- Thiago H. de Paula Figueiredo - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Output raw html from the method
On Thu, 20 Dec 2012 11:59:30 -0200, bhorvat wrote: Hi all, Hi! tags public String getTags() { return "Item:1
Item2
Item3
"; } now this doesnt work. Any idea why? How can I output raw html from the method? Just return the unquoted tags in your method, as Tapestry will quote them for you. -- Thiago H. de Paula Figueiredo - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: BeanModel Exception
On Thu, 20 Dec 2012 10:26:14 -0200, mateen wrote: the message object is just an Injected Object. But i get a render queue exception. What am i doing wrong. When an exception occurs and you want help, please post the exception, otherwise we can only guess what's happening. -- Thiago H. de Paula Figueiredo - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Output raw html from the method
I need to output my data to a attribute title in this case so I cannot use output component for this. I have tried that -- View this message in context: http://tapestry.1045711.n5.nabble.com/Output-raw-html-from-the-method-tp5718874p5718877.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
Layout component
Hi, I have a question regarding Layout component: http://tapestry.apache.org/layout-component.html Since pages and components "are more equal than they are different" I was wondering if base pages (located in the base package) can be used as layout components? We already have a Layout component and we need to create a base page that will be extended multiple times. That base page uses the Layout component. Now we need pages that inherit from that base page to override just a small part of the base page template. We are using Tapestry 5.1.05 Thanks, Ozkan
Output raw html from the method
Hi all, I am trying to create a list of items in the tooltip. Something like Item 1 Item 2 Item 3 To do this I need to use the tooltip component in tapestry jquery and to generate my list by providing html without <>. In other words something like this Item1
Item2
Item3
In other words this works priority but since my data needs to be generate dynamically I need to use a method tags public String getTags() { return "Item:1
Item2
Item3
"; } now this doesnt work. Any idea why? How can I output raw html from the method? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Output-raw-html-from-the-method-tp5718874.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
BeanModel Exception
I have a Grid that i wish to show and hide some columns. Here is my Grid Process Teller In the onSubmit from button that renders my Grid i include the following source code. quoteViewModel = beanModelSource.createDisplayModel(QuoteView.class, messages); quoteViewModel.exclude( "recipientPhoneNumber,pickupQuoteID,transactionID" ); return request.isXHR( ) ? searchTransactionZone.getBody( ) : null; the message object is just an Injected Object. But i get a render queue exception. What am i doing wrong. -- View this message in context: http://tapestry.1045711.n5.nabble.com/BeanModel-Exception-tp5718873.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: Difference between tapestry “Element” and “Component”
By the way, could you please stop posting the same message in both the users and dev mailing lists? This message should have been posted just in the users one. On Thu, 20 Dec 2012 09:32:51 -0200, Athneria, Mahendra wrote: Hi, Can someone explain me the difference between Tapestry “Element” and “Component”? I got this from the tapestry site(http://tapestry.apache.org/component-templates.html) “There are a certain number of Tapestry elements, listed below, that act as template directives; beyond that, any element in the Tapestry namespace will be a Tapestry component.” Regards, Mahendra -- Thiago H. de Paula Figueiredo - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Difference between tapestry “Element” and “Component”
On Thu, 20 Dec 2012 09:32:51 -0200, Athneria, Mahendra wrote: Hi, Hi! Can someone explain me the difference between Tapestry “Element” and “Component”? They're completely different. Elements in Tapestry are exactly the same as HTML and XML elements. Components usually generate HTML or XML elements. I got this from the tapestry site(http://tapestry.apache.org/component-templates.html) “There are a certain number of Tapestry elements, listed below, that act as template directives; , , etc are Tapestry elements (tags). They define portions of template. Each one of these Tapestry elements has its own use and meaning. They don't generate elements: instead, just have a body, which is consisted of elements. beyond that, any element in the Tapestry namespace will be a Tapestry component.” This means that every element which isn't one of the listed Tapestry special elements is treated like a component instance declaration. is the same as , i.e., the declaration of one instance of the Grid component. -- Thiago H. de Paula Figueiredo - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Difference between tapestry “Element” and “Component”
Hi, Can someone explain me the difference between Tapestry “Element” and “Component”? I got this from the tapestry site(http://tapestry.apache.org/component-templates.html) “There are a certain number of Tapestry elements, listed below, that act as template directives; beyond that, any element in the Tapestry namespace will be a Tapestry component.” Regards, Mahendra
Re: Tapestry LoadingBar
http://tapestryjava.blogspot.co.uk/2011/12/adding-ajax-throbbers-to-zone-updates.html -- View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-LoadingBar-tp5718867p5718868.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
Tapestry LoadingBar
Hi, I want to show a loading bar in Tapestry so that its is shown when my onActionFrom starts and ends when onActionFrom returns. How can i do this ? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-LoadingBar-tp5718867.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: Tapestry Grid hide Action Column
The grid accepts an "exclude" parameter which is a comma separated list of columns to ignore (or null). Or you could call grid.getDataModel().exclude("action") in code too. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-Grid-hide-Action-Column-tp5718863p5718864.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
Tapestry Grid hide Action Column
Hi, I have a Grid that is looping over an in memory List. I have added a Action Column to the Grid. Now the Grid will be used to show two kinds of objects and it will show either of the both kind but never both. If i have a status attribute in my object that either returns true or false. How can i hide the action column if my list contains objects whose status return false. Kind Regards -- View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-Grid-hide-Action-Column-tp5718863.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