t;Tapestry users"
Kopie
Thema
Re: T5: ASO in HttpServletRequestFilter
Obvious: Because you can't access the HttpServletRequest from within the
RequestFilter to access methods such as getRequestUri() (needed by 3rd
party
library being called in the filter).
If I didn't have
From: "Robert Zeigler" <[EMAIL PROTECTED]>
To: "Tapestry users"
Sent: Tuesday, May 13, 2008 10:43 AM
Subject: Re: T5: ASO in HttpServletRequestFilter
Why not use a RequestFilter, instead?
You can access the ApplicationStateManager from withing a RequestFilter.
Robert
On
Why not use a RequestFilter, instead?
You can access the ApplicationStateManager from withing a RequestFilter.
Robert
On May 13, 2008, at 5/139:41 AM , kranga wrote:
Version: 5.0.11
It appears that if you inject an application state manager into an
HttpServletRequestFilter and try to access
Version: 5.0.11
It appears that if you inject an application state manager into an
HttpServletRequestFilter and try to access an ASO, you get a null pointer
exception since the Tapestry Request object has still not been set up. This
means that if you do need to access an ASO, you are forced to
On Sun, 2008-05-11 at 16:15 +0200, Filip S. Adamsen wrote:
> You can still use an ApplicationStateCreator. Just instantiate the ASO
> in the creator and set the values wherever you want after its creation.
Ha, you're right, I simply want to invoke the default constructor - I
forgot this ;)
Thanx
You can still use an ApplicationStateCreator. Just instantiate the ASO
in the creator and set the values wherever you want after its creation.
-Filip
On 2008-05-11 16:12, Martin Grotzke wrote:
On Sun, 2008-05-11 at 15:13 +0200, Filip S. Adamsen wrote:
Hi,
Tapestry is trying to inject service
On Sun, 2008-05-11 at 15:13 +0200, Filip S. Adamsen wrote:
> Hi,
>
> Tapestry is trying to inject services into your ASO's constructor. In
> 5.0.12-SNAPSHOT you can put @Inject on the constructor Tapestry should
> use when auto-instantiating.
Ok, thanx! This will solve our issue when we can upgr
Hi,
Tapestry is trying to inject services into your ASO's constructor. In
5.0.12-SNAPSHOT you can put @Inject on the constructor Tapestry should
use when auto-instantiating.
Until you can upgrade to 5.0.12 I guess a workaround would be to
contribute and ApplicationStateCreator for your ASO.
Hi,
I'm just upgrading our app from 5.0.10-SNAPSHOT to 5.0.11 and get
exceptions for ASOs that have a non default constructor (additionally to
the default constructor):
Caused by: java.lang.RuntimeException: Error invoking constructor
com.freiheit.shopping24.shop.search.model.AnalysedSearchParam
--
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/T5-ASO---Services-tp17134860p17145265.html
Sent from the Tapestry - User
What? It's not uncommon to have methods on an ASO. You can also inject
services into it when creating it if you use an ApplicationStateCreator.
The relevant docs on Application State has an example at the bottom.
-Filip
maxthesecond skrev:
oopss!
I think I missed the point
the ASO aplication
oopss!
I think I missed the point
the ASO aplication state object is merely a container for sharing
information across pages and time it shall not have metods, so I'll do as
you say.
thanks again
--
View this message in context:
http://www.nabble.com/T5-ASO---Services-tp17134860p17141903
ces, such is the destiny of frameworks: give
>> satisfaction to all needs
>>
>> Thanks and never mind !
>> --
>> View this message in context:
>> http://www.nabble.com/T5-ASO---Services-tp17134860p17134860.html
>> Sent from the Tapestry - User ma
t; satisfaction to all needs
>
> Thanks and never mind !
> --
> View this message in context:
> http://www.nabble.com/T5-ASO---Services-tp17134860p17134860.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
>
ing was the oposit; how to acces
> the ASO from a Services, such is the destiny of frameworks: give
> satisfaction to all needs
>
> Thanks and never mind !
> --
> View this message in context:
> http://www.nabble.com/T5-ASO---Services-tp17134860p17134860.html
>
the ASO from a Services, such is the destiny of frameworks: give
satisfaction to all needs
Thanks and never mind !
--
View this message in context:
http://www.nabble.com/T5-ASO---Services-tp17134860p17134860.html
Sent from the Tapestry - User mailing list archiv
rnate retrieval.
Jonathan
> -Original Message-
> From: Kheldar666 [mailto:[EMAIL PROTECTED]
> Sent: Sunday, February 03, 2008 5:49 PM
> To: users@tapestry.apache.org
> Subject: RE: [T5] ASO, BeanEditor and Interfaces
>
>
> Yes ! that was it :)
>
> I inde
stry.apache.org/tapestry5/tapestry-core/guide/appstate.html
>
> Also, you can make sure your UserImpl constructor instantiates an empty
> Address object.
>
> Jonathan
>
>
>> -Original Message-
>> From: Kheldar666 [mailto:[EMAIL PROTECTED]
>> Sent: S
stry-core/guide/appstate.html
Also, you can make sure your UserImpl constructor instantiates an empty
Address object.
Jonathan
> -Original Message-
> From: Kheldar666 [mailto:[EMAIL PROTECTED]
> Sent: Sunday, February 03, 2008 1:53 PM
> To: users@tapestry.apache.org
> Subject
mplements User {
> >> >> //An implementation with Hibernate annotation for instance
> >> >> }
> >> >>
> >> >> Everywhere in Tapestry we use Interfaces for the IoC. But if I declare
> >> >> somewhere :
> >> >
t;> somewhere :
>> >>
>> >>
>> >> @ApplicationState
>> >> private User _user
>> >>
>> >>
>> >> I have an InstanciationExcepti
Impl and it tries to
> >> instanciate
> >> an Interface).
> >>
> >> So my question is : is there a way to tell Tapestry to instanciate the
> >> right
> >> class and not the Interface (may be via contributing to some Service
> >> c
rface).
>>
>> So my question is : is there a way to tell Tapestry to instanciate the
>> right
>> class and not the Interface (may be via contributing to some Service
>> configuration or something ) ? Or should I wrote a simple data object
>> that
>> can be direc
tion or something ) ? Or should I wrote a simple data object that
> can be directly instanciated and some kind of translator that would convert
> my Data Object into the class used by my internal services ?
> --
> View this message in context:
> http://www.nabble.com/-
ation or something ) ? Or should I wrote a simple data object that
can be directly instanciated and some kind of translator that would convert
my Data Object into the class used by my internal services ?
--
View this message in context:
http://www.nabble.com/-T5--ASO%2C-BeanEditor-and-Inter
as I had moved the class and the exception showed up on the next
refresh.
Still it would be nice for Tapestry to report more precisely what has
happened, if that's possible.
Stephan
--
http://www.stephan-schwab.com
--
View this message in context:
http://www.nabble.com/T5---ASO-cannot-be-in-the-sam
By putting the ASO class into the pages package, Tapestry created an
enhanced version of the ASO class, as if it were a component. This
enhanced class is in the class loader used for pages, components and
mixins. The reference to the ASO in the page is a reference to the
enhanced version, not the
Hi Peter,
I see your point. Any class in the pages package can be accessed
through an URL and it doesn't make sense to store anything else than
pages there.
But on the other hand, the behaviour that I reported is totally
obscure and not in line with the nice error reporting of tapestry. If
someb
I beleive you are supposed to put only your page classes in the page
folder. Refer tapestry 5 tutorial, page 19.
Anjana Gopinath
On Mar 22, 2007, at 10:07 AM, Bogdan Calmac wrote:
After creating my own ASO object, I kept getting the
ClassCastExeception below when accessing it, until
Not 100% sure, but it seems like Tapestry has designated
my.package.pagesfor Tapestry Pages (convention) and
my.package.components for Tapestry Components (convention again). So
Tapestry will treat the classes in those packages as pages/components
respectively. It is likely a better idea anyway to
After creating my own ASO object, I kept getting the
ClassCastExeception below when accessing it, until I had the
inspiration to move the ASO in a different package than the page. Then
it worked fine. Is this just a bug or intentional design?
This is the exception (with 5.0.3). The ASO reader thr
Thats true. My code is more clean now!!
Thanks to everyone who helped me out, i am almost done with my mini
project in Tapestry 5. This is the 5th day since i started it, i
wouldnt have reached here without the support of this community.
Thanks!!!
Anjana Gopinath
On Mar 21, 2007, at
I like these discussions, and I really like that they tend to end in a
conclusion that good code conventions and good code design seems to be
the solution to the "problem".
T5 encourage one to do things "right".
2007/3/20, Anjana Gopinath <[EMAIL PROTECTED]>:
Thanks Robert!
Anjana Gopinath
Tru
Thanks Robert!
Anjana Gopinath
True North Technology
11465 John's Creek Parkway, Suite 300
Duluth, GA 30079
[EMAIL PROTECTED]
On Mar 20, 2007, at 5:47 PM, Robert Zeigler wrote:
Tapestry works its magic using runtime type information, and since
generics in java were implemented using type
Tapestry works its magic using runtime type information, and since
generics in java were implemented using type erasure, the two types
will be the same at runtime.
So you'll need to wrap the two lists in some type of enclosure, just
like with the pricing information.
Robert
On Mar 20, 200
Thanks Howard for explaining. It makes sense.
But what if i want to store a list of objects as a ASO?
For example
public ArrayList appList;
public ArrayList networkList;
Both the above are of type List, but list of two objects. Will this
be an issue?
Anjana Gopinath
True North Technolog
T4 allowed multiple ASOs of the same type, however each and every ASO
had to be defined with a unique name, plus an XML snippet to identify
how to instantiate it.
This violated the Dont Repeat Yourself principle, since you had to
know and repeat the ASO name on every use throughout the applicatio
Robert
Thanks for explaining and i perfectly understand your point. But i
still feel this is a restriction as i cant have ASOs of same type.
Anyway, right now i can continue with the way you suggested. Thanks!
Anjana Gopinath
True North Technology
11465 John's Creek Parkway, Suite 300
Duluth,
I see it as simplification rather than a restriction.
I guess I don't normally store application state in a bunch of
separate strings; rather, I always store state in one or more POJO's,
exactly analogous to the Pricing object. So, for me, less mess,
because I don't have to have a bunch of e
Thanks Robert for responding.
I can do that, but was wondering why there is a restriction like this?
Anjana Gopinath
True North Technology
11465 John's Creek Parkway, Suite 300
Duluth, GA 30079
[EMAIL PROTECTED]
On Mar 20, 2007, at 4:29 PM, Robert Zeigler wrote:
Correct.
Why not create,
Correct.
Why not create, say, a "Pricing" object with "enterprisePrice" and
"clientPrice" properties?
Then you could do:
@ApplicationState
private Pricing _pricing;
Then you have one less injection to do/page that requires pricing
information. :)
Robert
On Mar 20, 2007, at 3/203:26 PM ,
Hi
I am trying to use few ASO's so share data across the pages. I have
declared the following, but looks like if one gets a value, the
second varaible also gets the same value. Is it not possible to
define different ASO's of same type?
@ApplicationState
private String enterprisePrice;
42 matches
Mail list logo