Hi,
Is there a way to redirect the page under onActivate? example: there might
be a logical error detected and program will direct user to another page
instead of the original one, possible? Thanks.
A.C.
--
View this message in context:
http://www.nabble.com/T5%3A-redirecting-page-under-onActiv
You can return an object that represents the page you want to redirect to.
The allowed objects are described here:
http://tapestry.apache.org/tapestry5/tapestry-core/guide/pagenav.html
Josh
On 9/19/07, Angelo Chen <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> Is there a way to redirect the page under
Hi Josh,
Thanks, it works, a related question, how to redirect the page to the one
calling? sometimes we don't know which one is "calling page", so we can't
use page class/name to redirect, any idea? Thanks.
A.C.
Josh Canfield-2 wrote:
>
> You can return an object that represents the page you
Just return null.
On 9/19/07, Angelo Chen <[EMAIL PROTECTED]> wrote:
>
> Hi Josh,
>
> Thanks, it works, a related question, how to redirect the page to the one
> calling? sometimes we don't know which one is "calling page", so we can't
> use page class/name to redirect, any idea? Thanks.
> A.C.
>
Hi Marcus,
Example: both Home.html and Other.html has a link to Member, when the link
is clicked, Member.class' onActivate will be called, if I return null, it
displays Member.html, but I'd like to display Home or Other if there is
validation error, possible?
If not possible, is there a way to p
Hi,
I tried the example under 'Render request only' in the following link, if I
remove the :
long onPassivate() { return _productId; }
still works, what's the use of it? thanks.
http://tapestry.apache.org/tapestry5/tapestry-core/guide/pagenav.html
--
View this message in context:
http://www.nab
I suspected you meant this. You'll have to persist the "caller" somehow.
If you're using a base page class you could store it in an ASO there.
Cheers,
Nick.
Angelo Chen wrote:
Hi Marcus,
Example: both Home.html and Other.html has a link to Member, when the link
is clicked, Member.class' onAct
It's a way of persisting the product id into the link context.
Client side persistence to avoid using the sesssion.
That would be important for links on the detail page.
Cheers,
Nick.
Angelo Chen wrote:
Hi,
I tried the example under 'Render request only' in the following link, if I
remove the
Hi Johan,
If you create a new project, using tutorial, and import to Eclipse, under
"Maven2 Dependencies".
- commons-codec...
- commons-logging...
- javassist...
- junit
- log4j.
- tapestry-core-5.0.5.jar
- tapestry-ioc-5.0.5.jar
- testng...
Marcus
Hi Angelo,
Maybe this hel with your first question:
public class ProtectedPage
{
@ApplicationState
private Visit _visit;
public Visit getVisit() { return _visit; }
public void setVisit(Visit _visit) { this._visit = _visit; }
public Object onActivate()
{
if (!_vis
I can't copy any code but I can definitely describe it without issue.
One of the main ajax components created was a widget wrapper for dynamic
content. It takes a widget configuration which is defined by various
contributions to the widget service. Part of that is a page name and a block
name
I am trying to create and use a trivial custom library.
Here is the component:
TestComp.java:
package com.test.components;
public class TestComp {
public String getMessage() {
return "Test message";
}
}
TestComp.html:
http://tapestry.apache.org/schema/tapestry_
Hi Nick,
I think so, one way to persist caller is, adding a t:id, here is what I do:
< a t:type="pagelink" page="Member" context="rowBltn.id"
t:id="Home">${RowBltn.name} a>
the rendered page will have something like this:
/myapp/member/6
Now, is there a way to access this id in the onActivat
Thanks.
Marcus-11 wrote:
>
> Hi Angelo,
>
> Maybe this hel with your first question:
>
>
--
View this message in context:
http://www.nabble.com/T5%3A-redirecting-page-under-onActivate-tf4479292.html#a12775141
Sent from the Tapestry - User mailing list archive at Nabble.com.
-
hmm, I am no tapestry expert but when you refer to component as
would not your class have to live under the FQN of
com.test.components.test.TestComp?
Yours looks like it is com.test.components.TestComp
Alex.
On 9/19/07, Kolesnikov, Alexander GNI
<[EMAIL PROTECTED]> wrote:
> I am trying
Well, I modeled this after FCKEditor which works wonderfully... While my
stuff doesn't.
Also, "test" prefix is defined in the library module. It should tell
Tapestry that "test" means "com.test", and it should probably figure out
that any components will be in the components subpackage.
-Orig
Hi Nick,
It is still not clear to me, example:
< a t:type="pagelink" page="member" context="rowBltn.id" > which generates:
< a href="/myapp/member/4" id="pagelink_11" />
and the onActivate already has access to the id(4 in this case) without the
need to use onPassivate,
public Class onActiva
Hi Howard,
I thought it was intended, already found a way how to use it: it can
modify template in the run time achieving effects similar to Titles, but
have not yet tested it. anyway, it's a bug, so will not bother:)
A.C.
Howard Lewis Ship wrote:
>
> This is a known bug, and fixed. When usi
So now try to add an ActionLink to the detail page ...
Cheers,
Nick.
Angelo Chen wrote:
Hi Nick,
It is still not clear to me, example:
< a t:type="pagelink" page="member" context="rowBltn.id" > which generates:
< a href="/myapp/member/4" id="pagelink_11" />
and the onActivate already has a
Angelo,
On a pretty creepy workaround, you can have, on the Member page, an String
attribute named caller that you can set with the "Other" or "Main"
values(depending on who called it) and you can return it on the Member's
onActivate method...
2007/9/19, Angelo Chen <[EMAIL PROTECTED]>:
>
>
> Tha
Angelo,
Sorry, return false (or true) is not an option, you must known the page
name. Returning null allow access.
Marcus
Finally, logging shows that contributeComponentClassResolver() method in
the library's module actually runs. Does Tapestry expect the components
not to be POJOs? Questions, questions... Will go look into the source.
-Original Message-
From: Kolesnikov, Alexander GNI
Sent: 19 September 200
The additional detail is that if I change the reference in the manifest
misspelling the module name, the application doesn't start, throwing
ClassNotFoundException. Which proves that Tapestry does read the
manifest and tries to load the library's module. Why it doesn't see the
components then?
---
Hi Alexander,
I too am curious about this - I'm in the same situation. I've started
poking into ComponentClassResolverImpl but haven't caught anything yet.
Do tell if you discover anything.
sincerely,
chris
Kolesnikov, Alexander GNI wrote:
Finally, logging shows that contributeComponentClas
Hi Chris,
The only idea I have so far is that the problem is in HTML template that
goes into the same package as the page class. I would try creating a
component without template to test this. Do not have time at the moment
though, will try later.
I suspect that T5 with its pro-Maven orientation
Thanks, Robin,
No, it's a separate JAR.
Cheers,
Alexander
-Original Message-
From: Robin Helgelin [mailto:[EMAIL PROTECTED]
Sent: 19 September 2007 15:10
To: Tapestry users
Subject: Re: [T5] Can't make custom library work
On 9/19/07, Kolesnikov, Alexander GNI
<[EMAIL PROTECTED]>
On 9/19/07, Kolesnikov, Alexander GNI
<[EMAIL PROTECTED]> wrote:
> Finally, logging shows that contributeComponentClassResolver() method in
> the library's module actually runs. Does Tapestry expect the components
> not to be POJOs? Questions, questions... Will go look into the source.
Are yo
Hmm - I'm not sure about this. According to the component template docs
the template should live beside the component class (same package). I'm
using the quickstart archetype, so my source files (template and java)
physically exist in different directories, but when compiled end up in
the same
I have my page in the package
xxx.pages
It does not matter if I put the abstract BasePage parent class to my page in
xxx.base or not. Tapestry complains about
BasePage: method ()V not found
If I add that constructor to my parent class the page works (almost)
as expected.
It gets even stranger sin
Check out Alias and AliasOverrides:
http://tapestry.apache.org/tapestry5/tapestry-core/guide/alias.html
Also search the users list for previous override discussions.
Cheers,
Nick.
Fernando Padilla wrote:
I need to figure out how to override the default PageResponseRenderer. I
just tried to bi
Another option for remembering where you have come from is to tell the page
explicitly.
In Member have @Persist private Link _lastPageLink;
In Home/Other have @InjectPage private Member _memberPage;
You can use an action link handler to go to the page
protected Link getGotoMemberLink() {
Object
Ok I've made some progress.
First of all, my component not loading issue was a problem with
eclipse/maven plugin. As I said I created a different project for my
test component lib, also using maven, and used mvn install to install
the artifact to my local repo. I manually added this artifact a
On 9/19/07, Chris Lewis <[EMAIL PROTECTED]> wrote:
> folder icon with the same name as my test lib project. I verified this
> was caused by my pom entry by removing the dep from the pom and cleaning
> the project. So to confirm this test I created a "normal" user library
> (called "Mine") and manua
Thanks Robin. I'm using the jetty plugin for eclipse to run the app. I'm
not sure what you mean by "eclipse-project" or "jar-file" - are these
eclipse settings or variables? The m2 plugin really seems clumsy about
using artifacts from other eclipse projects..
Robin Helgelin wrote:
On 9/19/07,
On 9/19/07, Chris Lewis <[EMAIL PROTECTED]> wrote:
> Thanks Robin. I'm using the jetty plugin for eclipse to run the app. I'm
> not sure what you mean by "eclipse-project" or "jar-file" - are these
> eclipse settings or variables? The m2 plugin really seems clumsy about
> using artifacts from other
Howard stated previously that he considers this a bug.
Please log a JIRA.
Cheers,
Nick.
Chris Lewis wrote:
Note that this WILL NOT work:
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
Oops, just checked and it looks like this is correct behaviour.
"testlib.TestComp" _used_ to work, but I guess that was a bug.
Looks like Howard wants only one way to specify a component.
Pity that one way is different for tags and attributes.
Cheers,
Nick.
Nick Westgate wrote:
Howard stated
I'm teaching myself Tapestry by jumping right into version 5. I'm a
pretty experienced developer and so I'm not ready to give up and go
back to version 4, but I am having what is probably a very basic
problem...
I'm trying to do the Tapestry 5 tutorial and I'm on the section where
we coun
Background: I've never "done" the T5 tutorial.
But I do have functional T5 apps.
Few things:
1) In T5, multiple annotations/item are supported
2) You don't need to persist the page. You might need to persist
values that each page needs, but you don't need to persist the pages.
3) Tapestry will
Thank you! That was it - declaring it private fixed it:
private GameOver _gameOver;
I now just inject the page but don't persist it.
I'll have to try to read up on what you mean by 'enhance private
variables'...
R
On Sep 19, 2007, at 8:20 PM, Robert Zeigler wrote:
Background: I've never
See "Instance variables must be private":
http://tapestry.apache.org/tapestry5/tapestry-core/guide/component-classes.html
Cheers,
Nick.
Robert A. Decker wrote:
Thank you! That was it - declaring it private fixed it:
private GameOver _gameOver;
I now just inject the page but don't persist it.
Hate to bump my own thread, but i'd really like some feedback before i
post a bug on jira.
If i'm not mistaken, this will be a problem for anyone using tapestry-hibernate.
Summary: I think HibernateSessionManagerImpl needs to be closing
sessions on thread cleanup.
On 9/18/07, lasitha <[EMAIL PROT
I had to add rollback logic to the HibernateSessionManager, but I didn't add
a close. I haven't seen the exception you are reporting, but I don't know
hibernate well enough to say definitively that this is ok. The session is
marked to close with the transaction commit/rollback, but I didn't see it
43 matches
Mail list logo