Re: How to automatically add mixins to all

2012-01-31 Thread Taha Hafeez Siddiqi
Hi

Write a ComponontClassTransformWorker

catch all submit components and add your mixin :)

http://tawus.wordpress.com/2011/08/01/tapestry-mixins-classtransformations/

regards
Taha

On Feb 1, 2012, at 7:50 AM, Yohan Yudanara wrote:

> Currently my project already have use standard Submit components in all of
> its pages.
> And there are so many pages.. :)
> 
> So I'm looking for an 'automatic' way to add mixins to existing "standard"
> submit components on my project.
> 
> Thanks..
> 
> Best regards,
> Yohan Yudanara
> 
> On Wed, Feb 1, 2012 at 9:15 AM, Robert Zeigler
> wrote:
> 
>> Why don't you create a custom submit component that uses the mixin? Then
>> just use your custom component anywhere the standard submit would otherwise
>> be used?
>> 
>> Robert
>> 
>> On Jan 31, 2012, at 1/318:10 PM , Yohan Yudanara wrote:
>> 
>>> Hi,
>>> 
>>> I'm planning to use Lenny Primak - Flowlogix's "DisableAfterSubmit"
>> mixins
>>> to all of my submit component. It works great to prevent double submit.
>>> 
>>> Please give me a clue how to accomplish this, instead of having to copy
>>> paste "mixins="DisableAfterSubmit" to all of submit components on so many
>>> pages?
>>> 
>>> Thank you..
>>> 
>>> Best regards,
>>> Yohan Yudanara
>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>> 
>> 



Re: How to automatically add mixins to all

2012-01-31 Thread Yohan Yudanara
Currently my project already have use standard Submit components in all of
its pages.
And there are so many pages.. :)

So I'm looking for an 'automatic' way to add mixins to existing "standard"
submit components on my project.

Thanks..

Best regards,
Yohan Yudanara

On Wed, Feb 1, 2012 at 9:15 AM, Robert Zeigler
wrote:

> Why don't you create a custom submit component that uses the mixin? Then
> just use your custom component anywhere the standard submit would otherwise
> be used?
>
> Robert
>
> On Jan 31, 2012, at 1/318:10 PM , Yohan Yudanara wrote:
>
> > Hi,
> >
> > I'm planning to use Lenny Primak - Flowlogix's "DisableAfterSubmit"
> mixins
> > to all of my submit component. It works great to prevent double submit.
> >
> > Please give me a clue how to accomplish this, instead of having to copy
> > paste "mixins="DisableAfterSubmit" to all of submit components on so many
> > pages?
> >
> > Thank you..
> >
> > Best regards,
> > Yohan Yudanara
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: How to automatically add mixins to all

2012-01-31 Thread Robert Zeigler
Why don't you create a custom submit component that uses the mixin? Then just 
use your custom component anywhere the standard submit would otherwise be used?

Robert

On Jan 31, 2012, at 1/318:10 PM , Yohan Yudanara wrote:

> Hi,
> 
> I'm planning to use Lenny Primak - Flowlogix's "DisableAfterSubmit" mixins
> to all of my submit component. It works great to prevent double submit.
> 
> Please give me a clue how to accomplish this, instead of having to copy
> paste "mixins="DisableAfterSubmit" to all of submit components on so many
> pages?
> 
> Thank you..
> 
> Best regards,
> Yohan Yudanara


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



How to automatically add mixins to all

2012-01-31 Thread Yohan Yudanara
Hi,

I'm planning to use Lenny Primak - Flowlogix's "DisableAfterSubmit" mixins
to all of my submit component. It works great to prevent double submit.

Please give me a clue how to accomplish this, instead of having to copy
paste "mixins="DisableAfterSubmit" to all of submit components on so many
pages?

Thank you..

Best regards,
Yohan Yudanara


scripts in head affect placement of imported scripts in tapestry 5.3

2012-01-31 Thread hien
Hi,

I am upgrading from tapestry 5.2.5 to 5.3.1 and have noticed that scripts
already in the head of the tml affect the placement of imported scripts
using JavaScriptSupport class in 5.3.1.

I have a 

Re: Question regarding the t:delegate tag in the context of t:checklist component

2012-01-31 Thread Julien Martin
Hi Thiago,
I understand better now.
Thanks,
J.

2012/1/31 Thiago H. de Paula Figueiredo 

> On Tue, 31 Jan 2012 14:30:14 -0200, Julien Martin 
> wrote:
>
>  Hello,
>>
>
> Hi!
>
> There's no t:delegate tag: there's a Delegate component. Any component
> instance can be declared using the  or  (which
> is my favorite one).
>
>  I noticed that a t:delegate is used in order to render the individual
>> checkboxes of the t:checklist component.
>> Can anyone please briefly explain the logic behind this?
>>
>
> I can't look at the source now, so I can't answer this.
>
>
>  How can a simple t:delegate tag render a full-fledged checkbox?
>>
>
> From the Delegate's "to" parameter JavaDoc: "The object which will be
> rendered in place of the Delegate component. This is typically a specific
> component
> instance, or a {@link Block}."
>
> --
> 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
>


Re: form within a form scenario

2012-01-31 Thread hese

Yeah ok.  Thats how I've handled it now...was wondering if there is another
way.

Thanks!

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/form-within-a-form-scenario-tp5444872p5445619.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: URL Rewriting

2012-01-31 Thread Jochen Frey
Thanks Thiago!

On Jan 31, 2012, at 10:52 AM, Thiago H. de Paula Figueiredo wrote:

> On Tue, 31 Jan 2012 15:53:29 -0200, Jochen Frey  wrote:
> 
>> Excellent!
>> 
>> But what let's say there's a 2nd link transformer, what happens to the 
>> PageRenderRequestParameters that the two transformers return?  Would the 
>> second one just inject an EventContext
> 
> The PageRenderRequestParameters returned by the first will be passed to the 
> next. I haven't looked at the code, but that's what I expect it to do. That's 
> what the old URL rewriter code did: the Request returned by one rule was 
> passed to the next rule until all rules were executed.
> 
> -- 
> 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

---
  joc...@jochenfrey.com
  +1.415.366.0450
  @jochen_frey



Re: URL Rewriting

2012-01-31 Thread Thiago H. de Paula Figueiredo
On Tue, 31 Jan 2012 15:53:29 -0200, Jochen Frey   
wrote:



Excellent!

But what let's say there's a 2nd link transformer, what happens to the  
PageRenderRequestParameters that the two transformers return?  Would the  
second one just inject an EventContext


The PageRenderRequestParameters returned by the first will be passed to  
the next. I haven't looked at the code, but that's what I expect it to do.  
That's what the old URL rewriter code did: the Request returned by one  
rule was passed to the next rule until all rules were executed.


--
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: How to use custom onSubmit handler in form tag?

2012-01-31 Thread Thiago H. de Paula Figueiredo
Why don't you just add a listener to the 'submit' function of the form  
using Prototype's Element.observe() or the similar function in jQuery?  
Anyway, adding onXXX attributes to attach listeners to HTML elements isn't  
recommended at all.


On Tue, 31 Jan 2012 15:51:30 -0200, Christian Köberl  
 wrote:



2012-01-29, Michael Gerzabek:

The form tag automagically renders a javascript handler for the onSubmit
event [1, line 388]. It uses the same snippet that's declared for
onclick handler in MarkupConstants.WAIT_FOR_PAGE

[2] described in [3].

How could I contribute my own javascript snippet to onSubmit attribute
of forms? How can I override this setting?


The problem is that this is no setting and therefore cannot be  
overwritten.


One solution is to override the default JavaScriptStack of Tapestry and
provide another implementation of the onSubmit handler:
1. copy CoreJavaScriptStack
2. change tapestry.js in array to a modified copy in your project
3. contribute the overridden configuration
public static void
contributeJavaScriptStackSource(MappedConfiguration configuration)
{
  configuration.overrideInstance(InternalConstants.CORE_STACK_NAME,
MyCoreJavaScriptStack.class);
}

Has anybody a better idea?

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org




--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
Consultor, desenvolvedor e instrutor em Java, Tapestry e Hibernate
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: URL Rewriting

2012-01-31 Thread Jochen Frey
Excellent!

But what let's say there's a 2nd link transformer, what happens to the 
PageRenderRequestParameters that the two transformers return?  Would the second 
one just inject an EventContext

@Inject
private EventContext eventContext;

and use it to generate the new EventContext? As well, would the 2nd transformer 
get an adjusted path in the Request ... (or how else would I do additional path 
munging?)

public PageRenderRequestParameters decodePageRenderRequest(Request request)
{


Thanks!
Jochen


On Jan 31, 2012, at 9:42 AM, Thiago H. de Paula Figueiredo wrote:

> On Tue, 31 Jan 2012 15:35:13 -0200, Jochen Frey  wrote:
> 
> 
>> Let's say there's a page /SomeAccount/profile/SomeOtherVar, where 
>> "SomeOtherVar" is supposed to go into the activation context as well ... how 
>> would I handle that?  Do I have the shot of augmenting the activation 
>> context somewhere on a per-page basis, or do I need to handle all possible 
>> Activate Context variations in the LinkTransformer?  In other words, is 
>> there some chain where more processing of the URL is done?
> 
> Don't forget that you can have more than one LinkTransformer. They're 
> chained, so you need to ensure they're contributed in the right order.
> 
> -- 
> 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

---
  joc...@jochenfrey.com
  +1.415.366.0450
  @jochen_frey


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: How to use custom onSubmit handler in form tag?

2012-01-31 Thread Christian Köberl
2012-01-29, Michael Gerzabek:
> The form tag automagically renders a javascript handler for the onSubmit
> event [1, line 388]. It uses the same snippet that's declared for
> onclick handler in MarkupConstants.WAIT_FOR_PAGE
> 
> [2] described in [3].
> 
> How could I contribute my own javascript snippet to onSubmit attribute
> of forms? How can I override this setting?

The problem is that this is no setting and therefore cannot be overwritten.

One solution is to override the default JavaScriptStack of Tapestry and
provide another implementation of the onSubmit handler:
1. copy CoreJavaScriptStack
2. change tapestry.js in array to a modified copy in your project
3. contribute the overridden configuration
public static void
contributeJavaScriptStackSource(MappedConfiguration configuration)
{
  configuration.overrideInstance(InternalConstants.CORE_STACK_NAME,
MyCoreJavaScriptStack.class);
}

Has anybody a better idea?

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: URL Rewriting

2012-01-31 Thread Thiago H. de Paula Figueiredo
On Tue, 31 Jan 2012 15:35:13 -0200, Jochen Frey   
wrote:



Let's say there's a page /SomeAccount/profile/SomeOtherVar, where  
"SomeOtherVar" is supposed to go into the activation context as well ...  
how would I handle that?  Do I have the shot of augmenting the  
activation context somewhere on a per-page basis, or do I need to handle  
all possible Activate Context variations in the LinkTransformer?  In  
other words, is there some chain where more processing of the URL is  
done?


Don't forget that you can have more than one LinkTransformer. They're  
chained, so you need to ensure they're contributed in the right order.


--
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: Question regarding the t:delegate tag in the context of t:checklist component

2012-01-31 Thread Thiago H. de Paula Figueiredo

On Tue, 31 Jan 2012 14:30:14 -0200, Julien Martin  wrote:


Hello,


Hi!

There's no t:delegate tag: there's a Delegate component. Any component  
instance can be declared using the  or  (which  
is my favorite one).



I noticed that a t:delegate is used in order to render the individual
checkboxes of the t:checklist component.
Can anyone please briefly explain the logic behind this?


I can't look at the source now, so I can't answer this.


How can a simple t:delegate tag render a full-fledged checkbox?


From the Delegate's "to" parameter JavaDoc: "The object which will be  
rendered in place of the Delegate component. This is typically a specific  
component

instance, or a {@link Block}."

--
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: Using Tapestry-IoC libraries in non-Tapestry application

2012-01-31 Thread Thiago H. de Paula Figueiredo
On Tue, 31 Jan 2012 15:31:33 -0200, Andreas Fink  
 wrote:



Hi Erik.


Hi!

Be aware of the fact that many classes you will use through T5 will be  
rewritten. So if your "wrapping" application needs to work on  
annotations, make sure those are on interfaces, not implementing classes.


You can file a JIRA for Tapestry-IoC supporting annotations in classes.

--
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: URL Rewriting

2012-01-31 Thread Jochen Frey

On Jan 31, 2012, at 2:39 AM, Thiago H. de Paula Figueiredo wrote:

> On Tue, 31 Jan 2012 03:50:49 -0200, Jochen Frey  wrote:
> 
>> Hi!
> 
> Hi!
> 
>> I am looking for a clean way to generically rewrite URLs as follows:
>> 
>> Publicly we want to have an account name to be the first part of the path in 
>> URLs like so:  /SomeAccount/settings/page1.  Since (I believe) that in 
>> Tapestry I can't bind the first part of the path to a variable,  I would 
>> like to rewrite it to something like this: 
>> /settings/page1?account=SomeAccount
> 
> Why not as the first page activation context value?

Activation context sounds fine.  However, I will want to have flexibility to 
add other Activation Contexts values for some of the pages (and not for 
others).  Currently the code in LinkTransformer does something like this (based 
on :

public PageRenderRequestParameters decodePageRenderRequest(Request request)
{

String path = request.getPath();
// do some path munging here
String newPath = someMagic(path);
String pageName = componentClassResolver.canonicalizePageName(newPath);

PageRenderRequestParameters ret = new PageRenderRequestParameters(
pageName, new EmptyEventContext(), false
);
return ret;
}

Let's say there's a page /SomeAccount/profile/SomeOtherVar, where 
"SomeOtherVar" is supposed to go into the activation context as well ... how 
would I handle that?  Do I have the shot of augmenting the activation context 
somewhere on a per-page basis, or do I need to handle all possible Activate 
Context variations in the LinkTransformer?  In other words, is there some chain 
where more processing of the URL is done?

Thanks so much!
Jochen

---
  joc...@jochenfrey.com
  +1.415.366.0450
  @jochen_frey


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Question regarding the internals of t:checklist component..

2012-01-31 Thread Thiago H. de Paula Figueiredo

On Tue, 31 Jan 2012 14:24:11 -0200, Julien Martin  wrote:


Hello all,


Hi!

I am trying to better understand how T5 components work and I would like  
to know what the difference is between @Environmental and @Inject and  
when to use which in the context of component developpement of course.


They're very, very, very different.

@Inject is one way to get services from the Tapestry-IoC registry.  
@Environmental uses the Environment service, which is used for components  
or pages to pass some information for components inside them.



For instance having a look under the hood of t:checklist, I noticed that
the validation tracker is injected by the @Environmental annotation as
follows:

*@Environmental*
*private ValidationTracker tracker;*


ValidationTracker is not a service.


whereas the javascript support variable is injected by the @Inject
annotation as follows:

*@Inject*
*private JavaScriptSupport javaScriptSupport;*


JavaScriptSupport is a service.

--
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: Using Tapestry-IoC libraries in non-Tapestry application

2012-01-31 Thread Andreas Fink
Hi Erik.

Be aware of the fact that many classes you will use through T5 will be 
rewritten.
So if your "wrapping" application needs to work on annotations, make sure those 
are on interfaces, not implementing classes.

Cheers,
Andi.

On Jan 30, 2012, at 16:56 , Erik Fäßler wrote:

> Hello all,
> 
> I was wondering whether it is possible to build a JAR library which uses 
> Tapestry-IoC internally which is then used by another application without 
> being aware of Tapestry at all.
> 
> The reason is that we already use a framework architecture for NLP related 
> processing (UIMA). This framework defines components - annotators - which can 
> be put in line flexibly to create a variety of different pipeline 
> architectures, reusing the same components.
> 
> One of our components has grown quite big and I feel Tapestry's service and 
> IoC mechanisms would work just fine here. The UIMA framework, however, does 
> not use any external IoC container, AFAIK. Thus, my bigger components for 
> which I would like to use Tapestry IoC would do so silently.
> 
> But I should not use multiple registry objects if I'm correct. But I also 
> don't have a main application to hold the registry - this would be the UIMA 
> Framework itself which I'd rather not alter for this purpose. Is it perhaps 
> possible to create one central registry which can be used by all UIMA 
> components? I could use a static class with a static registry variable, for 
> example. By Tapestry's module-autoloading, all modules should be included in 
> this central registry. But I don't know if I don't just run straight into 
> bigger problems with that approach. So I'd like to ask for your advice.
> 
> Thanks and best regards,
> 
> Erik
> -
> 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: Exception handling in Tomcat 6.0.33

2012-01-31 Thread Kalle Korhonen
Good thing, that's one way to set things up and I've used it myself
but it only goes half way. The even better idea (if I say so myself)
is to use Tynamo's (and in the future core Tapestry)
tapestry-exceptionpage module for mapping exceptions directly to error
pages (see http://tynamo.org/tapestry-exceptionpage+guide).

Kalle


On Tue, Jan 31, 2012 at 8:41 AM, Brian Long  wrote:
> Hi Kalle,
>
> yes I managed finally track down the answer after searching through
> pages of search results, unfortunately my original search query
> included the terms "tomcat", "tapestry" and "error" which produces
> reams of result (most of them irrelevant)!
>
> Like you mentioned in your reply I needed to add an error dispatcher
> (like example here: http://tapestry.apache.org/error-page-recipe.html)
>
>    
>        app
>        /*
>        FORWARD
>        REQUEST
>        ERROR
>    
>
> I then mapped error codes to tapestry URLs
>
>    
>        500
>        /ExceptionReport
>    
>    
>        404
>        /ExceptionReport
>    
>
> Tomcat then started to redirect these error types to my Exception
> Report page like Jetty already does. Hopefully this answer will be
> found by the next person looking into this issue.
>
> Thanks for the link explaining why the tapestry exception report
> filter works in Jetty but not in Tomcat . . .
>
> Regards, Brian.
>
> On 31 January 2012 16:18, Kalle Korhonen  wrote:
>> Are you setting an error code to your response? You haven't configured
>> the filter to handle error dispatches:
>>        
>>                app
>>                /*
>>                REQUEST
>>                ERROR
>>        
>>
>> Error handling in Jetty and Tomcat differ, see
>> http://www.cacoethes.co.uk/blog/software/a-tomcat-gotcha for more
>> info.
>>
>> Kalle
>>
>>
>> On Tue, Jan 31, 2012 at 2:50 AM, Brian Long  wrote:
>>> Hi all,
>>>
>>> I'm sure I'm not the first person to experience this issue but can't
>>> seem to find any answers in the mail archive or on the web. I have an
>>> ExceptionReport page implementing ExceptionReporter so any nasty
>>> surprises like NPE's result in a nice and friendly "We experiencing
>>> technical difficulties" page being presented to the user, this works
>>> fine in jetty but when I deploy my war file to tomcat 6, the
>>> exceptions are not caught by the ExceptionReporter and the stacktrace
>>> is shown to the user?
>>>
>>> If anyone know what setting in tomcat needs to change so I can get
>>> this to work as it does in jetty I appreciate it.
>>>
>>> Regards, Brian.
>>>
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: form within a form scenario

2012-01-31 Thread Thiago H. de Paula Figueiredo

On Tue, 31 Jan 2012 13:45:53 -0200, hese <1024h...@gmail.com> wrote:


The reason I want the entire thing enclosed within a form is that I have
other fields along with t:ContactCrud for each row, which have to be
submitted as a whole.


HTML doesn't allow nested forms, so you'll probably need to refactor your  
component in two, one just with the fields, the other using the one with  
the fields (just a suggestion).


--
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: Exception handling in Tomcat 6.0.33

2012-01-31 Thread Brian Long
Hi Kalle,

yes I managed finally track down the answer after searching through
pages of search results, unfortunately my original search query
included the terms "tomcat", "tapestry" and "error" which produces
reams of result (most of them irrelevant)!

Like you mentioned in your reply I needed to add an error dispatcher
(like example here: http://tapestry.apache.org/error-page-recipe.html)


app
/*
FORWARD
REQUEST
ERROR


I then mapped error codes to tapestry URLs


500
/ExceptionReport


404
/ExceptionReport


Tomcat then started to redirect these error types to my Exception
Report page like Jetty already does. Hopefully this answer will be
found by the next person looking into this issue.

Thanks for the link explaining why the tapestry exception report
filter works in Jetty but not in Tomcat . . .

Regards, Brian.

On 31 January 2012 16:18, Kalle Korhonen  wrote:
> Are you setting an error code to your response? You haven't configured
> the filter to handle error dispatches:
>        
>                app
>                /*
>                REQUEST
>                ERROR
>        
>
> Error handling in Jetty and Tomcat differ, see
> http://www.cacoethes.co.uk/blog/software/a-tomcat-gotcha for more
> info.
>
> Kalle
>
>
> On Tue, Jan 31, 2012 at 2:50 AM, Brian Long  wrote:
>> Hi all,
>>
>> I'm sure I'm not the first person to experience this issue but can't
>> seem to find any answers in the mail archive or on the web. I have an
>> ExceptionReport page implementing ExceptionReporter so any nasty
>> surprises like NPE's result in a nice and friendly "We experiencing
>> technical difficulties" page being presented to the user, this works
>> fine in jetty but when I deploy my war file to tomcat 6, the
>> exceptions are not caught by the ExceptionReporter and the stacktrace
>> is shown to the user?
>>
>> If anyone know what setting in tomcat needs to change so I can get
>> this to work as it does in jetty I appreciate it.
>>
>> Regards, Brian.
>>
>>
>>
>> -
>> 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



Question regarding the t:delegate tag in the context of t:checklist component

2012-01-31 Thread Julien Martin
Hello,

I noticed that a t:delegate is used in order to render the individual
checkboxes of the t:checklist component.

See below:
http://tapestry.apache.org/schema/tapestry_5_3.xsd";>

  * *



Can anyone please briefly explain the logic behind this? How can a simple
t:delegate tag render a full-fledged checkbox?

Regards,

Julien.


Question regarding the internals of t:checklist component..

2012-01-31 Thread Julien Martin
Hello all,

I am trying to better understand how T5 components work and I would like to
know what the difference is between @Environmental and @Inject and when to
use which in the context of component developpement of course.

For instance having a look under the hood of t:checklist, I noticed that
the validation tracker is injected by the @Environmental annotation as
follows:

*@Environmental*
*private ValidationTracker tracker;*

whereas the javascript support variable is injected by the @Inject
annotation as follows:

*@Inject*
*private JavaScriptSupport javaScriptSupport;*
*
*
Any reason why that is?

Regards,

Julien.


Re: Exception handling in Tomcat 6.0.33

2012-01-31 Thread Kalle Korhonen
Are you setting an error code to your response? You haven't configured
the filter to handle error dispatches:

app
/*
REQUEST
ERROR


Error handling in Jetty and Tomcat differ, see
http://www.cacoethes.co.uk/blog/software/a-tomcat-gotcha for more
info.

Kalle


On Tue, Jan 31, 2012 at 2:50 AM, Brian Long  wrote:
> Hi all,
>
> I'm sure I'm not the first person to experience this issue but can't
> seem to find any answers in the mail archive or on the web. I have an
> ExceptionReport page implementing ExceptionReporter so any nasty
> surprises like NPE's result in a nice and friendly "We experiencing
> technical difficulties" page being presented to the user, this works
> fine in jetty but when I deploy my war file to tomcat 6, the
> exceptions are not caught by the ExceptionReporter and the stacktrace
> is shown to the user?
>
> If anyone know what setting in tomcat needs to change so I can get
> this to work as it does in jetty I appreciate it.
>
> Regards, Brian.
>
>
>
> -
> 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: form within a form scenario

2012-01-31 Thread hese

The reason I want the entire thing enclosed within a form is that I have
other fields along with t:ContactCrud for each row, which have to be
submitted as a whole.



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/form-within-a-form-scenario-tp5444872p5444886.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



form within a form scenario

2012-01-31 Thread hese
Hi,

I want to create an ajax grid and do CRUD operations on single rows without
having to post the entire form.  So something like this -



 



ContactCrud is my custom component which in turn deals each row in Edit,
Delete, Create modes.  Each row will have a Edit, Delete icons at the end,
which when clicked will bring up text fields for editing.  When save is
clicked the contents of that row be posted (this is what I cannot do with
AjaxFormLoop, I have to submit the entire form) and that row alone will be
zone updated.

In order to do single row posting, I have a form inside ContactCrud, but I
get an error 'form component cannot embedded with other form components'.

So how should I code this?  Are there any examples like this?

Thanks!



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/form-within-a-form-scenario-tp5444872p5444872.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: exclude a column from a grid component, by a condition

2012-01-31 Thread Dusko Jovanovski
Try this:

.tml:



.java:

public String getExcludeColumn(){
if(excludeCondition)
return "somecolumn";
else return null;
}

I didn't test this code, but it should work.

2012/1/31 Vladimir Bauer 

> Good day everybody!
>
> I need to exclude a column from a grid component, by a condition.
> t:exclude parameter of a grid component provides ability to exclude any
> column, but with no condition.
>
> So far I have following code, but I think it is a bit ugly, because it is
> repeating same line with grid.
>
>  
>t:exclude="somecolumn" />
>
>
> 
>
>
>  
>
> Any idea how to do it more properly?
>
> Regards,
> Vladimir Bauer
>
>
>


exclude a column from a grid component, by a condition

2012-01-31 Thread Vladimir Bauer
Good day everybody!

I need to exclude a column from a grid component, by a condition.
t:exclude parameter of a grid component provides ability to exclude any column, 
but with no condition.

So far I have following code, but I think it is a bit ugly, because it is 
repeating same line with grid.

  
  


 


  

Any idea how to do it more properly?

Regards,
Vladimir Bauer




Exception handling in Tomcat 6.0.33

2012-01-31 Thread Brian Long
Hi all,

I'm sure I'm not the first person to experience this issue but can't
seem to find any answers in the mail archive or on the web. I have an
ExceptionReport page implementing ExceptionReporter so any nasty
surprises like NPE's result in a nice and friendly "We experiencing
technical difficulties" page being presented to the user, this works
fine in jetty but when I deploy my war file to tomcat 6, the
exceptions are not caught by the ExceptionReporter and the stacktrace
is shown to the user?

If anyone know what setting in tomcat needs to change so I can get
this to work as it does in jetty I appreciate it.

Regards, Brian.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Re: URL Rewriting

2012-01-31 Thread Thiago H. de Paula Figueiredo
On Tue, 31 Jan 2012 03:50:49 -0200, Jochen Frey   
wrote:



Hi!


Hi!


I am looking for a clean way to generically rewrite URLs as follows:

Publicly we want to have an account name to be the first part of the  
path in URLs like so:  /SomeAccount/settings/page1.  Since (I believe)  
that in Tapestry I can't bind the first part of the path to a variable,   
I would like to rewrite it to something like this:  
/settings/page1?account=SomeAccount


Why not as the first page activation context value?

How do I pass newly created variable (account) into the  
PageRenderRequestParameters (I guess if knew the Java class from step 1,  
I could check if it implements an interface and if so, typecast it and  
ask the receiving page to generate a link ... but that wouldn't help  
much either.


What do you mean by variable?

It's pretty clear to me how I'd have done it in TS 5.1  
(http://tapestry.apache.org/url-rewriting.html), but URLRewriterRule is  
not supported any more.
Alternatively I could roll my own RequestFilter (like the TimingFilter),  
but it seems there'd have to be a better way?


If you don't want to user LinkTransformer, I'd just copy the URL rewriting  
support from Tapestry 5.1 sources. It's basically a RequestFilter and some  
helper classes. Not much code and it uses nothing that would cause  
problems in 5.3.


--
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: subclass overrides parameter value

2012-01-31 Thread Thiago H. de Paula Figueiredo
On Tue, 31 Jan 2012 00:27:38 -0200, Paul Stanton   
wrote:



Hi all,


Hi!



I have a component with:

 @Parameter(defaultPrefix = BindingConstants.LITERAL, value = "30")
 private int maxResults;

and I also have a subclass component for which I would like to change  
the default the value for 'maxResults' to 10.


When either component (super or sub) is used, i would like the parameter  
to be optional.


Have you tried to provide the default value with a defaultMaxResults()  
method instead of the value attribute of @Parameter? This way, you can  
change the default value using ordinary method override.


--
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