Re: Zones and blocks inside components
You're right, the "id" attribute of the zone will not be "uniqueified" by Tapestry, so you have to do the job yourself. Also, the "t:id" and "id" attributes are not the same, they behave differently. You could perhaps use something like this in your component class: @Property private String uniqueZoneId; @SetupRender void initUniqueZoneId() { String u = generateRandomUniqueString(); uniqueZoneId = "myZoneId_" + u; } And then in your template you could do this: A Zone! A Block! A link I may have introduced some errors, but you probably get the idea. Hope it works! Inge On Tue, Aug 18, 2009 at 1:23 AM, Juan E. Maya wrote: > That would;t work if the component is inside a loop because the id of > zone is unique. in this case: aZone. The zone has to be created > dynamically. > > On Tue, Aug 18, 2009 at 12:03 AM, Ted Steen wrote: > > Something like this? > > > > Index.tml > > http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"; > > xmlns:p="tapestry:parameter"> > > > >A Zone! > >A Block! > >A > link > > > > > > > > Index.java > > public class Index > > { > >@Inject > >private Block aBlock; > > > >@OnEvent(component = "anActionLink", value = EventConstants.ACTION) > >public Block actionFromActionLink() > >{ > >return aBlock; > >} > > > > } > > > > 2008/6/19 Mohan Zhang > > > >: > >> > >> Hi everyone, > >> > >> I've been reading the mailing list for a while now and have only seen > one > >> post on this topic, which unfortunately did not clarify things for me. I > >> know this question has probably been asked a few times either indirectly > or > >> whatnot, but I'm curious to find out if the problem is something very > >> fundamental in my understanding, or whether this is just a technical > issue. > >> > >> The question is this: if I have a component which has a zone and an > >> actionlink (or alternatively an eventlink) which loads a block into the > >> zone, what's the right way to do this? I've tried using clientId tricks, > but > >> this has never been successful for me. > >> > >> So to summarize, I have a component which declares its own zone, block, > and > >> actionlink. I want this actionlink to load the block into the zone for > this > >> component. Now I have a page which has say four of these components and > I > >> want each actionlink to affect the appropriate zone. What's the right > way to > >> do this? > >> -- > >> View this message in context: > http://www.nabble.com/Zones-and-blocks-inside-components-tp17993683p17993683.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 > > > > > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >
Header, footer component are not working.
Hello Friends, I want to add header and footer in my web page . But it is not working. I have create my .java and .tml file in there appropriate "components" folder. Here is my component file called "HF.tml". http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> This Is Header File this is header === HF.java package org.example.myapp.components; public class HF { } === Another.tml http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> my another page == Another.java package org.example.myapp.pages; public class Another{ } But it just display my another page but it should show *this is header* my another page Prajesh J. Kacha. Coriolis Technologies Pvt Ltd.
How to submit in javascript to update zone?
if like this: var myAjax = new Ajax.Request("poicenter.form", { method :'post', parameters :"c=c", onComplete :null }); tomcat will throw exception:Forms require that the request method be POST and that the t:formdata query parameter have values. if I just submit like this: form.submit(). Then isXHR() will return false and zone will not be update. any advise? 2009-08-18 sohu
Re: Hello. New user here!
Better than exclude - re-declare the tapestry version in your own application pom so Maven's "nearest" version resolution can work properly (that way you don't have to exclude them for each dependency that declares a specific version of Tapestry). Kalle On Mon, Aug 17, 2009 at 5:27 PM, Thiago H. de Paula Figueiredo wrote: > Em Mon, 17 Aug 2009 21:11:09 -0300, Joshua Martin > escreveu: > >> I never figured it out - although I believe that the Chenille Kit >> handles this nicely. The problem was that Chenille Kit isn't >> compatible with T5.1 and I need 5.1 - note here that the upcoming >> version of CK will support T5.1 > > It is compatible. If you're using Maven, make sure you exclude Tapestry from > ChenilleKit's transitive dependencies > > You can also look at some examples posted in Inge Solvoll's blog: > http://tinybits.blogspot.com/. > > -- > 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 > > - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: How to create Master-Detail view
But the correct solution was in using prop: prefix to refer to enclosing component. Thanks for pointing. Work in progress. On Tue, Aug 18, 2009 at 07:51, Andrey Larionov wrote: > The only way i can achive result is ugly getSelf hack. Thru > environmental service i can't access no component no wraped component. > > On Tue, Aug 18, 2009 at 05:57, Andrey Larionov wrote: >> Thanks for good point. try it now. >> >> On Tue, Aug 18, 2009 at 05:51, Thiago H. de Paula >> Figueiredo wrote: >>> Em Mon, 17 Aug 2009 22:12:13 -0300, Andrey Larionov >>> escreveu: >>> One more question. How to pass enclosing component into nested. I mean "self". In loop i render elements and i want to pass enclosing element as parameter in template For example: (start component template) >>> xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"; xmlns:p="tapestry:parameter"> >>> >>> You can only use component:componentId for components declared in the same >>> template. >>> A quick and dirty way would be to add a getSelf() { return this; } method in >>> your component class and them pass feedList="self". >>> A more elegant way would be to use the Environmental service, something I've >>> never used but seems to be easy. >>> >>> -- >>> 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 >>> >>> >> > - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: How to create Master-Detail view
The only way i can achive result is ugly getSelf hack. Thru environmental service i can't access no component no wraped component. On Tue, Aug 18, 2009 at 05:57, Andrey Larionov wrote: > Thanks for good point. try it now. > > On Tue, Aug 18, 2009 at 05:51, Thiago H. de Paula > Figueiredo wrote: >> Em Mon, 17 Aug 2009 22:12:13 -0300, Andrey Larionov >> escreveu: >> >>> One more question. How to pass enclosing component into nested. I mean >>> "self". In loop i render elements and i want to pass enclosing element >>> as parameter in template >>> For example: (start component template) >>> >> xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"; >>> xmlns:p="tapestry:parameter"> >>> >>> >>> >> >> You can only use component:componentId for components declared in the same >> template. >> A quick and dirty way would be to add a getSelf() { return this; } method in >> your component class and them pass feedList="self". >> A more elegant way would be to use the Environmental service, something I've >> never used but seems to be easy. >> >> -- >> 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 >> >> > - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: IEngineService blocks all other Page access
Out of curiosity... is this due to some synchronized collection(s) that back the cache? they block until the RequestCycle is over in order to empty them as per the org.apache.tapestry.disable-caching directive.. thus all other Page access which can use the cache must wait? On Sun, Aug 16, 2009 at 8:12 PM, Andreas Andreou wrote: > see if you have > org.apache.tapestry.disable-caching set to true > > It is possible that this might be causing that > > On Mon, Aug 17, 2009 at 2:54 AM, Nathan Beemer > wrote: > > > > I have an IEngineService implementation that simply has > Thread.sleep(3); > > in the service() implementation. > > > > I have a simple Page with a ServiceLink that calls this IEngineService. > > > > When I click the ServiceLink which causes Thread.sleep() to be invoked, > ALL > > other Page access blocks until the service() method in IEngineService > > returns, even from other clients. > > > > Is the service() method supposed to block other access? Is this a known > bug > > in Tapestry 4.1 ? > > > > > > - > > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > > For additional commands, e-mail: users-h...@tapestry.apache.org > > > > > > > > -- > Andreas Andreou - andy...@apache.org - http://blog.andyhot.gr > Tapestry / Tacos developer > Open Source / JEE Consulting > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >
Re: How to create Master-Detail view
Thanks for good point. try it now. On Tue, Aug 18, 2009 at 05:51, Thiago H. de Paula Figueiredo wrote: > Em Mon, 17 Aug 2009 22:12:13 -0300, Andrey Larionov > escreveu: > >> One more question. How to pass enclosing component into nested. I mean >> "self". In loop i render elements and i want to pass enclosing element >> as parameter in template >> For example: (start component template) >> > xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"; >> xmlns:p="tapestry:parameter"> >> >> >> > > You can only use component:componentId for components declared in the same > template. > A quick and dirty way would be to add a getSelf() { return this; } method in > your component class and them pass feedList="self". > A more elegant way would be to use the Environmental service, something I've > never used but seems to be easy. > > -- > 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 > > - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: How to create Master-Detail view
Em Mon, 17 Aug 2009 22:12:13 -0300, Andrey Larionov escreveu: One more question. How to pass enclosing component into nested. I mean "self". In loop i render elements and i want to pass enclosing element as parameter in template For example: (start component template) http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"; xmlns:p="tapestry:parameter"> You can only use component:componentId for components declared in the same template. A quick and dirty way would be to add a getSelf() { return this; } method in your component class and them pass feedList="self". A more elegant way would be to use the Environmental service, something I've never used but seems to be easy. -- 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: How to create Master-Detail view
One more question. How to pass enclosing component into nested. I mean "self". In loop i render elements and i want to pass enclosing element as parameter in template For example: (start component template) http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"; xmlns:p="tapestry:parameter"> Create new Feed... I want to pass FeedList (template of which) into FeedElement. But my example are wrong. On Tue, Aug 18, 2009 at 04:33, Andrey Larionov wrote: > Thanks. I'll try it. > > On Tue, Aug 18, 2009 at 04:20, Thiago H. de Paula > Figueiredo wrote: >> Em Mon, 17 Aug 2009 21:07:43 -0300, Andrey Larionov >> escreveu: >> >>> As i understand, i should in first component create a field of type of >>> second component and anotate this field as non required parameter? >> >> Yes. >> >>> How do i inject second component in first? From template? Or on class >>> side? >> >> From template, you can pass a component to a component parameter: >> t:parametername="component:componentId". >> In a page or component class that uses the given component, @InjectComponent >> private ComponentType component; >> >> -- >> 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 >> >> > - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: How to create Master-Detail view
Thanks. I'll try it. On Tue, Aug 18, 2009 at 04:20, Thiago H. de Paula Figueiredo wrote: > Em Mon, 17 Aug 2009 21:07:43 -0300, Andrey Larionov > escreveu: > >> As i understand, i should in first component create a field of type of >> second component and anotate this field as non required parameter? > > Yes. > >> How do i inject second component in first? From template? Or on class >> side? > > From template, you can pass a component to a component parameter: > t:parametername="component:componentId". > In a page or component class that uses the given component, @InjectComponent > private ComponentType component; > > -- > 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 > > - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Hello. New user here!
Em Mon, 17 Aug 2009 21:11:09 -0300, Joshua Martin escreveu: I never figured it out - although I believe that the Chenille Kit handles this nicely. The problem was that Chenille Kit isn't compatible with T5.1 and I need 5.1 - note here that the upcoming version of CK will support T5.1 It is compatible. If you're using Maven, make sure you exclude Tapestry from ChenilleKit's transitive dependencies You can also look at some examples posted in Inge Solvoll's blog: http://tinybits.blogspot.com/. -- 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: How to create Master-Detail view
Em Mon, 17 Aug 2009 21:07:43 -0300, Andrey Larionov escreveu: As i understand, i should in first component create a field of type of second component and anotate this field as non required parameter? Yes. How do i inject second component in first? From template? Or on class side? From template, you can pass a component to a component parameter: t:parametername="component:componentId". In a page or component class that uses the given component, @InjectComponent private ComponentType component; -- 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: Hello. New user here!
I had the same problem with catching an event from a Select. I was trying to update a Zone according to a selection in a Select. I never figured it out - although I believe that the Chenille Kit handles this nicely. The problem was that Chenille Kit isn't compatible with T5.1 and I need 5.1 - note here that the upcoming version of CK will support T5.1 Here's what I did to solve my dilemma - albeit a more "backwards" way of doing things: I use a button on the page with the Select to get the Select's value and then redirect to a page, passing the value along. Let me know if you need the code to get the Select's value. On Mon, Aug 17, 2009 at 7:17 PM, Martin Torre Castro wrote: > > > Hello, I'm a student as engineer and I have to make an application web with > Tapestry. It's a wonderful framework, but I'm finding many problems which I > spend too many time to solve and I've got very few time, so I decided to > suscribe to this mail-list. > > My current problem now is finding a way to catch and handle an event from a > Select component. I've read on google about something called "mixings" but > don't know/understand about it. > I tried with something like: > > > .tml file: > > > > .java file: > @OnEvent(component="incidSearchType") > void onActionFromIncidSearchType() { /*Some code here*/ } > > > Is there an easy way with @OnEvent or with naming convention to do it or do > i have to use mixings? I would appreciate some sample code, please. I have > read half the book that Kolesnikov wrote about tapestry5 and I couldn't find > anything. Am I missing something? > > > Please, help me. I would aprecciate very much. Thanks for your attention > and sorry about my english and my newbie question > > Thanks very much. > > _ > Entérate de todas las noticias al instante ¡Suscríbete al servicio de Alertas > MSN! > http://especiales.es.msn.com/noticias/msninforma.aspx -- _ Joshua S. Martin CONFIDENTIALITY NOTE: This e-mail message, including any attachment(s), contains information that may be confidential, protected by the attorney client or other legal privileges, and or proprietary non public information. If you are not an intended recipient of this message or an authorized assistant to an intended recipient, please notify the sender by replying to this message and then delete it from your system. Use, dissemination, distribution, or reproduction of this message and or any of its attachments (if any) by unintended recipients is not authorized and may be unlawful. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: How to create Master-Detail view
As i understand, i should in first component create a field of type of second component and anotate this field as non required parameter? How do i inject second component in first? From template? Or on class side? On Tue, Aug 18, 2009 at 03:53, Thiago H. de Paula Figueiredo wrote: > Em Mon, 17 Aug 2009 20:44:55 -0300, Andrey Larionov > escreveu: > >> By linking i mean next: >> When i perform (for example) select action on first component, second >> should get selected value and display corresponding changes. But if >> one of components is absent, then components should work standalone >> without interaction with each other. > > You could do that by: > > * Having the first component has a non-required parameter that is the linked > component > * Actions are handled by events. The first component, handling some event, > would then invoke methods in the second component to change its state. > Components (and pages too) are simple stateful objects, so they can interact > with each other just by invoking methods. > * Components (both or just the linked one) is rerendered. > > Better explained now? :) Most of the time, doing something in Tapestry is > simpler than we think at first. > > -- > 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 > > - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: How to create Master-Detail view
Em Mon, 17 Aug 2009 20:44:55 -0300, Andrey Larionov escreveu: By linking i mean next: When i perform (for example) select action on first component, second should get selected value and display corresponding changes. But if one of components is absent, then components should work standalone without interaction with each other. You could do that by: * Having the first component has a non-required parameter that is the linked component * Actions are handled by events. The first component, handling some event, would then invoke methods in the second component to change its state. Components (and pages too) are simple stateful objects, so they can interact with each other just by invoking methods. * Components (both or just the linked one) is rerendered. Better explained now? :) Most of the time, doing something in Tapestry is simpler than we think at first. -- 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: How to create Master-Detail view
By linking i mean next: When i perform (for example) select action on first component, second should get selected value and display corresponding changes. But if one of components is absent, then components should work standalone without interaction with each other. On Tue, Aug 18, 2009 at 03:36, Thiago H. de Paula Figueiredo wrote: > Em Mon, 17 Aug 2009 20:05:41 -0300, Andrey Larionov > escreveu: > >> By "component" i mean Tapestry component. > > Ok! > >> I try to understand how to place two components on page. > > Just declare them in the template. > >> And make they optionaly linked. > > What do you mean by linked in this scenario? > > Anyway, take a look here: > http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/AjaxFormLoop.html. > It provides a master/detail example. > > -- > 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 > > - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: How to create Master-Detail view
Em Mon, 17 Aug 2009 20:05:41 -0300, Andrey Larionov escreveu: By "component" i mean Tapestry component. Ok! I try to understand how to place two components on page. Just declare them in the template. And make they optionaly linked. What do you mean by linked in this scenario? Anyway, take a look here: http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/AjaxFormLoop.html. It provides a master/detail example. -- 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: [T5.1] MultiZoneUpdate can not be handled Error
Em Mon, 17 Aug 2009 20:19:26 -0300, xfile80303 escreveu: Hi Thiago, Hi! Request.isXHR() returns 'false' as you expected... Fist part of the problem solved: figuring out what went wrong . . . :) So I'm not sure how to proceed... I'm far better at Java than Javascript, so please pardon my ignorance. No problem. :) The ID of the radiobutton components are created as a result of the loop iterator, so I'm not sure how I can use Even.observe (or where I would place a script containing Event.observe calls) to initiate the form submission... You must place the Event.observe calls after your radio buttons. The Event.observe first parameter is the observed element (tag) id, so you need to generate this code dynamically. http://wiki.apache.org/tapestry/Tapestry5AndJavaScriptExplained tells you how to do it. Anyway, I guess your problem is that you're submitting the form directly and Tapestry.js not being notified of that. Try programatically clicking in a submit button. -- 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: Zones and blocks inside components
That would;t work if the component is inside a loop because the id of zone is unique. in this case: aZone. The zone has to be created dynamically. On Tue, Aug 18, 2009 at 12:03 AM, Ted Steen wrote: > Something like this? > > Index.tml > http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"; > xmlns:p="tapestry:parameter"> > > A Zone! > A Block! > A link > > > > Index.java > public class Index > { > �...@inject > private Block aBlock; > > �...@onevent(component = "anActionLink", value = EventConstants.ACTION) > public Block actionFromActionLink() > { > return aBlock; > } > > } > > 2008/6/19 Mohan Zhang : >> >> Hi everyone, >> >> I've been reading the mailing list for a while now and have only seen one >> post on this topic, which unfortunately did not clarify things for me. I >> know this question has probably been asked a few times either indirectly or >> whatnot, but I'm curious to find out if the problem is something very >> fundamental in my understanding, or whether this is just a technical issue. >> >> The question is this: if I have a component which has a zone and an >> actionlink (or alternatively an eventlink) which loads a block into the >> zone, what's the right way to do this? I've tried using clientId tricks, but >> this has never been successful for me. >> >> So to summarize, I have a component which declares its own zone, block, and >> actionlink. I want this actionlink to load the block into the zone for this >> component. Now I have a page which has say four of these components and I >> want each actionlink to affect the appropriate zone. What's the right way to >> do this? >> -- >> View this message in context: >> http://www.nabble.com/Zones-and-blocks-inside-components-tp17993683p17993683.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 > > - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5.1] MultiZoneUpdate can not be handled Error
Hi Thiago, Request.isXHR() returns 'false' as you expected... So I'm not sure how to proceed... I'm far better at Java than Javascript, so please pardon my ignorance. The ID of the radiobutton components are created as a result of the loop iterator, so I'm not sure how I can use Even.observe (or where I would place a script containing Event.observe calls) to initiate the form submission... For reference, I'm looking here: http://www.prototypejs.org/api/event/observe Your suggestions are greatly appreciated. Thanks, Levi On Aug 17, 2009, at 16:40, Thiago H. de Paula Figueiredo (via Nabble) wrote: > Em Mon, 17 Aug 2009 19:25:54 -0300, xfile80303 > escreveu: > >> Can you suggest how I should activate the ajax refresh when the user >> clicks on one of the radio buttons? > > Please check first Request.isXHR() in your event handler to see > whether > this really is the source of the problem. > Another hint: instead of relying in onclick, use Prototype's > Event.observe() method. > > -- > 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 > > > > __ > View message @ > http://n2.nabble.com/-T5.1--MultiZoneUpdate-can-not-be-handled-Error-tp3462182p3462618.html > > To unsubscribe from Re: [T5.1] MultiZoneUpdate can not be handled > Error, click (link removed) -- View this message in context: http://n2.nabble.com/-T5.1--MultiZoneUpdate-can-not-be-handled-Error-tp3462182p3462793.html Sent from the Tapestry Users mailing list archive at Nabble.com.
Hello. New user here!
Hello, I'm a student as engineer and I have to make an application web with Tapestry. It's a wonderful framework, but I'm finding many problems which I spend too many time to solve and I've got very few time, so I decided to suscribe to this mail-list. My current problem now is finding a way to catch and handle an event from a Select component. I've read on google about something called "mixings" but don't know/understand about it. I tried with something like: .tml file: .java file: @OnEvent(component="incidSearchType") void onActionFromIncidSearchType() { /*Some code here*/ } Is there an easy way with @OnEvent or with naming convention to do it or do i have to use mixings? I would appreciate some sample code, please. I have read half the book that Kolesnikov wrote about tapestry5 and I couldn't find anything. Am I missing something? Please, help me. I would aprecciate very much. Thanks for your attention and sorry about my english and my newbie question Thanks very much. _ Entérate de todas las noticias al instante ¡Suscríbete al servicio de Alertas MSN! http://especiales.es.msn.com/noticias/msninforma.aspx
[Tapestry Central] Article: Meta-Programming Java
In the last couple of years, if you mention the term meta-programming, people's ears perk up ... and they start looking around for Ruby. That's fair; Ruby makes a lot of meta-programming concepts very, very easy. However, that doesn't mean you can't do any meta-programming in Java; you just are a bit more limited and need a lot more infrastructure. Tapestry 5, both the web framework and the underlying Inversion of Control container, is rife with meta-programming options. Let's talk about one of the most versatile: the thunk. Thunks and Laziness A thunk is a placeholder for a value to be computed as-needed. The Haskell programming language makes great use of these; thunks are the essense of lazy programming: each thunk represents a set of parameters to a function1 and the function itself. The upshot of this is that when you see a function call (or other expression) in Haskell code, what really happens is that a thunk of the invocation of that function is created to capture the values to be passed in (some of which may themselves be thunks of other expressions). Its only when the value is needed, when the result of the expression is used in some other expression that is evaluated, that the thunk itself gets evaluated; the function is invoked, the return value is cached in the thunk and returned. This makes the order in which things happen in Haskell very difficult to predict, especially from the outside. Because of thunks, algorithms that look tail recursive aren't (the recursive call is just another thunk, evaulated serially). Further, algorithms that appear to be infinite, aren't: the thunks ensure that just values that are actually needed are ever computed. It's an elegant and powerful approach, and it's even fast, because the fastest code is the code that is never executed in the first place. Other languages have this feature; Clojure reflects its Lisp heritage in that almost everything operates in terms of accessing, iterating and transforming collections ... and all of those collection operations are lazy as well. Unlike Haskell, this is more a function of a carefully crafted standard library than a direct offshoot of the language, but the end result is quite similar. But what happens when you want to accomplish some of these features (such as lazy evaluation) within the tight constraints of standard Java? That's when you need to get creative! Thunks in Tapestry 5 Tapestry 5 uses thunks in many different places; the most common one is the use of proxies for Tapestry 5 IoC services. In Tapestry 5 every service has an interface2. Let's take a peek at a typical service in Tapestry 5, to illustrate the typed-thunk concept. Listing 1: ComponentMessagesSource.java public interface ComponentMessagesSource { Messages getMessages(ComponentModel componentModel, Locale locale); InvalidationEventHub getInvalidationEventHub(); } The purpose of the CompnentMessagesSource service is to provide a Messages object representing a particular component's message catalog. This is part of Tapestry's localization support: every page and component has easy access to its own message bundle, which includes messages inherited from base components and from a global message catalog. A central tenet of Tapestry 5 is that service instantiation is lazy: services are only constructed as needed. What does "as needed" mean? It means, the first time any method of the service is invoked. This kind of lazy instantiation is accomplished by using thunks. So for a service such as ComponentMessagesSource, there will be a class somewhat like ComponentMessagesSourceThunk to handle the lazy instantiation: Listing 2: ComponentMessagesSourceThunk.java public interface ComponentMessagesSourceThunk implements ComponentMessagesSource { private final ObjectCreator creator; public ComponentMessagesSourceThunk(ObjectCreator creator) { this.creator = creator; } private ComponentMessagesSourceThunk delegate() { return (ComponentMessagesSourceThunk) creator.createObject(); } public Messages getMessages(ComponentModel componentModel, Locale locale) { return delegate().getMessages(componentModel, locale); } public InvalidationEventHub getInvalidationEventHub() { return delegate().getInvalidationEventHub(); } } You won't find the above class in the Tapestry source code: it is generated on-the-fly by Tapestry. That's great, because I know I'd hate to have to supply a service interface, a service implementation and a thunk class for each service; the interface and implementation is already plenty! One of the reasons that Tapestry all but requires that services have a service interface is to support the automatic creation of thunks or other proxies around the interface. However, you can see the pattern: every method of the interface is, of course, implemented in the thunk. That's what it means to implement an interface. Each method obtains the delegate and then re-invokes the same method with the same parameters on the delegate. The trick is that the first time
Re: How to create Master-Detail view
By "component" i mean Tapestry component. I try to understand how to place two components on page. And make they optionaly linked. On Tue, Aug 18, 2009 at 02:02, Thiago H. de Paula Figueiredo wrote: > Em Mon, 17 Aug 2009 18:33:36 -0300, Andrey Larionov > escreveu: > >> Actualy not. It's only a tools. > > But they're tools that make the task of implementing a master/detail form > easier. ;) > Solution outline: > > * Create a Zone in your template with a Form inside it to edit the detail > object. > * Create one EventLink for each object. Don't forget to set their context > parameter with the object id and the zone parameter. > * In the method that handles the EventLink, set the object that is edited by > the form above. > >> I'm asking advice on how to decompose and interact between two components. > > What are you calling a component here? Anyway, your question is quite vague. > Components interact with each other by parameters, triggering events or > through an environmental variable. > > -- > 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 > > - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: ZoneUpdater is Great
:) Inge, I've recently noticed that this does not seem to work with the MultiZoneUpdate return type (it just updates the first zone specified). Any hope of an updated version which would support this? See the section on Multiple Zone Updates at: http://tapestry.apache.org/tapestry5/guide/ajax.html Cheers, Levi On Aug 6, 2009, at 1:33, Inge Solvoll (via Nabble) wrote: > Thanks for the very nice feedback, Levi! :) > > First of all, I must mention that this is a generalization/reworking > of > concepts created by equanda, I hope the equanda guys are ok with it > being > published like this. > > I strongly agree with you that the concept demonstrated in this > mixin should > be integrated into the framework, hence the JIRA issue. There will > still be > a need for the mixin, but the code required to trigger the zone, > optionally > with a parameter value provided by the client, should be > standardized in > some way, making the mixin code a lot simpler and more focused. I > haven't > seen too many requests for this kind of thing lately, though, so I'm > not > sure if the committers will pick it up. > > You should vote for the JIRA! > > On Wed, Aug 5, 2009 at 9:07 PM, xfile80303 <[hidden email]> wrote: > > > > > Hi all, > > > > I just wanted to take a moment and shine some light onto the > "ZoneUpdater" > > mixin which appears to have been originally authored by Inge > Solvoll. > > > > For those which are not familiar with it (it took some digging for > me to > > find it), it is a mixin which will allow one to have an AJAX > update occur > > for a given Zone, on a specified component event with appropriate > handler. > > Quite useful. > > > > See the blog post by Inge: > > > > > > http://tinybits.blogspot.com/2009/05/update-zone-on-any-client-side-event.html > > > > apparently there is an open JIRA issue related to the > implementation: > > > > https://issues.apache.org/jira/browse/TAP5-521 > > > > For those Tapestry developers out there who are listening, this is > such a > > useful and basic mixin that I would suggest it be incorporated > into the > > Tapestry codebase. If not that, then it should at least be > mentioned in > > the > > wiki or on the related projects page... something. > > > > Wherever you are Inge, thanks for sharing this very useful mixin > with this > > community. > > > > Cheers, > > > > Levi > > > > -- > > View this message in context: > > http://n2.nabble.com/ZoneUpdater-is-Great-tp3394151p3394151.html > > Sent from the Tapestry Users mailing list archive at Nabble.com. > > > > > - > > To unsubscribe, e-mail: [hidden email] > > For additional commands, e-mail: [hidden email] > > > > > > > View message @ > http://n2.nabble.com/ZoneUpdater-is-Great-tp3394151p3396793.html > To unsubscribe from ZoneUpdater is Great, click here. > -- View this message in context: http://n2.nabble.com/ZoneUpdater-is-Great-tp3394151p3462721.html Sent from the Tapestry Users mailing list archive at Nabble.com.
Re: [T5.1] MultiZoneUpdate can not be handled Error
Em Mon, 17 Aug 2009 19:25:54 -0300, xfile80303 escreveu: Can you suggest how I should activate the ajax refresh when the user clicks on one of the radio buttons? Please check first Request.isXHR() in your event handler to see whether this really is the source of the problem. Another hint: instead of relying in onclick, use Prototype's Event.observe() method. -- 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: [Off-topic] Permanent Java Developers sought
Oops - apologies for the spam, that was meant to go to Ben directly! On Mon, Aug 17, 2009 at 11:27 PM, Steve Cowx wrote: > Hi Ben > > If I recall correctly, you recruited Peter off the Turbine mailing list :) > > It seems to be a good technique. > > I hope all is well at IOKO, please send my regards to everyone on the old > Kangaroo dev team. > > Steve > > On Mon, Aug 17, 2009 at 1:59 PM, Ben Gidley wrote: > >> Apologies for using this list as a recruitment board - but I thought some >> of >> you may be interested. >> ioko (www.ioko.com) are recruiting Java Developers at present in either >> York >> UK (preferred) or London (possible but not as preferred) to work on a >> range >> of projects with our existing clients. One of these projects is built >> using >> Tapestry 5 and as such I would love to find some candidates who have used >> it >> (also to prove our resourcing manager wrong who said I wouldn't be able to >> find anyone with it on their CV!). >> >> If you are interested can you let me know and I can send you the Job >> Specification and tell you who to contact to apply. >> Ben Gidley >> >> www.gidley.co.uk >> b...@gidley.co.uk >> > > > > -- > Kind regards > > Stephen Cowx > +44 (0) 7748 490 323 > +44 (0) 1306 740 523 > -- Kind regards Stephen Cowx +44 (0) 7748 490 323 +44 (0) 1306 740 523
Re: [Off-topic] Permanent Java Developers sought
Hi Ben If I recall correctly, you recruited Peter off the Turbine mailing list :) It seems to be a good technique. I hope all is well at IOKO, please send my regards to everyone on the old Kangaroo dev team. Steve On Mon, Aug 17, 2009 at 1:59 PM, Ben Gidley wrote: > Apologies for using this list as a recruitment board - but I thought some > of > you may be interested. > ioko (www.ioko.com) are recruiting Java Developers at present in either > York > UK (preferred) or London (possible but not as preferred) to work on a range > of projects with our existing clients. One of these projects is built using > Tapestry 5 and as such I would love to find some candidates who have used > it > (also to prove our resourcing manager wrong who said I wouldn't be able to > find anyone with it on their CV!). > > If you are interested can you let me know and I can send you the Job > Specification and tell you who to contact to apply. > Ben Gidley > > www.gidley.co.uk > b...@gidley.co.uk > -- Kind regards Stephen Cowx +44 (0) 7748 490 323 +44 (0) 1306 740 523
Re: [T5.1] MultiZoneUpdate can not be handled Error
Can you suggest how I should activate the ajax refresh when the user clicks on one of the radio buttons? Levi Thiago H. de Paula Figueiredo wrote: > > Em Mon, 17 Aug 2009 19:10:01 -0300, xfile80303 > escreveu: > >> Hi Thiago! > > Hi! > >> Yes, I'm sorry I should have mentioned this... >> My form uses the zone attribute to indicate it should refresh a zone via >> AJAX (or at lease that's my understanding of the attribute from the >> documentation): > > You still need to check Request.ixXHR(). Maybe the > onclick="this.form.submit()" are the source of your problem. > > -- > 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 > > > -- View this message in context: http://n2.nabble.com/-T5.1--MultiZoneUpdate-can-not-be-handled-Error-tp3462182p3462533.html Sent from the Tapestry Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5.1] MultiZoneUpdate can not be handled Error
Em Mon, 17 Aug 2009 19:10:01 -0300, xfile80303 escreveu: Hi Thiago! Hi! Yes, I'm sorry I should have mentioned this... My form uses the zone attribute to indicate it should refresh a zone via AJAX (or at lease that's my understanding of the attribute from the documentation): You still need to check Request.ixXHR(). Maybe the onclick="this.form.submit()" are the source of your problem. -- 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: [T5.1] MultiZoneUpdate can not be handled Error
Hi Thaigo! Yes, I'm sorry I should have mentioned this... My form uses the zone attribute to indicate it should refresh a zone via AJAX (or at lease that's my understanding of the attribute from the documentation): ${mainCategoryIterator.name} Thanks, Levi Thiago H. de Paula Figueiredo wrote: > > Em Mon, 17 Aug 2009 18:23:40 -0300, xfile80303 > escreveu: > >> Hi all, > > Hi! > >> I'm trying to update two zones using the MultiZoneUpdate return type >> from my onSuccessFrom method, but Tapestry gives me an error >> saying the return type is not understood (see stack below). > > You can only return MultiZoneUpdate (or Block or a component) when > handling an AJAX request. Use Request.isXHR() to check if the current > request is made through AJAX or not. > > -- > 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 > > > -- View this message in context: http://n2.nabble.com/-T5.1--MultiZoneUpdate-can-not-be-handled-Error-tp3462182p3462442.html Sent from the Tapestry Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Zones and blocks inside components
Something like this? Index.tml http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"; xmlns:p="tapestry:parameter"> A Zone! A Block! A link Index.java public class Index { @Inject private Block aBlock; @OnEvent(component = "anActionLink", value = EventConstants.ACTION) public Block actionFromActionLink() { return aBlock; } } 2008/6/19 Mohan Zhang : > > Hi everyone, > > I've been reading the mailing list for a while now and have only seen one > post on this topic, which unfortunately did not clarify things for me. I > know this question has probably been asked a few times either indirectly or > whatnot, but I'm curious to find out if the problem is something very > fundamental in my understanding, or whether this is just a technical issue. > > The question is this: if I have a component which has a zone and an > actionlink (or alternatively an eventlink) which loads a block into the > zone, what's the right way to do this? I've tried using clientId tricks, but > this has never been successful for me. > > So to summarize, I have a component which declares its own zone, block, and > actionlink. I want this actionlink to load the block into the zone for this > component. Now I have a page which has say four of these components and I > want each actionlink to affect the appropriate zone. What's the right way to > do this? > -- > View this message in context: > http://www.nabble.com/Zones-and-blocks-inside-components-tp17993683p17993683.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: How to create Master-Detail view
Em Mon, 17 Aug 2009 18:33:36 -0300, Andrey Larionov escreveu: Actualy not. It's only a tools. But they're tools that make the task of implementing a master/detail form easier. ;) Solution outline: * Create a Zone in your template with a Form inside it to edit the detail object. * Create one EventLink for each object. Don't forget to set their context parameter with the object id and the zone parameter. * In the method that handles the EventLink, set the object that is edited by the form above. I'm asking advice on how to decompose and interact between two components. What are you calling a component here? Anyway, your question is quite vague. Components interact with each other by parameters, triggering events or through an environmental variable. -- 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: [T5.1] MultiZoneUpdate can not be handled Error
Em Mon, 17 Aug 2009 18:23:40 -0300, xfile80303 escreveu: Hi all, Hi! I'm trying to update two zones using the MultiZoneUpdate return type from my onSuccessFrom method, but Tapestry gives me an error saying the return type is not understood (see stack below). You can only return MultiZoneUpdate (or Block or a component) when handling an AJAX request. Use Request.isXHR() to check if the current request is made through AJAX or not. -- 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: How to create Master-Detail view
Actualy not. It's only a tools. I'm asking advice on how to decompose and interact between two components. There is an explanation of this UI pattern http://en.wikipedia.org/wiki/Master-detail On Tue, Aug 18, 2009 at 01:07, Juan E. Maya wrote: > if i understand u. Maybe what u need is just a > ActionLink or EventLink that updates a zone containing the details. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
[T5.1] MultiZoneUpdate can not be handled Error
Hi all, I'm trying to update two zones using the MultiZoneUpdate return type from my onSuccessFrom method, but Tapestry gives me an error saying the return type is not understood (see stack below). I've read, and re-read the info on MultiZoneUpdate usage at http://tapestry.apache.org/tapestry5.1/guide/ajax.html but no where does it mention anything about configuration (or how to trigger the zone update from a form (besides the normal form 'zone' attribute)). Any tips on getting this to work in Tapestry 5.1.0.5? Thanks, Levi --- My form event handler method: Object onSuccessFromMain() { if (_mainCategoryIterator != null) { setMainCategory(_mainCategoryIterator); } MultiZoneUpdate mzu = new MultiZoneUpdate("primarySelectZone", primarySelectZone.getBody()); mzu.add("directZone", directZone.getBody()); return mzu; } The Stack Trace: ERROR [http-8080-2: RequestExceptionHandler]: Processing of request failed with uncaught exception: A component event handler method returned the value MultiZoneUpdate[{primarySelectZone=Block[Body of Search:primaryselectzone, at classpath:com/java/dse/cwp/eos/pages/Search.tml, line 52]}]. Return type org.apache.tapestry5.ajax.MultiZoneUpdate can not be handled. Configured return types are java.lang.Class, java.lang.String, java.net.URL, org.apache.tapestry5.Link, org.apache.tapestry5.StreamResponse, org.apache.tapestry5.runtime.Component. org.apache.tapestry5.runtime.ComponentEventException: A component event handler method returned the value MultiZoneUpdate[{primarySelectZone=Block[Body of Search:primaryselectzone, at classpath:com/java/dse/cwp/eos/pages/Search.tml, line 52]}]. Return type org.apache.tapestry5.ajax.MultiZoneUpdate can not be handled. Configured return types are java.lang.Class, java.lang.String, java.net.URL, org.apache.tapestry5.Link, org.apache.tapestry5.StreamResponse, org.apache.tapestry5.runtime.Component. [at classpath:com/java/dse/cwp/eos/pages/Search.tml, line 18] at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1098) at org.apache.tapestry5.internal.services.ComponentEventRequestHandlerImpl.handle(ComponentEventRequestHandlerImpl.java:75) at org.apache.tapestry5.internal.services.ImmediateActionRenderResponseFilter.handle(ImmediateActionRenderResponseFilter.java:42) at $ComponentEventRequestHandler_1232a2b90f1.handle($ComponentEventRequestHandler_1232a2b90f1.java) at org.apache.tapestry5.internal.services.AjaxFilter.handle(AjaxFilter.java:42) at $ComponentEventRequestHandler_1232a2b90f1.handle($ComponentEventRequestHandler_1232a2b90f1.java) at org.apache.tapestry5.services.TapestryModule$36.handle(TapestryModule.java:2164) at $ComponentEventRequestHandler_1232a2b90f1.handle($ComponentEventRequestHandler_1232a2b90f1.java) at $ComponentEventRequestHandler_1232a2b90d7.handle($ComponentEventRequestHandler_1232a2b90d7.java) at org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handleComponentEvent(ComponentRequestHandlerTerminator.java:43) at $ComponentRequestHandler_1232a2b8fe7.handleComponentEvent($ComponentRequestHandler_1232a2b8fe7.java) at org.apache.tapestry5.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:46) at $Dispatcher_1232a2b8ff3.dispatch($Dispatcher_1232a2b8ff3.java) at $Dispatcher_1232a2b8fe4.dispatch($Dispatcher_1232a2b8fe4.java) at org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:245) at org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26) at $RequestHandler_1232a2b8fe5.service($RequestHandler_1232a2b8fe5.java) at org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:778) at $RequestHandler_1232a2b8fe5.service($RequestHandler_1232a2b8fe5.java) at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:767) at $RequestHandler_1232a2b8fe5.service($RequestHandler_1232a2b8fe5.java) at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85) at $RequestHandler_1232a2b8fe5.service($RequestHandler_1232a2b8fe5.java) -- View this message in context: http://n2.nabble.com/-T5.1--MultiZoneUpdate-can-not-be-handled-Error-tp3462182p3462182.html Sent from the Tapestry Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: How to create Master-Detail view
I am not sure if i understand u. Maybe what u need is just a ActionLink or EventLink that updates a zone containing the details. U can see examples here: http://jumpstart.doublenegative.com.au:8080/jumpstart/examples/javascript/ajax or here: http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/ActionLink.html On Mon, Aug 17, 2009 at 10:55 PM, Andrey Larionov wrote: > Hi, everyone > I start to explore world of Tapestry 5. It so exciting. But at first > time is very difficult to find simple elegant (maybe pattern-like) > solution. And i want to ask, can any point or give advice on creating > Master-Detail presentation. I want to have two independent component > but with posibility to link. Selecting element in one is display > coresponding subset of data in another. But also i want to use it > independent (especialy Master view) for managing Master datasource. > > Thanks > > - > 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
How to create Master-Detail view
Hi, everyone I start to explore world of Tapestry 5. It so exciting. But at first time is very difficult to find simple elegant (maybe pattern-like) solution. And i want to ask, can any point or give advice on creating Master-Detail presentation. I want to have two independent component but with posibility to link. Selecting element in one is display coresponding subset of data in another. But also i want to use it independent (especialy Master view) for managing Master datasource. Thanks - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Zones and blocks inside components
I resolved this adding zones dynamically in the during the setupRender. It looks something like this: _clientBehaviorSupport.addZone(_assignedClientId, "show", "show"); Link link = _componentResources.createEventLink(EventConstants.ACTION, _design.getId(), _assignedClientId); _clientBehaviorSupport.linkZone(_linkClientId, _assignedClientId, writer.element("a", "href", link.toURI(), "id", _linkClientId); On Mon, Aug 17, 2009 at 6:51 PM, Juan E. Maya wrote: > Mohan! Did u manage to resolve this problem? How do u do this? > > On Fri, Jun 20, 2008 at 11:47 PM, Mohan > Zhang wrote: >> >> Anyone? This problem is bugging me a lot because it seems like it would be a >> common usecase... >> >> >> >> Mohan Zhang wrote: >>> >>> Hi everyone, >>> >>> I've been reading the mailing list for a while now and have only seen one >>> post on this topic, which unfortunately did not clarify things for me. I >>> know this question has probably been asked a few times either indirectly >>> or whatnot, but I'm curious to find out if the problem is something very >>> fundamental in my understanding, or whether this is just a technical >>> issue. >>> >>> The question is this: if I have a component which has a zone and an >>> actionlink (or alternatively an eventlink) which loads a block into the >>> zone, what's the right way to do this? I've tried using clientId tricks, >>> but this has never been successful for me. >>> >>> So to summarize, I have a component which declares its own zone, block, >>> and actionlink. I want this actionlink to load the block into the zone for >>> this component. Now I have a page which has say four of these components >>> and I want each actionlink to affect the appropriate zone. What's the >>> right way to do this? >>> >> >> -- >> View this message in context: >> http://www.nabble.com/Zones-and-blocks-inside-components-tp17993683p18037943.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: [Off-topic] Permanent Java Developers sought
Well, you have proved your resource manager wrong. I live near York and I use Tapestry at the BL. Sadly (err, happily!) I'm not looking to change jobs just now. ;-) -Original Message- From: Ben Gidley [mailto:b...@gidley.co.uk] Sent: 17 August 2009 13:59 To: Tapestry users Subject: [Off-topic] Permanent Java Developers sought Apologies for using this list as a recruitment board - but I thought some of you may be interested. ioko (www.ioko.com) are recruiting Java Developers at present in either York UK (preferred) or London (possible but not as preferred) to work on a range of projects with our existing clients. One of these projects is built using Tapestry 5 and as such I would love to find some candidates who have used it (also to prove our resourcing manager wrong who said I wouldn't be able to find anyone with it on their CV!). If you are interested can you let me know and I can send you the Job Specification and tell you who to contact to apply. Ben Gidley www.gidley.co.uk b...@gidley.co.uk ** Experience the British Library online at www.bl.uk The British Library's new interactive Annual Report and Accounts 2007/08 : www.bl.uk/knowledge Help the British Library conserve the world's knowledge. Adopt a Book. www.bl.uk/adoptabook The Library's St Pancras site is WiFi - enabled * The information contained in this e-mail is confidential and may be legally privileged. It is intended for the addressee(s) only. If you are not the intended recipient, please delete this e-mail and notify the postmas...@bl.uk : The contents of this e-mail must not be disclosed or copied without the sender's consent. The statements and opinions expressed in this message are those of the author and do not necessarily reflect those of the British Library. The British Library does not take any responsibility for the views of the author. * - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Zones and blocks inside components
Mohan! Did u manage to resolve this problem? How do u do this? On Fri, Jun 20, 2008 at 11:47 PM, Mohan Zhang wrote: > > Anyone? This problem is bugging me a lot because it seems like it would be a > common usecase... > > > > Mohan Zhang wrote: >> >> Hi everyone, >> >> I've been reading the mailing list for a while now and have only seen one >> post on this topic, which unfortunately did not clarify things for me. I >> know this question has probably been asked a few times either indirectly >> or whatnot, but I'm curious to find out if the problem is something very >> fundamental in my understanding, or whether this is just a technical >> issue. >> >> The question is this: if I have a component which has a zone and an >> actionlink (or alternatively an eventlink) which loads a block into the >> zone, what's the right way to do this? I've tried using clientId tricks, >> but this has never been successful for me. >> >> So to summarize, I have a component which declares its own zone, block, >> and actionlink. I want this actionlink to load the block into the zone for >> this component. Now I have a page which has say four of these components >> and I want each actionlink to affect the appropriate zone. What's the >> right way to do this? >> > > -- > View this message in context: > http://www.nabble.com/Zones-and-blocks-inside-components-tp17993683p18037943.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: Tapestry IoC Idea: annotations for build and contribute methods
Good idea,I had the same problem. 2009/8/17 Sergey Didenko > Hi, > > What do you think about dedicated annotations that are alternative to > buildXXX() and contributeXXX() name convention? > > I changed service names a few times and forgot to update my build and > contribute methods. > > If I would code it with annotations, say @Build( serviceId = > ServiceInterface.class ) it would be refactored by IDE automatically. > > P.S. Do I miss anything? > > Regards, Sergey. > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- regards, Jun Tsai
Tapestry IoC Idea: annotations for build and contribute methods
Hi, What do you think about dedicated annotations that are alternative to buildXXX() and contributeXXX() name convention? I changed service names a few times and forgot to update my build and contribute methods. If I would code it with annotations, say @Build( serviceId = ServiceInterface.class ) it would be refactored by IDE automatically. P.S. Do I miss anything? Regards, Sergey. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: t5: hibernate connection string
Hi Uli, Thanks for the quick response, leaving it in XML is fine, problem is, the xml file is packaged into a jar, can not find it under the 'ROOT' directory for me to update, any idea putting that hibernate.cfg.xml somewhere else, say WEB-INF? Ulrich Stärk wrote: > > contribute a HibernateConfigurer to the HibernateSessionSource service. > Although I don't quite get > why putting the connection string into a properties file is any different > than putting it in the xml > file... > > Uli > > On 17.08.2009 15:21 schrieb Angelo Chen: >> Hi, >> >> I use following in hibernate.cfg.xml to connect to database: >> >> < property >> name="hibernate.connection.url">jdbc:mysql://localhost/stock?autoReconnect=true> >> This works very well, but it is hard coded, is there a way to put the >> particular info in a property file, then pick it up when the t5 program >> is >> loaded? >> >> Thanks, >> >> Angelo > > - > 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%3A-hibernate-connection-string-tp2500p25007693.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: hibernate connection string
contribute a HibernateConfigurer to the HibernateSessionSource service. Although I don't quite get why putting the connection string into a properties file is any different than putting it in the xml file... Uli On 17.08.2009 15:21 schrieb Angelo Chen: Hi, I use following in hibernate.cfg.xml to connect to database: < property name="hibernate.connection.url">jdbc:mysql://localhost/stock?autoReconnect=trueloaded? Thanks, Angelo - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
t5: hibernate connection string
Hi, I use following in hibernate.cfg.xml to connect to database: < property name="hibernate.connection.url">jdbc:mysql://localhost/stock?autoReconnect=true This works very well, but it is hard coded, is there a way to put the particular info in a property file, then pick it up when the t5 program is loaded? Thanks, Angelo -- View this message in context: http://www.nabble.com/t5%3A-hibernate-connection-string-tp2500p2500.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
[Off-topic] Permanent Java Developers sought
Apologies for using this list as a recruitment board - but I thought some of you may be interested. ioko (www.ioko.com) are recruiting Java Developers at present in either York UK (preferred) or London (possible but not as preferred) to work on a range of projects with our existing clients. One of these projects is built using Tapestry 5 and as such I would love to find some candidates who have used it (also to prove our resourcing manager wrong who said I wouldn't be able to find anyone with it on their CV!). If you are interested can you let me know and I can send you the Job Specification and tell you who to contact to apply. Ben Gidley www.gidley.co.uk b...@gidley.co.uk
Re: T5.1 and JNI
Problem solved .. a javah incorrect creation :( Hi guys. I'm using a JNI library directly inside a service i have binded into T5.1, but i can't get it to run because of a UnsatiesfiedLinkError. I'll show you how my setup is : ( System is ubuntu 9.04 ) Library in /etc/lib/mylib.so AppModule.java public static void bind(ServiceBinder binder) { binder.bind(LicenseCheck.class,LicenseCheckImpl.class); } LicenseCheckImpl.java { /** JNI Interface */ public static native String licenseVerify(String file, String feature); static { System.load("/etc/lib/liblicense_verify.so"); } public LicenseCheckImpl() { } public String check() { return licenseVerify("",""); } } License.tml @Inject private LicenseCheck theLicenseCheck; public void checkLicense() { String license = theLicenseCheck.check(); } [DEBUG] AppModule.LicenseCheck Invoking constructor hsiAdministrationConsole.services.LicenseCheckImpl() (at LicenseCheckImpl.java:25) via hsiAdministrationConsole.services.AppModule.bind(ServiceBinder) (at AppModule.java:28). [ERROR] TapestryModule.RequestExceptionHandler Processing of request failed with uncaught exception: com.mcentric.glo.hsiAdministrationConsole.services.LicenseCheckImpl.licenseVerify(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; java.lang.UnsatisfiedLinkError: hsiAdministrationConsole.services.LicenseCheckImpl.licenseVerify(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; at hsiAdministrationConsole.services.LicenseCheckImpl.licenseVerify(Native Method) at hsiAdministrationConsole.services.LicenseCheckImpl.checkLicense(LicenseCheckImpl.java:34) at $LicenseCheck_12327d32a7a.checkLicense($LicenseCheck_12327d32a7a.java) If i call the library from inside a sample java file, the program works. public class LicenseVerify { public static native String licenseVerify(String file, String feature); static { System.load("/etc/lib/liblicense_verify.so"); } public static void main (String args[]) { String s=licenseVerify(args[0],args[1]); System.out.print(s); } } Is a T5 related problem ? Btw, running inside a Tomcat 6.0.20 container. - 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: tapestry request processing diagram
Thanx, Uli! - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: How to pass message's parameters in template
Yes there is, in the Chenille Kit. See http://www.chenillekit.org/chenillekit-tapestry/messageformatbinding.html Olle 2009/8/17 Radek Terber : > Hi all. > > Is there any way how to pass parameter to message directly in TML file ? > > For example: > I have component Example1 (resides in "Example1.java") and in it's > "Example1.tml" is something like this: > > in Example1.tml is > -- > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"; > > ... > ${message:any-message-text-requires-parameter} > ... > > > -- > > in "Example1.properties" is > -- > any-message-text-requires-parameter=Any text which "%s" here requires > parameter > -- > > And now, I would like pass the "%s" value directly in TML file (to avoid > divide those text to two or more fragments). > I know possibility to prepare entire message in JAVA class, but it is more > coding, more getters ... > > Thanks. > > > > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Olle Hallin Senior Java Developer and Architect olle.hal...@crisp.se www.crisp.se - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
T5.1: no post-redirect on invalid forms
Hi folks, I thought I'd try out a RequestExceptionHandler that could catch custom form validation exceptions and render the response directly rather than use the standard redirect response. This means I can avoid using sessions entirely and in my limited testing it works perfectly but was wondering if anyone has any thoughts about this or knows any reasons why it could cause problems. Cheers, Jack public class LoginPage { @Property private String email; @Property private String password; void onSubmitFromLogin() throws PageValidationException { throw new PageValidationException(this); } } public class PageValidationException extends Exception { private Object page; public PageValidationException(Object page) { super(); this.page = page; } public Object getPage() { return page; } } public class PageValidationExceptionHandler implements RequestExceptionHandler { private final RequestPageCache pageCache; private final PageResponseRenderer pageRenderer; private final ResponseRenderer responseRenderer; private final Logger logger; private final Response response; public PageValidationExceptionHandler( RequestPageCache pageCache, ResponseRenderer responseRenderer, PageResponseRenderer pageRenderer, Logger logger, Response response) { this.pageCache = pageCache; this.pageRenderer = pageRenderer; this.responseRenderer = responseRenderer; this.logger = logger; this.response = response; } public void handleRequestException(Throwable throwable) throws IOException { Throwable exception = throwable; while (exception.getCause() != null) { exception = exception.getCause(); if (exception instanceof PageValidationException) { PageValidationException pageValidationException = (PageValidationException) exception; String pageName = ((Component) pageValidationException.getPage()) .getComponentResources().getPageName(); responseRenderer.renderPageMarkupResponse(pageName); return; } } logger.error(ServicesMessages.requestException(throwable), throwable); response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); response.setHeader("X-Tapestry-ErrorMessage", InternalUtils.toMessage(throwable)); Page page = pageCache.get("ExceptionReport"); ExceptionReporter report = (ExceptionReporter) page.getRootComponent(); report.reportException(throwable); pageRenderer.renderPageResponse(page); } } And the decorateRequestExceptionHandler method in AppModule: public RequestExceptionHandler decorateRequestExceptionHandler( final Logger logger, final ResponseRenderer responseRenderer, final PageResponseRenderer pageRenderer, final Response response, final RequestPageCache pageCache) { return new PageValidationExceptionHandler(pageCache, responseRenderer, pageRenderer, logger, response); }
T5.1 and JNI
Hi guys. I'm using a JNI library directly inside a service i have binded into T5.1, but i can't get it to run because of a UnsatiesfiedLinkError. I'll show you how my setup is : ( System is ubuntu 9.04 ) Library in /etc/lib/mylib.so AppModule.java public static void bind(ServiceBinder binder) { binder.bind(LicenseCheck.class,LicenseCheckImpl.class); } LicenseCheckImpl.java { /** JNI Interface */ public static native String licenseVerify(String file, String feature); static { System.load("/etc/lib/liblicense_verify.so"); } public LicenseCheckImpl() { } public String check() { return licenseVerify("",""); } } License.tml @Inject private LicenseCheck theLicenseCheck; public void checkLicense() { String license = theLicenseCheck.check(); } [DEBUG] AppModule.LicenseCheck Invoking constructor hsiAdministrationConsole.services.LicenseCheckImpl() (at LicenseCheckImpl.java:25) via hsiAdministrationConsole.services.AppModule.bind(ServiceBinder) (at AppModule.java:28). [ERROR] TapestryModule.RequestExceptionHandler Processing of request failed with uncaught exception: com.mcentric.glo.hsiAdministrationConsole.services.LicenseCheckImpl.licenseVerify(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; java.lang.UnsatisfiedLinkError: hsiAdministrationConsole.services.LicenseCheckImpl.licenseVerify(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; at hsiAdministrationConsole.services.LicenseCheckImpl.licenseVerify(Native Method) at hsiAdministrationConsole.services.LicenseCheckImpl.checkLicense(LicenseCheckImpl.java:34) at $LicenseCheck_12327d32a7a.checkLicense($LicenseCheck_12327d32a7a.java) If i call the library from inside a sample java file, the program works. public class LicenseVerify { public static native String licenseVerify(String file, String feature); static { System.load("/etc/lib/liblicense_verify.so"); } public static void main (String args[]) { String s=licenseVerify(args[0],args[1]); System.out.print(s); } } Is a T5 related problem ? Btw, running inside a Tomcat 6.0.20 container. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
How to pass message's parameters in template
Hi all. Is there any way how to pass parameter to message directly in TML file ? For example: I have component Example1 (resides in "Example1.java") and in it's "Example1.tml" is something like this: in Example1.tml is -- http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"; > ... ${message:any-message-text-requires-parameter} ... -- in "Example1.properties" is -- any-message-text-requires-parameter=Any text which "%s" here requires parameter -- And now, I would like pass the "%s" value directly in TML file (to avoid divide those text to two or more fragments). I know possibility to prepare entire message in JAVA class, but it is more coding, more getters ... Thanks. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: t5: tools to monitor
Hi Angelo, Maybe Lambda Probe (http://www.lambdaprobe.org/d/index.htm) will help? Jérôme On Mon, Aug 17, 2009 at 00:51, Angelo Chen wrote: > > Hi, > Currently I use Tomcat's manager to monitor t5 apps, is there any other > similar tools for this job? > thanks, > angelo > -- > View this message in context: > http://www.nabble.com/t5%3A-tools-to-monitor-tp24998832p24998832.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 > > -- Jerome Bernard, Director, EMEA Operations, Elastic Grid, LLC. Site: http://www.elastic-grid.com Blog: http://blog.elastic-grid.com