? OtherPage.class : null;
>}
>
> Thanks.
> Alessandro Badin
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/T5-onActivate-called-before-onSuccessFrom-tp2430026p3389328.html
> Sent from the Ta
Hello guys,
What about I have something like this:
Object onActivate() {
condition = service.findSomething();
return (condition == null) ? OtherPage.class : null;
}
Thanks.
Alessandro Badin
--
View this message in context:
http://tapestry.1045711.n5.nabble.com/T5
it was a terrible typo from me. misspelled t:context :(
--
View this message in context:
http://old.nabble.com/Re%3A--T5--onActivate%2C-onPassivate-and-actionlink-tp28410121p28411519.html
Sent from the Tapestry - User mailing list archive at Nabble.com
How have you defined the ActionLink? It sounds like you might have set
the context parameter for it incorrectly. Can you paste your link
definition here?
cheers,
Joost
paha wrote:
Hi,
i am very new to tapestry and must be missing some important concept, need
you help. i have a page (list of
) {
//fired but has no data
}
what i want to achieve - delete selected product on the same page that shows
product list.
--
View this message in context:
http://old.nabble.com/-T5--onActivate%2C-onPassivate-and-actionlink-tp28409603p28409603.html
Sent from the Tapestry - User mailing list
Hi,
I'd like to redirect from ExceptionReport class to a normal page, however I
notice that onActivate was never called, any idea? Thanks,
public class ExceptionReport implements ExceptionReporter {
public void reportException(Throwable exception) {
}
public Object onActivate() {
On Wed, Apr 1, 2009 at 8:33 AM, Peter Kanze wrote:
> * Maybe the onActivate is not a could place to do my doSearch(), but how can
> I do this better? Because now my search query is called twice.
> That is not what I want!
I do not use event handler methods for that: if I'm using a Grid, for
examp
Hi Geof,
Thank you!
I think I understand it better now.
The first onActivate is called when the form submits.. The second is from
the page redirected by tapestry, in my case the same page*.
* Maybe the onActivate is not a could place to do my doSearch(), but how can
I do this better? Because now
Do these help?
http://jumpstart.doublenegative.com.au:8080/jumpstart/examples/navigation/onactivateandonpassivate/3
http://jumpstart.doublenegative.com.au:8080/jumpstart/examples/navigation/whatiscalledandwhen
Regards,
Geoff
On 01/04/2009, at 9:30 PM, Peter Kanze wrote:
To b
To be more clear I added a basic page with a simple form.
See below which methods are called. Why is the onActivate() called before
the onSuccess and onSubmit()?
In my onActivate I call a doSearch(), so basically for every form submit,
the search query is called twice.
This is very inefficient. Ho
Hello
Today I noticed that when I submit a form by clicking the submit button,
tapestry first calls the onActivate and then the onSuccesFromMyForm.
Is this normal tapestry behaviour? What is the reason behind it?
See my output after I clicked the submit button:
onActivate(String categoryName, i
Already pointed out that this is expected. But you can bypass this
behavior.
Make your two-parameter method return "true" on successful processing;
then your 1-parameter method won't be called.
Robert
On Mar 25, 2009, at 3/256:10 AM , Peter Kanze wrote:
Hello
I have a pagelink that point t
As Andy already pointed, this is normal Tapestry behaviour.
When you have more than onActivate() method, I recommend the use of a
single method receiving an EventContext
(http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/EventContext.html):
onActivate(EventContext event) {
if
e-
> From: Peter Kanze [mailto:peterka...@gmail.com]
> Sent: 25 March 2009 11:11
> To: Tapestry users
> Subject: T5: onActivate called twice
>
> Hello
> I have a pagelink that point to this /products/computer/5
>
> In my Products.java I have two onActivate methods.
Hello
I have a pagelink that point to this /products/computer/5
In my Products.java I have two onActivate methods. See below.
When I click the pageLink I can see that both onActivate are called.
Because this is printed to the output console:
onActivate(String categoryName, int pageNr)
onActivate:
activate in a 1:1 cycle, as
posts can occur for any number of components / form events.
Cheers,
Peter
- Original Message -
From: "Thiago H. de Paula Figueiredo"
To: "Tapestry users"
Sent: Tuesday, 17 February, 2009 17:06:44 GMT +02:00 Athens, Beirut, Bucharest,
Ista
On Tue, Feb 17, 2009 at 12:02 PM, Angelo Chen
wrote:
> you need a onPassivate to persist the context on the client side if:
You need an onPassivate() method to tell Tapestry what is the
activation context for a given page. This is needed primarily because
of redirect-after-post, AFAIK, and every
Hi Thiago,
I just read again that doc, here is what I understand:
you need a onPassivate to persist the context on the client side if:
1. you have a form in the page
2. if you have an action link in the page
correct?
Angelo
Thiago H. de Paula Figueiredo wrote:
>
> On Tue, Feb 17, 2009 at 1
On Tue, Feb 17, 2009 at 10:28 AM, Angelo Chen
wrote:
> Hi Thiago,
Hi!
> I always make sure i have a onPassivate that returns same thing in the
> onActivate,
That's a good thing, returning the the save value, but not necessarily
the same type.
> now, must be wrong, what is the rule of thumb o
Hi Thiago,
I always make sure i have a onPassivate that returns same thing in the
onActivate, now, must be wrong, what is the rule of thumb on this? why we
need a onPassivate?
Thanks,
Angelo
Thiago H. de Paula Figueiredo wrote:
>
> On Tue, Feb 17, 2009 at 10:16 AM, Angelo Chen
>
> You cann
On Tue, Feb 17, 2009 at 10:16 AM, Angelo Chen
wrote:
> Hi Thiago,
Hi, Angelo!
> Thanks for the tip, never knew there is this EventContext, is following
> onPassivate correct:
You cannot return an EventContext in the onPassivate method. You don't
even need to return the same type you received
Hi Thiago,
Thanks for the tip, never knew there is this EventContext, is following
onPassivate correct:
private EventContext ec;
public Object onActivate(EventContext obj) {ec = obj;}
public EventContext onPassivate() { return ec; }
What's the advantage of using EventContext compared to O
On Tue, Feb 17, 2009 at 9:30 AM, Angelo Chen wrote:
> You are correct, in one of my javascript it has a "../images/..", i don't
> know why it got called, in that particular page, there is no reference to
> that js, commenting it out fixes the problem, but this does bring up another
> question, how
Hi,
You are correct, in one of my javascript it has a "../images/..", i don't
know why it got called, in that particular page, there is no reference to
that js, commenting it out fixes the problem, but this does bring up another
question, how to put asset:context in a javascript?
//var tb_pathTo
Most probably you're including images in your page using relative
paths. Use ${asset:context/images/loading.gif} instead and the problem
goes away. ;)
By the way, use EventContext instead of Object[] as the parameter of
your onActivate method. ;)
--
Thiago
--
btw, it is 5.0.18.
Angelo Chen wrote:
>
> Hi,
>
>
>
--
View this message in context:
http://www.nabble.com/t5%3A-onActivate-called-twice-tp22053148p22053292.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
--
Hi,
I have following code, onActivate was called correctly 1st time, but it will
be called again during the rendering and obj[0] has 'images', obj[1]
has 'loading.gif', I do provide a onPassivate, any idea? thanks
private Object[] _objs;
@CommitAfter
public Object onActivate(Object[] o
I have a page with:
@Secured(User.ROLE_USER)
public class Page1 extends MyAbstractPage {
void onActivate(long someId) {
Some initialization takes place here. No check against user role, cause
we believe we're secured!
}
}
If I call this without context like this: http://localhost:8080/my
What version of Tapestry? This was addressed in 5.0.14, I believe, to
ensure that when overriding a base class event handler method, the
method is not invoked twice.
On Mon, Apr 21, 2008 at 6:25 AM, Leon Derks <[EMAIL PROTECTED]> wrote:
> Hi Davor,
>
> Indeed, I have a BasePage that implements th
Hi Leon,
I am facing the same problem with the onActivate() method calling twice.
Did you find any solution for this?
Thanks,
Yees.
-Original Message-
From: Leon Derks [mailto:[EMAIL PROTECTED]
Sent: Monday, April 21, 2008 6:56 PM
To: Tapestry users
Subject: Re: T5: onActivate
i think that solution is a bit "dangerous",
if you do some refectorings.
eg: move the page Administration in another package
or the application context is changed
2008/8/29 <[EMAIL PROTECTED]>
> Hi,
>
> I was just about to reply and say I solved it. Missing slash in the
> location.href. The fol
Hi,
I was just about to reply and say I solved it. Missing slash in the
location.href. The following works:
onclick="location.href='/Administration';"/>
thanks for your help.
p.
Quoting Martijn Brinkers <[EMAIL PROTECTED]>:
I'm not sure but I thinks it's a similar problem. It looks l
I'm not sure but I thinks it's a similar problem. It looks like
Administration is interpreted as the context.
If you want to cancel the page it's easier to use the t5Component Button
component.
Add t5Component jar to you project (see
http://code.google.com/p/tapestry5-components/) and add this to
Em Fri, 29 Aug 2008 07:23:48 -0300, <[EMAIL PROTECTED]> escreveu:
Something that works wonderfully with any kind of resource (imagens, CSS,
etc) is to use the asset prefix:
alt="bl" />
It works regardless of where your template is and what URL it has.
Thiago
--
Thanks for the fast reply Martijn; that fixed the GIF asset.
However, I am still having problems with the Cancel button. I can
reference the Administration page as an asset, but obviously it then
does not get processed by Tapestry.
Thoughts, anyone?
p.
Quoting Martijn Brinkers <[EMAI
I think the following happens
The gif is requested by your page because of the IMG so the GET for the
IMG looks something like
http://YOUR_DOMAIN/YOUR_PAGE/bl_red_hundred.gif
Now you page assumes this is your activation context and tries to
convert it to int (which it's not).
I think you can so
I don't quite understand why the following does not work and produces:
TapestryModule.RequestExceptionHandler Processing of request failed
with uncaught exception: Exception in method
uk.bl.dportal.pages.EditUser.onActivate(int) (at EditUser.java:40),
parameter #1: Coercion of bl_red_hundre
Hello,
With 5.13 and 5.14, I have a strange behavior when I add an onActivate
method in a super class. The methods are not called in the same order
in my child class.
public class ParentPage {
}
public class ChildPage extends ParentPage {
public void onActivate(Entity e) {
System.out.print
Before 5.0.13, if onActivate() appeared in a subclass and its parent,
Tapestry used to jump in and call both. From 5.0.13 it seems to
follow the normal Java convention, ie. only the subclass method is
called, so it is up to the subclass to call the parent if that's what
you want. I ran a
Em Sun, 22 Jun 2008 04:09:30 -0300, Geoff Callender
<[EMAIL PROTECTED]> escreveu:
Furthermore, since T5.0.13, the parent class's onActivate() is no longer
called if it's been overridden in the child class (see
https://issues.apache.org/jira/browse/TAPESTRY-2311 ). Now you must
ensure the
Furthermore, since T5.0.13, the parent class's onActivate() is no
longer called if it's been overridden in the child class (see https://issues.apache.org/jira/browse/TAPESTRY-2311
). Now you must ensure the child class's onActivate() calls
super.onActivate(), or else the security is lost. T
Hi,
Both PageRenderRequestFilter and ComponentEventRequestFilter receives a
context that includes the page name. Why not use that?
The following post might be of use:
http://www.mail-archive.com/users@tapestry.apache.org/msg21568.html
-Filip
Ned Jackson Lovely skrev:
On Sun, Jun 8, 2008 at
On Sun, Jun 8, 2008 at 5:00 AM, maxthesecond <[EMAIL PROTECTED]> wrote:
> As for loggin the request-filter option is very attractive, all that crap in
> just one place.
I've been wondering about the request filter... To determine which
page is being accessed, I've been parsing the path myself, usi
I must admit that i'm not
fully "prepared" to get it right so thanks to point me there although
sometimes is very hard to find documentation about those events...
Thanks
--
View this message in context:
http://www.nabble.com/T5-onActivate-tp17673637p17716824.html
Sent from the
I just read the tail end of the conversation, but I wanted to add something.
I try to use onActivate to capture parameters from the url, and maybe do
minimal translation/validation of those inputs. But I do the actual
work within the setupRender. That way it doesn't matter how many
onActivat
Glad to know there is consensus about it ,I'll check the RequestFilter and
let the onActivate for the page tasks (reloading objects.)
Thanks
--
View this message in context:
http://www.nabble.com/T5-onActivate-tp17673637p17710792.html
Sent from the Tapestry - User mailing list archi
I have to agree with Filip and I'll state it a bit more strongly: if you
are using onActivate for access control your app will suffer from
significant maintenance issues that will only get worse and more complex
with each page you add, and even nastier if your access control logic's
requirements ev
page.
Nevertheless, perhaps your aproach is better, so thanks for the information
I'll try to see how to implement it.
Thanks
--
View this message in context:
http://www.nabble.com/T5-onActivate-tp17673637p17709884.html
Sent from the Tapestry - User mailing l
Hi,
The documentation clearly states that they will all be called as well as
the order they will be called in.
I don't check login etc. in onActivate, I use request filters for that.
But it's your app, not mine, so do as you please. :)
-Filip
On 2008-06-07 12:58, maxthesecond wrote:
Well,
many places.
--
View this message in context:
http://www.nabble.com/T5-onActivate-tp17673637p17707583.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For addit
Hi,
I frequently have multiple onActivate methods as well. Tapestry will
look at the context and see how many parameters there are - let's say
there are n parameters. It will then call the method with n parameters -
or if none can be found, the one with n-1 parameters, then n-2
parameters and
e, I'm happy with my solution.
Thanks
--
View this message in context:
http://www.nabble.com/T5-onActivate-tp17673637p17706350.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
-
To unsubscribe, e-ma
vate they are all called so
> better to just have one..
> --
> View this message in context:
> http://www.nabble.com/T5-onActivate-tp17673637p17695969.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---
you have more than one onActivate they are all called so
better to just have one..
--
View this message in context:
http://www.nabble.com/T5-onActivate-tp17673637p17695969.html
Sent from the Tapestry - User mailing list archive at Nabble.com
od to be the first allways called giving you a
chance to switch page or whatever
Does it exist such method? OnPageActivateBeforeRender
I'm a bit confused regarding the state diagram of the requests in tapestry
Thanks
--
View this message in context:
http://www.nabble.com/T5-
p")+4)+"/images/"+plusImage;
img.src=s;
So the trick is to remove the part of the URI that gets out of the scope.
--
View this message in context:
http://www.nabble.com/T5-OnActivate-tp17583640p17597422.html
Sent from the Tapestry - User mailing list a
correct page with a weird context.
How to solve it? don't know I'll try tomorrow!
thanks
--
View this message in context:
http://www.nabble.com/T5-OnActivate-tp17583640p17590070.html
Sent from the
ee component to fill then I get no more console exception, but of course
the tree is no longer filled.
BTW there are no "images" anywhere
Thanks
--
View this message in context:
http://www.nabble.com/T5-OnActivate-tp17583640p17583640.html
Sent from the Tapestry - User
Hi Davor,
Indeed, I have a BasePage that implements the public void onActivate()
{}method.
In my subpage I also have implemented the public void onActivate() {}.
The code in onActivate() of my subpage is executed twice.
BASEPAGE:
public void onActivate() {
String pageName = resources.g
you have to be more specific,
same OnActivate method will not be called more than once in normal
circumastances,
but overriding onActivate from a base class I belive can cause this ...
some code would be useful.
Davor Hrg
On Mon, Apr 21, 2008 at 12:41 PM, Leon Derks <[EMAIL PROTECTED]> wrote:
Hi,
I noticed that my onActivate() is called twice.
I solved the problem by changing onActivate() into onActivate(Object[]
parameters).
Now it is only called once. But is this the way to do this or is there a
better way?
greetings,
Leon
--
Yes it does, if the onActivate() methods are in different places.
There's a very explicit order, base classes handle events before
subclasses. Within a class, its handled alphabetically (ascending)
and by parameter count (descending, for a single method name with
multiple overrides).
What you may
Howard,
I'm on 5.0.6. I'll try to boil this down to a simple test case and file
a JIRA. It might have something to do with the page inheritance I'm
using? ThisPage -> EditBasePage -> BasePage. The onActivate() and
onActivate(Integer) methods are on ThisPage. Would this make a
difference?
Tha
Please add to JIRA.
On Nov 24, 2007 9:09 PM, Andy Huhn <[EMAIL PROTECTED]> wrote:
> Hi Howard,
>
> I am on 5.0.6. The behavior you described here is what I expected to
> see (I have onActivate() with one parameter, and onActivate() with 0
> parameters, and I expected to see onActivate() with one
Hi Howard,
I am on 5.0.6. The behavior you described here is what I expected to
see (I have onActivate() with one parameter, and onActivate() with 0
parameters, and I expected to see onActivate() with one parameter
executed first...but that was not the case).
Should I file a JIRA? It sounds lik
You are using 5.0.5? I believe 5.0.6 has a fix for this, wherein the
method invocation order is by number of parameters, decreasing.
You may have to do:
Object onActivate(Object[] context)
{
...
}
And check the context count explicitly, and convert the context values
explicitly, if you are on
Hello,
I'm having a problem with onActivate(). Here are my questions:
1) Why is onActivate() called when a context variable is included in the
URL?
2) Is there a way to prevent onActivate() from being called until AFTER
onActivate(Integer prmPrimaryKey) is called?
Here's my dilemma: I want to us
The onActivate(Object[]) solution works well, thanks.
I've opened an enhancement request in JIRA to track this change, too:
https://issues.apache.org/jira/browse/TAPESTRY-1295
On 2/23/07, Howard Lewis Ship <[EMAIL PROTECTED]> wrote:
Yes, this is tricky and I'm thinking I'm not happy with the
Yes, this is tricky and I'm thinking I'm not happy with the way it
currently works.
Your best option is to implement onActivate(Object[]) and do any
coercions from there. This will be invoked regardless of the number
of values in the context (even zero).
I'm thinking the change will be: a meth
Hi,
I'm using the activate / passivate infrastructure in T5, and have a question
about it. I have the following methods on a search page:
public String onPassivate() {
return this.jurisdiction;
}
public void onActivate(String jurisdiction) {
this.jurisdiction = jurisdicti
70 matches
Mail list logo