Re: Tapestry-Spring-Security and Tapestry 5.1.0.x
Someone else mentioned that they were having issues with the same thing no more than a week ago. I don't remember them having a solution either. -Anthony On Mar 24, 2009, at 10:23 PM, Thiago H. de Paula Figueiredo wrote: Hi! Is it just me or Tapestry-Spring-Security doesn't work with Tapestry 5.1.0.x? I tried to use the @Secured annotation in a class, using a non-existent role, and the page was rendered normally when it should redirect to the login page. Changing to T5.0.18 makes everything work as expected. -- Thiago H. de Paula Figueiredo Independent Java consultant, developer, and instructor http://www.arsmachina.com.br/thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org smime.p7s Description: S/MIME cryptographic signature
t5: forwarding in index
Hi, we can return a page class in the index page to redirect to another page, but the URL in the browser got changed as well, is there a way to do a forward in the index page so that the URL in the browser remain the same, example: http://localhost:8080?myquerystring I can capture myQueryString in the HttpServletRequest injected in the Index.java, and I'd like to forward this to /myOtherPage/p1/p2, without browser's url got updated, possible? Thanks, Angelo -- View this message in context: http://www.nabble.com/t5%3A-forwarding-in-index-tp22694515p22694515.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-Spring-Security and Tapestry 5.1.0.x
Hi! Is it just me or Tapestry-Spring-Security doesn't work with Tapestry 5.1.0.x? I tried to use the @Secured annotation in a class, using a non-existent role, and the page was rendered normally when it should redirect to the login page. Changing to T5.0.18 makes everything work as expected. -- Thiago H. de Paula Figueiredo Independent Java consultant, developer, and instructor http://www.arsmachina.com.br/thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
validator message
How can I avoid "Function Tapestry.Validator.string() does not exist for field XXX"? Thanks in advance Jorge
Re: Binding of Boolean parameter
2009/3/24 Ville Virtanen : > > Also the line > > writer.write(""+value); > > could be to blame? > > try something like > > if(value == null) { > writer.write("null"); > } else if (value.booleanValue() == true) { > writer.write("true"); > } else { > writer.write("false"); > } > Your code gives the same result as ""+value and String.valueOf(value) (as suggests Thiago). It doesn't matter. And that's not the point. > If it still does not work I suggest that you create JIRA issue and attach > .tml and .java files that replicate this with explanation. Yes. I'll do it. Thanks a lot. Lukasz - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5: creating a tutorial for 5.0.18
Hi Angelo, try -DarchetypeVersion instead of -Dversion. Cheers, Marcus Veloso
Re: Executing javascript on ajax call return
Howard, since you're into doing quick fixes/enhancements. :) could you please add a "loading" effect for zones? :) since at the moment other developers in our company have added local hacks to get a little loading effect going (simple hour glass or somesuch), but I would love to rip out all of our hackish code, if tapestry can support it natively. :) it would be the first motivator for more zone events. I would just add loading effects :) And you can leave the show/update ones. I would even add loadingEnd, showEnd, updateEnd, to allow you to chain effects together easier, for transitions: slide right, then fade in. or fade out, then slight in left, etc. .loading { background-image: url( http://ssres.s3.amazonaws.com/img/bg/loadingCircle.gif ); background-repeat: no-repeat; padding-top: 5px; min-height: 20px; } Blower, Andy wrote: Fantastic, might be worth removing the line "Currently, the partial page content that is rendered may not use an Environmental services. This is expected to change soon." from http://tapestry.apache.org/tapestry5.1/guide/ajax.html then. -Original Message- From: Hugo Palma [mailto:hugo.m.pa...@gmail.com] Sent: 24 March 2009 18:23 To: Tapestry users Subject: Re: Executing javascript on ajax call return I've just tried using renderSupport on a partial page render and it worked great. I'm using 5.1.0.2-SNASHOT. On Tue, Mar 24, 2009 at 4:14 PM, Blower, Andy wrote: Unfortunately this doesn't work because Environmental stuff is not available when doing partial page renders - well for 5.0.18 at least, maybe it works with 5.1.0.1? This is the perfect mechanism for doing this though. I'll be trying 5.1 later this week so I'll try it again then. Thanks. -Original Message- From: Fernando Padilla [mailto:f...@alum.mit.edu] Sent: 24 March 2009 15:35 To: Tapestry users Subject: Re: Executing javascript on ajax call return This already works.. when you do RenderSupport.addScript(), while rendering a zone/block, it will be executed when that zone is put into the page. But I can't remember what version of tapestry this got turned on.. Blower, Andy wrote: I would like to be able to add javascript to the 'script' key section that is returned as a partial page render. Client side events are okay, but being able to return some JS that runs is more flexible. It's also partially there already and just needs exposing I think. At present we've resorted to returning some inline JS in the markup returned. Nasty, but it works. I assume we've not missed a better way of doing this? -Original Message- From: Howard Lewis Ship [mailto:hls...@gmail.com] Sent: 24 March 2009 00:54 To: Tapestry users Subject: Re: Executing javascript on ajax call return I've been thinking for a while that there needs to be more client- side events, so that the zone element could ire "tapestry:zone:fetched", "tapestry:zone:show", etc. On Mon, Mar 23, 2009 at 3:19 PM, Thiago H. de Paula Figueiredo wrote: Is therea JIRA for that so I can vote on it? Em Mon, 23 Mar 2009 17:29:03 -0300, Fernando Padilla escreveu: Nope, there is no way to do javascript callbacks after a zone is updated. Zones right now are missing lifecycle callbacks, that you can hook into. They do have the show/update callbacks that the Effects hook into, but it could/should/hopefully will be expanded, eventually.. :) things like: preFetch preShow preUpdate postUpdate But if you wanted to hack up your own, then start looking at tapestry.js: Tapestry.ZoneManager Tapestry.Initializer.zone Tapestry.Initializer.linkZone Thiago H. de Paula Figueiredo wrote: Em Mon, 23 Mar 2009 16:20:08 -0300, Hugo Palma escreveu: Is there a way to execute some javascript right after a zone update is performed ? I can't seem to find a place where i can register to listen for an ajax call return. Well, Prototype has a global way to provide these callbacks: http://www.prototypejs.org/api/ajax/options. If you have more than one zone in a single page, I don't know how you would do that. -- -- - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users- h...@tapestry.apache.org -- Thiago H. de Paula Figueiredo Independent Java consultant, developer, and instructor Consultor, desenvolvedor e instrutor em Java http://www.arsmachina.com.br/thiago --- -- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
RE: Executing javascript on ajax call return
Fantastic, might be worth removing the line "Currently, the partial page content that is rendered may not use an Environmental services. This is expected to change soon." from http://tapestry.apache.org/tapestry5.1/guide/ajax.html then. > -Original Message- > From: Hugo Palma [mailto:hugo.m.pa...@gmail.com] > Sent: 24 March 2009 18:23 > To: Tapestry users > Subject: Re: Executing javascript on ajax call return > > I've just tried using renderSupport on a partial page render and it > worked > great. I'm using 5.1.0.2-SNASHOT. > > On Tue, Mar 24, 2009 at 4:14 PM, Blower, Andy > wrote: > > > Unfortunately this doesn't work because Environmental stuff is not > > available when doing partial page renders - well for 5.0.18 at least, > maybe > > it works with 5.1.0.1? This is the perfect mechanism for doing this > though. > > I'll be trying 5.1 later this week so I'll try it again then. > > > > Thanks. > > > > > -Original Message- > > > From: Fernando Padilla [mailto:f...@alum.mit.edu] > > > Sent: 24 March 2009 15:35 > > > To: Tapestry users > > > Subject: Re: Executing javascript on ajax call return > > > > > > This already works.. when you do RenderSupport.addScript(), while > > > rendering a zone/block, it will be executed when that zone is put > into > > > the page. But I can't remember what version of tapestry this got > > > turned > > > on.. > > > > > > Blower, Andy wrote: > > > > I would like to be able to add javascript to the 'script' key > section > > > that is returned as a partial page render. Client side events are > okay, > > > but being able to return some JS that runs is more flexible. It's > also > > > partially there already and just needs exposing I think. > > > > > > > > At present we've resorted to returning some inline JS in the > markup > > > returned. Nasty, but it works. I assume we've not missed a better > way > > > of doing this? > > > > > > > >> -Original Message- > > > >> From: Howard Lewis Ship [mailto:hls...@gmail.com] > > > >> Sent: 24 March 2009 00:54 > > > >> To: Tapestry users > > > >> Subject: Re: Executing javascript on ajax call return > > > >> > > > >> I've been thinking for a while that there needs to be more > client- > > > side > > > >> events, so that the zone element could ire > "tapestry:zone:fetched", > > > >> "tapestry:zone:show", etc. > > > >> > > > >> On Mon, Mar 23, 2009 at 3:19 PM, Thiago H. de Paula Figueiredo > > > >> wrote: > > > >>> Is therea JIRA for that so I can vote on it? > > > >>> > > > >>> Em Mon, 23 Mar 2009 17:29:03 -0300, Fernando Padilla > > > >> > > > >>> escreveu: > > > >>> > > > Nope, there is no way to do javascript callbacks after a zone > is > > > >> updated. > > > Zones right now are missing lifecycle callbacks, that you can > > > hook > > > >> into. > > > They do have the show/update callbacks that the Effects hook > > > into, > > > >> but it > > > could/should/hopefully will be expanded, eventually.. :) > > > > > > things like: > > > > > > preFetch > > > preShow > > > preUpdate > > > postUpdate > > > > > > > > > > > > But if you wanted to hack up your own, then start looking at > > > >> tapestry.js: > > > Tapestry.ZoneManager > > > Tapestry.Initializer.zone > > > Tapestry.Initializer.linkZone > > > > > > > > > > > > Thiago H. de Paula Figueiredo wrote: > > > > Em Mon, 23 Mar 2009 16:20:08 -0300, Hugo Palma > > > >> > > > > escreveu: > > > > > > > >> Is there a way to execute some javascript right after a zone > > > >> update is > > > >> performed ? I can't seem to find a place where i can > register > > > to > > > >> listen > > > >> for an ajax call return. > > > > Well, Prototype has a global way to provide these callbacks: > > > > http://www.prototypejs.org/api/ajax/options. If you have more > > > than > > > >> one zone > > > > in a single page, I don't know how you would do that. > > > > > > > -- > > > > -- > > > >> - > > > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > > > For additional commands, e-mail: users- > h...@tapestry.apache.org > > > > > > >>> > > > >>> > > > >>> -- > > > >>> Thiago H. de Paula Figueiredo > > > >>> Independent Java consultant, developer, and instructor > > > >>> Consultor, desenvolvedor e instrutor em Java > > > >>> http://www.arsmachina.com.br/thiago > > > >>> > > > >>> --- > > > > -- > > > >>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > > > >>> For additional commands, e-mail: users-h...@tapestry.apache.org > > > >>> > > > >>> > > > >> > > > >> > > > >> -- > > > >> Howard M. Lewis Ship > > > >> > > > >> Creator Apache Tapestry and Apache HiveMind > > > >> > > > >> > >
Re: Executing javascript on ajax call return
I've just tried using renderSupport on a partial page render and it worked great. I'm using 5.1.0.2-SNASHOT. On Tue, Mar 24, 2009 at 4:14 PM, Blower, Andy wrote: > Unfortunately this doesn't work because Environmental stuff is not > available when doing partial page renders - well for 5.0.18 at least, maybe > it works with 5.1.0.1? This is the perfect mechanism for doing this though. > I'll be trying 5.1 later this week so I'll try it again then. > > Thanks. > > > -Original Message- > > From: Fernando Padilla [mailto:f...@alum.mit.edu] > > Sent: 24 March 2009 15:35 > > To: Tapestry users > > Subject: Re: Executing javascript on ajax call return > > > > This already works.. when you do RenderSupport.addScript(), while > > rendering a zone/block, it will be executed when that zone is put into > > the page. But I can't remember what version of tapestry this got > > turned > > on.. > > > > Blower, Andy wrote: > > > I would like to be able to add javascript to the 'script' key section > > that is returned as a partial page render. Client side events are okay, > > but being able to return some JS that runs is more flexible. It's also > > partially there already and just needs exposing I think. > > > > > > At present we've resorted to returning some inline JS in the markup > > returned. Nasty, but it works. I assume we've not missed a better way > > of doing this? > > > > > >> -Original Message- > > >> From: Howard Lewis Ship [mailto:hls...@gmail.com] > > >> Sent: 24 March 2009 00:54 > > >> To: Tapestry users > > >> Subject: Re: Executing javascript on ajax call return > > >> > > >> I've been thinking for a while that there needs to be more client- > > side > > >> events, so that the zone element could ire "tapestry:zone:fetched", > > >> "tapestry:zone:show", etc. > > >> > > >> On Mon, Mar 23, 2009 at 3:19 PM, Thiago H. de Paula Figueiredo > > >> wrote: > > >>> Is therea JIRA for that so I can vote on it? > > >>> > > >>> Em Mon, 23 Mar 2009 17:29:03 -0300, Fernando Padilla > > >> > > >>> escreveu: > > >>> > > Nope, there is no way to do javascript callbacks after a zone is > > >> updated. > > Zones right now are missing lifecycle callbacks, that you can > > hook > > >> into. > > They do have the show/update callbacks that the Effects hook > > into, > > >> but it > > could/should/hopefully will be expanded, eventually.. :) > > > > things like: > > > > preFetch > > preShow > > preUpdate > > postUpdate > > > > > > > > But if you wanted to hack up your own, then start looking at > > >> tapestry.js: > > Tapestry.ZoneManager > > Tapestry.Initializer.zone > > Tapestry.Initializer.linkZone > > > > > > > > Thiago H. de Paula Figueiredo wrote: > > > Em Mon, 23 Mar 2009 16:20:08 -0300, Hugo Palma > > >> > > > escreveu: > > > > > >> Is there a way to execute some javascript right after a zone > > >> update is > > >> performed ? I can't seem to find a place where i can register > > to > > >> listen > > >> for an ajax call return. > > > Well, Prototype has a global way to provide these callbacks: > > > http://www.prototypejs.org/api/ajax/options. If you have more > > than > > >> one zone > > > in a single page, I don't know how you would do that. > > > > > -- > > -- > > >> - > > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > > For additional commands, e-mail: users-h...@tapestry.apache.org > > > > >>> > > >>> > > >>> -- > > >>> Thiago H. de Paula Figueiredo > > >>> Independent Java consultant, developer, and instructor > > >>> Consultor, desenvolvedor e instrutor em Java > > >>> http://www.arsmachina.com.br/thiago > > >>> > > >>> --- > > -- > > >>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > > >>> For additional commands, e-mail: users-h...@tapestry.apache.org > > >>> > > >>> > > >> > > >> > > >> -- > > >> Howard M. Lewis Ship > > >> > > >> Creator Apache Tapestry and Apache HiveMind > > >> > > >> > > - > > >> 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 > > > > > > > - > > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > > For additional commands, e-mail: users-h...@tapestry.apache.org > > > > > > - > To unsubscribe, e-mail: users-unsu
Re: [T 5.1] Problem with obligatory locale-aware number formatting
Make the getter and setter convert to/from String instead of double? That should work. On Tue, Mar 24, 2009 at 5:09 AM, Otho wrote: > Hi all! > > I want to use dojo/dijit widgets in an applicatioin. For example the > currency textbox like this: > > Java: > public getPriceFloat() > { > return currentProduct.getPrice().doubleValue(); > } > > Template: > dojoType="dijit.form.CurrencyTextBox" > required="true" > constraints="{fractional:true}" > currency="EUR"/> > > > Currencytextbox ecpects a standard javascript "float" as value and > Tapestry's number translator renders it according to my (german) locale with > a comma instead of a dot as decimal separator (eg. value="123,45" instead of > value="123.45"). > > Now I could of course use a special datatype in these cases and provide a > custom translator, but it would be better to have a more general approach to > it, since in this case dojo/dijit would work with the english locale but not > with the german one, which is a bit ugly. > > One solution could for example be a special annotation like > @Translate(false) or @NoTranslation or something like that which skips > locale specific translation, so I can override standard datatypes' > translation only in the cases I want without having to write (potentially) a > bunch of custom translators. > > Or did I overlook some simple workaround? > > Regards, > Otho > -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: 5.0.18 - 5.1.0.1 upgrade problems
Exactly, and the actually implementation (already checked in) documents this distinction. On Tue, Mar 24, 2009 at 10:18 AM, Robert Zeigler wrote: > +1. > > I assume the difference between createPageRenderLink and > createPageRenderLinkWithContext is that if the context is empty in with > context, you're going to override the page's passivate context with an empty > context, whereas with createPageRenderLink, you let the page supply it's own > context? > > Robert > > On Mar 24, 2009, at 3/2411:40 AM , Howard Lewis Ship wrote: > >> I think there needs to be a facade service to make this easier: a >> PageLinkSource. >> >> public interface PageRenderLinkSource >> { >> Link createPageRenderLink(String pageName); >> >> Link createPageRenderLinkWithContext(String pageName, Object... context); >> >> Link createPageRenderLink(Class pageClass); >> >> Link createPageRenderLinkWithContet(Class pageClass, Object... context); >> } >> >> >> >> On Tue, Mar 24, 2009 at 6:20 AM, Robert Zeigler >> wrote: >>> >>> I think that's ugly. :) >>> >>> Consider: >>> componentSource >>> .getPage >>> (Index.class).getComponentResources().createPageLink(Index.class,true); >>> >>> Personally, I get suspicious of call chains nested more than about >>> two-deep... smells of tight coupling. >>> >>> Ultimately, componentResources.createPageLink calls into LinkSource, >>> which >>> calls into ComponentEvenLinkEncoder to create the link. *shrug*. >>> Why not bypass the nastiness and go straight to >>> ComponentEventLinkEncoder? >>> It /is/ a public service, after all... Personally, though, I wonder if it >>> should be the other way around: ComponentEventLinkEncoder really exposes >>> too >>> much of the internal "guts" of how tapestry "thinks" about requests: page >>> names, nested component ids, etc. (In the form of the >>> PageRequestParameters >>> and ComponentEventRequestParameters objects. In that regard, using >>> component resources is "correct" because it "hides" all of the gory >>> details... >>> >>> Except that it still requires an ugly rats' nest of method calls. >>> Creating >>> links to pages from within services seems like such a common paradigm >>> (redirecting to the login page on authentication failure, for example); >>> maybe we ought to have cleaner, public support for it... >>> >>> Robert >>> >>> >>> >>> On Mar 23, 2009, at 3/2310:47 AM , Howard Lewis Ship wrote: >>> The correct approach is to use ComponentSource (http://tapestry.formos.com/nightly/tapestry5/apidocs/org/apache/tapestry5/services/ComponentSource.html) to acquire a page. You can then get its ComponentResources and generate a page render Link from the resources. On Mon, Mar 23, 2009 at 8:36 AM, Massimo Lusetti wrote: > > On Mon, Mar 23, 2009 at 4:29 PM, Robert Zeigler > wrote: > >> If you want to stick with public services, and you're using 5.1, you >> can >> use: >> >> >> http://tapestry.formos.com/nightly/tapestry5/apidocs/org/apache/tapestry5/services/ComponentEventLinkEncoder.html >> >> I don't think it's quite as convenient to use as LinkSource, but at >> least >> it's public. :) > > I think that's the better bet we can have and that has been made for > similar use cases. > > -- > Massimo > http://meridio.blogspot.com > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - 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 >>> >>> >> >> >> >> -- >> Howard M. Lewis Ship >> >> Creator Apache Tapestry and Apache HiveMind >> >> - >> 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 > > -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: 5.0.18 - 5.1.0.1 upgrade problems
+1. I assume the difference between createPageRenderLink and createPageRenderLinkWithContext is that if the context is empty in with context, you're going to override the page's passivate context with an empty context, whereas with createPageRenderLink, you let the page supply it's own context? Robert On Mar 24, 2009, at 3/2411:40 AM , Howard Lewis Ship wrote: I think there needs to be a facade service to make this easier: a PageLinkSource. public interface PageRenderLinkSource { Link createPageRenderLink(String pageName); Link createPageRenderLinkWithContext(String pageName, Object... context); Link createPageRenderLink(Class pageClass); Link createPageRenderLinkWithContet(Class pageClass, Object... context); } On Tue, Mar 24, 2009 at 6:20 AM, Robert Zeigler wrote: I think that's ugly. :) Consider: componentSource .getPage (Index .class).getComponentResources().createPageLink(Index.class,true); Personally, I get suspicious of call chains nested more than about two-deep... smells of tight coupling. Ultimately, componentResources.createPageLink calls into LinkSource, which calls into ComponentEvenLinkEncoder to create the link. *shrug*. Why not bypass the nastiness and go straight to ComponentEventLinkEncoder? It /is/ a public service, after all... Personally, though, I wonder if it should be the other way around: ComponentEventLinkEncoder really exposes too much of the internal "guts" of how tapestry "thinks" about requests: page names, nested component ids, etc. (In the form of the PageRequestParameters and ComponentEventRequestParameters objects. In that regard, using component resources is "correct" because it "hides" all of the gory details... Except that it still requires an ugly rats' nest of method calls. Creating links to pages from within services seems like such a common paradigm (redirecting to the login page on authentication failure, for example); maybe we ought to have cleaner, public support for it... Robert On Mar 23, 2009, at 3/2310:47 AM , Howard Lewis Ship wrote: The correct approach is to use ComponentSource (http://tapestry.formos.com/nightly/tapestry5/apidocs/org/apache/tapestry5/services/ComponentSource.html ) to acquire a page. You can then get its ComponentResources and generate a page render Link from the resources. On Mon, Mar 23, 2009 at 8:36 AM, Massimo Lusetti wrote: On Mon, Mar 23, 2009 at 4:29 PM, Robert Zeigler wrote: If you want to stick with public services, and you're using 5.1, you can use: http://tapestry.formos.com/nightly/tapestry5/apidocs/org/apache/tapestry5/services/ComponentEventLinkEncoder.html I don't think it's quite as convenient to use as LinkSource, but at least it's public. :) I think that's the better bet we can have and that has been made for similar use cases. -- Massimo http://meridio.blogspot.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - 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 -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - 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.0.18 - 5.1.0.1 upgrade problems
I think there needs to be a facade service to make this easier: a PageLinkSource. public interface PageRenderLinkSource { Link createPageRenderLink(String pageName); Link createPageRenderLinkWithContext(String pageName, Object... context); Link createPageRenderLink(Class pageClass); Link createPageRenderLinkWithContet(Class pageClass, Object... context); } On Tue, Mar 24, 2009 at 6:20 AM, Robert Zeigler wrote: > I think that's ugly. :) > > Consider: > componentSource > .getPage > (Index.class).getComponentResources().createPageLink(Index.class,true); > > Personally, I get suspicious of call chains nested more than about > two-deep... smells of tight coupling. > > Ultimately, componentResources.createPageLink calls into LinkSource, which > calls into ComponentEvenLinkEncoder to create the link. *shrug*. > Why not bypass the nastiness and go straight to ComponentEventLinkEncoder? > It /is/ a public service, after all... Personally, though, I wonder if it > should be the other way around: ComponentEventLinkEncoder really exposes too > much of the internal "guts" of how tapestry "thinks" about requests: page > names, nested component ids, etc. (In the form of the PageRequestParameters > and ComponentEventRequestParameters objects. In that regard, using > component resources is "correct" because it "hides" all of the gory > details... > > Except that it still requires an ugly rats' nest of method calls. Creating > links to pages from within services seems like such a common paradigm > (redirecting to the login page on authentication failure, for example); > maybe we ought to have cleaner, public support for it... > > Robert > > > > On Mar 23, 2009, at 3/2310:47 AM , Howard Lewis Ship wrote: > >> The correct approach is to use ComponentSource >> >> (http://tapestry.formos.com/nightly/tapestry5/apidocs/org/apache/tapestry5/services/ComponentSource.html) >> to acquire a page. >> >> You can then get its ComponentResources and generate a page render >> Link from the resources. >> >> On Mon, Mar 23, 2009 at 8:36 AM, Massimo Lusetti >> wrote: >>> >>> On Mon, Mar 23, 2009 at 4:29 PM, Robert Zeigler >>> wrote: >>> If you want to stick with public services, and you're using 5.1, you can use: http://tapestry.formos.com/nightly/tapestry5/apidocs/org/apache/tapestry5/services/ComponentEventLinkEncoder.html I don't think it's quite as convenient to use as LinkSource, but at least it's public. :) >>> >>> I think that's the better bet we can have and that has been made for >>> similar use cases. >>> >>> -- >>> Massimo >>> http://meridio.blogspot.com >>> >>> - >>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >>> For additional commands, e-mail: users-h...@tapestry.apache.org >>> >>> >> >> >> >> -- >> Howard M. Lewis Ship >> >> Creator Apache Tapestry and Apache HiveMind >> >> - >> 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 > > -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: 5.0.18 - 5.1.0.1 upgrade problems
Yes, event links are a different animal (at this point). That's evident when comparing ComponentEventRequestParameters and PageRenderRequestParameters. For component event links, then, it makes some sense to fetch the particular component instance and its resources, and generate the link that way. But, let's be realistic... what is the likelihood that a service will generate a component event link? I can think of scenarios, but... the vast majority of use cases are handled by a simple, public service that wants you to give it a page class (or perhaps a page name as a string) with perhaps an activation context. Robert On Mar 24, 2009, at 3/2410:33 AM , Fernando Padilla wrote: I believe for page links, there is no difference. And you can just get the LinkFactory. For EventLinks, now it starts to get different because you are targetting both a page and a component ( which can be on a different page ). I'm still not a master on figuring this out, but I know what to look out for: pagelink: http://server/page/pagecontext eventlink: http://server/pagewithcomponent:component/eventcontext?t:ac=pagecontext&t:cp=pagetorender Andreas Pardeike wrote: On 24 mar 2009, at 14.20, Robert Zeigler wrote: I think that's ugly. :) Consider: componentSource .getPage (Index .class).getComponentResources().createPageLink(Index.class,true); Personally, I get suspicious of call chains nested more than about two-deep... smells of tight coupling. Ultimately, componentResources.createPageLink calls into LinkSource, which calls into ComponentEvenLinkEncoder to create the link. *shrug*. Why not bypass the nastiness and go straight to ComponentEventLinkEncoder? It /is/ a public service, after all... Personally, though, I wonder if it should be the other way around: ComponentEventLinkEncoder really exposes too much of the internal "guts" of how tapestry "thinks" about requests: page names, nested component ids, etc. (In the form of the PageRequestParameters and ComponentEventRequestParameters objects. In that regard, using component resources is "correct" because it "hides" all of the gory details... Except that it still requires an ugly rats' nest of method calls. Creating links to pages from within services seems like such a common paradigm (redirecting to the login page on authentication failure, for example); maybe we ought to have cleaner, public support for it... I totally agree with Robert. Plus, what is the difference between: componentSource .getPage (XXX.class).getComponentResources().createPageLink(XXX.class,true); componentSource .getPage (YYY.class).getComponentResources().createPageLink(XXX.class,true); Will I still get the same link? If so, why do I need to get a page in first place? /Andreas - 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 - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5 - Zone update annoyance.
Just to clarify a bit more. When the page loads, the browser seems to cache it. So any subsequent updates to the summary panel are not cached. The user then leaves the page, and when they hit the back button in their browser, they get the cached page, which does not include the updates that were made after the page was loaded. I have tested IE7, and Google Chrome which both have the problem. It works in Firefox!! Daniel Jones wrote: > > Not sure why the show="summary" is there. (My lost efforts to try and > make the thing work) > > Daniel Jones wrote: >> >> Hi Kalle, >> >> I'm already using delegate: >> >> >> >> >> >> So I'm stumped as to what it could be. >> >> >> Kalle Korhonen-2 wrote: >>> >>> Delegate doesn't do the trick? >>> >>> >>> >>> >>> Kalle >>> >>> >>> On Tue, Mar 24, 2009 at 6:43 AM, Daniel Jones wrote: >>> Hello, I'm using Tapestry 5.0.18 and more specifically the Zone component. When I have a zone on a page (This is for an shopping basket panel, that updates as the user adds items.) Everything works fine but there is a minor annoyance. When the user follows a link to the next page and then decides to go back by clicking the back button on their browser. The Zone is now empty and does not perform a refresh, I have to manually click refresh to get the correct contents. Has anyone else had this problem? And are there any tips on how to solve it? I know that this may be more of a browser related issue, but there must be some workaround? Any help is much appreciated. Daniel -- View this message in context: http://www.nabble.com/T5---Zone-update-annoyance.-tp22680692p22680692.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org >>> >>> >> >> > > -- View this message in context: http://www.nabble.com/T5---Zone-update-annoyance.-tp22680692p22684056.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: Executing javascript on ajax call return
Unfortunately this doesn't work because Environmental stuff is not available when doing partial page renders - well for 5.0.18 at least, maybe it works with 5.1.0.1? This is the perfect mechanism for doing this though. I'll be trying 5.1 later this week so I'll try it again then. Thanks. > -Original Message- > From: Fernando Padilla [mailto:f...@alum.mit.edu] > Sent: 24 March 2009 15:35 > To: Tapestry users > Subject: Re: Executing javascript on ajax call return > > This already works.. when you do RenderSupport.addScript(), while > rendering a zone/block, it will be executed when that zone is put into > the page. But I can't remember what version of tapestry this got > turned > on.. > > Blower, Andy wrote: > > I would like to be able to add javascript to the 'script' key section > that is returned as a partial page render. Client side events are okay, > but being able to return some JS that runs is more flexible. It's also > partially there already and just needs exposing I think. > > > > At present we've resorted to returning some inline JS in the markup > returned. Nasty, but it works. I assume we've not missed a better way > of doing this? > > > >> -Original Message- > >> From: Howard Lewis Ship [mailto:hls...@gmail.com] > >> Sent: 24 March 2009 00:54 > >> To: Tapestry users > >> Subject: Re: Executing javascript on ajax call return > >> > >> I've been thinking for a while that there needs to be more client- > side > >> events, so that the zone element could ire "tapestry:zone:fetched", > >> "tapestry:zone:show", etc. > >> > >> On Mon, Mar 23, 2009 at 3:19 PM, Thiago H. de Paula Figueiredo > >> wrote: > >>> Is therea JIRA for that so I can vote on it? > >>> > >>> Em Mon, 23 Mar 2009 17:29:03 -0300, Fernando Padilla > >> > >>> escreveu: > >>> > Nope, there is no way to do javascript callbacks after a zone is > >> updated. > Zones right now are missing lifecycle callbacks, that you can > hook > >> into. > They do have the show/update callbacks that the Effects hook > into, > >> but it > could/should/hopefully will be expanded, eventually.. :) > > things like: > > preFetch > preShow > preUpdate > postUpdate > > > > But if you wanted to hack up your own, then start looking at > >> tapestry.js: > Tapestry.ZoneManager > Tapestry.Initializer.zone > Tapestry.Initializer.linkZone > > > > Thiago H. de Paula Figueiredo wrote: > > Em Mon, 23 Mar 2009 16:20:08 -0300, Hugo Palma > >> > > escreveu: > > > >> Is there a way to execute some javascript right after a zone > >> update is > >> performed ? I can't seem to find a place where i can register > to > >> listen > >> for an ajax call return. > > Well, Prototype has a global way to provide these callbacks: > > http://www.prototypejs.org/api/ajax/options. If you have more > than > >> one zone > > in a single page, I don't know how you would do that. > > > -- > -- > >> - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > >>> > >>> > >>> -- > >>> Thiago H. de Paula Figueiredo > >>> Independent Java consultant, developer, and instructor > >>> Consultor, desenvolvedor e instrutor em Java > >>> http://www.arsmachina.com.br/thiago > >>> > >>> --- > -- > >>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > >>> For additional commands, e-mail: users-h...@tapestry.apache.org > >>> > >>> > >> > >> > >> -- > >> Howard M. Lewis Ship > >> > >> Creator Apache Tapestry and Apache HiveMind > >> > >> > - > >> 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 > > > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5 - Zone update annoyance.
Not sure why the show="summary" is there. (My lost efforts to try and make the thing work) Daniel Jones wrote: > > Hi Kalle, > > I'm already using delegate: > > > > > > So I'm stumped as to what it could be. > > > Kalle Korhonen-2 wrote: >> >> Delegate doesn't do the trick? >> >> >> >> >> Kalle >> >> >> On Tue, Mar 24, 2009 at 6:43 AM, Daniel Jones wrote: >> >>> >>> Hello, >>> >>> I'm using Tapestry 5.0.18 and more specifically the Zone component. >>> >>> When I have a zone on a page (This is for an shopping basket panel, that >>> updates as the user adds items.) Everything works fine but there is a >>> minor >>> annoyance. When the user follows a link to the next page and then >>> decides >>> to go back by clicking the back button on their browser. The Zone is >>> now >>> empty and does not perform a refresh, I have to manually click refresh >>> to >>> get the correct contents. >>> >>> Has anyone else had this problem? And are there any tips on how to >>> solve >>> it? I know that this may be more of a browser related issue, but there >>> must >>> be some workaround? >>> >>> Any help is much appreciated. >>> Daniel >>> -- >>> View this message in context: >>> http://www.nabble.com/T5---Zone-update-annoyance.-tp22680692p22680692.html >>> Sent from the Tapestry - User mailing list archive at Nabble.com. >>> >>> >>> - >>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >>> For additional commands, e-mail: users-h...@tapestry.apache.org >>> >>> >> >> > > -- View this message in context: http://www.nabble.com/T5---Zone-update-annoyance.-tp22680692p22683794.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: T5 - Zone update annoyance.
Hi Kalle, I'm already using delegate: So I'm stumped as to what it could be. Kalle Korhonen-2 wrote: > > Delegate doesn't do the trick? > > > > > Kalle > > > On Tue, Mar 24, 2009 at 6:43 AM, Daniel Jones wrote: > >> >> Hello, >> >> I'm using Tapestry 5.0.18 and more specifically the Zone component. >> >> When I have a zone on a page (This is for an shopping basket panel, that >> updates as the user adds items.) Everything works fine but there is a >> minor >> annoyance. When the user follows a link to the next page and then >> decides >> to go back by clicking the back button on their browser. The Zone is now >> empty and does not perform a refresh, I have to manually click refresh to >> get the correct contents. >> >> Has anyone else had this problem? And are there any tips on how to solve >> it? I know that this may be more of a browser related issue, but there >> must >> be some workaround? >> >> Any help is much appreciated. >> Daniel >> -- >> View this message in context: >> http://www.nabble.com/T5---Zone-update-annoyance.-tp22680692p22680692.html >> Sent from the Tapestry - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> > > -- View this message in context: http://www.nabble.com/T5---Zone-update-annoyance.-tp22680692p22683733.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
executing/adding a script statement on zone update
Hello, I'm totally lost: what does happen when I update a zone : where do I have to put that startement renderSupport.addScript so that it is executed when updating the zone ? Could someone help me please ? Thanks in advance, Andrea Chiumenti - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Executing javascript on ajax call return
This already works.. when you do RenderSupport.addScript(), while rendering a zone/block, it will be executed when that zone is put into the page. But I can't remember what version of tapestry this got turned on.. Blower, Andy wrote: I would like to be able to add javascript to the 'script' key section that is returned as a partial page render. Client side events are okay, but being able to return some JS that runs is more flexible. It's also partially there already and just needs exposing I think. At present we've resorted to returning some inline JS in the markup returned. Nasty, but it works. I assume we've not missed a better way of doing this? -Original Message- From: Howard Lewis Ship [mailto:hls...@gmail.com] Sent: 24 March 2009 00:54 To: Tapestry users Subject: Re: Executing javascript on ajax call return I've been thinking for a while that there needs to be more client-side events, so that the zone element could ire "tapestry:zone:fetched", "tapestry:zone:show", etc. On Mon, Mar 23, 2009 at 3:19 PM, Thiago H. de Paula Figueiredo wrote: Is therea JIRA for that so I can vote on it? Em Mon, 23 Mar 2009 17:29:03 -0300, Fernando Padilla escreveu: Nope, there is no way to do javascript callbacks after a zone is updated. Zones right now are missing lifecycle callbacks, that you can hook into. They do have the show/update callbacks that the Effects hook into, but it could/should/hopefully will be expanded, eventually.. :) things like: preFetch preShow preUpdate postUpdate But if you wanted to hack up your own, then start looking at tapestry.js: Tapestry.ZoneManager Tapestry.Initializer.zone Tapestry.Initializer.linkZone Thiago H. de Paula Figueiredo wrote: Em Mon, 23 Mar 2009 16:20:08 -0300, Hugo Palma escreveu: Is there a way to execute some javascript right after a zone update is performed ? I can't seem to find a place where i can register to listen for an ajax call return. Well, Prototype has a global way to provide these callbacks: http://www.prototypejs.org/api/ajax/options. If you have more than one zone in a single page, I don't know how you would do that. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Thiago H. de Paula Figueiredo Independent Java consultant, developer, and instructor Consultor, desenvolvedor e instrutor em Java http://www.arsmachina.com.br/thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - 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 - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: 5.0.18 - 5.1.0.1 upgrade problems
I believe for page links, there is no difference. And you can just get the LinkFactory. For EventLinks, now it starts to get different because you are targetting both a page and a component ( which can be on a different page ). I'm still not a master on figuring this out, but I know what to look out for: pagelink: http://server/page/pagecontext eventlink: http://server/pagewithcomponent:component/eventcontext?t:ac=pagecontext&t:cp=pagetorender Andreas Pardeike wrote: On 24 mar 2009, at 14.20, Robert Zeigler wrote: I think that's ugly. :) Consider: componentSource .getPage (Index .class).getComponentResources().createPageLink(Index.class,true); Personally, I get suspicious of call chains nested more than about two-deep... smells of tight coupling. Ultimately, componentResources.createPageLink calls into LinkSource, which calls into ComponentEvenLinkEncoder to create the link. *shrug*. Why not bypass the nastiness and go straight to ComponentEventLinkEncoder? It /is/ a public service, after all... Personally, though, I wonder if it should be the other way around: ComponentEventLinkEncoder really exposes too much of the internal "guts" of how tapestry "thinks" about requests: page names, nested component ids, etc. (In the form of the PageRequestParameters and ComponentEventRequestParameters objects. In that regard, using component resources is "correct" because it "hides" all of the gory details... Except that it still requires an ugly rats' nest of method calls. Creating links to pages from within services seems like such a common paradigm (redirecting to the login page on authentication failure, for example); maybe we ought to have cleaner, public support for it... I totally agree with Robert. Plus, what is the difference between: componentSource.getPage(XXX.class).getComponentResources().createPageLink(XXX.class,true); componentSource.getPage(YYY.class).getComponentResources().createPageLink(XXX.class,true); Will I still get the same link? If so, why do I need to get a page in first place? /Andreas - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5 - Zone update annoyance.
Delegate doesn't do the trick? Kalle On Tue, Mar 24, 2009 at 6:43 AM, Daniel Jones wrote: > > Hello, > > I'm using Tapestry 5.0.18 and more specifically the Zone component. > > When I have a zone on a page (This is for an shopping basket panel, that > updates as the user adds items.) Everything works fine but there is a > minor > annoyance. When the user follows a link to the next page and then decides > to go back by clicking the back button on their browser. The Zone is now > empty and does not perform a refresh, I have to manually click refresh to > get the correct contents. > > Has anyone else had this problem? And are there any tips on how to solve > it? I know that this may be more of a browser related issue, but there > must > be some workaround? > > Any help is much appreciated. > Daniel > -- > View this message in context: > http://www.nabble.com/T5---Zone-update-annoyance.-tp22680692p22680692.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: Executing javascript on ajax call return
I would like to be able to add javascript to the 'script' key section that is returned as a partial page render. Client side events are okay, but being able to return some JS that runs is more flexible. It's also partially there already and just needs exposing I think. At present we've resorted to returning some inline JS in the markup returned. Nasty, but it works. I assume we've not missed a better way of doing this? > -Original Message- > From: Howard Lewis Ship [mailto:hls...@gmail.com] > Sent: 24 March 2009 00:54 > To: Tapestry users > Subject: Re: Executing javascript on ajax call return > > I've been thinking for a while that there needs to be more client-side > events, so that the zone element could ire "tapestry:zone:fetched", > "tapestry:zone:show", etc. > > On Mon, Mar 23, 2009 at 3:19 PM, Thiago H. de Paula Figueiredo > wrote: > > Is therea JIRA for that so I can vote on it? > > > > Em Mon, 23 Mar 2009 17:29:03 -0300, Fernando Padilla > > > escreveu: > > > >> Nope, there is no way to do javascript callbacks after a zone is > updated. > >> Zones right now are missing lifecycle callbacks, that you can hook > into. > >> They do have the show/update callbacks that the Effects hook into, > but it > >> could/should/hopefully will be expanded, eventually.. :) > >> > >> things like: > >> > >> preFetch > >> preShow > >> preUpdate > >> postUpdate > >> > >> > >> > >> But if you wanted to hack up your own, then start looking at > tapestry.js: > >> > >> Tapestry.ZoneManager > >> Tapestry.Initializer.zone > >> Tapestry.Initializer.linkZone > >> > >> > >> > >> Thiago H. de Paula Figueiredo wrote: > >>> > >>> Em Mon, 23 Mar 2009 16:20:08 -0300, Hugo Palma > > >>> escreveu: > >>> > Is there a way to execute some javascript right after a zone > update is > performed ? I can't seem to find a place where i can register to > listen > for an ajax call return. > >>> > >>> Well, Prototype has a global way to provide these callbacks: > >>> http://www.prototypejs.org/api/ajax/options. If you have more than > one zone > >>> in a single page, I don't know how you would do that. > >>> > >> > >> > - > >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > >> For additional commands, e-mail: users-h...@tapestry.apache.org > >> > > > > > > > > -- > > Thiago H. de Paula Figueiredo > > Independent Java consultant, developer, and instructor > > Consultor, desenvolvedor e instrutor em Java > > http://www.arsmachina.com.br/thiago > > > > - > > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > > For additional commands, e-mail: users-h...@tapestry.apache.org > > > > > > > > -- > Howard M. Lewis Ship > > Creator Apache Tapestry and Apache HiveMind > > - > 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.0.18 - 5.1.0.1 upgrade problems
On Tue, Mar 24, 2009 at 2:20 PM, Robert Zeigler wrote: > maybe we ought to have cleaner, public support for it... Wise words. It's since day one i start to write authentication and authorization logic that i stumble across this. Ciao -- Massimo http://meridio.blogspot.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
T5 - Zone update annoyance.
Hello, I'm using Tapestry 5.0.18 and more specifically the Zone component. When I have a zone on a page (This is for an shopping basket panel, that updates as the user adds items.) Everything works fine but there is a minor annoyance. When the user follows a link to the next page and then decides to go back by clicking the back button on their browser. The Zone is now empty and does not perform a refresh, I have to manually click refresh to get the correct contents. Has anyone else had this problem? And are there any tips on how to solve it? I know that this may be more of a browser related issue, but there must be some workaround? Any help is much appreciated. Daniel -- View this message in context: http://www.nabble.com/T5---Zone-update-annoyance.-tp22680692p22680692.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: 5.0.18 - 5.1.0.1 upgrade problems
On 24 mar 2009, at 14.20, Robert Zeigler wrote: I think that's ugly. :) Consider: componentSource .getPage (Index .class).getComponentResources().createPageLink(Index.class,true); Personally, I get suspicious of call chains nested more than about two-deep... smells of tight coupling. Ultimately, componentResources.createPageLink calls into LinkSource, which calls into ComponentEvenLinkEncoder to create the link. *shrug*. Why not bypass the nastiness and go straight to ComponentEventLinkEncoder? It /is/ a public service, after all... Personally, though, I wonder if it should be the other way around: ComponentEventLinkEncoder really exposes too much of the internal "guts" of how tapestry "thinks" about requests: page names, nested component ids, etc. (In the form of the PageRequestParameters and ComponentEventRequestParameters objects. In that regard, using component resources is "correct" because it "hides" all of the gory details... Except that it still requires an ugly rats' nest of method calls. Creating links to pages from within services seems like such a common paradigm (redirecting to the login page on authentication failure, for example); maybe we ought to have cleaner, public support for it... I totally agree with Robert. Plus, what is the difference between: componentSource .getPage (XXX.class).getComponentResources().createPageLink(XXX.class,true); componentSource .getPage (YYY.class).getComponentResources().createPageLink(XXX.class,true); Will I still get the same link? If so, why do I need to get a page in first place? /Andreas - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: 5.0.18 - 5.1.0.1 upgrade problems
I think that's ugly. :) Consider: componentSource .getPage (Index.class).getComponentResources().createPageLink(Index.class,true); Personally, I get suspicious of call chains nested more than about two- deep... smells of tight coupling. Ultimately, componentResources.createPageLink calls into LinkSource, which calls into ComponentEvenLinkEncoder to create the link. *shrug*. Why not bypass the nastiness and go straight to ComponentEventLinkEncoder? It /is/ a public service, after all... Personally, though, I wonder if it should be the other way around: ComponentEventLinkEncoder really exposes too much of the internal "guts" of how tapestry "thinks" about requests: page names, nested component ids, etc. (In the form of the PageRequestParameters and ComponentEventRequestParameters objects. In that regard, using component resources is "correct" because it "hides" all of the gory details... Except that it still requires an ugly rats' nest of method calls. Creating links to pages from within services seems like such a common paradigm (redirecting to the login page on authentication failure, for example); maybe we ought to have cleaner, public support for it... Robert On Mar 23, 2009, at 3/2310:47 AM , Howard Lewis Ship wrote: The correct approach is to use ComponentSource (http://tapestry.formos.com/nightly/tapestry5/apidocs/org/apache/tapestry5/services/ComponentSource.html ) to acquire a page. You can then get its ComponentResources and generate a page render Link from the resources. On Mon, Mar 23, 2009 at 8:36 AM, Massimo Lusetti wrote: On Mon, Mar 23, 2009 at 4:29 PM, Robert Zeigler wrote: If you want to stick with public services, and you're using 5.1, you can use: http://tapestry.formos.com/nightly/tapestry5/apidocs/org/apache/tapestry5/services/ComponentEventLinkEncoder.html I don't think it's quite as convenient to use as LinkSource, but at least it's public. :) I think that's the better bet we can have and that has been made for similar use cases. -- Massimo http://meridio.blogspot.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - 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
AW: T5: creating a tutorial for 5.0.18
Try this one: mvn archetype:create -DarchetypeGroupId=org.apache.tapestry -DarchetypeVersion=5.0.18 -DarchetypeArtifactId=quickstart -DgroupId=org.apache.tapestry -DartifactId= tutorial1 -DpackageName=org.apache.tapestry5.tutorial Max > -Ursprüngliche Nachricht- > Von: Angelo Chen [mailto:angelochen...@yahoo.com.hk] > Gesendet: Sonntag, 22. März 2009 08:00 > An: users@tapestry.apache.org > Betreff: Re: T5: creating a tutorial for 5.0.18 > > > Hi, > > I copied this from T5 page: > > mvn archetype:create -DarchetypeGroupId=org.apache.tapestry > -DarchetypeArtifactId=quickstart -DgroupId=org.example -DartifactId=myapp > -DpackageName=org.example.myapp -Dversion=RELEASE > > and run it, got this error: > Embedded error: The META-INF/maven/archetype.xml descriptor cannot be > found. > > I have been using quickstart in the pass and worked very well, only now > having this problem, any idea how to fix this? > > Thanks, > > Angelo > > > Angelo Chen wrote: > > > > Hi, > > > > using this one:mvn archetype:create > > -DarchetypeGroupId=org.apache.tapestry > > -DarchetypeArtifactId=quickstart > > -DgroupId=org.apache.tapestry > > -DartifactId=tutorial1 > > -DpackageName=org.apache.tapestry5.tutorial > > it creates one for 5.1.0.1, is there a way to create one for 5.0.18? > The > > reason for me to create a tutorial is, I always use this approach to > start > > a new project. > > > > Thanks, > > > > Angelo > > > > -- > View this message in context: http://www.nabble.com/T5%3A-creating-a- > tutorial-for-5.0.18-tp22643617p22643743.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
[T 5.1] Problem with obligatory locale-aware number formatting
Hi all! I want to use dojo/dijit widgets in an applicatioin. For example the currency textbox like this: Java: public getPriceFloat() { return currentProduct.getPrice().doubleValue(); } Template: Currencytextbox ecpects a standard javascript "float" as value and Tapestry's number translator renders it according to my (german) locale with a comma instead of a dot as decimal separator (eg. value="123,45" instead of value="123.45"). Now I could of course use a special datatype in these cases and provide a custom translator, but it would be better to have a more general approach to it, since in this case dojo/dijit would work with the english locale but not with the german one, which is a bit ugly. One solution could for example be a special annotation like @Translate(false) or @NoTranslation or something like that which skips locale specific translation, so I can override standard datatypes' translation only in the cases I want without having to write (potentially) a bunch of custom translators. Or did I overlook some simple workaround? Regards, Otho
Re: Binding of Boolean parameter
On Tue, Mar 24, 2009 at 5:27 AM, Ville Virtanen wrote: > Also the line > writer.write(""+value); What about writer.write(String.valueOf(value))? Anyway, conversions from almost any type to String are best handled by String.valueOf(). -- Thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Executing javascript on ajax call return
That would be great. Is there an issue already for this ? On Tue, Mar 24, 2009 at 12:53 AM, Howard Lewis Ship wrote: > I've been thinking for a while that there needs to be more client-side > events, so that the zone element could ire "tapestry:zone:fetched", > "tapestry:zone:show", etc. > > On Mon, Mar 23, 2009 at 3:19 PM, Thiago H. de Paula Figueiredo > wrote: > > Is therea JIRA for that so I can vote on it? > > > > Em Mon, 23 Mar 2009 17:29:03 -0300, Fernando Padilla > > escreveu: > > > >> Nope, there is no way to do javascript callbacks after a zone is > updated. > >> Zones right now are missing lifecycle callbacks, that you can hook > into. > >> They do have the show/update callbacks that the Effects hook into, but > it > >> could/should/hopefully will be expanded, eventually.. :) > >> > >> things like: > >> > >> preFetch > >> preShow > >> preUpdate > >> postUpdate > >> > >> > >> > >> But if you wanted to hack up your own, then start looking at > tapestry.js: > >> > >> Tapestry.ZoneManager > >> Tapestry.Initializer.zone > >> Tapestry.Initializer.linkZone > >> > >> > >> > >> Thiago H. de Paula Figueiredo wrote: > >>> > >>> Em Mon, 23 Mar 2009 16:20:08 -0300, Hugo Palma > > >>> escreveu: > >>> > Is there a way to execute some javascript right after a zone update is > performed ? I can't seem to find a place where i can register to > listen > for an ajax call return. > >>> > >>> Well, Prototype has a global way to provide these callbacks: > >>> http://www.prototypejs.org/api/ajax/options. If you have more than one > zone > >>> in a single page, I don't know how you would do that. > >>> > >> > >> - > >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > >> For additional commands, e-mail: users-h...@tapestry.apache.org > >> > > > > > > > > -- > > Thiago H. de Paula Figueiredo > > Independent Java consultant, developer, and instructor > > Consultor, desenvolvedor e instrutor em Java > > http://www.arsmachina.com.br/thiago > > > > - > > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > > For additional commands, e-mail: users-h...@tapestry.apache.org > > > > > > > > -- > Howard M. Lewis Ship > > Creator Apache Tapestry and Apache HiveMind > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >
Re: Executing javascript on ajax call return
I agree too, that would make zones way more useful! On Tue, Mar 24, 2009 at 2:01 AM, Thiago H. de Paula Figueiredo < thiag...@gmail.com> wrote: > Em Mon, 23 Mar 2009 21:53:55 -0300, Howard Lewis Ship > escreveu: > > I've been thinking for a while that there needs to be more client-side >> events, so that the zone element could ire "tapestry:zone:fetched", >> "tapestry:zone:show", etc. >> > > +1! > > -- > Thiago H. de Paula Figueiredo > Independent Java consultant, developer, and instructor > http://www.arsmachina.com.br/thiago > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >
Re: Binding of Boolean parameter
Also the line writer.write(""+value); could be to blame? try something like if(value == null) { writer.write("null"); } else if (value.booleanValue() == true) { writer.write("true"); } else { writer.write("false"); } If it still does not work I suggest that you create JIRA issue and attach .tml and .java files that replicate this with explanation. - Ville Łukasz Jazgar wrote: > > 5.0.18 > > 2009/3/24 Ville Virtanen : >> >> What version are you using? >> >> - Ville >> >> >> Łukasz Jazgar wrote: >>> >>> 2009/3/24 Ville Virtanen : Hi, double check that the boolean is not primitive _anywhere_, as then assigning null to it would coerse the value to false witch is the default in Java if it is unknown. >>> >>> I checked it 10 times before. Parameter of component and property of >>> page are not primitive Booleans. >>> >>> Similar behaviour I see in oposite direction. When I set value of >>> component parameter to null, page property gets false, not null. >>> The other option is that the type coersion system in T5 handles null values incorrectly? >>> >>> Is it possible, that so base functionality is buggy in stable release >>> (5.0.18) and nobody noticed it before? Neither unit tests? I can't >>> belive. I still think it's my fault and my lack of understanding. >>> >>> >>> Łukasz >>> >>> - >>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >>> For additional commands, e-mail: users-h...@tapestry.apache.org >>> >>> >>> >> >> -- >> View this message in context: >> http://www.nabble.com/Binding-of-Boolean-parameter-tp22670091p22675837.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 > > > -- View this message in context: http://www.nabble.com/Binding-of-Boolean-parameter-tp22670091p22675928.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: Binding of Boolean parameter
5.0.18 2009/3/24 Ville Virtanen : > > What version are you using? > > - Ville > > > Łukasz Jazgar wrote: >> >> 2009/3/24 Ville Virtanen : >>> >>> Hi, >>> >>> double check that the boolean is not primitive _anywhere_, as then >>> assigning >>> null to it would coerse the value to false witch is the default in Java >>> if >>> it is unknown. >> >> I checked it 10 times before. Parameter of component and property of >> page are not primitive Booleans. >> >> Similar behaviour I see in oposite direction. When I set value of >> component parameter to null, page property gets false, not null. >> >>> >>> The other option is that the type coersion system in T5 handles null >>> values >>> incorrectly? >> >> Is it possible, that so base functionality is buggy in stable release >> (5.0.18) and nobody noticed it before? Neither unit tests? I can't >> belive. I still think it's my fault and my lack of understanding. >> >> >> Łukasz >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> >> > > -- > View this message in context: > http://www.nabble.com/Binding-of-Boolean-parameter-tp22670091p22675837.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: Binding of Boolean parameter
What version are you using? - Ville Łukasz Jazgar wrote: > > 2009/3/24 Ville Virtanen : >> >> Hi, >> >> double check that the boolean is not primitive _anywhere_, as then >> assigning >> null to it would coerse the value to false witch is the default in Java >> if >> it is unknown. > > I checked it 10 times before. Parameter of component and property of > page are not primitive Booleans. > > Similar behaviour I see in oposite direction. When I set value of > component parameter to null, page property gets false, not null. > >> >> The other option is that the type coersion system in T5 handles null >> values >> incorrectly? > > Is it possible, that so base functionality is buggy in stable release > (5.0.18) and nobody noticed it before? Neither unit tests? I can't > belive. I still think it's my fault and my lack of understanding. > > > Łukasz > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > > -- View this message in context: http://www.nabble.com/Binding-of-Boolean-parameter-tp22670091p22675837.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: Binding of Boolean parameter
2009/3/24 Ville Virtanen : > > Hi, > > double check that the boolean is not primitive _anywhere_, as then assigning > null to it would coerse the value to false witch is the default in Java if > it is unknown. I checked it 10 times before. Parameter of component and property of page are not primitive Booleans. Similar behaviour I see in oposite direction. When I set value of component parameter to null, page property gets false, not null. > > The other option is that the type coersion system in T5 handles null values > incorrectly? Is it possible, that so base functionality is buggy in stable release (5.0.18) and nobody noticed it before? Neither unit tests? I can't belive. I still think it's my fault and my lack of understanding. Łukasz - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org