You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Eli Doran <el...@gmail.com> on 2005/07/09 14:24:06 UTC

Picasso State Objects

Is there a way to check the existence of state objects pro grammatically? 

If not, could we instead of injecting a get method with no arguments 
inject a get method taking a boolean representing whether you want the 
state object created?

also, without code access there is no OGNL version so you can't combine 
a check for a state object with other tests. for example, if you wanted 
to check for an 'admin' object to make sure they are logged in, then 
also check to make sure that admin has an acceptable rating for 
accessing that resource you can't combine the test into one condition. 
condition="state:admin"  doesn't allow putting any OGNL in there like 
condition="states.admin && states.admin.rating > 100".  right?

what do you think?

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Picasso State Objects

Posted by Eli Doran <el...@gmail.com>.
being able to inject a flag for the state object would be great. it's 
just what i need. i would definitely appreciate a non-annotation version 
as I am unable to use Java 1.5 with this client.  hivemind detective 
work is under the way but i'm just not too competent with it yet.

thank you for the response,
eli

Howard Lewis Ship wrote:

>This looks, to me, like you really want two different injections:
>
>1) inject the state (as today; acessing property creates the object)
>2) inject a flag indicating if the state already exists
>
>So we should concentrate, I think, on an injection type and/or
>annotation for the latter.
>
>Of course; since these are based on extensible HiveMind configuration
>points, you don't have to wait for the framework to provide it!  Yes
>-- I realize that it would take a lot of detective work (hopefully not
>too much) to figure out how to do this ... but again, that's the
>reason for HiveMind integration, to allow you to extend and add your
>own injection types, annotations, etc. and have those integrate
>seamlessly in with what Tapestry already does.
>
>On 7/9/05, Eli Doran <el...@gmail.com> wrote:
>  
>
>>Is there a way to check the existence of state objects pro grammatically?
>>
>>If not, could we instead of injecting a get method with no arguments
>>inject a get method taking a boolean representing whether you want the
>>state object created?
>>
>>also, without code access there is no OGNL version so you can't combine
>>a check for a state object with other tests. for example, if you wanted
>>to check for an 'admin' object to make sure they are logged in, then
>>also check to make sure that admin has an acceptable rating for
>>accessing that resource you can't combine the test into one condition.
>>condition="state:admin"  doesn't allow putting any OGNL in there like
>>condition="states.admin && states.admin.rating > 100".  right?
>>
>>what do you think?
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
>>    
>>
>
>
>  
>

Re: Picasso State Objects

Posted by Howard Lewis Ship <hl...@gmail.com>.
This looks, to me, like you really want two different injections:

1) inject the state (as today; acessing property creates the object)
2) inject a flag indicating if the state already exists

So we should concentrate, I think, on an injection type and/or
annotation for the latter.

Of course; since these are based on extensible HiveMind configuration
points, you don't have to wait for the framework to provide it!  Yes
-- I realize that it would take a lot of detective work (hopefully not
too much) to figure out how to do this ... but again, that's the
reason for HiveMind integration, to allow you to extend and add your
own injection types, annotations, etc. and have those integrate
seamlessly in with what Tapestry already does.

On 7/9/05, Eli Doran <el...@gmail.com> wrote:
> Is there a way to check the existence of state objects pro grammatically?
> 
> If not, could we instead of injecting a get method with no arguments
> inject a get method taking a boolean representing whether you want the
> state object created?
> 
> also, without code access there is no OGNL version so you can't combine
> a check for a state object with other tests. for example, if you wanted
> to check for an 'admin' object to make sure they are logged in, then
> also check to make sure that admin has an acceptable rating for
> accessing that resource you can't combine the test into one condition.
> condition="state:admin"  doesn't allow putting any OGNL in there like
> condition="states.admin && states.admin.rating > 100".  right?
> 
> what do you think?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org