Re: Pretty Printing JSON
By "nice enough" he means "paid to". A lot of the goodness in Tapestry 5.2 is coming in paid for by Ben's company, Widen. Hats off to them! On Fri, May 21, 2010 at 12:01 PM, Ben Dotte wrote: > For anyone who's looking for json pretty-printing in development mode, > Howard was nice enough to implement this and it is now available in > the latest Tapestry 5.2 snapshots. > > Ben > > On Wed, Feb 24, 2010 at 4:44 AM, Ville Virtanen > wrote: >> >> Hi, >> >> this definitely sounds something T5 should do as it is known to be developer >> friendly and aid in debugging whenever possible. >> >> It sounds good to enable this in non-production mode and disable in >> production. >> >> - Ville >> >> >> Ben Dotte-2 wrote: >>> >>> I put up a post on pretty printing the JSON that gets output on the >>> bottom of the generated HTML by Tapestry: >>> >>> http://bdotte.blogspot.com/2010/02/pretty-printing-json-in-tapestry-5.html >>> >>> I'm not sure if there is any interest in having this functionality >>> available in the actual Tapestry codebase; I could look into >>> (attempting) to clean it up if there is. In any case it has been handy >>> for me, so I thought I'd post it. >>> >>> Ben >>> >>> - >>> 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://old.nabble.com/Pretty-Printing-JSON-tp27713069p27714144.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 > > -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Pretty Printing JSON
For anyone who's looking for json pretty-printing in development mode, Howard was nice enough to implement this and it is now available in the latest Tapestry 5.2 snapshots. Ben On Wed, Feb 24, 2010 at 4:44 AM, Ville Virtanen wrote: > > Hi, > > this definitely sounds something T5 should do as it is known to be developer > friendly and aid in debugging whenever possible. > > It sounds good to enable this in non-production mode and disable in > production. > > - Ville > > > Ben Dotte-2 wrote: >> >> I put up a post on pretty printing the JSON that gets output on the >> bottom of the generated HTML by Tapestry: >> >> http://bdotte.blogspot.com/2010/02/pretty-printing-json-in-tapestry-5.html >> >> I'm not sure if there is any interest in having this functionality >> available in the actual Tapestry codebase; I could look into >> (attempting) to clean it up if there is. In any case it has been handy >> for me, so I thought I'd post it. >> >> Ben >> >> - >> 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://old.nabble.com/Pretty-Printing-JSON-tp27713069p27714144.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: T5: LinkSubmit should be generic
On Fri, 21 May 2010 10:55:17 -0300, Bryan Lewis wrote: Cool. It reminds me of a question I've been meaning to ask. LinkSubmit is a component, but we could have a mixin like Inge suggested. :) What's the best way to define the default value for component parameters? Is it: @Parameter(defaultPrefix = BindingConstants.LITERAL) private String clientEvent = "change"; or: @Parameter(value = "change", defaultPrefix = BindingConstants.LITERAL) private String clientEvent; or some method with a name starting with "default"? I think I've seen all three usages. If the default is constant, I use @Parameter(value = "change"). If not, I use a defaultXXX() method. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5: LinkSubmit should be generic
Cool. It reminds me of a question I've been meaning to ask. What's the best way to define the default value for component parameters? Is it: @Parameter(defaultPrefix = BindingConstants.LITERAL) private String clientEvent = "change"; or: @Parameter(value = "change", defaultPrefix = BindingConstants.LITERAL) private String clientEvent; or some method with a name starting with "default"? I think I've seen all three usages. On Fri, May 21, 2010 at 6:32 AM, Inge Solvoll wrote: > You're right, it was the blog tool that stripped it off :) Fixed now. > > On Fri, May 21, 2010 at 12:07 PM, paha wrote: > > > > > there is a small compilation issue - ProcessSubmission should inherit > from > > ComponentAction, not from ComponentAction, shouldn't it? > > > > > > -- > > View this message in context: > > > http://old.nabble.com/T5%3A-LinkSubmit-should-be-generic-tp28630552p28631907.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: multiselect
If "multiselect" means what I think it does... we've had good luck with the ChildSelect component in the lombok library. http://lombok.demon.co.uk/tapestry5Demo/test/components/DynamicSelect 2010/5/21 Genís Pujol > Hello, > > Is there any documentation/examples about multiselect controls in > Tapestry5? Anyone has implemented this already? > > regards, > > Genís > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >
Re: Developer's Guide
thanx Thiago. charith On Fri, May 21, 2010 at 6:25 PM, Thiago H. de Paula Figueiredo < thiag...@gmail.com> wrote: > On Fri, 21 May 2010 08:28:16 -0300, Charith Madusanka < > charithc...@gmail.com> wrote: > > In left menu I can't find it. Can you put the url to "bible" >> section please... >> > > Search for "Bible" in http://tapestry.apache.org/tapestry5.1/ and you'll > find it. > > -- > Thiago H. de Paula Figueiredo > Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, > and instructor > Owner, Ars Machina Tecnologia da Informação Ltda. > http://www.arsmachina.com.br > > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >
Re: Rendering Block to MarkupWriter
On Fri, 21 May 2010 06:44:28 -0300, Łukasz Jazgar wrote: Now I know that RenderQueue is not a queue but stack (!!!). It's a queue rendering a stack of components, so the ordering is a little tricky, but it's still a queue. :) -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Developer's Guide
On Fri, 21 May 2010 08:28:16 -0300, Charith Madusanka wrote: In left menu I can't find it. Can you put the url to "bible" section please... Search for "Bible" in http://tapestry.apache.org/tapestry5.1/ and you'll find it. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Developer's Guide
In left menu I can't find it. Can you put the url to "bible" section please... charith On Fri, May 21, 2010 at 2:13 PM, Ulrich Stärk wrote: > There is the "bible" section in the left hand menu on the Tapestry website. > > Uli > > > On 20.05.2010 10:53, Charith Madusanka wrote: > >> Hi , >> >> Tapestry have any developer guide or some thing like that? >> >> charith >> >> > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >
Re: T5: LinkSubmit should be generic
You're right, it was the blog tool that stripped it off :) Fixed now. On Fri, May 21, 2010 at 12:07 PM, paha wrote: > > there is a small compilation issue - ProcessSubmission should inherit from > ComponentAction, not from ComponentAction, shouldn't it? > > > -- > View this message in context: > http://old.nabble.com/T5%3A-LinkSubmit-should-be-generic-tp28630552p28631907.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: LinkSubmit should be generic
there is a small compilation issue - ProcessSubmission should inherit from ComponentAction, not from ComponentAction, shouldn't it? -- View this message in context: http://old.nabble.com/T5%3A-LinkSubmit-should-be-generic-tp28630552p28631907.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: Rendering Block to MarkupWriter
2010/5/20 Thiago H. de Paula Figueiredo > > The issue here is how to render something after you render the block. I > guess you need to implement it as a RenderCommand. It receives the render > queue (RenderQueue instance), so you can add more RenderCommands to it. To > render a Block inside a RenderCommand, cast it to RenderCommand and add it > to the queue. > > Thanks a lot! I have not understood what you wrote completly, but it gave me direction to search. I needed debugger, to discover what is going on, how rendering mechanism really works. Now I understand what is RenderCommand and RenderQueue and theirs relation to MarkupWriter. Now I know that RenderQueue is not a queue but stack (!!!). My problem I solved this way: public Object afterRender(MarkupWriter writer) { CompositeRenderCommand compositeRenderCommand = new CompositeRenderCommand(); compositeRenderCommand.addRenderCommand(new RenderCommand() { public void render(MarkupWriter writer, RenderQueue queue) { writer.element("div", "id", messageBlockId, "style", "display:none"); } }); compositeRenderCommand.addRenderCommand((RenderCommand) messageBlock); compositeRenderCommand.addRenderCommand( new RenderCommand() { public void render(MarkupWriter writer, RenderQueue queue) { writer.end(); } }); return compositeRenderCommand; } public class CompositeRenderCommand implements RenderCommand { private final List commands = new ArrayList(10); public void addRenderCommand(RenderCommand command) { commands.add(command); } public void render(MarkupWriter writer, RenderQueue queue) { for (int i = commands.size() - 1; i >= 0; i--) queue.push(commands.get(i)); } } Regards Lukasz
multiselect
Hello, Is there any documentation/examples about multiselect controls in Tapestry5? Anyone has implemented this already? regards, Genís - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Developer's Guide
There is the "bible" section in the left hand menu on the Tapestry website. Uli On 20.05.2010 10:53, Charith Madusanka wrote: Hi , Tapestry have any developer guide or some thing like that? charith - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5: LinkSubmit should be generic
Nice! - Original Message - From: "Inge Solvoll" To: "Tapestry users" Sent: Friday, 21 May, 2010 11:34:11 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: T5: LinkSubmit should be generic Forget the question, I tested it myself and it works :) See the blog post for the complete working solution, that enables any element to submit the form and trigger an event, like a regular submit. http://tinybits.blogspot.com/2010/05/mixin-to-allow-any-element-to-submit.html On Fri, May 21, 2010 at 9:29 AM, Inge Solvoll wrote: > After looking at the source code for the LinkSubmit core component, I see a > lot of potential for a more generic component/mixin that could solve lots of > other problems. > > What I need right now (and quite often) is a Select component that submits > the form and triggers an event to let the component class know that it was > the source of the submit. The LinkSubmit source code is very close to doing > this, the only difference is that it insists on rendering a link. > > My questions is: > > Is it possible to encapsulate this in a mixin, named something like > "AnySubmit"? It would only need parameters for "event" and "clientEvent". > > I tried, but I don't see how I can use a mixin and still trigger an event > on submit using ComponentAction. See modified code from LinkSubmit below, is > this possible to do in a mixin on any component? > > private static class ProcessSubmission implements > ComponentAction { > > private final String clientId; > > public ProcessSubmission(String clientId) { > this.clientId = clientId; > } > > public void execute(MySubmitMixinClass component) { > component.processSubmission(clientId); > } > } > - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5: LinkSubmit should be generic
Forget the question, I tested it myself and it works :) See the blog post for the complete working solution, that enables any element to submit the form and trigger an event, like a regular submit. http://tinybits.blogspot.com/2010/05/mixin-to-allow-any-element-to-submit.html On Fri, May 21, 2010 at 9:29 AM, Inge Solvoll wrote: > After looking at the source code for the LinkSubmit core component, I see a > lot of potential for a more generic component/mixin that could solve lots of > other problems. > > What I need right now (and quite often) is a Select component that submits > the form and triggers an event to let the component class know that it was > the source of the submit. The LinkSubmit source code is very close to doing > this, the only difference is that it insists on rendering a link. > > My questions is: > > Is it possible to encapsulate this in a mixin, named something like > "AnySubmit"? It would only need parameters for "event" and "clientEvent". > > I tried, but I don't see how I can use a mixin and still trigger an event > on submit using ComponentAction. See modified code from LinkSubmit below, is > this possible to do in a mixin on any component? > > private static class ProcessSubmission implements > ComponentAction { > > private final String clientId; > > public ProcessSubmission(String clientId) { > this.clientId = clientId; > } > > public void execute(MySubmitMixinClass component) { > component.processSubmission(clientId); > } > } >
T5: LinkSubmit should be generic
After looking at the source code for the LinkSubmit core component, I see a lot of potential for a more generic component/mixin that could solve lots of other problems. What I need right now (and quite often) is a Select component that submits the form and triggers an event to let the component class know that it was the source of the submit. The LinkSubmit source code is very close to doing this, the only difference is that it insists on rendering a link. My questions is: Is it possible to encapsulate this in a mixin, named something like "AnySubmit"? It would only need parameters for "event" and "clientEvent". I tried, but I don't see how I can use a mixin and still trigger an event on submit using ComponentAction. See modified code from LinkSubmit below, is this possible to do in a mixin on any component? private static class ProcessSubmission implements ComponentAction { private final String clientId; public ProcessSubmission(String clientId) { this.clientId = clientId; } public void execute(MySubmitMixinClass component) { component.processSubmission(clientId); } }