Re: Not in GZIP format problem

2009-09-24 Thread Ovidiu Hurducas
Thanks! ... it was a wrong t:formdata value. Another thing: it is working
with and without GZIP-ing the request. Tapestry seems to handle both
situations.


On Thu, Sep 24, 2009 at 10:36 AM, Kalle Korhonen kalle.o.korho...@gmail.com
 wrote:

 And obviously you need to gzip the request.

 On Thu, Sep 24, 2009 at 12:32 AM, Kalle Korhonen
 kalle.o.korho...@gmail.com wrote:
  From the page source, check what the value of hidden field t:formdata
  is and send it together with the rest of your multipart form data and
  it'll work. The value of t:formdata changes only if you change the
  form itself (add/remove fields).
 
  Kalle
 
 
  On Wed, Sep 23, 2009 at 4:02 PM, Ovidiu Hurducas ovi2...@gmail.com
 wrote:
  I've recently migrated an Tapestry 5.0.18 application to Tapestry
 version
  5.1.0.5.
  I have this form that isn't working anymore
 
  html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
 t:form
 t:upload t:id=file/
 t:submit /
 /t:form
  /html
 
  I'm using Apache HttpClient 3.1 to POST a multipart form (file upload).
  And the stacktrace follows:
 
  [ERROR] TapestryModule.RequestExceptionHandler Processing of request
 failed
  with uncaught exception: java.io.IOException: Not in GZIP format
  org.apache.tapestry5.runtime.ComponentEventException:
 java.io.IOException:
  Not in GZIP format [at classpath:com/xxx/server/web/pages/Data.tml, line
 2]
 at
 
 org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1098)
 at
 
 org.apache.tapestry5.internal.services.ComponentEventRequestHandlerImpl.handle(ComponentEventRequestHandlerImpl.java:75)
 at
 
 org.apache.tapestry5.internal.services.ImmediateActionRenderResponseFilter.handle(ImmediateActionRenderResponseFilter.java:42)
 at
 
 $ComponentEventRequestHandler_123e8fdf819.handle($ComponentEventRequestHandler_123e8fdf819.java)
 at
 
 org.apache.tapestry5.internal.services.AjaxFilter.handle(AjaxFilter.java:42)

 at
 
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
 at
 
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
 at
  org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
 at java.lang.Thread.run(Thread.java:619)
  Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException:
  java.io.IOException: Not in GZIP format
 at
 
 org.apache.tapestry5.corelib.components.Form.executeStoredActions(Form.java:495)
 at
 
 org.apache.tapestry5.corelib.components.Form._$advised$onAction(Form.java:378)
   
 at
 
 org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:910)
 at
 
 org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1081)
 ... 52 more
  Caused by: java.lang.RuntimeException: java.io.IOException: Not in GZIP
  format
 at
 
 org.apache.tapestry5.internal.services.ClientDataEncoderImpl.decodeClientData(ClientDataEncoderImpl.java:62)
 at
 
 $ClientDataEncoder_123e8fdf7e9.decodeClientData($ClientDataEncoder_123e8fdf7e9.java)
 at
 
 org.apache.tapestry5.corelib.components.Form.executeStoredActions(Form.java:467)
 ... 62 more
  Caused by: java.io.IOException: Not in GZIP format
 at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:137)
 at java.util.zip.GZIPInputStream.init(GZIPInputStream.java:58)
 at java.util.zip.GZIPInputStream.init(GZIPInputStream.java:68)
 at
 
 org.apache.tapestry5.internal.services.ClientDataEncoderImpl.decodeClientData(ClientDataEncoderImpl.java:55)
 ... 64 more
 
  This worked fine with Tapestry 5.0.18. I know about the latest GZIP
  optimizations and I've tried to switch off this with
  configuration.add(tapestry.gzip-compression-enabled, false);
  However this the problem remains.
 
  Any thoughts about this?
 
  Kind regards,
  --Ovidiu
 
 

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




Not in GZIP format problem

2009-09-23 Thread Ovidiu Hurducas
I've recently migrated an Tapestry 5.0.18 application to Tapestry version
5.1.0.5.
I have this form that isn't working anymore

html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
t:form
t:upload t:id=file/
t:submit /
/t:form
/html

I'm using Apache HttpClient 3.1 to POST a multipart form (file upload).
And the stacktrace follows:

[ERROR] TapestryModule.RequestExceptionHandler Processing of request failed
with uncaught exception: java.io.IOException: Not in GZIP format
org.apache.tapestry5.runtime.ComponentEventException: java.io.IOException:
Not in GZIP format [at classpath:com/xxx/server/web/pages/Data.tml, line 2]
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1098)
at
org.apache.tapestry5.internal.services.ComponentEventRequestHandlerImpl.handle(ComponentEventRequestHandlerImpl.java:75)
at
org.apache.tapestry5.internal.services.ImmediateActionRenderResponseFilter.handle(ImmediateActionRenderResponseFilter.java:42)
at
$ComponentEventRequestHandler_123e8fdf819.handle($ComponentEventRequestHandler_123e8fdf819.java)
at
org.apache.tapestry5.internal.services.AjaxFilter.handle(AjaxFilter.java:42)
   
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException:
java.io.IOException: Not in GZIP format
at
org.apache.tapestry5.corelib.components.Form.executeStoredActions(Form.java:495)
at
org.apache.tapestry5.corelib.components.Form._$advised$onAction(Form.java:378)
 
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:910)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1081)
... 52 more
Caused by: java.lang.RuntimeException: java.io.IOException: Not in GZIP
format
at
org.apache.tapestry5.internal.services.ClientDataEncoderImpl.decodeClientData(ClientDataEncoderImpl.java:62)
at
$ClientDataEncoder_123e8fdf7e9.decodeClientData($ClientDataEncoder_123e8fdf7e9.java)
at
org.apache.tapestry5.corelib.components.Form.executeStoredActions(Form.java:467)
... 62 more
Caused by: java.io.IOException: Not in GZIP format
at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:137)
at java.util.zip.GZIPInputStream.init(GZIPInputStream.java:58)
at java.util.zip.GZIPInputStream.init(GZIPInputStream.java:68)
at
org.apache.tapestry5.internal.services.ClientDataEncoderImpl.decodeClientData(ClientDataEncoderImpl.java:55)
... 64 more

This worked fine with Tapestry 5.0.18. I know about the latest GZIP
optimizations and I've tried to switch off this with
configuration.add(tapestry.gzip-compression-enabled, false);
However this the problem remains.

Any thoughts about this?

Kind regards,
--Ovidiu


[T5] How to get a list of the current instances of an ASO?

2009-01-08 Thread Ovidiu Hurducas
Greetings!

I want to access the list of currently logged in users in my application and
display it (along with user name, log in time, etc).
The user at log in time initialize an ASO and stores all the required data
in it.

There is a way to access all those ASOs for all the users that exists at a
time in the application?

Thank you!


Re: [T5] How to get a list of the current instances of an ASO?

2009-01-08 Thread Ovidiu Hurducas
Thanks!
I was thinking on a list too. Because the application runs in a clustered
environment this list must be sync-ed on all nodes. I think I will try to
use this with a caching technique like JBoss cache.

I was lazy and I thought there is a ready made tapestrish solution for this
:)


On Thu, Jan 8, 2009 at 3:22 PM, Ulrich Stärk u...@spielviel.de wrote:

 Ovidiu Hurducas schrieb:

  Greetings!

 I want to access the list of currently logged in users in my application
 and
 display it (along with user name, log in time, etc).
 The user at log in time initialize an ASO and stores all the required data
 in it.

 There is a way to access all those ASOs for all the users that exists at a
 time in the application?

 Thank you!


 I don't think that this is possible as the ASO is per-thread and stored in
 the user's session.
 Two approaches to solve your problem come to my mind. The first is to write
 a HttpSessionListener and listen to session creation and destruction and
 update some kind of internal list of sessions. But this is outside of
 tapestry's control and integration with your app might be difficult (you'd
 have to store this list in the servlet context or do some other tricks).
 Also, this is a list of sessions and not a list of logged in users. You'd
 have to extract that information from the sessions.
 The second approach would be to administer a list of logged in users inside
 a singleton tapestry service. You could tell that service that a user logged
 in from inside your login logic. You'd have to think about the logout
 though. Not every user will use a logout functionality but merely will let
 his session expire.

 Uli

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




[T5.0.17] tapestry-hibernate with EJB/JPA, it is possible?

2008-12-11 Thread Ovidiu Hurducas
Hi!
I want to use EJB3 Persistence with tapestry-hibernate.
I've configured an persistence unit in persistence.xml file.However is keep
trying to find the hibernate configuration.

The exception message is:
org.hibernate.HibernateException: /hibernate.cfg.xml not found

As far as I know all the configuration from persistence.xml is sufficient,
no other hibernate config is needed.

Am I missing something?

Thanks!

--Ovidiu


[T5] - How to restore/re-attach to an ASO after user leave application?

2008-11-28 Thread Ovidiu Hurducas
Hi!
I have a Tap 5 (5.0.15) application with the following scenario:

User access a page and init ASO - User than leave on a 3'rd party site (can
save some params here) - user come back on my site and wants to access the
ASO again (saved params can be provided here)

So the questions are: How do I reattach the user to its previous session?
What parameters should be provided in order to achieve that?
What is the best option for re-entry point? (page, RequestFilter, anything
else?)

Thank you!

--Ovidiu


Re: [T5] - How to restore/re-attach to an ASO after user leave application?

2008-11-28 Thread Ovidiu Hurducas
Thanks Andy,

That's very strange. I've tested this scenario (with cookies enabled and
disabled) with a RequestFilter with http redirect as a re-entry point.

In the service method when I'm calling:

TAState state = stateManager.getIfExists(TAState.class);

this allways retrun null no matter what.

Also I've tested with a page as a re-entry:

@ApplicationState
private TAState state;

this is also null. Very weird!

Some parameters (like jsessionid) can be provided as needed if user don't
have cookies enabled.

Cheers!


On Fri, Nov 28, 2008 at 6:01 PM, Andy Pahne [EMAIL PROTECTED]wrote:


 The session reattachment part: as long as the session id is stored in the
 default place (cookie), it should work right out of the box. It does not
 matter if the browsing session is interrupted shortly, as long as the
 session does not time out or the user closes and reopens his browser.

 I don't understand the parameters thing. Please be a bit more specific.

 Andy





 Ovidiu Hurducas schrieb:

  Hi!
 I have a Tap 5 (5.0.15) application with the following scenario:

 User access a page and init ASO - User than leave on a 3'rd party site
 (can
 save some params here) - user come back on my site and wants to access
 the
 ASO again (saved params can be provided here)

 So the questions are: How do I reattach the user to its previous session?
 What parameters should be provided in order to achieve that?
 What is the best option for re-entry point? (page, RequestFilter, anything
 else?)

 Thank you!

 --Ovidiu





 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




[T5] - How to generate pages with absolute URIs?

2008-11-25 Thread Ovidiu Hurducas
Hi!
I have a T5 webapp that has to provide a template page for a payment system,
a page that contains assets like images, css, js files in the layout
component. The template page is just a plain T5 page with a placeholder like
$inject_here$.
The payment system (another website) is taking the template directly from my
web application and than has to inject the payment options into the
placeholder, resulting the payment page.
All is working ok except the assets. They remain relative to the original
webapp so they can't be found on the payment system.

This should be fixed if the assets and links would have an absolute URLs.
I've tried to set the tapestry.force-absolute-uris parameter to true but
seems it doesn't have any effect.

Also I've tried to place a base tag in the head with the webapp page
location. No luck: with this only the images are showing. Css and Js files
are ignored.

There is a possibility to force Tapestry to generate absolute paths for
assets? Can be done just for specific pages?

Thanks so much,

--Ovidiu


Re: [T5] - How to generate pages with absolute URIs?

2008-11-25 Thread Ovidiu Hurducas
Thanks, I already tried that. However this seems to be ignored and all the
assets are inserted with relative URIs.

Any other options?

On Tue, Nov 25, 2008 at 6:10 PM, Toby Hobson [EMAIL PROTECTED]wrote:

 In your AppModule.java you need to tell T5 to use absolute uris e.g.

 public static void
 contributeApplicationDefaults(MappedConfigurationString,
 String configuration)
 {
...
configuration.add(SymbolConstants.FORCE_ABSOLUTE_URIS, true);
 }

 Toby

 2008/11/25 Ovidiu Hurducas [EMAIL PROTECTED]

  Hi!
  I have a T5 webapp that has to provide a template page for a payment
  system,
  a page that contains assets like images, css, js files in the layout
  component. The template page is just a plain T5 page with a placeholder
  like
  $inject_here$.
  The payment system (another website) is taking the template directly from
  my
  web application and than has to inject the payment options into the
  placeholder, resulting the payment page.
  All is working ok except the assets. They remain relative to the original
  webapp so they can't be found on the payment system.
 
  This should be fixed if the assets and links would have an absolute URLs.
  I've tried to set the tapestry.force-absolute-uris parameter to true but
  seems it doesn't have any effect.
 
  Also I've tried to place a base tag in the head with the webapp page
  location. No luck: with this only the images are showing. Css and Js
 files
  are ignored.
 
  There is a possibility to force Tapestry to generate absolute paths for
  assets? Can be done just for specific pages?
 
  Thanks so much,
 
  --Ovidiu
 



Re: [T5] - How to generate pages with absolute URIs?

2008-11-25 Thread Ovidiu Hurducas
I've put
configuration.add(SymbolConstants.FORCE_ABSOLUTE_URIS, true);

and I have tags like
img src=${asset:context:/images/logo_flat.gif} /
a t:type=actionlink t:id=releaseResSessionRelease RES Session/a

and what is rendering:

img src=/images/logo_flat.gif/
a href=/paymenttemplate.border.releaseressession
shape=rectRelease RES Session/a


So on the payment system they are rendering the html page exactly as above
.. resulting in broken links and assets are not loading.


On Tue, Nov 25, 2008 at 6:17 PM, Toby Hobson [EMAIL PROTECTED]wrote:

 That's a little strange .. can you send an example of the urls T5 is
 generating?


 2008/11/25 Ovidiu Hurducas [EMAIL PROTECTED]

  Thanks, I already tried that. However this seems to be ignored and all
 the
  assets are inserted with relative URIs.
 
  Any other options?
 
  On Tue, Nov 25, 2008 at 6:10 PM, Toby Hobson [EMAIL PROTECTED]
  wrote:
 
   In your AppModule.java you need to tell T5 to use absolute uris e.g.
  
   public static void
   contributeApplicationDefaults(MappedConfigurationString,
   String configuration)
   {
  ...
  configuration.add(SymbolConstants.FORCE_ABSOLUTE_URIS, true);
   }
  
   Toby
  
   2008/11/25 Ovidiu Hurducas [EMAIL PROTECTED]
  
Hi!
I have a T5 webapp that has to provide a template page for a payment
system,
a page that contains assets like images, css, js files in the layout
component. The template page is just a plain T5 page with a
 placeholder
like
$inject_here$.
The payment system (another website) is taking the template directly
  from
my
web application and than has to inject the payment options into the
placeholder, resulting the payment page.
All is working ok except the assets. They remain relative to the
  original
webapp so they can't be found on the payment system.
   
This should be fixed if the assets and links would have an absolute
  URLs.
I've tried to set the tapestry.force-absolute-uris parameter to true
  but
seems it doesn't have any effect.
   
Also I've tried to place a base tag in the head with the webapp
  page
location. No luck: with this only the images are showing. Css and Js
   files
are ignored.
   
There is a possibility to force Tapestry to generate absolute paths
 for
assets? Can be done just for specific pages?
   
Thanks so much,
   
--Ovidiu
   
  
 



Re: [T5] - How to generate pages with absolute URIs?

2008-11-25 Thread Ovidiu Hurducas
no effect: the tag was rendered exactly the same.

Thanks anyway!
-- Ovidiu

On Tue, Nov 25, 2008 at 6:45 PM, Toby Hobson [EMAIL PROTECTED]wrote:

 ok try

 img src=${asset:context:images/logo_flat.gif} /

 i.e. remove the leading /

 Toby

 2008/11/25 Ovidiu Hurducas [EMAIL PROTECTED]

  I've put
  configuration.add(SymbolConstants.FORCE_ABSOLUTE_URIS, true);
 
  and I have tags like
  img src=${asset:context:/images/logo_flat.gif} /
  a t:type=actionlink t:id=releaseResSessionRelease RES Session/a
 
  and what is rendering:
 
  img src=/images/logo_flat.gif/
  a href=/paymenttemplate.border.releaseressession
  shape=rectRelease RES Session/a
 
 
  So on the payment system they are rendering the html page exactly as
 above
  .. resulting in broken links and assets are not loading.
 
 
  On Tue, Nov 25, 2008 at 6:17 PM, Toby Hobson [EMAIL PROTECTED]
  wrote:
 
   That's a little strange .. can you send an example of the urls T5 is
   generating?
  
  
   2008/11/25 Ovidiu Hurducas [EMAIL PROTECTED]
  
Thanks, I already tried that. However this seems to be ignored and
 all
   the
assets are inserted with relative URIs.
   
Any other options?
   
On Tue, Nov 25, 2008 at 6:10 PM, Toby Hobson 
  [EMAIL PROTECTED]
wrote:
   
 In your AppModule.java you need to tell T5 to use absolute uris
 e.g.

 public static void
 contributeApplicationDefaults(MappedConfigurationString,
 String configuration)
 {
...
configuration.add(SymbolConstants.FORCE_ABSOLUTE_URIS, true);
 }

 Toby

 2008/11/25 Ovidiu Hurducas [EMAIL PROTECTED]

  Hi!
  I have a T5 webapp that has to provide a template page for a
  payment
  system,
  a page that contains assets like images, css, js files in the
  layout
  component. The template page is just a plain T5 page with a
   placeholder
  like
  $inject_here$.
  The payment system (another website) is taking the template
  directly
from
  my
  web application and than has to inject the payment options into
 the
  placeholder, resulting the payment page.
  All is working ok except the assets. They remain relative to the
original
  webapp so they can't be found on the payment system.
 
  This should be fixed if the assets and links would have an
 absolute
URLs.
  I've tried to set the tapestry.force-absolute-uris parameter to
  true
but
  seems it doesn't have any effect.
 
  Also I've tried to place a base tag in the head with the
 webapp
page
  location. No luck: with this only the images are showing. Css and
  Js
 files
  are ignored.
 
  There is a possibility to force Tapestry to generate absolute
 paths
   for
  assets? Can be done just for specific pages?
 
  Thanks so much,
 
  --Ovidiu
 

   
  
 



[T5] - How to use a custom resource source, e.g. reading resources from a database instead of .property files

2008-09-17 Thread Ovidiu Hurducas
Greetings!

I'm migrating a I18N enabled Tap3 application to Tap5. The current
application is using a custom implementation of BaseEngine class (overriding
createComponentStringsSource method to use my provided
IComponentMessagesSource) to use internationalized resources form a
database. The current T5 API has dramatically changed and seems it doesn't
have the same mechanism to provide a custom resurce source as T3.

There is a similar mecanishm in Tapestry 5?

Thanks!


Re: organizing HTML templates into subdirectories

2007-08-23 Thread Ovidiu Hurducas
Hi!
I got this problem too.
Until now I had the application packed as a war file and I had some pages in
a subdirectory (something like profile/AuthPage.html) and the layout
template in WEB-INF/layout/Border.html. It worked fine, but for some reason
I had to change the deployment type, I cannot use war file, It will be
deployed as expanded file structure.

Now all the pages that are in a subdirectory are served as static html. The
jwcid attributes are ignored. The @layout mark is ignored and no Border is
applied.

I'm using Tap 4.1.3-SNAPSHOT with Tomcat 6.

Any ideas?

Thanks,

-- Ovidiu


On 8/23/07, abhilash [EMAIL PROTECTED] wrote:


 Thanks for your reply .
 Now i am able to get the page but it loks like static html different from
 all my other pages.
 please help me out.

 Kolesnikov, Alexander  GNI wrote:
 
  The page name should be used as admin/ListClient and its class should
  be in whatever.admin subpackage.
 
  -Original Message-
  From: abhilash [mailto:[EMAIL PROTECTED]
  Sent: 22 August 2007 14:15
  To: users@tapestry.apache.org
  Subject: organizing HTML templates into subdirectories
 
 
 
  I have a sub directory called admin under WEB-INF .My servlet mapping is
 
   servlet-mapping
servlet-namedentaprise/servlet-name
url-pattern/app/url-pattern
 /servlet-mapping
 
  i have ListClient.html in admin directory.I am unable to get the page
  ListClient.where i have to specify my sub directory? any ideas?
 
 
  --
  View this message in context:
  http://www.nabble.com/organizing-HTML-templates-into-subdirectories-tf43
  11520.html#a12274323
  Sent from the Tapestry - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 --
  CONFIDENTIALITY NOTICE: If you have received this email in error, please
  immediately notify the sender by e-mail at the address shown.  This
 email
  transmission may contain confidential information.  This information is
  intended only for the use of the individual(s) or entity to whom it is
  intended even if addressed incorrectly.  Please delete it from your
 files
  if you are not the intended recipient.  Thank you for your compliance.
  Copyright 2007 CIGNA
 
 ==
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context:
 http://www.nabble.com/RE%3A-organizing-HTML-templates-into-subdirectories-tf4311559.html#a12288442
 Sent from the Tapestry - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Problems with tapestry-spring while upgrading from 4.1.2-SNAPSHOT to 4.1.3-SNAPSHOT

2007-08-15 Thread Ovidiu Hurducas
Hi!
I'm building an application that uses Tapestry 4.1.2, Spring
2.0.6(integrated with tapestry-spring
1.0.0) and Hibernate 3.2.1, Tomcat 6.0.14,  jdk1.6.
All went well before until recently when because of a bug in the
InlineEditBox component (is about the listener problem) I've been forced to
upgrade from 4.1.2-SNAPSHOT to 4.1.3-SNAPSHOT.
Now the application won't even load the first page or any other page.
I've been keeping the Hibernate session open for lazy loading by using the
OpenSessionInViewFilter.

My Hibernate config in web.xml looks like:

context-param
param-namecontextConfigLocation/param-name
param-value
/WEB-INF/applicationContext-dao.xml,/WEB-INF/applicationContext-
service.xml,/WEB-INF/applicationContext-jdbc.xml
/param-value
/context-param

listener
listener-class
org.springframework.web.context.ContextLoaderListener
/listener-class
/listener

!-- Spring open session hibernate config --
filter
filter-namehibernateFilter/filter-name
filter-class

org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
/filter-class
/filter
filter-mapping
filter-namehibernateFilter/filter-name
url-pattern*.html/url-pattern
/filter-mapping
filter-mapping
filter-namehibernateFilter/filter-name
url-pattern/g/url-pattern
/filter-mapping


The in the server error page the message look like:

javax.servlet.ServletException: Servlet execution threw an exception

org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)

org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)

*root cause*

java.lang.AbstractMethodError:
com.javaforge.tapestry.spring.SpringBeanInjectionWorker.performEnhancement(Lorg/apache/tapestry/enhance/EnhancementOperation;Lorg/apache/tapestry/spec/InjectSpecification;Lorg/apache/tapestry/spec/IComponentSpecification;)V

$InjectEnhancementWorker_1146ad9bd87.performEnhancement($InjectEnhancementWorker_1146ad9bd87.java)

$InjectEnhancementWorker_1146ad9bd86.performEnhancement($InjectEnhancementWorker_1146ad9bd86.java)

org.apache.tapestry.enhance.DispatchToInjectWorker.invokeWorker(DispatchToInjectWorker.java:61)

org.apache.tapestry.enhance.DispatchToInjectWorker.performEnhancement(DispatchToInjectWorker.java:45)

$EnhancementWorker_1146ad9bd54.performEnhancement($EnhancementWorker_1146ad9bd54.java)

$EnhancementWorker_1146ad9bd6c.performEnhancement($EnhancementWorker_1146ad9bd6c.java)

$EnhancementWorker_1146ad9bd3e.performEnhancement($EnhancementWorker_1146ad9bd3e.java)

org.apache.tapestry.services.impl.ComponentConstructorFactoryImpl.getComponentConstructor(ComponentConstructorFactoryImpl.java:103)

$ComponentConstructorFactory_1146ad9bd25.getComponentConstructor($ComponentConstructorFactory_1146ad9bd25.java)

org.apache.tapestry.pageload.PageLoader.instantiateComponent(PageLoader.java:556)

org.apache.tapestry.pageload.PageLoader.createImplicitComponent(PageLoader.java:496)

$IPageLoader_1146ad9bd1f.createImplicitComponent($IPageLoader_1146ad9bd1f.java)

$IPageLoader_1146ad9bd20.createImplicitComponent($IPageLoader_1146ad9bd20.java)

org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.createImplicitComponent(ComponentTemplateLoaderLogic.java:203)

org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(ComponentTemplateLoaderLogic.java:158)

org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.process(ComponentTemplateLoaderLogic.java:98)

org.apache.tapestry.services.impl.ComponentTemplateLoaderLogic.loadTemplate(ComponentTemplateLoaderLogic.java:75)

org.apache.tapestry.services.impl.ComponentTemplateLoaderImpl.loadTemplate(ComponentTemplateLoaderImpl.java:60)

$ComponentTemplateLoader_1146ad9bd29.loadTemplate($ComponentTemplateLoader_1146ad9bd29.java)

org.apache.tapestry.pageload.PageLoader.loadTemplateForComponent(PageLoader.java:673)
org.apache.tapestry.BaseComponent.readTemplate(BaseComponent.java:92)
org.apache.tapestry.BaseComponent.finishLoad(BaseComponent.java:122)
$Header_4.finishLoad($Header_4.java)

...

In the server log I got this message:

java.lang.AbstractMethodError:
com.javaforge.tapestry.spring.SpringBeanInjectionWorker.performEnhancement
(Lorg/apache/tapestry/enhance/EnhancementOperation;Lorg/apache/tapestry/spec/InjectSpecification;Lorg/apache/tapestry/spec/IComponentSpecification;)V
at
$InjectEnhancementWorker_1146ad9bd87.performEnhancement($InjectEnhancementWorker_1146ad9bd87.java)
at
$InjectEnhancementWorker_1146ad9bd86.performEnhancement($InjectEnhancementWorker_1146ad9bd86.java)
at org.apache.tapestry.enhance.DispatchToInjectWorker.invokeWorker(

Displaying validation errors in another page

2007-08-11 Thread Ovidiu Hurducas
Hi!

I am trying to display form errors and highlighted fields in another form
page then the initial form.

More specific: I have a login form in the header component for quick login
and if something wrong is happened there the user is directed to the main
login page where the validation errors must be listed and the error input
fields should be highlighted.

What is the elegant way to do this?

I've been trying without success to pass the ValidationDelegate bean from
the first page to the next page and in pageBeginRender to record all the
FieldTracking entries in the current ValidationDelegate bean.

Something like:

ValidationDelegate headerDelegate = getHeaderValidationDelegate();
// copy the errors from the other page
*if*(headerDelegate!=*null*) {
  ValidationDelegate delegate = getDelegate();
  List tracking = headerDelegate.getFieldTracking();
  Iterator it = tracking.iterator();
  *while*(it.hasNext()) {
FieldTracking field = (FieldTracking)it.next();
 delegate.setFormComponent((IFormComponent)getComponent(
  field.getFieldName()));
 delegate.record(field.getErrorRenderer(),
  field.getConstraint());
  }
}

Is not working, when I call delegate.record() method I got this:
java.lang.NullPointerException Parameter fieldName must not be null.



Any suggestions are greatly appreciated

Cheers,

--Ovidiu**