Re: removing attributes from session from pages other than the one setting it

2011-07-15 Thread bogdan_cm
I solved it another way:

Page X persists the session object. Page X also defines a method which
invokes componentResources.discardPersistentFieldChanges. 


I navigate to page Y. On page Y I @InjectPage X and, at the appropriate time
I invoke the method on 
page X that discards all persistent data and return a redirect link to page
X.

Being that the discard process removes session data for all subsequent
requests of page X, returning a Link from page Y will give me the exact
behavior that i need. 

Bogdan. 

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/removing-attributes-from-session-from-pages-other-than-the-one-setting-it-tp4592795p4592960.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: removing attributes from session from pages other than the one setting it

2011-07-15 Thread Taha Hafeez
One solution will be to remember the previous page and if the new page
is not the same as the old page, remove the page-specific attributes.

You can check https://github.com/argoyle/tapestry-breadcrumbs for the
first part and AbstractSessionPersistentFieldStrategy for the second
part.

But I do feel, tapestry should be doing it for us :)

regards
Taha

On Sat, Jul 16, 2011 at 7:48 AM, bogdan_cm  wrote:
> Yep, it does not solve my problem. Being on another page than the one setting
> the object in session, discarding will not remove my object of interest.
> Still digging for a solution. I wonder if I could just cast the session back
> to a Servlet HttpSession and just invoke removeAttribute from there. That
> will be leaving Tap scope a bit, so i'm reluctant to do it that way.
>
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/removing-attributes-from-session-from-pages-other-than-the-one-setting-it-tp4592795p4592891.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
>
>

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



Re: removing attributes from session from pages other than the one setting it

2011-07-15 Thread bogdan_cm
Yep, it does not solve my problem. Being on another page than the one setting
the object in session, discarding will not remove my object of interest.
Still digging for a solution. I wonder if I could just cast the session back
to a Servlet HttpSession and just invoke removeAttribute from there. That
will be leaving Tap scope a bit, so i'm reluctant to do it that way. 

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/removing-attributes-from-session-from-pages-other-than-the-one-setting-it-tp4592795p4592891.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: removing attributes from session from pages other than the one setting it

2011-07-15 Thread Kalle Korhonen
@DiscardOnPageReset discards on the next page visit which may not give
you much, depending on your situation. Tapestry-conversations still
going strong, allows you to expire pages and so on, see
http://tynamo.org/tapestry-conversations+guide.

Kalle


On Fri, Jul 15, 2011 at 6:53 PM, bogdan_cm  wrote:
> I'll have a look. Thanks very much for the reply.
>
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/removing-attributes-from-session-from-pages-other-than-the-one-setting-it-tp4592795p4592862.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
>
>

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



Re: removing attributes from session from pages other than the one setting it

2011-07-15 Thread bogdan_cm
I'll have a look. Thanks very much for the reply. 

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/removing-attributes-from-session-from-pages-other-than-the-one-setting-it-tp4592795p4592862.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: Free J2ee hosting

2011-07-15 Thread Mark Shead
Is that to keep sessions synced across multiple load balanced instances? It
wouldn't be useful on a free single instance anyway.

Mark
On Jul 15, 2011 5:30 PM, "Paul Stanton"  wrote:


Re: removing attributes from session from pages other than the one setting it

2011-07-15 Thread Josh Canfield
http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/ComponentResources.html#discardPersistentFieldChanges()

You'd need to call it on the page you want the persisted fields
discarded. Knowing when to call the method can be touchy, I believe
this article might be useful.

http://tawus.wordpress.com/2011/04/16/tapestry-magic-1-using-componentclasstransformworker/


Josh

On Fri, Jul 15, 2011 at 5:53 PM, bogdan_cm  wrote:
> Hi again everyone,
>  I have hit another snag.
>
> Page X contains a session persistent field:
>        @Persist
>        private ArrayList paginatedResults;
>
> I am navigating away from page X to page Y. On page Y I want to remove the
> persisted object "paginatedResults" from the session.
>
> I am looking at the Tap Session Interface and it seems to be missing the
> removeAttribute() method of HttpSession.
> If I were on page X, the one that actually persists the object, i would use
> discardPersistentFieldChanges method from ComponentResources, but I am not.
>
>  What would be the solution for me to remove the persisted object from
> session?
>
>
> Thanks very much,
> Bogdan.
>
>
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/removing-attributes-from-session-from-pages-other-than-the-one-setting-it-tp4592795p4592795.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
>
>

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



removing attributes from session from pages other than the one setting it

2011-07-15 Thread bogdan_cm
Hi again everyone, 
  I have hit another snag. 

Page X contains a session persistent field:
@Persist
private ArrayList paginatedResults;

I am navigating away from page X to page Y. On page Y I want to remove the
persisted object "paginatedResults" from the session. 

I am looking at the Tap Session Interface and it seems to be missing the
removeAttribute() method of HttpSession. 
If I were on page X, the one that actually persists the object, i would use
discardPersistentFieldChanges method from ComponentResources, but I am not. 

  What would be the solution for me to remove the persisted object from
session? 


Thanks very much,
Bogdan. 


--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/removing-attributes-from-session-from-pages-other-than-the-one-setting-it-tp4592795p4592795.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: Is it possible to access @SessionState at the "listener" level

2011-07-15 Thread Taha Hafeez
org.apache.tapestry5.ioc.Registry

regards
Taha

On Sat, Jul 16, 2011 at 3:09 AM, hese <1024h...@gmail.com> wrote:
>
> Which class do I cast it to?
>
> = (??) servletContext.getAttribute(TapestryFilter.REGISTRY_CONTEXT_NAME);
>
> Looks like tapestry IOC is a bunch of classes? Not sure which one to use.
>
> Thanks!!
>
>
>
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Is-it-possible-to-access-SessionState-at-the-listener-level-tp4591912p4592377.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
>
>

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



Re: Free J2ee hosting

2011-07-15 Thread Paul Stanton

what's the story with cloudbees and "session store" ?

It says they don't offer it under the free account:

http://cloudbees.com/run-pricing.cb

but i can't find any definition of what they're talking about...

On 14/07/2011 12:34 PM, Taha Hafeez wrote:

Hi Mark, David

On Thu, Jul 14, 2011 at 7:31 AM, Mark  wrote:

I'm not sure if it does everything you need, but check into
www.cloudbees.com.  On the free accounts they will suspend the app
after a certain period, but it only takes a few seconds to come back
up.  Cloudbees deployment process is very nice.  They have a maven
plugin that uploads just the diff of the war (or something like that).
  Deployment is very fast even if you are on a slow connection.


Thanks, I registered with cloudbees.com and am waiting for their response


If that doesn't look like it will work, lets talk about what you need.
If I can provide what you need, I'd be happy to setup a virtual server
for you to use on a VMWare servers.


What I want is to provide examples/demos for my blog posts at Java
Magic so that a newbie can easily see the result before reading the
post.

I also want to write a cookbook kind of a tutorial for tapestry&
plastic which will be backed by these demos. This will be something
like a jumpstart but tutorial style.


Mark


regards
Taha


On Wed, Jul 13, 2011 at 8:54 PM, Taha Hafeez  wrote:

Hi

I was thinking of hosting working demos of Java Magic and examples
that shared on the mailing list. Is there any free hosting available
for such open source projects. The ones I found require a restart
after every 4 hours which is not feasible for me.

regards
Taha

-
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: Is it possible to access @SessionState at the "listener" level

2011-07-15 Thread hese

Which class do I cast it to?

= (??) servletContext.getAttribute(TapestryFilter.REGISTRY_CONTEXT_NAME);

Looks like tapestry IOC is a bunch of classes? Not sure which one to use.

Thanks!!



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Is-it-possible-to-access-SessionState-at-the-listener-level-tp4591912p4592377.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: Tapestry Hibernate / hibernate3-maven-plugin

2011-07-15 Thread Thiago H. de Paula Figueiredo
Another way, my preferred, is to use Hibernate's SchemaExport class and  
generate the DDL to a file. As far as I can imagine, the Maven plugin and  
the Ant task are just ways of using that class.


On Fri, 15 Jul 2011 17:23:49 -0300, Mark  wrote:


I'm not sure if this helps, but you should be able to generate the ddl
without using the maven plugin.  So if tapestry-hibernate can talk to
the db, it should be able to create the schema.

You'll need something like:
create

or

update

in hibernate.cfg.xml

Mark

On Fri, Jul 15, 2011 at 11:31 AM, George Christman
 wrote:

Hello, I'm not really sure if this belongs in this mailing list, but
hopefully someone will be able to help. I'm sitting behind a firewall  
and
trying to generate a ddl using hibernate3-maven-plugin. For some reason  
it
tries to connect to hibernate without using proxy settings and fails.  
Does
anybody happen to know how to get around this issue? Sorry if I'm  
posting

this in the wrong spot.

--
View this message in context:  
http://tapestry.1045711.n5.nabble.com/Tapestry-Hibernate-hibernate3-maven-plugin-tp4591336p4591336.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




-
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: Is it possible to access @SessionState at the "listener" level

2011-07-15 Thread Thiago H. de Paula Figueiredo

On Fri, 15 Jul 2011 16:25:22 -0300, hese <1024h...@gmail.com> wrote:


Hi All,


Hi!

I have a listener registered with my servlet container which adds users  
to the servlet context as they login (so i have a list of currently  
loged in

active users). Depending on the user's settings I want to be able to set
some values in @SessionState so that I can later use it across all pages.


Get the Tapestry-IoC registry from the servlet context. Tapestry puts it  
in the TapestryFilter.REGISTRY_CONTEXT_NAME attribute. Then get the  
ApplicationStateManager service from it.


--
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: Tapestry Hibernate / hibernate3-maven-plugin

2011-07-15 Thread Mark
I'm not sure if this helps, but you should be able to generate the ddl
without using the maven plugin.  So if tapestry-hibernate can talk to
the db, it should be able to create the schema.

You'll need something like:
create

or

update

in hibernate.cfg.xml

Mark

On Fri, Jul 15, 2011 at 11:31 AM, George Christman
 wrote:
> Hello, I'm not really sure if this belongs in this mailing list, but
> hopefully someone will be able to help. I'm sitting behind a firewall and
> trying to generate a ddl using hibernate3-maven-plugin. For some reason it
> tries to connect to hibernate without using proxy settings and fails. Does
> anybody happen to know how to get around this issue? Sorry if I'm posting
> this in the wrong spot.
>
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Tapestry-Hibernate-hibernate3-maven-plugin-tp4591336p4591336.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
>
>

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



Is it possible to access @SessionState at the "listener" level

2011-07-15 Thread hese

Hi All,

I have a listener registered with my servlet container which adds users to
the servlet context as they login (so i have a list of currently loged in
active users).  Depending on the user's settings I want to be able to set
some values in @SessionState so that I can later use it across all pages.

The way I am doing it right now is - 
I have a BasePage.java from which all other pages are derived.  So, the
BasePage.onActivate method checks to see if these variables in the user
session (@SessionState) object are null. if yes it sets it.  But I fell this
is not the right way to do it as the check happens everytime any page loads. 
I want to do it just once when the user logs in.  

Is there a way to access the @SessionState object from my listener class. 
Not sure it is possible because I cannot @Inject it as the listener object
is not created by tapestry.

What is the right way to do this?

Thanks











--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Is-it-possible-to-access-SessionState-at-the-listener-level-tp4591912p4591912.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: Another case of "Block parameters are only allowed directly within component elements."

2011-07-15 Thread gs_tapestry
Thanks for getting back so quick. Yes I am using T5.2.5. I will give T5.3 a
try during the weekend and have you posted. 

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Another-case-of-Block-parameters-are-only-allowed-directly-within-component-elements-tp4585262p4591835.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: Another case of "Block parameters are only allowed directly within component elements."

2011-07-15 Thread Thiago H. de Paula Figueiredo
On Fri, 15 Jul 2011 14:35:40 -0300, gs_tapestry  
 wrote:


Caused by: java.lang.ClassCastException: java.lang.Class cannot be cast  
to java.lang.reflect.ParameterizedType
	at  
org.apache.tapestry5.ioc.internal.util.GenericsUtils.extractActualType(GenericsUtils.java:141)


Yep, it looks like a Tapestry bug. 5.2.5, right? Could you post the page  
class declaration and its superclass? It will help to find the solution.


Have you tried 5.3 to check if it works in this version?

--
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: Another case of "Block parameters are only allowed directly within component elements."

2011-07-15 Thread gs_tapestry
Here are the stack. Thanks.

EMM 54968 [http-9080-4] ERROR org.apache.tapestry5.ioc.Registry  - [ 5]
Assembling component
search/Advanced:advancedsearchcomponent.advancedsearchform.dynamicadvancedsearchform
(com.gallery.components.search.DynamicAdvancedSearchForm)
EMM 54968 [http-9080-4] ERROR
org.apache.tapestry5.services.TapestryModule.RequestExceptionHandler  -
Processing of request failed with uncaught exception: Exception assembling
root component of page search/Advanced: Exception assembling embedded
component 'advancedSearchComponent' (of type
com.gallery.components.search.AdvancedSearchComponent, within
search/Advanced): Exception assembling embedded component
'advancedsearchform' (of type
com.gallery.components.search.AdvancedSearchForm, within
search/Advanced:advancedsearchcomponent): Exception assembling embedded
component 'dynamicadvancedsearchform' (of type
com.gallery.components.search.DynamicAdvancedSearchForm, within
search/Advanced:advancedsearchcomponent.advancedsearchform): Could not
convert 'itemsFound' into a component parameter binding: Exception
generating conduit for expression 'itemsFound':
java.lang.ClassCastException: java.lang.Class cannot be cast to
java.lang.reflect.ParameterizedType
java.lang.RuntimeException: Exception assembling root component of page
search/Advanced: Exception assembling embedded component
'advancedSearchComponent' (of type
com.gallery.components.search.AdvancedSearchComponent, within
search/Advanced): Exception assembling embedded component
'advancedsearchform' (of type
com.gallery.components.search.AdvancedSearchForm, within
search/Advanced:advancedsearchcomponent): Exception assembling embedded
component 'dynamicadvancedsearchform' (of type
com.gallery.components.search.DynamicAdvancedSearchForm, within
search/Advanced:advancedsearchcomponent.advancedsearchform): Could not
convert 'itemsFound' into a component parameter binding: Exception
generating conduit for expression 'itemsFound':
java.lang.ClassCastException: java.lang.Class cannot be cast to
java.lang.reflect.ParameterizedType
at
org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.performAssembleRootComponent(ComponentAssemblerImpl.java:124)
at
org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.access$000(ComponentAssemblerImpl.java:38)
at
org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl$1.invoke(ComponentAssemblerImpl.java:82)
at
org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl$1.invoke(ComponentAssemblerImpl.java:80)
at
org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:65)
at
org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
at
org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1063)
at
org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.assembleRootComponent(ComponentAssemblerImpl.java:77)
at
org.apache.tapestry5.internal.pageload.PageLoaderImpl$3.invoke(PageLoaderImpl.java:182)
at
org.apache.tapestry5.internal.pageload.PageLoaderImpl$3.invoke(PageLoaderImpl.java:175)
at
org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:65)
at
org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
at
org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1063)
at
org.apache.tapestry5.internal.pageload.PageLoaderImpl.loadPage(PageLoaderImpl.java:173)
at $PageLoader_1312e182135.loadPage($PageLoader_1312e182135.java)
at
org.apache.tapestry5.internal.services.PageSourceImpl.getPage(PageSourceImpl.java:81)
at $PageSource_1312e182133.getPage($PageSource_1312e182133.java)
at
org.apache.tapestry5.internal.services.NonPoolingRequestPageCacheImpl.get(NonPoolingRequestPageCacheImpl.java:74)
at $RequestPageCache_1312e182132.get($RequestPageCache_1312e182132.java)
at $RequestPageCache_1312e18212d.get($RequestPageCache_1312e18212d.java)
at com.gallery.services.Module$8.handle(Module.java:547)
at
$PageRenderRequestHandler_1312e18212a.handle($PageRenderRequestHandler_1312e18212a.java)
at
org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handlePageRender(ComponentRequestHandlerTerminator.java:48)
at
org.apache.tapestry5.services.InitializeActivePageName.handlePageRender(InitializeActivePageName.java:47)
at
$ComponentRequestHandler_1312e18212b.handlePageRender($ComponentRequestHandler_1312e18212b.java)
at
$ComponentRequestHandler_1312e182124.handlePageRender($ComponentRequestHandler_1312e182124.java)
at
org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:45)
at $Dispatcher_1312e182128.dispatch($Dispatcher_1312e182128.java)
at $Dispatcher_1312e182121.dispatch($Dispatcher_

Tapestry Hibernate / hibernate3-maven-plugin

2011-07-15 Thread George Christman
Hello, I'm not really sure if this belongs in this mailing list, but
hopefully someone will be able to help. I'm sitting behind a firewall and
trying to generate a ddl using hibernate3-maven-plugin. For some reason it
tries to connect to hibernate without using proxy settings and fails. Does
anybody happen to know how to get around this issue? Sorry if I'm posting
this in the wrong spot. 

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-Hibernate-hibernate3-maven-plugin-tp4591336p4591336.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: Is possible to use an spring bean to carry a SessionState object within a dispatcher?

2011-07-15 Thread Thiago H. de Paula Figueiredo
On Fri, 15 Jul 2011 12:03:03 -0300, Luana   
wrote:



Hi again!


Hi!

We need some mechanism to know the previous page from any page.  
Therefore, we want to hide that the implementation is made with a  
sessionState object. So our idea was to save the sessionState object  
inside an spring bean.


Why don't you use the ApplicationStateManager service to get and set the  
session state object and just pass it as a method parameter to your Spring  
bean?


Without code, we can't help you on why your code doesn't work. By the way,  
try to use a PageRenderRequestFilter would be better suited than a  
Dispatcher for that.


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



Is possible to use an spring bean to carry a SessionState object within a dispatcher?

2011-07-15 Thread Luana
Hi again!

We are using tapestry 5.1.0.5, and by the moment, we can't change it.

We need some mechanism to know the previous page from any page. Therefore,
we want to hide that the implementation is made with a sessionState object.
So our idea was to save the sessionState object inside an spring bean.

We decided to contribute with a service to the Tapestry MasterDispatcher by
adding a new dispatcher (which acts before the PageRender dispatcher). Thus,
in our dispatcher we injected a bean for carrying the SSO, but we had a
problem by trying to access from different sessions. Even the id of the SSO
was different, its content was the same for all sessions.

Later, we tried to make that the bean wasn't a singleton bean, because we
thought that the problem was related to the bean itself. However, this
approach isn't useful for us because a new instance is created every time is
requested, loosing the SSO.

Finally, we decided to implement it as a SSO directly, but we would like to
know if exists a way of using the bean.

We hope for your answer.
Regards.


--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Is-possible-to-use-an-spring-bean-to-carry-a-SessionState-object-within-a-dispatcher-tp4591010p4591010.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: Another case of "Block parameters are only allowed directly within component elements."

2011-07-15 Thread Thiago H. de Paula Figueiredo
On Fri, 15 Jul 2011 10:11:16 -0300, gs_tapestry  
 wrote:


I am using T5.2.5 too. I can't reproduce it with your code either.   
Might be something else in the application as it is T5.0 based.


Please post the full stack trace so we know where exactly the exception is  
thrown.


--
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: Another case of "Block parameters are only allowed directly within component elements."

2011-07-15 Thread gs_tapestry
I am using T5.2.5 too. I can't reproduce it with your code either.  Might be
something else in the application as it is T5.0 based. Any major change in
T5.2 has particular demand in component parameter?

Thanks,
Simon

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Another-case-of-Block-parameters-are-only-allowed-directly-within-component-elements-tp4585262p4590611.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: Generic interface, issue in TML

2011-07-15 Thread Thiago H. de Paula Figueiredo
On Fri, 15 Jul 2011 09:54:42 -0300, Nicolas Gillet - MARKET-IP  
 wrote:



The type is actually the problem.
It is actually a java.lang.String but the getter and setter on it are  
defined by a generic interface :


// INTERFACE (Identifiable.java) :
public interface Identifiable {
public void setId(T id);
public T getId();
}


As far as I recall there was a JIRA about a very similar bug, maybe even  
the same. If there isn't, please post one. ;)


--
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: Zone update causes to loose js/css bound to div inside zone

2011-07-15 Thread sandeep kale

Hi,

Thanks a lot Thiago and  Derkoe for quick reply and a perfect solution.
It worked fine.

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Zone-update-causes-to-loose-js-css-bound-to-div-inside-zone-tp4579141p4589663.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: Generic interface, issue in TML

2011-07-15 Thread Nicolas Gillet - MARKET-IP
The type is actually the problem.

It is actually a java.lang.String but the getter and setter on it are defined 
by a generic interface :

// INTERFACE (Identifiable.java) :
public interface Identifiable {
public void setId(T id);
public T getId();
}

// POJO TO DISPLAY IN FORM (MyPojo.java):
public class MyPojo implements Identifiable {
private String id;
private String name;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}

// FORM TEMPLATE (TestGeneric.tml):
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";
  xmlns:p="tapestry:parameter">











// PAGE CODE (TestGeneric.java):
public class TestGeneric {
public MyPojo getMyPojoInstance() {
MyPojo pojo = new MyPojo();
pojo.setId("F7U12");
pojo.setName("Narwhal");
return pojo;
}
}

-Original Message-
From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com] 
Sent: Friday, July 15, 2011 1:45 PM
To: 'Tapestry users'; Nicolas Gillet - MARKET-IP
Subject: Re: Generic interface, issue in TML

On Fri, 15 Jul 2011 06:55:30 -0300, Nicolas Gillet - MARKET-IP  
 wrote:

> Hello,

Hi!

> org.apache.tapestry5.ioc.internal.util.TapestryException: Parameter
> 'translate' of component test/Generic:pojoid is bound to null. This
> parameter is not allowed to be null. [at
> classpath:com/marketip/geoplanning/web/pages/test/TestGeneric.tml, line  
> 11]

What's the type of Generic.pojoid?

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


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



Re: Scala + v5.3 + ${}: IntrospectionException

2011-07-15 Thread stephanos2k
Hm, I tried to debug and went to the root of the exception:
java.beans.PropertyDescriptor.findPropertyType

It seems that the read method for the 'id' field is
 /public java.lang.Object com.mycompany.sql.model.DataEntity.id()/
while the write method is
 /public void com.mycompany.sql.model.DataEntity.id_$eq(long)/

I will try a few things to see if I can somehow resolve this.

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Scala-v5-3-IntrospectionException-tp4590266p4590540.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: Scala + v5.3 + ${}: IntrospectionException

2011-07-15 Thread stephanos2k
Thanks for your reply. I tried adding @BeanProperty to the case class and it
still fails - BUT the stacktrace is different:

/Caused by: java.beans.IntrospectionException: type mismatch between read
and write methods
at
java.beans.PropertyDescriptor.findPropertyType(PropertyDescriptor.java:603)
at
java.beans.PropertyDescriptor.setWriteMethod(PropertyDescriptor.java:270)
at
org.apache.tapestry5.ioc.internal.services.PropertyAccessImpl.addPropertyIfScalaGetterMethod(PropertyAccessImpl.java:156)
 
at
org.apache.tapestry5.ioc.internal.services.PropertyAccessImpl.addPropertiesFromScala(PropertyAccessImpl.java:138)
at
org.apache.tapestry5.ioc.internal.services.PropertyAccessImpl.buildAdapter(PropertyAccessImpl.java:97)/

It appears as though somebody especially wrote methods just to handle Scala
classes, but it leaves me even more puzzled as to why it fails then.

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Scala-v5-3-IntrospectionException-tp4590266p4590494.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: Generic interface, issue in TML

2011-07-15 Thread Thiago H. de Paula Figueiredo
On Fri, 15 Jul 2011 06:55:30 -0300, Nicolas Gillet - MARKET-IP  
 wrote:



Hello,


Hi!


org.apache.tapestry5.ioc.internal.util.TapestryException: Parameter
'translate' of component test/Generic:pojoid is bound to null. This
parameter is not allowed to be null. [at
classpath:com/marketip/geoplanning/web/pages/test/TestGeneric.tml, line  
11]


What's the type of Generic.pojoid?

--
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: Scala + v5.3 + ${}: IntrospectionException

2011-07-15 Thread Thiago H. de Paula Figueiredo

Hi!

On Fri, 15 Jul 2011 08:16:58 -0300, stephanos2k  
 wrote:


I just tried to reference a variable from a Scala case class in a  
template file when I received this:

 /java.beans.IntrospectionException: type mismatch between read and
write methods/


Do you know how the bytecode of a case class' getters and setters are  
generated? I'm curious about Scala, but I haven't had the time to really  
experiment with it yet. As far as I know, Scala doesn't generate  
Java-style getters and setters for fields unless you use the @BeanProperty  
annotation. This blog has documenting the use of Scala and Tapestry  
together:  
http://fanf42.blogspot.com/2009/01/t5-scala-first-injection-and-property.html.


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



Scala + v5.3 + ${}: IntrospectionException

2011-07-15 Thread stephanos2k
I just tried to reference a variable from a Scala case class in a template
file when I received this:
 /java.beans.IntrospectionException: type mismatch between read and
write methods/

I used something like ${currentEntity.id} when the exception occured, just
${currentEntity} works.

I'm not 100% certain that it has to do with Scala, yet, but it seems like
it. I think in v5.2 it worked. 
*Does anyone have a clue why this happens or how to fix it?*

Oh, here is part of the stacktrace:
 /java.lang.RuntimeException: java.beans.IntrospectionException: type
mismatch between read and write methods
at
org.apache.tapestry5.ioc.internal.services.PropertyAccessImpl.buildAdapter(PropertyAccessImpl.java:103)
at
org.apache.tapestry5.ioc.internal.services.PropertyAccessImpl.getAdapter(PropertyAccessImpl.java:68)
/

Cheers

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Scala-v5-3-IntrospectionException-tp4590266p4590266.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: Generic interface, issue in TML

2011-07-15 Thread Nicolas Gillet - MARKET-IP
Hello,

Well actually I pasted the error I get on my real application and a
simplfied example to illustrate it.
If I really execute this example, the error is

org.apache.tapestry5.ioc.internal.util.TapestryException: Parameter
'translate' of component test/Generic:pojoid is bound to null. This
parameter is not allowed to be null. [at
classpath:com/marketip/geoplanning/web/pages/test/TestGeneric.tml, line 11]

Exactly the same ...
Well there is one differece actually, I have the error on jetty too (not
only Tomcat).

--
Nicolas.

-Original Message-
From: Christian Köberl [mailto:tapestry.christian.koeb...@gmail.com] 
Sent: Thursday, July 14, 2011 9:17 PM
To: Tapestry users
Subject: Re: Generic interface, issue in TML

Seems that your code example is not consitent. The error says there's a 
component "foreignid" but in your tml there's no such field.
Please check your example - maybe you're having the inconsistency in 
your app as well.
The problem is that it's hard to help you when you modify your example 
so, that the field in the error is not there anymore.

 > Above all, I don’t have the problem when running the application on
 > Jetty (Eclipse plugin) but I do have the problem when deploying the
 > application on a Tomcat 6.

This looks even more like some inconsistent build app - maybe the tml is 
picked up but the class isnt (or vice versa). Please check your environemnt.

-- 
Chris

-
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



Issue with configuration of IDE used for a Tapestry project

2011-07-15 Thread Julien Martin
Hello,

I use Intellij as my IDE and only some of the available attributes for some
components are available. For instance I have a beaneditform in one of my
templates and I can't use auto-completion for some of the attribute i.e. the
*clientValidation* attribute.

Can anyone please give me some guidelines as to how to configure my IDE so
that all valid attributes are available?

Thanks in advance,

Julien.

http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";>
  





Re: what is Heartbeat

2011-07-15 Thread Taha Hafeez
Hi

http://www.nofluffjuststuff.com/blog/howard_lewis_ship/2010/04/meta_programming_java_with_tapestry

http://tapestry.1045711.n5.nabble.com/What-s-heartbeat-td2414062.html

regards
Taha


On Fri, Jul 15, 2011 at 1:20 PM, dick_hu  wrote:
> A question is always with me ,
> what is the "Hearbeat" in tapestry?
> What can it do in our code.
>
>
>
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/what-is-Heartbeat-tp4589766p4589766.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
>
>

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



what is Heartbeat

2011-07-15 Thread dick_hu
A question is always with me , 
what is the "Hearbeat" in tapestry?
What can it do in our code.



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/what-is-Heartbeat-tp4589766p4589766.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: Loop Map

2011-07-15 Thread dick_hu
Thank you,they are helpful to me.

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Loop-Map-tp4589569p4589722.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: Generic interface, issue in TML

2011-07-15 Thread Nicolas Gillet - MARKET-IP
Hello,

Tapestry version 5.2.5
Tomacat version 6.0.32

Nicolas.

-Original Message-
From: Josh Canfield [mailto:joshcanfi...@gmail.com] 
Sent: Thursday, July 14, 2011 3:30 PM
To: Tapestry users
Subject: Re: Generic interface, issue in TML

What version of tapestry?
On Jul 14, 2011 6:03 AM, "Support Geoplanning" 
wrote:
> Hello List,
>
>
>
> Not easy to summarize this issue in the title … anyway.
>
>
>
> I am facing an irritating behavior with a pojo that I want to modify in a
> form.
>
> This pojo implements a generic interface that forces the implementation of
a
> getter and a setter.
>
> If I try to link the value of a TextField to the property handled by this
> getter I get a happy
> “org.apache.tapestry5.ioc.internal.util.TapestryException”
>
> Like :
>
> org.apache.tapestry5.ioc.internal.util.TapestryException: Parameter
> 'translate' of component admin/Tasks:taskedit.taskeditform.foreignid is
> bound to null. This parameter is not allowed to be null. [at
> classpath:com/marketip/geoplanning/web/components/admin/TaskEditForm.tml,
> line 138]
>
>
>
> Here’s a sample :
>
>
>
> Interface :
>
> public interface Identifiable {
>
> public T getId();
>
> public void setId(T id);
>
> }
>
>
>
> Pojo :
>
> public class MyPojo implements Identifiable  {
>
> public String id;
>
> public String name;
>
> public String getId() {
>
> return this.id;
>
> }
>
> public void setId(String id) {
>
> this.id = id;
>
> }
>
> public Strign getName() {
>
> return this.name;
>
> }
>
> public void setName(Strign name) {
>
> this.name = name;
>
> }
>
> }
>
>
>
> TML :
>
> 
>
> 
>
>  />
>
> 
>
>
>
> => this will show the above exception at render time, and simply removing
> the “implements Identifiable” of the MyPojo class will make
> everything running just fine.
>
>
>
> Above all, I don’t have the problem when running the application on Jetty
> (Eclipse plugin) but I do have the problem when deploying the application
on
> a Tomcat 6.
>
>
>
> Does anyone have an idea ?
>
>
>
> Thanks,
>
>
>
>
> Nicolas Gillet
>
>  nicolas.gil...@market-ip.com
>
> Tel. +32.81.33.11.11
>
> Fax.+32.81.33.11.10
>
>
>
> cid:image001.jpg@01CAF041.1E9CE660
>
> Chaussée de Marche, 774
>
> B-5100 Naninne
>
> Belgique
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>


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