Re: The Rise and Fall of Tapestry

2013-11-22 Thread Matheus Eduardo Machado Moreira
+1 :-)

   Atenciosamente,

Matheus Eduardo Machado Moreira
matheus@gmail.com


2013/11/22 Borut Bolčina 

> You need professional help. That's my contribution.
>
>
> 2013/11/21 Emmanuel Sowah 
>
> > Hi guys,
> >
> > Tapestry did not make it to a recent Web frameworks report released by
> > Zeroturnaround found here:
> >
> >
> http://zeroturnaround.com/rebellabs/the-2014-decision-makers-guide-to-java-web-frameworks/
> > .
> >
> > This to me, and many others, is the clearest evidence yet that Tapestry
> has
> > failed and that Tapestry is no more relevant. Tapestry, once a rising
> star
> > with huge following, is reduced to rags with a very small cult following.
> > Users of Tapestry now are mostly newbies to Java or just finished school
> > and playing about with some home hobby projects. Or people, like Thiago H
> > de Paula Figueiredo, who write applications not used by more than 3
> people.
> >
> > Now, to hammer the last nails on Tapestry's coffin, I've decide to write
> a
> > blog with the title: *The Rise and Fall of Tapestry*. The paragraphs I
> > would discuss include:
> >
> > 1. The begin
> > 2. How Tapestry betrayed it's users by breaking existing code base at any
> > major release.
> > 3. The arrogance of Howard Lewis *Ship*
> > 4. When the 'H' in Howard became 'C' to form Coward.
> > 5. When the Ship sank.
> > 4. How Tapestry became a one-man project
> > 5. Migration path to other web frameworks
> > 6. How Tapestry would be remembered.
> > 7. Why Howard finally embraced Wicket and started using it in his
> clients'
> > projects.
> > 8. When Tapestry became Wicketstry or Tapwickstry.
> > ...
> >
> > I want to have 10 points to write about in my blog. Please feel free to
> > suggest some other points for me.
> >
> > I have to mention that I will strictly moderate comments on my blog in
> > order to filter out venomous comments from Tapestry cult trolls like the
> > ones I've seen here the last few days.
> >
> > Please contribute.
> >
> > Cheers
> >
>


Re: Web frameworks

2013-11-22 Thread Matheus Eduardo Machado Moreira
   Good Lord, I did't know that Tapestry list had a "let's have fun" topic
like this one! :-)

   Emmanuel, it is not that you *"(...) won't cite anything about that
interview (...)"*. You just *can't* because it just exists in your head.
You call Howard coward and Thiago (who is my personal friend from a long
time) a liar but you are acting the *same* (and I don't think that Howard
is a coward and I *know* that Thiago is not a liar). Never one person here
threatened another one and you're using this excuse as a way to run away
from the responsability of presenting facts when *you can't*.

   Even if Tapestry is not relevant in the web framework space (and I'm not
saying it isn't), there are a lot to be learned with it (and its IOC
framework), with its community (which is very supportive, well behaved --
except from you -- and intelligent), reading the source codes and learning
incredible solutions that are the result of the work of great minds.

   Atenciosamente,

Matheus Eduardo Machado Moreira
matheus@gmail.com


2013/11/21 Muhammad Gelbana 

> Tapestry is an idea Mr. Emmanuel and Ideas are troll proof.
>
> *-*
> *Muhammad Gelbana*
> http://www.linkedin.com/in/mgelbana
>
>
> On Thu, Nov 21, 2013 at 1:05 PM, Peter Hvass  wrote:
>
> > Wooow! What is this inane crap? :D This is hilarious in general on all
> > sides!
> >
> >
> > The best bit was discovering this wiki page;
> > http://wiki.apache.org/tapestry/Tapestry5Trolls
> >
> >
> > Have been giggling with a colleague over this today. :)
> >
> > - Original Message -
> >
> > From: "ICE Ernesto Arteaga Zavala" 
> > To: "Tapestry users" 
> > Sent: Thursday, November 21, 2013 1:03:04 AM
> > Subject: Re: Web frameworks
> >
> > Emmanuel,
> >
> > Then have sex with Wicket and let us work with the framework we
> > prefer...
> >
> >
> > 2013/11/20 Emmanuel Sowah 
> >
> > > And let me clarify some more about live class reloading in Wicket.
> Wicket
> > > has 2 modes- development and production. When you turn on development
> > mode,
> > > it reloads classes live. So don't fool yourself and others to think
> > > Tapestry is the only framework that does live class reloading.
> > >
> > >
> > > On Wed, Nov 20, 2013 at 10:18 PM, Thiago H de Paula Figueiredo <
> > > thiag...@gmail.com> wrote:
> > >
> > > > On Wed, 20 Nov 2013 19:04:30 -0200, Emmanuel Sowah  >
> > > > wrote:
> > > >
> > > > Don't listen to Thiago, he is just blowing hot air. Tapestry is no
> more
> > > >> relevant, as can be seen in the article:
> > > >> http://zeroturnaround.com/rebellabs/the-2014-decision-
> > > >> makers-guide-to-java-web-frameworks/
> > > >> As you may see, Tapestry is not mentioned anywhere in that article.
> > > >>
> > > >
> > > > A single article shouldn't be the single decision point of any
> > decision.
> > > > Not to mention that ZeroTurnaround provides a tool that provides live
> > > class
> > > > reloading, which Tapestry already does for some scenarios.
> > > >
> > > >
> > > > What about Vaadin, GWT or Wicket?
> > > >>
> > > >
> > > > Drink another shot! :D
> > > >
> > > >
> > > > Thiago, please stop misleading people.
> > > >>
> > > >
> > > > Now you're calling me a liar or something by accusing me of
> misleading
> > > > people. That's rude, specially in a medium which is archived for many
> > > years
> > > > to come, and most people don't like rude people. You're being so
> > pathetic
> > > > the only feeling I have right now about you isn't anger. It's pity.
> > > >
> > > >
> > > > Tapestry is just dying a slow death.
> > > >> Even Howard admitted that in a recent interview.
> > > >>
> > > >
> > > > [citation needed]
> > > >
> > > >
> > > > --
> > > > Thiago H. de Paula Figueiredo
> > > > Tapestry, Java and Hibernate consultant and developer
> > > > http://machina.com.br
> > > >
> > > > -
> > > > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > > > For additional commands, e-mail: users-h...@tapestry.apache.org
> > > >
> > > >
> > >
> >
> >
> >
> > --
> > Saludos,
> >
> > ---
> > "Nada que se consiga sin pena y sin trabajo
> > es verdaderamente valioso."
> > Joseph Addison
> > ---
> >
> > ICE Ernesto Arteaga Zavala
> > Ingeniero de Desarrollo
> >
> >
>


Re: Proposal for a new book: Mastering Apache Tapestry

2013-08-06 Thread Matheus Eduardo Machado Moreira
   It would be good to have a nice book about Tapestry-IOC. And your
explanations about the container could use a lot of Tapestry (web
framework) code. This could be a good strategy to a deep understanding
about IOC and Core at the same time.

   "Integration" is a subject in my mind too. It would be good to have
several examples that map to integrations that Spring provides
out-of-the-box. This part of the book could refer to existing Tapestry
plugins and analyse them or you could show how to write (or how to start
writing) integrations and services that provide similar features provided
by Spring.

   One framework that came to my mind, that is awsome and have a nice
Spring integration, is Apache Camel.

   Atenciosamente,

Matheus Eduardo Machado Moreira
matheus@gmail.com


2013/8/6 Onno Scheffers 

> >
> >
> >  Some topics I'd be interested in:
> >> - Application security, authentication and authorization- best practices
> >> with several popular frameworks
> >>
> >
> > Several popular frameworks? Which ones?
> >
>
> I'd say the most popular ones are Shiro and Spring Security. So far I have
> only rolled my own based on the blog article by Howard a while ago.
> I see questions about authentication/authorization in Tapestry popup quite
> a bit so it deserves some attention, since pretty much any application
> requires it and it would really help if some popular solutions are
> explained in one place.
>
>
>
> > This is already covered in Igor's book, so I'm not sure my one really
> > needs to talk about it too. Anyway, using Spring beans in Tapestry-IoC is
> > easy.
> >
>
> To me it makes sense to at least show an example in a book because it is
> such a popular choice and so many people are familiar with it. I must admit
> I haven't read all of Igor's book yet. Sadly most of the projects that pay
> the bills for me do not include any Tapestry, so that book keeps getting
> pushed to the bottom of the stack, even though I really like what I have
> read so far.
>
>
> regards,
>
> Onno
>


Re: Need help upgrading JumpStart examples to Tapestry 5.2

2011-01-08 Thread Matheus Eduardo Machado Moreira
   François,

   I've just confirmed that I have access to the repo. Merci. :-)

   Atenciosamente,

Matheus Eduardo Machado Moreira
matheus@gmail.com

*Good cooking takes time. If you are made to wait, it is to serve you
better, and to please you.*
Menu do Restaurant Antoine, New Orleans



2011/1/8 françois facon 

> Hi Matheus, you should have access now.
> Obrigado!
> François
>
>
> 2011/1/8 Matheus Eduardo Machado Moreira 
>
> >   Hi, François. My account is found at https://github.com/matheusemm.
> >
> >   Atenciosamente,
> >
> > Matheus Eduardo Machado Moreira
> > matheus@gmail.com
> >
> > *Good cooking takes time. If you are made to wait, it is to serve you
> > better, and to please you.*
> > Menu do Restaurant Antoine, New Orleans
> >
> >
> >
> > 2011/1/8 françois facon 
> >
> > > if you want to contribute, have a look at the current issues
> > > https://github.com/frafac-JumpStart/jumpstart-4.12.2/issues/
> > >
> > > if you have a github account, i can give your full access to this repo.
> > >
> > > Regards.
> > > François
> > >
> > >
> > > Le 8 janvier 2011 09:22, françois facon  a écrit
> :
> > >
> > > > Hi Geoff
> > > >
> > > > I have commit  my change on your /web/build.xml on this github repo
> > > > https://github.com/frafac-JumpStart/jumpstart-4.12.
> > > >
> > > > HTH
> > > > François
> > > >
> > >
> >
>


Re: Need help upgrading JumpStart examples to Tapestry 5.2

2011-01-08 Thread Matheus Eduardo Machado Moreira
   Hi, François. My account is found at https://github.com/matheusemm.

   Atenciosamente,

Matheus Eduardo Machado Moreira
matheus@gmail.com

*Good cooking takes time. If you are made to wait, it is to serve you
better, and to please you.*
Menu do Restaurant Antoine, New Orleans



2011/1/8 françois facon 

> if you want to contribute, have a look at the current issues
> https://github.com/frafac-JumpStart/jumpstart-4.12.2/issues/
>
> if you have a github account, i can give your full access to this repo.
>
> Regards.
> François
>
>
> Le 8 janvier 2011 09:22, françois facon  a écrit :
>
> > Hi Geoff
> >
> > I have commit  my change on your /web/build.xml on this github repo
> > https://github.com/frafac-JumpStart/jumpstart-4.12.
> >
> > HTH
> > François
> >
>


Re: Need help upgrading JumpStart examples to Tapestry 5.2

2011-01-06 Thread Matheus Eduardo Machado Moreira
   I, too, upgraded the project dependencies to use Tapestry 5.2.4. Changed
some build files (the targets that download the required libraries), changed
project configurations (build path), updated the user libraries. Enough
steps to publish a blog post about it. :-P

   I suppose my status now is the same as François'. I don't know what could
be the best approach to upgrade the examples - have you thought anything
about it, Goeff?

   Atenciosamente,

Matheus Eduardo Machado Moreira
matheus@gmail.com

*Good cooking takes time. If you are made to wait, it is to serve you
better, and to please you.*
Menu do Restaurant Antoine, New Orleans



2011/1/6 françois facon 

> Hi Goeff,
>
> I have made some change on your build.xml to point to 5.2.4.
> Some examples are not working but some comments you I have a partial
> version
> of you great webapps.
> if you want I can create a repo on github for you.
>
>
> BR
> François
>
>
> 2010/12/25 ael 
>
> >
> > Yes that's a good idea so that everyone can add there own example per
> > components. It can greatly help the documentation part of tapestry :).
> > --
> > View this message in context:
> >
> http://tapestry.1045711.n5.nabble.com/Need-help-upgrading-JumpStart-examples-to-Tapestry-5-2-tp3313299p3318182.html
> > Sent from the Tapestry - User mailing list archive at Nabble.com.
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >
> >
>


Re: [5.2.4] Bean Validation integration - another possible bug

2011-01-05 Thread Matheus Eduardo Machado Moreira
   Igor Drobiazko,

   I'm glad to know that you fixed the issue I filled. It was quick! Thank
you very much!

   Atenciosamente,

Matheus Eduardo Machado Moreira
matheus@gmail.com

*Good cooking takes time. If you are made to wait, it is to serve you
better, and to please you.*
Menu do Restaurant Antoine, New Orleans



2010/12/28 Matheus Eduardo Machado Moreira 

>Issue created: https://issues.apache.org/jira/browse/TAP5-1393.
>
>I'll provide some attachments that show a scenario where the bug happens
> (basically the same code that I put on the e-mail I previously sent to the
> list).
>
>Thanks for your time, Thiago.
>
>Atenciosamente,
>
>
> Matheus Eduardo Machado Moreira
> matheus@gmail.com
>
> *Good cooking takes time. If you are made to wait, it is to serve you
> better, and to please you.*
> Menu do Restaurant Antoine, New Orleans
>
>
>
> 2010/12/28 Thiago H. de Paula Figueiredo 
>
> On Tue, 28 Dec 2010 13:55:06 -0200, Matheus Eduardo Machado Moreira <
>> matheus@gmail.com> wrote:
>>
>>Reading the Form component class (beginRender() method) I found that a
>>> BeanValidationContextImpl is pushed into the Environment before
>>> "prepareForRender" and "prepare" events are triggered. I could handle the
>>> problem combining the code of the methods onActivate() and
>>> prepararFormulario() on the method onActivate(). Yet I think that the
>>> situation represents a bug and maybe it is simple to correct - just
>>> move *environment.push(BeanValidationContext.class,
>>> new BeanValidationContextImpl(validate));* (Form.class line 393) below
>>> *resources.triggerEvent(EventConstants.PREPARE,
>>> context, null);* (Form.class line 408).
>>>
>>
>> This looks like a bug. Please file a ticket at the
>> tapestry-beans-validation project at JIRA.
>>
>> --
>> 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: [5.2.4] Bean Validation integration - another possible bug

2010-12-28 Thread Matheus Eduardo Machado Moreira
   Issue created: https://issues.apache.org/jira/browse/TAP5-1393.

   I'll provide some attachments that show a scenario where the bug happens
(basically the same code that I put on the e-mail I previously sent to the
list).

   Thanks for your time, Thiago.

   Atenciosamente,

Matheus Eduardo Machado Moreira
matheus@gmail.com

*Good cooking takes time. If you are made to wait, it is to serve you
better, and to please you.*
Menu do Restaurant Antoine, New Orleans



2010/12/28 Thiago H. de Paula Figueiredo 

> On Tue, 28 Dec 2010 13:55:06 -0200, Matheus Eduardo Machado Moreira <
> matheus@gmail.com> wrote:
>
>Reading the Form component class (beginRender() method) I found that a
>> BeanValidationContextImpl is pushed into the Environment before
>> "prepareForRender" and "prepare" events are triggered. I could handle the
>> problem combining the code of the methods onActivate() and
>> prepararFormulario() on the method onActivate(). Yet I think that the
>> situation represents a bug and maybe it is simple to correct - just
>> move *environment.push(BeanValidationContext.class,
>> new BeanValidationContextImpl(validate));* (Form.class line 393) below
>> *resources.triggerEvent(EventConstants.PREPARE,
>> context, null);* (Form.class line 408).
>>
>
> This looks like a bug. Please file a ticket at the
> tapestry-beans-validation project at JIRA.
>
> --
> 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
>
>


[5.2.4] Bean Validation integration - another possible bug

2010-12-28 Thread Matheus Eduardo Machado Moreira
 }

public static void
contributeComponentMessagesSource(OrderedConfiguration
configuration
, @ClasspathProvider AssetFactory classpathAssetFactory) {

Resource root = classpathAssetFactory.getRootResource();
Resource tapestryBeanValidationCatalog =
root.forFile("TapestryBeanValidationMessages_pt_BR.properties");

// TODO seria necessário indicar a restrição de posicionamento
(after:, before:)
//  mas ainda não consigo determinar qual a restrição correta.
:(
configuration.add("TapestryBeanValidationCatalog",
tapestryBeanValidationCatalog);
}

*EditarPermissao.java*

package br.com.eteg.cromoup.pages.acesso;

import org.apache.tapestry5.EventConstants;
import org.apache.tapestry5.annotations.InjectPage;
import org.apache.tapestry5.annotations.OnEvent;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.ioc.Messages;
import org.apache.tapestry5.ioc.annotations.Inject;

import br.com.eteg.cromoup.domain.acesso.Permissao;

public class EditarPermissao {

@Property
private Permissao permissao;

@Inject
private Messages messages;

@InjectPage
private ListarPermissao listarPermissao;

*void onActivate(Long id) {
if (id != null) {
permissao = Permissao.findPermissao(id);
}
}
*
Long onPassivate() {
return permissao != null ? permissao.getId() : null;
}

*@OnEvent(EventConstants.PREPARE)
void prepararFormulario() {
if (permissao == null) {
permissao = new Permissao();
}
}
*
@OnEvent(EventConstants.SUCCESS)
Object salvar() {
if (permissao.getId() == null) {
permissao.persist();
}
else {
permissao.merge();
}
return listarPermissao;
}

@OnEvent(EventConstants.CANCELED)
Object cancelar() {
listarPermissao.limpar();
return listarPermissao;
}

public String getRotuloSalvar() {
return permissao != null && permissao.getId() != null
? messages.get("atualizar-label")
: messages.get("salvar-label");
}

}

*EditarPermissao.tml*

























${message:cancelar-label}


   Reading the Form component class (beginRender() method) I found that a
BeanValidationContextImpl is pushed into the Environment before
"prepareForRender" and "prepare" events are triggered. I could handle the
problem combining the code of the methods onActivate() and
prepararFormulario() on the method onActivate(). Yet I think that the
situation represents a bug and maybe it is simple to correct - just
move *environment.push(BeanValidationContext.class,
new BeanValidationContextImpl(validate));* (Form.class line 393) below
*resources.triggerEvent(EventConstants.PREPARE,
context, null);* (Form.class line 408).

   Atenciosamente,

Matheus Eduardo Machado Moreira
matheus@gmail.com

*Good cooking takes time. If you are made to wait, it is to serve you
better, and to please you.*
Menu do Restaurant Antoine, New Orleans


[5.2.4] Bean Validation integration - possible bug

2010-12-28 Thread Matheus Eduardo Machado Moreira
   Hello!

   Reading the
org.apache.tapestry5.internal.beanvalidator.BeanFieldValidator class source
I found that isRequired() always returns *false*. I think it is incorrect -
maybe it should return a value based on the presence of @NotNull annotation
on the field. Is it really a bug? If so, I could fill a bug about it.

   Atenciosamente,

Matheus Eduardo Machado Moreira
matheus@gmail.com

*Good cooking takes time. If you are made to wait, it is to serve you
better, and to please you.*
Menu do Restaurant Antoine, New Orleans


Re: [5.2.4] Custom ValidationDecorator + Bean Validation integration

2010-12-28 Thread Matheus Eduardo Machado Moreira
   https://issues.apache.org/jira/browse/TAP5-328 seems to be back. :-(

   Atenciosamente,

Matheus Eduardo Machado Moreira
matheus@gmail.com

*Good cooking takes time. If you are made to wait, it is to serve you
better, and to please you.*
Menu do Restaurant Antoine, New Orleans



2010/12/27 Matheus Eduardo Machado Moreira 

>I tried to resurrect a thread to ask questions regarding
> ValidationDecorator and Bean Validation integration but now I think that was
> not the best approach, so I decided to start a new thead.
>
>I'm trying to write a custom ValidationDecorator that must meet the
> following requirements:
>
>- Render a decoration (e.g.: an *) in front of the label of every
>required field
>- The decoration must be displayed with the same style as the label's
>text (e.g.: red when the label's field is in error)
>- The ValidationDecorator must work together with Bean Validation
>integration
>
>I already searched the past messages but could find nothing that could
> help with the third requirement. This is where I'm stuck now. I've written a
> couple of versions of my ValidationDecorator. The last setup is as follow:
>
> *RequiredFieldValidationDecorator.java*
>
> /**
>  * Decorates the DefaultValidationDecorator and render a "required
> decoration" in front
>  * of the label's text.
>  */
> public class RequiredFieldValidationDecorator extends
> BaseValidationDecorator {
>
> private String decoration;
> private ValidationDecorator decorated;
>
> public RequiredFieldValidationDecorator(String decoration
> , Environment environment, Asset spacerAsset, MarkupWriter
> markupWriter) {
>
> this.decoration = decoration;
> this.decorated = new DefaultValidationDecorator(environment,
> spacerAsset, markupWriter);
> }
>
> @Override
> public void beforeField(Field field) {
> decorated.beforeField(field);
> }
>
> @Override
> public void insideField(Field field) {
> decorated.insideField(field);
> }
>
> @Override
> public void afterField(Field field) {
> decorated.afterField(field);
> }
>
> @Override
> public void beforeLabel(Field field) {
> decorated.beforeLabel(field);
> }
>
> @Override
> public void insideLabel(Field field, Element labelElement) {
> decorated.insideLabel(field, labelElement);
> if (field != null && field.isRequired()) {
> labelElement.text(decoration);
> }
> }
>
> @Override
> public void afterLabel(Field field) {
> decorated.afterLabel(field);
> }
>
> }
>
> *AppModule.java*
>
> public static void
> contributeBeanValidatorSource(OrderedConfiguration
> configuration) {
> configuration.add("ConfiguradorBeanValidator", new
> BeanValidatorConfigurer() {
> public void configure(javax.validation.Configuration
> configuration) {
> configuration.ignoreXmlConfiguration();
> }
> });
> }
>
> public static void
> contributeComponentMessagesSource(OrderedConfiguration
> configuration
> , @ClasspathProvider AssetFactory classpathAssetFactory) {
>
> Resource root = classpathAssetFactory.getRootResource();
> Resource tapestryBeanValidationCatalog =
> root.forFile("TapestryBeanValidationMessages_pt_BR.properties");
>
> // TODO seria necessário indicar a restrição de posicionamento (after:,
> before:)
> //  mas ainda não consigo determinar qual a restrição correta. :(
> configuration.add("TapestryBeanValidationCatalog",
> tapestryBeanValidationCatalog);
> }
>
> public void
> contributeMarkupRenderer(OrderedConfiguration
> configuration
> , final Environment environment, @Path("${tapestry.spacer-image}")
> final Asset spacerImage) {
>
> MarkupRendererFilter requiredFieldValidationDecorator = new
> MarkupRendererFilter() {
> @Override
> public void renderMarkup(MarkupWriter writer, MarkupRenderer
> renderer) {
> ValidationDecorator decorator = new
> RequiredFieldValidationDecorator(" *", environment, spacerImage, writer);
>
> environment.push(ValidationDecorator.class, decorator);
> renderer.renderMarkup(writer);
> environment.pop(ValidationDecorator.class);
> }
> };
>
> configuration.override("DefaultValidationDecorator",
> requiredFieldValidationDecorator, "after:Heartbeat");
> }
>
> public void
> contributePartialMarku

Re: Forms and Grid questions ....

2010-12-28 Thread Matheus Eduardo Machado Moreira
   Hi, Gunnar!

   I think I know how to answer your first question. I assume your are using
Tapestry 5.2.4 as I am. :-) You need to create an explicit BeanModel,
customize its sorting funcionality and provide it to your Grid component.

*Page class*

@Inject
private BeanModelSource beanModelSource;

@Inject
private Messages messages;

public BeanModel getUnsortableBeanModel() {
   BeanModel model = beanModelSource.createDisplayModel(YourModel.class,
messages);
   for (String propName : model.getPropertyNames()) {
  PropertyModel propModel = model.get(propName);
  propModel.sortable(false);
   }
}

*Page template*



   You can add a checkbox column using BeanModel.add("propertyName", null).
It will be necessary to provide a render block for it in the template
(...).

   Atenciosamente,

Matheus Eduardo Machado Moreira
matheus@gmail.com

*Good cooking takes time. If you are made to wait, it is to serve you
better, and to please you.*
Menu do Restaurant Antoine, New Orleans



2010/12/28 Gunnar Eketrapp 

> Hi!
>
> I am using a grid inside a form to display a list of name + checkbox.
>
> The user can then select a number of names and press OK (or cancel).
>
> My questions are:
>
> 1) How do I disable the sorting functionality of the grid.
>
> 2) If I would like to suppport sorting and paging then I need some way to
> first submit what's been checked.
>
> Or should I skip the grid !?
>
> Thanks in advance,
> Gunnar Eketrapp
>


Re: Grid with Scroll synchronization + Customization

2010-12-28 Thread Matheus Eduardo Machado Moreira
   You could probably remove the TimingFilter that is present in your
AppModule. This service is part of the app that is generated by the
quickstart archetype and serve as an example of how to build and contribute
services. Just comment out the methods buildTimingFilter() and
contributeRequestHandler() (if the timing filter is the only contribution)
and you have 2624 ms gain in you app. :-)

   Atenciosamente,

Matheus Eduardo Machado Moreira
matheus@gmail.com

*Good cooking takes time. If you are made to wait, it is to serve you
better, and to please you.*
Menu do Restaurant Antoine, New Orleans



2010/12/28 Duruk_Kab 

>
> Thanks Thiago for pointing out logger issue. It was really very helpful.
>
> Now, the application takes around 5-6 seconds instead of 12-13 seconds it
> was taking before. But still have to figure out why it is taking 5-6
> seconds
> in Tapestry.
>
> The log says:
> [2010-12-28 03:53:51.247] server-tomcat-thread-13
> System.out I  ScrollableDataGrid - step 4 -:Tue Dec 28 03:53:51 EST
> 2010
> [2010-12-28 03:53:51.257] server-tomcat-thread-13
> System.out I  ScrollableDataGrid - step 3 -:Tue Dec 28 03:53:51 EST
> 2010
> [2010-12-28 03:53:51.257] server-tomcat-thread-13
> System.out I  ScrollableDataGrid - step 4 -:Tue Dec 28 03:53:51 EST
> 2010
> [2010-12-28 03:53:51.377] server-tomcat-thread-13
> .cfs.raa.web.services.AppModule.TimingFilter.unknown I Request time: 2624
> ms
> [2010-12-28 03:53:57.436] server-tomcat-thread-14
> .cfs.raa.web.services.AppModule.TimingFilter.unknown I Request time: 0 ms
> [2010-12-28 03:53:57.456] server-tomcat-thread-13
> .cfs.raa.web.services.AppModule.TimingFilter.unknown I Request time: 0 ms
> [2010-12-28 03:54:02.894] server-tomcat-thread-13
> .cfs.raa.web.services.AppModule.TimingFilter.unknown I Request time: 0 ms
>
>
> It says TimingFilter took 2624ms. Any idea???
>
> I have below method in my AppModule which uses TiminigFilter:
> public void contributeRequestHandler(OrderedConfiguration
> configuration, @InjectService("TimingFilter") RequestFilter filter) {
>
> // Each contribution to an ordered configuration has a name, When
> necessary,
> you may
> // set constraints to precisely control the invocation order of the
> contributed filter
> // within the pipeline.
>
> configuration.add("Timing", filter);
> }
>
> Please help me to find out the root cause so that I can resolve this
> performance issue.
>
> @ DK
> --
> View this message in context:
> http://tapestry-users.832.n2.nabble.com/Grid-with-Scroll-synchronization-Customization-tp5863225p5871361.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
>
>


[5.2.4] Custom ValidationDecorator + Bean Validation integration

2010-12-27 Thread Matheus Eduardo Machado Moreira
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$BeginRenderPhase.render(ComponentPageElementImpl.java:246)
at
org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:72)
... 111 more
Caused by: java.lang.IllegalArgumentException: Class cannot be null
at
org.hibernate.validator.metadata.BeanMetaDataCache.getBeanMetaData(BeanMetaDataCache.java:40)
at
org.hibernate.validator.engine.ValidatorImpl.getBeanMetaData(ValidatorImpl.java:726)
at
org.hibernate.validator.engine.ValidatorImpl.getConstraintsForClass(ValidatorImpl.java:153)
at
org.apache.tapestry5.internal.beanvalidator.BeanFieldValidator.render(BeanFieldValidator.java:84)
at
org.apache.tapestry5.internal.services.CompositeFieldValidator.render(CompositeFieldValidator.java:45)
at
org.apache.tapestry5.corelib.base.AbstractTextField.begin(AbstractTextField.java:175)
at
org.apache.tapestry5.corelib.base.AbstractTextField$MethodAccess_begin_12d2952b301.invoke(AbstractTextField$MethodAccess_begin_12d2952b301.java)
at
org.apache.tapestry5.internal.transform.RenderPhaseMethodWorker$Invoker.invoke(RenderPhaseMethodWorker.java:117)
at
org.apache.tapestry5.internal.transform.RenderPhaseMethodWorker$RenderPhaseMethodAdvice.advise(RenderPhaseMethodWorker.java:86)
at
org.apache.tapestry5.internal.services.AbstractComponentMethodInvocation.proceed(AbstractComponentMethodInvocation.java:86)
at
org.apache.tapestry5.corelib.base.AbstractTextField.beginRender(AbstractTextField.java)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$BeginRenderPhase.invokeComponent(ComponentPageElementImpl.java:239)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.invoke(ComponentPageElementImpl.java:186)
... 113 more

*EditarPermissao.tml

*http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";
xmlns:p="tapestry:parameter">


${message:novaPermissao}
|
${message:novaPesquisa}








   







${message:cancelar-label}





*EditarPermissao.java*

http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";
xmlns:p="tapestry:parameter">


${message:novaPermissao}
|
${message:novaPesquisa}








   







${message:cancelar-label}





*Permissao.java*

package br.com.eteg.cromoup.domain.acesso;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.validation.constraints.NotNull;

import org.apache.commons.lang.ObjectUtils;
import org.springframework.roo.addon.entity.RooEntity;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.plural.RooPlural;
import org.springframework.roo.addon.tostring.RooToString;

@RooJavaBean
@RooToString
@RooEntity
@RooPlural("permissoes")
@Entity
public class Permissao {

@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "id")
private Long id;

@NotNull
@Column(unique = true)
private String nome;

@NotNull
private String descricao;
private Boolean interno = Boolean.TRUE;

@ManyToMany(cascade = CascadeType.ALL,fetch=FetchType.LAZY)
@JoinTable(name = "perfil_permissao", joinColumns = { @JoinColumn(name =
"permissao_id") }, inverseJoinColumns = { @JoinColumn(name = "perfil_id") })
private Set perfis = new HashSet();

private AgrupamentoPermissao grupo;

public Long getId() {
return this.id;
}

public void setId(Long id) {
this.id = id;
}

@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 :
getId().hashCode());
return result;
}

@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
Permissao other = (Permissao) obj;
    return ObjectUtils.equals(getId(), other.getId());
}
}


   Do you have any idea what is the best approach to make this
ValidationDecorator work together with Bean Validation integration? Thanks
you.

   Atenciosamente,

Matheus Eduardo Machado Moreira
matheus@gmail.com

*Good cooking takes time. If you are made to wait, it is to serve you
better, and to please you.*
Menu do Restaurant Antoine, New Orleans


Re: ValidationDecorator using zone updates don't seem to work

2010-12-27 Thread Matheus Eduardo Machado Moreira
   Hi!

   Sorry about resurrecting this thread but a have a similar requirement
(render a decoration (eg an '*') in front of labels of every required field)
and some problems.

   I'd like to render the decoration with the same style as the label when
the field is in error. My custom ValidationDecorator renders the decoration
inside a  but I'm unable to apply the CSSClassConstants.ERROR class to
it. My code overrides the afterLabel() method and when I try to get the
ValidationTracker from the Environment it results in a NullPointerException:

public RequiredFieldValidationDecorator(String decoration, Environment
environment, MarkupWriter writer) {
this.decoration = decoration;
this.environment = environment;
this.writer = writer;
}

@Override
public void afterLabel(Field field) {
if (field.isRequired()) {
writer.element("span");
if (inError(field)) {
writer.attributes("class", CSSClassConstants.ERROR);
}
writer.write(decoration);
writer.end();  // span
}
}

private boolean inError(Field field) {
ValidationTracker tracker =
*environment*.peekRequired(ValidationTracker.class);
// NPE!
return tracker.inError(field);
}

   I tried to contribute this ValidationDecorator to MarkupRenderer and
PartialMarkupRenderer services *after* DefaultValidationDecorator. The
decoration is rendered (but not in red when the field is in error) if i
remove the inError() test inside afterLabel(); otherwise the result is a
NPE.

   The other result I'm pursuing is to make this custom ValidationDecorator
to work together with Bean Validation integration. I'd like it to be able to
render an '*' in front of fields that are bound to properties annotated with
JSR 303 annotations.

   I can send any code you think is necessary to solve this problems. Thanks
in advance.

   Atenciosamente,

Matheus Eduardo Machado Moreira
matheus@gmail.com

*Good cooking takes time. If you are made to wait, it is to serve you
better, and to please you.*
Menu do Restaurant Antoine, New Orleans



2010/11/10 Hugo Palma 

> Thanks Denis, that worked great.
> Still, i think this is more of a workaround than a solution right ?
> Shouldn't this work right out-of-the-box ?
>
> On Wed, Nov 10, 2010 at 12:08, Denis Stepanov  >wrote:
>
> >
> > Try:
> >
> >public void
> > contributeMarkupRenderer(OrderedConfiguration
> > configuration, final Environment environment) {
> >
> >MarkupRendererFilter defaultValidationDecorator = new
> > MarkupRendererFilter() {
> >public void renderMarkup(MarkupWriter writer,
> > MarkupRenderer renderer) {
> >
>  environment.push(ValidationDecorator.class,
> > new MyValidatorDecorator(environment, writer));
> >renderer.renderMarkup(writer);
> >
>  environment.pop(ValidationDecorator.class);
> >}
> >};
> >
> >configuration.add("MyValidatorDecorator",
> > defaultValidationDecorator, "after:DefaultValidationDecorator");
> >}
> >
> >public void
> >
> contributePartialMarkupRenderer(OrderedConfiguration
> > configuration,
> >final Environment environment) {
> >
> >PartialMarkupRendererFilter defaultValidationDecorator =
> new
> > PartialMarkupRendererFilter() {
> >public void renderMarkup(MarkupWriter writer,
> > JSONObject reply, PartialMarkupRenderer renderer) {
> >
>  environment.push(ValidationDecorator.class,
> > new MyValidatorDecorator(environment, writer));
> >renderer.renderMarkup(writer, reply);
> >
>  environment.pop(ValidationDecorator.class);
> >}
> >};
> >
> >configuration.add("MyValidatorDecorator",
> > defaultValidationDecorator, "after:DefaultValidationDecorator");
> > }
> >
> > On 10.11.2010, at 12:15, Hugo Palma wrote:
> >
> > > The doesn't seem to be on the render but on the injection of the
> > > ValidationDecorator
> > > into de label component in my case.
> > > I've created an issue for this here
> > > https://issues.apache.org/jira/browse/TAP5-1339
> > >
> > > On Wed, Nov 10, 2010 at 10:20, Denis Stepanov <
> denis.stepa...@gmail.com
> > >wrote:
> > >
> > >> Ajax response uses PartialMarkupRenderer via
> > >> contributePartialMarkupRenderer.
> > >>
> > >> Denis
> > >>
> >

Re: Tapestry localized messages in portuguese (pt_BR)

2010-12-23 Thread Matheus Eduardo Machado Moreira
   Problem solved.

   Just added a ValidationMessages_pt_BR.properties in the root of the
classpath with translated messages and it worked. I thought that Tapestry's
message catalog would be used when integrated with Bean Validation but this
is not the case.

   Atenciosamente,

Matheus Eduardo Machado Moreira
matheus@gmail.com

*Good cooking takes time. If you are made to wait, it is to serve you
better, and to please you.*
Menu do Restaurant Antoine, New Orleans



2010/12/22 Matheus Eduardo Machado Moreira 

>Important info that was missing in the first message...
>
>Tapestry does localize messages *when I don't use the Bean Validation
> integration*. I modified one of my forms that don't use Bean Validation
> and the client-side validation message is presented in brazilian portuguese.
> The problem occurs when I use BeanEditor and an entity bean with validation
> annotations. Then the message is presented in english.
>
>What I have to do in this case to have localized messages? Does Tapestry
> uses the Bean Validation message catalogs? Am I supposed to translate the
> Bean Validation messages?
>
>Thanks in advance,
>
>
> Matheus Eduardo Machado Moreira
> matheus@gmail.com
>
> *Good cooking takes time. If you are made to wait, it is to serve you
> better, and to please you.*
> Menu do Restaurant Antoine, New Orleans
>
>
>
> 2010/12/22 Matheus Eduardo Machado Moreira 
>
>Hello,
>>
>>I'm facing a weird problem here. I configured my Tapestry 5.2.4 app to
>> support only pt_BR locale
>> (configuration.add(SymbolConstants.SUPPORTED_LOCALES, "pt_BR")) but the
>> messages shown by the app are still localized in english. For example,
>> client-side messages about required fields are shown as *FieldXyz may not
>> be null* and I expected them to be *FieldXyz não deve ser nulo*.
>>
>>I tested the app with Firefox and Chrome with the same result. I
>> configured the browsers preferences to use brazilian portuguese as the
>> prefered language for content. And I confirmed that the requests are sent
>> with the appropriate header: Accept-Language: pt-BR,en-US;q=0.8;q=0.6. Does
>> anybody know what is wrong here?
>>
>>Atenciosamente,
>>
>> Matheus Eduardo Machado Moreira
>> matheus@gmail.com
>>
>> *Good cooking takes time. If you are made to wait, it is to serve you
>> better, and to please you.*
>> Menu do Restaurant Antoine, New Orleans
>>
>>
>


Re: Tapestry localized messages in portuguese (pt_BR)

2010-12-22 Thread Matheus Eduardo Machado Moreira
   Important info that was missing in the first message...

   Tapestry does localize messages *when I don't use the Bean Validation
integration*. I modified one of my forms that don't use Bean Validation and
the client-side validation message is presented in brazilian portuguese. The
problem occurs when I use BeanEditor and an entity bean with validation
annotations. Then the message is presented in english.

   What I have to do in this case to have localized messages? Does Tapestry
uses the Bean Validation message catalogs? Am I supposed to translate the
Bean Validation messages?

   Thanks in advance,

Matheus Eduardo Machado Moreira
matheus@gmail.com

*Good cooking takes time. If you are made to wait, it is to serve you
better, and to please you.*
Menu do Restaurant Antoine, New Orleans



2010/12/22 Matheus Eduardo Machado Moreira 

>Hello,
>
>I'm facing a weird problem here. I configured my Tapestry 5.2.4 app to
> support only pt_BR locale
> (configuration.add(SymbolConstants.SUPPORTED_LOCALES, "pt_BR")) but the
> messages shown by the app are still localized in english. For example,
> client-side messages about required fields are shown as *FieldXyz may not
> be null* and I expected them to be *FieldXyz não deve ser nulo*.
>
>I tested the app with Firefox and Chrome with the same result. I
> configured the browsers preferences to use brazilian portuguese as the
> prefered language for content. And I confirmed that the requests are sent
> with the appropriate header: Accept-Language: pt-BR,en-US;q=0.8;q=0.6. Does
> anybody know what is wrong here?
>
>Atenciosamente,
>
> Matheus Eduardo Machado Moreira
> matheus@gmail.com
>
> *Good cooking takes time. If you are made to wait, it is to serve you
> better, and to please you.*
> Menu do Restaurant Antoine, New Orleans
>
>


Tapestry localized messages in portuguese (pt_BR)

2010-12-22 Thread Matheus Eduardo Machado Moreira
   Hello,

   I'm facing a weird problem here. I configured my Tapestry 5.2.4 app to
support only pt_BR locale
(configuration.add(SymbolConstants.SUPPORTED_LOCALES, "pt_BR")) but the
messages shown by the app are still localized in english. For example,
client-side messages about required fields are shown as *FieldXyz may not be
null* and I expected them to be *FieldXyz não deve ser nulo*.

   I tested the app with Firefox and Chrome with the same result. I
configured the browsers preferences to use brazilian portuguese as the
prefered language for content. And I confirmed that the requests are sent
with the appropriate header: Accept-Language: pt-BR,en-US;q=0.8;q=0.6. Does
anybody know what is wrong here?

   Atenciosamente,

Matheus Eduardo Machado Moreira
matheus@gmail.com

*Good cooking takes time. If you are made to wait, it is to serve you
better, and to please you.*
Menu do Restaurant Antoine, New Orleans


Component report plugin

2010-12-22 Thread Matheus Eduardo Machado Moreira
   Hello!

   I'm trying to generate component documentation for my Tapestry powered
project (5.2.4). I have the following lines at the end of my pom.xml:




org.apache.tapestry
tapestry-component-report
${tapestry.release.version}

br.com.eteg.cromoup





   Do I need to configure anything else? I think the component report should
be generated using mvn site:site, is it correct? When I try it the output is
an empty site. I just want the component report and documentation.

   Thanks in advance, have a nice Cristmas and New Year's Eve,

Matheus Eduardo Machado Moreira
matheus@gmail.com

*Good cooking takes time. If you are made to wait, it is to serve you
better, and to please you.*
Menu do Restaurant Antoine, New Orleans


JPA EntityManager injection (Spring Roo + Tapestry)

2010-12-02 Thread Matheus Eduardo Machado Moreira
   Hi!

   I'm building a proof of concept app using Tapestry + Spring Roo and am
having a little trouble trying to inject the JPA EntityManager (or
EntityManagerFactory) into one of my contribute (AppModule) methods.

   The method signature is
contributeValueEncoderSource(MappedConfiguration(Class,
ValueEncoderFactory), EntityManager, TypeCoercer, LoggerSource). The Spring
app context declares the following beans:

   - dataSource (org.apache.commons.dbcp.BasicDataSource)
   - transactionManager (org.springframework.orm.jpa.JpaTransactionManager)
   - entityManagerFactory
   (org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean)

   I tried to change the contribute method signature to use
EntityManagerFactory instead of EntityManager but to no avail. The error
message is *No service implements the interface
javax.persistence.EntityManager*. My next try would be inject the whole
Spring app context and get the EntityManager from there but I don't think
this is the best way to resolve this dependency. What is the best way to do
it?

   Thanks,

Matheus Eduardo Machado Moreira
matheus@gmail.com

*Good cooking takes time. If you are made to wait, it is to serve you
better, and to please you.*
Menu do Restaurant Antoine, New Orleans


Re: Multiple browser windows handling with sessions

2010-05-25 Thread Matheus Eduardo Machado Moreira
   Moritz,

   some time ago I read a bit about JBoss Seam and I think it solves the
"session per window" problem. Maybe the solution could be adapted to be used
by Tapestry applications.

   Sincerely,

Matheus Eduardo Machado Moreira
matheus@gmail.com

"Violence is the last refuge of the incompetent."
   Salvor Hardin (The Foundation, Isaac Asimov)


2010/5/25 Thiago H. de Paula Figueiredo 

> Take a look at
> http://communitymapbuilder.org/display/TYNAMO/tapestry-conversations+guide
> .
>
> --
> 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: Transformation Exception

2010-05-20 Thread Matheus Eduardo Machado Moreira
   Greg,

   I had a similar error and fixed it updating the Javassist dependency (now
my project depends on javassist:javassit:3.9.0.GA - the old one was
jboss:javassist:3.6.0). Co-workers told me that they used to follow certain
"code conventions" that prevented Javassist to write wrong transformations
(eg. using getter/setter instead of direct property access, don't put a lot
of code inside onActivate() - put the logic on a private method and call the
method inside onActivate()).

   Atenciosamente,

Matheus Eduardo Machado Moreira
matheus@gmail.com

"Violence is the last refuge of the incompetent."
   Salvor Hardin (The Foundation, Isaac Asimov)


2010/5/20 Greg Pagendam-Turner 

> Thanks Howard,
>
> I changed the project to compile as jdk 1.5 and removed any @Override
> annotations. The code compiles but still generates the same error under
> tomcat6. I get the same error under Jetty 7. The solution for me is to run
> Jetty 6 in production which doesn't seem to produce any of these errors.
>
> I understand that JavaAssist will be removed from Tapestry 5.2. Any idea on
> when it will be released yet?
>
> Also, I've written my first ajax component and am really starting to see
> the potential of the Tapestry model.
>
> Regards,
>
> Greg.
>
>
>
> On 19/05/2010 3:48 PM, Howard Lewis Ship wrote:
>
>> Your best bet for dealing with these issues is to first try compiling
>> for JDK 1.5, even if you are deploying on 1.6.  You can see why we're
>> working to take Javassist out of the picture!
>>
>> On Tue, May 18, 2010 at 6:26 PM, Greg Pagendam-Turner
>>   wrote:
>>
>>
>>> Guys,
>>>
>>> I'm getting a transformation exception for one of my pages. It only
>>> occurs
>>> in tomcat6 in production but not under jetty in development.
>>>
>>> I'd appreciate any ideas on how to track this down please.
>>>
>>>
>>>  An unexpected application exception has occurred.
>>>
>>>   * java.lang.RuntimeException
>>> java.lang.ClassNotFoundException: caught an exception while
>>> obtaining a class file for
>>> com.liftyourgame.application.pages.EditGoal
>>>   * java.lang.ClassNotFoundException
>>> caught an exception while obtaining a class file for
>>> com.liftyourgame.application.pages.EditGoal
>>>
>>> exception
>>> org.apache.tapestry5.internal.services.TransformationException: 4
>>>
>>>   * org.apache.tapestry5.internal.services.TransformationException
>>> 4
>>>
>>> transformation
>>>
>>> InternalClassTransformation[
>>> public com.liftyourgame.application.pages.EditGoal extends
>>> java.lang.Object
>>>implements org.apache.tapestry5.runtime.Component,
>>> org.apache.tapestry5.runtime.RenderCommand
>>>
>>> add default method: public void postRenderCleanup()
>>> 
>>>
>>> add default method: public void
>>> setupRender(org.apache.tapestry5.MarkupWriter $1,
>>> org.apache.tapestry5.runtime.Event $2)
>>> 
>>>
>>> add default method: public void
>>> beginRender(org.apache.tapestry5.MarkupWriter $1,
>>> org.apache.tapestry5.runtime.Event $2)
>>> 
>>>
>>> add default method: public void
>>> beforeRenderTemplate(org.apache.tapestry5.MarkupWriter $1,
>>> org.apache.tapestry5.runtime.Event $2)
>>> 
>>>
>>> add default method: public void
>>> afterRenderTemplate(org.apache.tapestry5.MarkupWriter $1,
>>> org.apache.tapestry5.runtime.Event $2)
>>> 
>>>
>>> add default method: public void
>>> beforeRenderBody(org.apache.tapestry5.MarkupWriter $1,
>>> org.apache.tapestry5.runtime.Event $2)
>>> 
>>>
>>> add default method: public void
>>> afterRenderBody(org.apache.tapestry5.MarkupWriter $1,
>>> org.apache.tapestry5.runtime.Event $2)
>>> 
>>>
>>> add default method: public void
>>> afterRender(org.apache.tapestry5.MarkupWriter $1,
>>> org.apache.tapestry5.runtime.Event $2)
>>> 
>>>
>>> add default method: public void
>>> cleanupRender(org.apache.tapestry5.MarkupWriter $1,
>>> org.apache.tapestry5.runtime.Event $2)
>>> 
>>>
>>> add default method: public boolean
>>> dispat

Re: Tutorial Import Project Into Eclipse

2010-05-12 Thread Matheus Eduardo Machado Moreira
   Like Christian sugested, it is a good idea to install m2eclipse.

   If you don't install de plugin (not recommended), define M2_REPO as a
classpath variable in Eclipse (preferences: Java > Build Path > Classpath
Variables). Its value must be the path to the root dir of your local maven
repository (eg. $USER_DIR/.m2/repository).

   Atenciosamente,

Matheus Eduardo Machado Moreira
matheus@gmail.com

"Violence is the last refuge of the incompetent."
   Salvor Hardin (The Foundation, Isaac Asimov)


2010/5/12 Tim Koop 

> No, I hadn't done that.  Perhaps it should be documented somewhere.
>
> But I just tried it now.  Eclipse has imported the project, but it is now
> complaining about a lot of "Unbound classpath variable: 'M2_REPO/..."
>
>
>
> Tim Koop
> t...@timkoop.com <mailto:t...@timkoop.com>
> www.timkoop.com <http://www.timkoop.com>
>
> On 12/05/2010 4:09 PM, Matheus Eduardo Machado Moreira wrote:
>
>>Hi, Tim.
>>
>>Did you execute mvn eclipse:eclipse on the command line before trying
>> to
>> import the project?
>>
>>Atenciosamente,
>>
>> Matheus Eduardo Machado Moreira
>> matheus@gmail.com
>>
>> "Violence is the last refuge of the incompetent."
>>Salvor Hardin (The Foundation, Isaac Asimov)
>>
>>
>> 2010/5/12 Tim Koop
>>
>>
>>
>>> I'm having a problem with the Tapestry tutorial on this page:
>>> http://tapestry.apache.org/tapestry5.1/tutorial1/first.html
>>>
>>> I have created a project with Maven (however, I used the instructions on
>>> this page: http://java.dzone.com/articles/using-maven-create-new because
>>> the one in the above tutorial didn't work--at least I couldn't get it
>>> working)
>>>
>>> But when I try to Import Existing Project Into Workspace, the project
>>> made
>>> by Maven, Eclipse says "No projects are found to import".  What's the
>>> deal?
>>>
>>> Thanks.
>>>
>>> --
>>> Tim Koop
>>> t...@timkoop.com<mailto:t...@timkoop.com>
>>> www.timkoop.com<http://www.timkoop.com>
>>>
>>>
>>>
>>
>>
>


Re: Tutorial Import Project Into Eclipse

2010-05-12 Thread Matheus Eduardo Machado Moreira
   Hi, Tim.

   Did you execute mvn eclipse:eclipse on the command line before trying to
import the project?

   Atenciosamente,

Matheus Eduardo Machado Moreira
matheus@gmail.com

"Violence is the last refuge of the incompetent."
   Salvor Hardin (The Foundation, Isaac Asimov)


2010/5/12 Tim Koop 

> I'm having a problem with the Tapestry tutorial on this page:
> http://tapestry.apache.org/tapestry5.1/tutorial1/first.html
>
> I have created a project with Maven (however, I used the instructions on
> this page: http://java.dzone.com/articles/using-maven-create-new because
> the one in the above tutorial didn't work--at least I couldn't get it
> working)
>
> But when I try to Import Existing Project Into Workspace, the project made
> by Maven, Eclipse says "No projects are found to import".  What's the deal?
>
> Thanks.
>
> --
> Tim Koop
> t...@timkoop.com <mailto:t...@timkoop.com>
> www.timkoop.com <http://www.timkoop.com>
>


Re: multipage grid with "select all" button

2010-04-15 Thread Matheus Eduardo Machado Moreira
2010/4/15 Thiago H. de Paula Figueiredo 

> On Thu, 15 Apr 2010 10:38:19 -0300, Yury Luneff  wrote:
>
>  yes, sure, but you can't select elements by class that are physically
>> not on this page now (another page of grid, both inline=true or false)
>>
>
> Why would you want to select something that is not shown? It seems quite
> error-prone and not intuitive to me.
> I can't recall any website that does that.


   Gmail. :-)


> In your case, you "select all" button must also use AJAX to send a
> notification to the page so it can consider all objects selected.
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> Owner, software architect and developer, 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
>
>
   Atenciosamente,

Matheus Eduardo Machado Moreira
matheus@gmail.com

"Violence is the last refuge of the incompetent."
   Salvor Hardin (The Foundation, Isaac Asimov)


Re: Properties persisted (compulsorily?) in the session

2010-03-25 Thread Matheus Eduardo Machado Moreira
   Thanks, Thiago. I'm glad to have helped Juan and that my answer was
"absolutely correct". ;-)

   Atenciosamente,

Matheus Eduardo Machado Moreira
matheus@gmail.com

"Violence is the last refuge of the incompetent."
   Salvor Hardin (The Foundation, Isaac Asimov)


2010/3/25 Thiago H. de Paula Figueiredo 

> On Thu, 25 Mar 2010 09:27:21 -0300, Matheus Eduardo Machado Moreira <
> matheus@gmail.com> wrote:
>
>Hi, folks. I'm just learning Tapestry too but I want to participate in
>> the list. :-)
>>
>
> Welcome to this list, Matheus!
>
>
>Juan, I don't know much about Tapestry (yet!) but if I'm not mistaken
>> that declaration of your service isn't adequate.
>>
>
> Absolutely correct. It isn't adequate because every field that hasn't
> annotations (except @Property), after a request, is set to its initial value
> (the one defined in its declaration). In your code, the field always point
> to the same Service object. It isn't in the session: actually, it's shared
> by all users that use that specific page instance. Tapestry page instances
> are pooled. Read more about the pool in the "Principle 1 -- Static
> Structure, Dynamic Behavior" session of
> http://tapestry.apache.org/tapestry5.1/.
>
>
>  You should use a method to handle the "activate" event and there
>> initialize your property:
>>
>
> Or some rendering event handler, like @SetupRender.
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> Owner, software architect and developer, 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: Properties persisted (compulsorily?) in the session

2010-03-25 Thread Matheus Eduardo Machado Moreira
   Hi, folks. I'm just learning Tapestry too but I want to participate in
the list. :-)

   Juan, I don't know much about Tapestry (yet!) but if I'm not mistaken
that declaration of your service isn't adequate. You should use a method to
handle the "activate" event and there initialize your property:

@Property
private Service service;

public void onActivate() {
this.service = new Service();
}

   Good luck! And I'm looking for learning a lot about Tapestry.

   Atenciosamente,

Matheus Eduardo Machado Moreira
matheus@gmail.com

"Violence is the last refuge of the incompetent."
   Salvor Hardin (The Foundation, Isaac Asimov)


2010/3/25 Juan Isern 

>
> Hi guys, I hope you're doing great.
>
> I'm pretty new to Tapestry and I'm having some trouble with forms.
>
> It turns out that when some field of a form (e.g. a textfield) references
> some property that's accessed by a dot notation (I mean, it's not a simple
> page property but a property that belongs to a model object which in turn
> is
> owned by the page) it doesn't clear its value when, for instance, I hit
> refresh. Just as if it were persisted in the session.
>
> Simple properties are working okay.
>
> This is the code:
>
> public class ServicePublication {
>@Property
>private Service service = new Service();
>@Property
>private String vanillaProperty;
>
> "service" here seems to be in the session whereas vanillaProperty behaves
> normally.
>
> I understand there may be some rationale behind this but I'd like to be
> able
> to control it, in this case I want to work with a fresh Service instance
> every time the form is submitted. Does anyone know about a workaround for
> this issue?
>
> I'll appreciate your thoughts.
> --
> View this message in context:
> http://old.nabble.com/Properties-persisted-%28compulsorily-%29-in-the-session-tp28027934p28027934.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: Templates and t:body

2007-10-18 Thread Matheus Eduardo Machado Moreira
Hi, Bob.

When the specific.tml page is requested, Tapestry asks its components to
render themselves to generate the response. So, when  on
specific.tml is asked to generate content, it knows that its body is "My
Page Specific Content". The content written by the component is:

http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>

My Tapestry Application



My Page Specific Content



So, you don't have to inject anything. The component knows what its body
is and know that it must be placed where  appears.

Atenciosamente,

Matheus Eduardo Machado Moreira
[EMAIL PROTECTED]

"Violence is the last refuge of the incompetent."
Salvor Hardin (The Foundation, Isaac Asimov)

2007/10/18, Heck, Bob <[EMAIL PROTECTED]>:
>
> Thanks for the reply.
>
> Ok, the page specific content:
>
>  xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
>
>My Page Specific Content
>
> 
>
> is stored in its own .tml file, right?  Call it specific.tml
>
>
> Now, the layout template, as specified by the documentation, is
>
> http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
>  
>  My Tapestry Application
>  
>  
>  
>  
> 
>
> and that is stored I its own .tml file, call it layout.tml
>
>
> So, how does layout.tml know to use specific.tml to fill in the
>  tag?  Does it have to be injected somehow?  Where does it get
> a reference? How is this done?
>
>
>
>
> -Original Message-
> From: Jonathan Barker [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 18, 2007 10:56
> To: 'Tapestry users'
> Subject: RE: Templates and t:body
>
> Bob,
>
> The documentation is correct, but requires some getting used to.
>
> A layout component is more of a design pattern (like the Border in T4).
> It is designed to be wrapped around something.  That something appears
> where you see 
>
> The naming is by convention.  I'm still using a T4 convention, so I
> actually use a  rather than a , because I
> created a component named Border rather than one named Layout.  You
> could call it anything you want!
>
> When you use , in your page, it's like saying, "Take
> everything inside of this tag and put in into Layout where you see
> ".
>
> I hope that helps.
>
> Jonathan
>
>
> > -Original Message-
> > From: Heck, Bob [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, October 18, 2007 11:37 AM
> > To: Tapestry users
> > Subject: Templates and t:body
> >
> > I am really confused and in need of some clarification.
> >
> > The templates documentation for Tapestry 5
> > (http://tapestry.formos.com/nightly/tapestry5/tapestry-core/guide/temp
> > la
> > tes.html) shows this (direct copy/paste):
> >
> > 
> > The following example is a Layout component, that adds basic HTML
> > elements around the page specific content:
> >
> > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
> > 
> > My Tapestry Application
> > 
> > 
> > 
> > 
> > 
> >
> > A page would use this component as follow:
> >
> >  > xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
> >
> >   My Page Specific Content
> >
> > 
> >
> > When the page renders, the page's template and the Border component's
> > template are merged together:
> >
> > 
> >   
> > My Tapestry Application
> >   
> >   
> > My Page Specific Content
> >   
> > 
> > ==
> >
> >
> > 1.  I thought a layout component should start with t:layout, someone
> > please clarify if the first block is actually a layout component.
> >
> > 2.  I will assume (not sure this is correct, though) that the
> > introductory sentences are reversed and the layout component is
> > actually the second block, i.e.:
> >
> >  > xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
> >
> >   My Page Specific Content
> >
> > 
> >
> >
> > And, the page is actually the first block, i.e.:
> >
> > http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
> > 
> > My Tapestry Application
> > 
> > 
> > 
> > 
> > 
> >
> >
> > 3.