Re: tapestry-acegi questions

2006-11-01 Thread James Carman

The value you gave for the symbol
de.zedlitz.tapestry.acegi.FormProcessingFilter, is that a service id
or a class name (I guess it could be both)?  It definitely needs to be
a service id, though.

On 11/1/06, Jesper Zedlitz [EMAIL PROTECTED] wrote:

James Carman wrote:
 I haven't implemented form-based authentication in
 tapestry-acegi, yet.  But, I don't think it's that difficult, really.
 Your need to use the AuthenticationProcessingFilter (I don't define it
 in my hivemodule.xml, but it would be easy to do so in yours) and your
 form has to have two fields named j_username and j_password and it
 should post to j_acegi_security_check.  The filter will pick up that
 request and handle it.  You would override the symbol
 tapestry.acegi.authenticationProcessingFilter to point to your
 authentication filter

I have added these entries to my hivemodule.xml:

contribution configuration-id=hivemind.ApplicationDefaults
  default symbol=tapestry.acegi.authenticationProcessingFilter
   value=de.zedlitz.tapestry.acegi.FormProcessingFilter/
  default symbol=tapestry.acegi.authenticationEntryPoint
   value=de.zedlitz.tapestry.acegi.FormAuthenticationEntryPoint/
  !--
 you have to adjust this text according to your module id --
/contribution

service-point id=FormProcessingFilter interface=javax.servlet.Filter
  invoke-factory
construct
class=org.acegisecurity.ui.webapp.AuthenticationProcessingFilter
 initialize-method=afterPropertiesSet
  set property=authenticationFailureUrl value=/LoginFailed.html/
  set property=defaultTargetUrl value=/app/
  set property=filterProcessesUrl value=/j_acegi_security_check/
/construct
  /invoke-factory
/service-point

service-point id=FormAuthenticationEntryPoint
   interface=org.acegisecurity.ui.AuthenticationEntryPoint
  invoke-factory
construct
class=org.acegisecurity.ui.webapp.AuthenticationProcessingFilterEntryPoint
  set property=loginFormUrl
   value=/app?page=Loginamp;service=page/
  set property=forceHttps value=false/
/construct
  /invoke-factory
/service-point

and created Login.html and Login.java according to the tutorial
http://wiki.javascud.org/display/hsa/Acegi+and+Tapestry--A+Step-by-Step+Guide

When I try to access a secured page it works fine and I get to the login
page. After submitting the login form I will be redirected
to /j_acegi_security_check
But how do I wire this URL to Acegi?


Jesper



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




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



Re: ThreadLocals for Hibernate in Tapestry 4.1

2006-10-31 Thread James Carman

You can use Tapernate (www.carmanconsulting.com/tapernate) if you
want, but I'd recommend against the persistence strategies as I think
I have a better idea how to do it and it'll be changing soon.  The
hibernate configuration, open-session-in-view, data squeezer, and POJO
rollback features are worth using it though.

On 10/30/06, Bill Holloway [EMAIL PROTECTED] wrote:

The Hibernate in Action book talks about using a servlet filter to
handle their thread-localized HibernateUtil commitTransaction and
closeSession calls.  But Howard has talked about thread locals being
handled deep inside hivemind.

I've got Tapestry 4.1 and am using Hibernate but am not using Spring.
So what's the best strategy here?  Should my HibernateUtil be a
hivemind service?  Should I just commit transactions in my page
listener methods?  Enquiring minds

Thanks,
Bill

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




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



Re: tapestry-acegi questions

2006-10-29 Thread James Carman

Hi, Robin.  I haven't implemented form-based authentication in
tapestry-acegi, yet.  But, I don't think it's that difficult, really.
Your need to use the AuthenticationProcessingFilter (I don't define it
in my hivemodule.xml, but it would be easy to do so in yours) and your
form has to have two fields named j_username and j_password and it
should post to j_acegi_security_check.  The filter will pick up that
request and handle it.  You would override the symbol
tapestry.acegi.authenticationProcessingFilter to point to your
authentication filter (like it does by default with the HTTP BASIC
filter).  If you get it working, feel free to email me snippets from
your hivemodule.xml and I'll make sure I include it in the default one
so that everyone can benefit.  If I were going to do it, I'd make sure
that the URL (j_acegi_security_check) is configurable as a symbol,
also.  We'd want a cool way to set up the URLs and stuff, too.  Good
luck and keep us posted!

On 10/29/06, Robin Ericsson [EMAIL PROTECTED] wrote:

Hi,

There still isn't any tapestry-acegi specific list is there?

What I like is to have is to use a webpage for login instead of http
basic auth. However, after checking the source of tapestry-acegi it
seems like a monster to accomplish based on that I know practially not
much at all about acegi :)

The other question might be easier though? I'd like to be able to
specific a webpage where to be directed to, when pressing cancel on
the basic auth dialog. Currently this just stays as the previous page.

I can certainly try to do this on my own, but I probably need a few
hinters on the way :)

--
regards,
Robin

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




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



Re: ServletContextListener equivalent in Tapestry

2006-10-28 Thread James Carman

You let HiveMind inject stuff into your service that runs at startup:

public class MyStartupClass implements Runnable
{
 private MyService myService;

 public void setMyService( MyService myService )
 {
   this.myService = myService;
 }

 public void run()
 {
   myService.doSomethingThatMyServiceDoes();
 }
}

HiveMind will autowire the MyService object into your MyStartupClass
object (unless there is more than one service point within your HiveMind
registry which implements the MyService interface).  Then, declare your
service point in the HiveMind module:

service-point id=SomeIdYouChoose interface=java.lang.Runnable
 invoke-factory
   construct class=com.myco.somepackage.MyStartupClass /
 /invoke-factory
/service-point

Then, register your service with the startup configuration point:

contribution configuration-id=hivemind.Startup
 startup object=service:SomeIdYouChoose /
/contribution

That's it!  Your Runnable class will now run upon registry startup
(creation), which happens in a Tapestry application when the application
servlet starts up.

On 10/28/06, KEGan [EMAIL PROTECTED] wrote:


Hi,

I have tried both approches. However, inside my code, I am trying to
access
Hivemind services, and it didnt work.

Example, in my custom ApplicationInitializer, I use:

Registry registry = RegistryBuilder.constructDefaultRegistry();
MyService myservice = (MyService)registry.getService(
com.project.myService,
MyService.class);

And all I get is a null.

I suspect using the RegistryBuilder.constructDefaultRegistry() is not
the
correct way to get access into Hivemind registry, when Tapestry is
starting
up.

So, how do I get access to Hivemind registry ... whether it is from inside

hivemind.Startup or tapestry.init.ApplicationInitializers.



On 10/24/06, James Carman [EMAIL PROTECTED] wrote:

 There is a configuration point called hivemind.Startup where you can
 register Runnable objects to be run at HM registry startup time (which
is
 the same as Tapestry startup time).

 On 10/22/06, KEGan [EMAIL PROTECTED] wrote:
 
  Hi,
 
  I need to do some tasks when my Servlet web application is
initialized.
 In
  this, I can use ServletContextListener.
 
  Now, I am using Tapestry ... and I want to achieve the same thing. Of
  course, I can still use ServletContextListener, but with this, I
cannot
  use
  all the TapestryAnnotation+Hivemind goodness (autowiring, etc) that
 comes
  with Tapestry. So is there a ServletContextListener equivalent in
  Tapestry?
  The idea is that I can run some tasks (only once) when Tapestry is
first
  initialized, and I want to do this with all the Tapestry Annontation
and
  Hivemind goodness.
 
  Thanks.
 
  ~KEGan
 
 






Re: TACOS DEMO getServletContext().getRealPath(/) returns NULL ?

2006-10-27 Thread James Carman

Is your webapp deployed in a .war file?  What application server are you
using?

On 10/27/06, andyhot [EMAIL PROTECTED] wrote:


Dear ken, please do not cross-post.
I just got this email 3 times...

And i can't even find what the question is...
Cause it's sure that your getServletContext().getRealPath(/) indeed
returns null.
Looks like a servlet context issue (configuration perhaps) to me...



Ken nashua wrote:
 Hi Folks,

 I thought it proper to integrate ConfigurationServlet to my webapp
 just like the tacosdemo does.. just to initialize log4j

 web.xml below...

 ---HERE IS THE OUTPUT FROM TOMCAT CONSOLE:
 java.io.FileNotFoundException: null\WEB-INF\log4j.properties (The
 system cannot
 find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.init(FileInputStream.java:106)
at java.io.FileInputStream.init(FileInputStream.java:66)

 ---HERE IS THE CODE:
 public class ConfigurationServlet extends ApplicationServlet
 implements ServletContextListener {

/** Comment for codeserialVersionUID/code */
private static final long serialVersionUID = 3257005471045858873L;
/* Logger */
private static final Logger LOG =
 Logger.getLogger(ConfigurationServlet.class);

/**
 * @see javax.servlet.GenericServlet#init()
 */
public void init() {
try {
// Use basic logging configuration until Log4j is properly
 configured

 PropertyConfigurator.configure(getServletContext().getRealPath(/)
+ /WEB-INF/log4j.properties);
super.init();
} catch (Throwable t) {
t.printStackTrace();
LOG.fatal(Error configuring CIMS, t);
}
}

/**
 * @see javax.servlet.Servlet#destroy()
 */
public void destroy()
{
super.destroy();
org.apache.log4j.LogManager.shutdown();
}

/**
 * @see
 javax.servlet.ServletContextListener#contextDestroyed(
javax.servlet.ServletContextEvent)

 */
public void contextDestroyed(ServletContextEvent arg0)
{
org.apache.log4j.LogManager.shutdown();
}

/**
 * [EMAIL PROTECTED]
 */
public void contextInitialized(ServletContextEvent arg0)
{
}
 }

 ---HERE IS WEB.XML
 ?xml version=1.0 encoding=UTF-8?
 !DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;

 web-app
display-nametap.proto-1.0/display-name

filter
filter-nameredirect/filter-name
filter-classorg.apache.tapestry.RedirectFilter/filter-class
/filter
filter-mapping
filter-nameredirect/filter-name
url-pattern//url-pattern
/filter-mapping

servlet
servlet-nametap.proto-1.0/servlet-name
servlet-classproto.servlet.ConfigurationServlet/servlet-class
load-on-startup1/load-on-startup
/servlet

!-- SERVLET-MAPPINGS --
servlet-mapping
servlet-nametap.proto-1.0/servlet-name
url-pattern/app/url-pattern
/servlet-mapping

!-- Boiler Plate HiveMind Services --
servlet-mapping
servlet-nametap.proto-1.0/servlet-name
url-pattern*.html/url-pattern
/servlet-mapping
servlet-mapping
servlet-nametap.proto-1.0/servlet-name
url-pattern*.direct/url-pattern
/servlet-mapping
servlet-mapping
servlet-nametap.proto-1.0/servlet-name
url-pattern*.sdirect/url-pattern
/servlet-mapping
servlet-mapping
servlet-nametap.proto-1.0/servlet-name
url-pattern/assets/*/url-pattern
/servlet-mapping
servlet-mapping
servlet-nametap.proto-1.0/servlet-name
url-pattern*.svc/url-pattern
/servlet-mapping
servlet-mapping
servlet-nametap.proto-1.0/servlet-name
url-pattern*.ajax/url-pattern
/servlet-mapping


session-config
session-timeout 10/session-timeout !-- minutes --
/session-config

resource-ref
res-ref-nameMySQLDataSource/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref
resource-ref
res-ref-nameOracleDataSource/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref

 /web-app

 _
 Use your PC to make calls at very low rates
 https://voiceoam.pcs.v2s.live.com/partnerredirect.aspx


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




--
Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting


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




Re: Dynamic Radiogroup

2006-10-25 Thread James Carman

I don't think it matters where you define it within the HTML.  Quite often,
the field label will come before the field it labels.  I've never had to
resort to a .page/.jwc file in this case.

On 10/24/06, Patrick Moore [EMAIL PROTECTED] wrote:


your FieldLabel's field parameter is wrong, it should look like this:

label jwcid=@FieldLabel field=component:sug

but if I remember correctly this will not work anyhow because sug is
defined in the html after the FieldLabel. You will need to specify sug
in your java or .jwc.

-Pat

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




Re: ServletContextListener equivalent in Tapestry

2006-10-24 Thread James Carman

There is a configuration point called hivemind.Startup where you can
register Runnable objects to be run at HM registry startup time (which is
the same as Tapestry startup time).

On 10/22/06, KEGan [EMAIL PROTECTED] wrote:


Hi,

I need to do some tasks when my Servlet web application is initialized. In
this, I can use ServletContextListener.

Now, I am using Tapestry ... and I want to achieve the same thing. Of
course, I can still use ServletContextListener, but with this, I cannot
use
all the TapestryAnnotation+Hivemind goodness (autowiring, etc) that comes
with Tapestry. So is there a ServletContextListener equivalent in
Tapestry?
The idea is that I can run some tasks (only once) when Tapestry is first
initialized, and I want to do this with all the Tapestry Annontation and
Hivemind goodness.

Thanks.

~KEGan




Re: window.print() in Tapestry?

2006-10-24 Thread James Carman

You can use a @Script component to set up some JavaScript to run onload, I
believe.

On 10/24/06, Dennis Sinelnikov [EMAIL PROTECTED] wrote:


Thank you for your reply, Roberto.  That is what I figured as well.

-Dennis

Roberto Ramírez Vique wrote:
 About the onLoad, not sure but i don't know any component that does this
 ...  From my point of view, is supose to be like this because this is
just
 client side stuff and tapestry works for server side stuff.

 Also the same reply (as far as I know) about the restrictions with the
 printers. It's a very client side information, that tapestry shouldn't
take
 care of.


 On 10/23/06, Dennis Sinelnikov [EMAIL PROTECTED]
wrote:

 Dear fellow tapestriers  :) ,

 I have a requirement where I need to automatically show a print window
 once a page is loaded.  After doing a little bit of googling, I came
 across onLoad=window.print() function call using Javascript.  Is
there
 similar functionality available to me via tapestry 4.0 framework?
 Moreover, is there a way to restrict the list of allowed printers to
 only local printer?

 Any suggestions are much appreciated!

 Dennis


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






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




RE: T4.1 problem

2006-10-18 Thread James Carman
Is there really a space at the end of your page-class-packages setting in
your .application file?  I don't know if that matters (Tapestry may be
trimming the string first), but that might be your problem.

-Original Message-
From: Davor Hrg [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 18, 2006 8:55 AM
To: Tapestry users
Subject: Re: T4.1 problem

nope,
I must be doing something very wrong,
just tried it in T4.0 and it also doesn't work

here is web.xml
?xml version=1.0?
web-app xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/TR/xmlschema-1/;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
version=2.4

display-nameponpon/display-name
servlet
servlet-nameponpon/servlet-name
servlet-classorg.apache.tapestry.ApplicationServlet
/servlet-class
load-on-startup1/load-on-startup
/servlet
servlet-mapping
servlet-nameponpon/servlet-name
url-pattern/app/url-pattern
/servlet-mapping
/web-app

ponpon.application
?xml version=1.0?
!DOCTYPE application PUBLIC
  -//Apache Software Foundation//Tapestry Specification 4.0//EN
  http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd;

DEFANGED_application
  DEFANGED_meta key=org.apache.tapestry.page-class-packages
value=hr.hrg.ponpon
/
  DEFANGED_meta key=org.apache.tapestry.component-class-packages value=
hr.hrg.ponpon/
/application

On 10/18/06, Dennis Sinelnikov [EMAIL PROTECTED] wrote:

 Try '.' instead of '/'
 DEFANGED_meta
key=org.apache.tapestry.page-class-packagesvalue=hr.hrg.ponpon/

 Dennis

 Davor Hrg wrote:
  Is there an known issue with
  org.apache.tapestry.page-class-packages
  in T4.1
 
  I don't seem to get it right,
  I have a simple app and trying to get rid of
  th pesky .page and use annotations
  .
  Just tried with Home.page
 
  org.apache.tapestry.PageNotFoundException
  Page 'Home' not found in application namespace.
 
- org.apache.tapestry.resolver.PageSpecificationResolverImpl.resolve(
PageSpecificationResolverImpl.java:147)
-
 

$PageSpecificationResolver_10e5b5b91b0.resolve($PageSpecificationResolver_10
e5b5b91b0.java)
 
 
-
 

$PageSpecificationResolver_10e5b5b91b1.resolve($PageSpecificationResolver_10
e5b5b91b1.java)
 
 
- org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:112)
 
- $IPageSource_10e5b5b9116.getPage($IPageSource_10e5b5b9116.java)
- $IPageSource_10e5b5b9115.getPage($IPageSource_10e5b5b9115.java)
- org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java
 :241)
 
- ---
 
  I tried both .application
  DEFANGED_application
   DEFANGED_meta key=org.apache.tapestry.page-class-packages
  value=hr/hrg/ponpon/
   DEFANGED_meta key=org.apache.tapestry.component-class-packages
  value=hr/hrg/ponpon/
  /application
 
  and web.xml
 init-param
 param-nameorg.apache.tapestry.page-class-packages
 /param-name
 param-valuehr.hrg.ponpon/param-value
 /init-param
 
  but no effect
 
 
  Davor Hrg
 


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




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



RE: T4.1 problem

2006-10-18 Thread James Carman
Well, I know that it works in 4.0, since I'm using that setting.  Where is
your ponon.application file located within your webapp?

-Original Message-
From: Davor Hrg [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 18, 2006 9:57 AM
To: Tapestry users
Subject: Re: T4.1 problem

no, :( there is no space :(

key=org.apache.tapestry.page-class-packages
value=hr.hrg.ponpon



On 10/18/06, James Carman [EMAIL PROTECTED] wrote:

 Is there really a space at the end of your page-class-packages setting in
 your .application file?  I don't know if that matters (Tapestry may be
 trimming the string first), but that might be your problem.

 -Original Message-
 From: Davor Hrg [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, October 18, 2006 8:55 AM
 To: Tapestry users
 Subject: Re: T4.1 problem

 nope,
 I must be doing something very wrong,
 just tried it in T4.0 and it also doesn't work

 here is web.xml
 ?xml version=1.0?
 web-app xmlns=http://java.sun.com/xml/ns/j2ee;
 xmlns:xsi=http://www.w3.org/TR/xmlschema-1/;
 xsi:schemaLocation=
 http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
 version=2.4

 display-nameponpon/display-name
 servlet
 servlet-nameponpon/servlet-name
 servlet-classorg.apache.tapestry.ApplicationServlet
 /servlet-class
 load-on-startup1/load-on-startup
 /servlet
 servlet-mapping
 servlet-nameponpon/servlet-name
 url-pattern/app/url-pattern
 /servlet-mapping
 /web-app

 ponpon.application
 ?xml version=1.0?
 !DOCTYPE application PUBLIC
   -//Apache Software Foundation//Tapestry Specification 4.0//EN
   http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd;

 DEFANGED_application
   DEFANGED_meta key=org.apache.tapestry.page-class-packages
 value=hr.hrg.ponpon
 /
   DEFANGED_meta key=org.apache.tapestry.component-class-packages
 value=
 hr.hrg.ponpon/
 /application

 On 10/18/06, Dennis Sinelnikov [EMAIL PROTECTED] wrote:
 
  Try '.' instead of '/'
  DEFANGED_meta
 key=org.apache.tapestry.page-class-packagesvalue=hr.hrg.ponpon/
 
  Dennis
 
  Davor Hrg wrote:
   Is there an known issue with
   org.apache.tapestry.page-class-packages
   in T4.1
  
   I don't seem to get it right,
   I have a simple app and trying to get rid of
   th pesky .page and use annotations
   .
   Just tried with Home.page
  
   org.apache.tapestry.PageNotFoundException
   Page 'Home' not found in application namespace.
  
 - org.apache.tapestry.resolver.PageSpecificationResolverImpl.resolve
 (
 PageSpecificationResolverImpl.java:147)
 -
  
 


$PageSpecificationResolver_10e5b5b91b0.resolve($PageSpecificationResolver_10
 e5b5b91b0.java)
  
  
 -
  
 


$PageSpecificationResolver_10e5b5b91b1.resolve($PageSpecificationResolver_10
 e5b5b91b1.java)
  
  
 - org.apache.tapestry.pageload.PageSource.getPage(PageSource.java
 :112)
  
 - $IPageSource_10e5b5b9116.getPage($IPageSource_10e5b5b9116.java)
 - $IPageSource_10e5b5b9115.getPage($IPageSource_10e5b5b9115.java)
 - org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java
  :241)
  
 - ---
  
   I tried both .application
   DEFANGED_application
DEFANGED_meta key=org.apache.tapestry.page-class-packages
   value=hr/hrg/ponpon/
DEFANGED_meta key=org.apache.tapestry.component-class-packages
   value=hr/hrg/ponpon/
   /application
  
   and web.xml
  init-param
  param-nameorg.apache.tapestry.page-class-packages
  /param-name
  param-valuehr.hrg.ponpon/param-value
  /init-param
  
   but no effect
  
  
   Davor Hrg
  
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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




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



RE: T4.1 problem

2006-10-18 Thread James Carman
Make sure you have a WEB-INF/classes/hr/hrg/ponpon/Home.class file in your
webapp.  Also, do you have Home.html in your webapp root?



-Original Message-
From: Davor Hrg [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 18, 2006 10:07 AM
To: Tapestry users
Subject: Re: T4.1 problem

tomcat\webapps\ponpon\WEB-INF

si it's in WEB-INF if looked relatively



On 10/18/06, James Carman [EMAIL PROTECTED] wrote:

 Well, I know that it works in 4.0, since I'm using that setting.  Where is
 your ponon.application file located within your webapp?

 -Original Message-
 From: Davor Hrg [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, October 18, 2006 9:57 AM
 To: Tapestry users
 Subject: Re: T4.1 problem

 no, :( there is no space :(

 key=org.apache.tapestry.page-class-packages
 value=hr.hrg.ponpon



 On 10/18/06, James Carman [EMAIL PROTECTED] wrote:
 
  Is there really a space at the end of your page-class-packages setting
 in
  your .application file?  I don't know if that matters (Tapestry may be
  trimming the string first), but that might be your problem.
 
  -Original Message-
  From: Davor Hrg [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, October 18, 2006 8:55 AM
  To: Tapestry users
  Subject: Re: T4.1 problem
 
  nope,
  I must be doing something very wrong,
  just tried it in T4.0 and it also doesn't work
 
  here is web.xml
  ?xml version=1.0?
  web-app xmlns=http://java.sun.com/xml/ns/j2ee;
  xmlns:xsi=http://www.w3.org/TR/xmlschema-1/;
  xsi:schemaLocation=
  http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
  version=2.4
 
  display-nameponpon/display-name
  servlet
  servlet-nameponpon/servlet-name
  servlet-classorg.apache.tapestry.ApplicationServlet
  /servlet-class
  load-on-startup1/load-on-startup
  /servlet
  servlet-mapping
  servlet-nameponpon/servlet-name
  url-pattern/app/url-pattern
  /servlet-mapping
  /web-app
 
  ponpon.application
  ?xml version=1.0?
  !DOCTYPE application PUBLIC
-//Apache Software Foundation//Tapestry Specification 4.0//EN
http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd;
 
  DEFANGED_application
DEFANGED_meta key=org.apache.tapestry.page-class-packages
  value=hr.hrg.ponpon
  /
DEFANGED_meta key=org.apache.tapestry.component-class-packages
  value=
  hr.hrg.ponpon/
  /application
 
  On 10/18/06, Dennis Sinelnikov [EMAIL PROTECTED]
 wrote:
  
   Try '.' instead of '/'
   DEFANGED_meta
  key=org.apache.tapestry.page-class-packagesvalue=hr.hrg.ponpon/
  
   Dennis
  
   Davor Hrg wrote:
Is there an known issue with
org.apache.tapestry.page-class-packages
in T4.1
   
I don't seem to get it right,
I have a simple app and trying to get rid of
th pesky .page and use annotations
.
Just tried with Home.page
   
org.apache.tapestry.PageNotFoundException
Page 'Home' not found in application namespace.
   
  -
 org.apache.tapestry.resolver.PageSpecificationResolverImpl.resolve
  (
  PageSpecificationResolverImpl.java:147)
  -
   
  
 
 


$PageSpecificationResolver_10e5b5b91b0.resolve($PageSpecificationResolver_10
  e5b5b91b0.java)
   
   
  -
   
  
 
 


$PageSpecificationResolver_10e5b5b91b1.resolve($PageSpecificationResolver_10
  e5b5b91b1.java)
   
   
  - org.apache.tapestry.pageload.PageSource.getPage(PageSource.java
  :112)
   
  - $IPageSource_10e5b5b9116.getPage($IPageSource_10e5b5b9116.java)
  - $IPageSource_10e5b5b9115.getPage($IPageSource_10e5b5b9115.java)
  - org.apache.tapestry.engine.RequestCycle.loadPage(
 RequestCycle.java
   :241)
   
  - ---
   
I tried both .application
DEFANGED_application
 DEFANGED_meta key=org.apache.tapestry.page-class-packages
value=hr/hrg/ponpon/
 DEFANGED_meta key=org.apache.tapestry.component-class-packages
value=hr/hrg/ponpon/
/application
   
and web.xml
   init-param
   param-nameorg.apache.tapestry.page-class-packages
   /param-name
   param-valuehr.hrg.ponpon/param-value
   /init-param
   
but no effect
   
   
Davor Hrg
   
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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




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



Re: T4.1 problem

2006-10-18 Thread James Carman

I don't think that makes a difference.  Here's my .application file (with
package names changed to protect the innocent):

!DOCTYPE application PUBLIC
   -//Apache Software Foundation//Tapestry Specification 4.0//EN
   http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd;

application
   meta key=org.apache.tapestry.page-class-packages value=
com.myco.myproject.web.page/
   meta key=org.apache.tapestry.component-class-packages value=
com.myco.myproject.web.component/
   library id=contrib
specification-path=/org/apache/tapestry/contrib/Contrib.library/
/application

On 10/18/06, Denis Souza [EMAIL PROTECTED] wrote:


I don't know if it actually makes a difference, but I use it in my
.application a little bit different:

I guess it wouldn't hurt to try:

application
  meta key=org.apache.tapestry.page-class-packageshr.hrg.ponpon/meta
  meta
key=org.apache.tapestry.component-class-packageshr.hrg.ponpon/meta
/application

Denis

-Original Message-
From: Davor Hrg [mailto:[EMAIL PROTECTED]
Sent: quarta-feira, 18 de outubro de 2006 10:55
To: Tapestry users
Subject: Re: T4.1 problem

nope,
I must be doing something very wrong,
just tried it in T4.0 and it also doesn't work

here is web.xml
?xml version=1.0?
web-app xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/TR/xmlschema-1/;
xsi:schemaLocation=
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
version=2.4

display-nameponpon/display-name
servlet
servlet-nameponpon/servlet-name
servlet-classorg.apache.tapestry.ApplicationServlet
/servlet-class
load-on-startup1/load-on-startup
/servlet
servlet-mapping
servlet-nameponpon/servlet-name
url-pattern/app/url-pattern
/servlet-mapping
/web-app

ponpon.application
?xml version=1.0?
!DOCTYPE application PUBLIC
  -//Apache Software Foundation//Tapestry Specification 4.0//EN
  http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd;

application
  meta key=org.apache.tapestry.page-class-packages value=hr.hrg.ponpon
/
  meta key=org.apache.tapestry.component-class-packages value=
hr.hrg.ponpon/
/application

On 10/18/06, Dennis Sinelnikov [EMAIL PROTECTED] wrote:

 Try '.' instead of '/'
 meta key=org.apache.tapestry.page-class-packagesvalue=hr.hrg.ponpon
/

 Dennis

 Davor Hrg wrote:
  Is there an known issue with
  org.apache.tapestry.page-class-packages
  in T4.1
 
  I don't seem to get it right,
  I have a simple app and trying to get rid of
  th pesky .page and use annotations
  .
  Just tried with Home.page
 
  org.apache.tapestry.PageNotFoundException
  Page 'Home' not found in application namespace.
 
- org.apache.tapestry.resolver.PageSpecificationResolverImpl.resolve
(
PageSpecificationResolverImpl.java:147)
-
 


$PageSpecificationResolver_10e5b5b91b0.resolve($PageSpecificationResolver_10
e5b5b91b0.java)
 
 
-
 


$PageSpecificationResolver_10e5b5b91b1.resolve($PageSpecificationResolver_10
e5b5b91b1.java)
 
 
- org.apache.tapestry.pageload.PageSource.getPage(PageSource.java
:112)
 
- $IPageSource_10e5b5b9116.getPage($IPageSource_10e5b5b9116.java)
- $IPageSource_10e5b5b9115.getPage($IPageSource_10e5b5b9115.java)
- org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java
 :241)
 
- ---
 
  I tried both .application
  application
   meta key=org.apache.tapestry.page-class-packages
  value=hr/hrg/ponpon/
   meta key=org.apache.tapestry.component-class-packages
  value=hr/hrg/ponpon/
  /application
 
  and web.xml
 init-param
 param-nameorg.apache.tapestry.page-class-packages
 /param-name
 param-valuehr.hrg.ponpon/param-value
 /init-param
 
  but no effect
 
 
  Davor Hrg
 


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




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




Re: T4.1 problem

2006-10-18 Thread James Carman

The servlet engine won't allow the source to be downloaded via URL, because
your tapestry servlet will intercept the request (assuming you've mapped it
correctly).

On 10/18/06, Davor Hrg [EMAIL PROTECTED] wrote:


It makes all the difference in my project.
I moved Home.html into WEB-INF
and it didnt work
I moved it back into context
and it worked
I restarted tomcat each time

finaly, my web app is not packed as .war,
it is a folder in webapps in tomcat.

another problem is when Home.html is in context dir
the source of it can be downloaded via url



Davor Hrg

On 10/18/06, James Carman [EMAIL PROTECTED] wrote:

 I don't think that makes a difference.  Here's my .application file
(with
 package names changed to protect the innocent):

 !DOCTYPE application PUBLIC
 -//Apache Software Foundation//Tapestry Specification 4.0//EN
 http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd;

 application
 meta key=org.apache.tapestry.page-class-packages value=
 com.myco.myproject.web.page/
 meta key=org.apache.tapestry.component-class-packages value=
 com.myco.myproject.web.component/
 library id=contrib
 specification-path=/org/apache/tapestry/contrib/Contrib.library/
 /application

 On 10/18/06, Denis Souza [EMAIL PROTECTED] wrote:
 
  I don't know if it actually makes a difference, but I use it in my
  .application a little bit different:
 
  I guess it wouldn't hurt to try:
 
  application
meta key=org.apache.tapestry.page-class-packageshr.hrg.ponpon
 /meta
meta
  key=org.apache.tapestry.component-class-packageshr.hrg.ponpon
/meta
  /application
 
  Denis
 
  -Original Message-
  From: Davor Hrg [mailto:[EMAIL PROTECTED]
  Sent: quarta-feira, 18 de outubro de 2006 10:55
  To: Tapestry users
  Subject: Re: T4.1 problem
 
  nope,
  I must be doing something very wrong,
  just tried it in T4.0 and it also doesn't work
 
  here is web.xml
  ?xml version=1.0?
  web-app xmlns=http://java.sun.com/xml/ns/j2ee;
  xmlns:xsi=http://www.w3.org/TR/xmlschema-1/;
  xsi:schemaLocation=
  http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
  version=2.4
 
  display-nameponpon/display-name
  servlet
  servlet-nameponpon/servlet-name
  servlet-classorg.apache.tapestry.ApplicationServlet
  /servlet-class
  load-on-startup1/load-on-startup
  /servlet
  servlet-mapping
  servlet-nameponpon/servlet-name
  url-pattern/app/url-pattern
  /servlet-mapping
  /web-app
 
  ponpon.application
  ?xml version=1.0?
  !DOCTYPE application PUBLIC
-//Apache Software Foundation//Tapestry Specification 4.0//EN
http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd;
 
  application
meta key=org.apache.tapestry.page-class-packages value=
 hr.hrg.ponpon
  /
meta key=org.apache.tapestry.component-class-packages value=
  hr.hrg.ponpon/
  /application
 
  On 10/18/06, Dennis Sinelnikov [EMAIL PROTECTED]
 wrote:
  
   Try '.' instead of '/'
   meta key=org.apache.tapestry.page-class-packagesvalue=
 hr.hrg.ponpon
  /
  
   Dennis
  
   Davor Hrg wrote:
Is there an known issue with
org.apache.tapestry.page-class-packages
in T4.1
   
I don't seem to get it right,
I have a simple app and trying to get rid of
th pesky .page and use annotations
.
Just tried with Home.page
   
org.apache.tapestry.PageNotFoundException
Page 'Home' not found in application namespace.
   
  -
 org.apache.tapestry.resolver.PageSpecificationResolverImpl.resolve
  (
  PageSpecificationResolverImpl.java:147)
  -
   
  
 
 

$PageSpecificationResolver_10e5b5b91b0.resolve($PageSpecificationResolver_10
  e5b5b91b0.java)
   
   
  -
   
  
 
 

$PageSpecificationResolver_10e5b5b91b1.resolve($PageSpecificationResolver_10
  e5b5b91b1.java)
   
   
  - org.apache.tapestry.pageload.PageSource.getPage(
PageSource.java
  :112)
   
  -
$IPageSource_10e5b5b9116.getPage($IPageSource_10e5b5b9116.java)
  -
$IPageSource_10e5b5b9115.getPage($IPageSource_10e5b5b9115.java)
  - org.apache.tapestry.engine.RequestCycle.loadPage(
 RequestCycle.java
   :241)
   
  - ---
   
I tried both .application
application
 meta key=org.apache.tapestry.page-class-packages
value=hr/hrg/ponpon/
 meta key=org.apache.tapestry.component-class-packages
value=hr/hrg/ponpon/
/application
   
and web.xml
   init-param
   param-nameorg.apache.tapestry.page-class-packages
   /param-name
   param-valuehr.hrg.ponpon/param-value
   /init-param
   
but no effect
   
   
Davor Hrg
   
  
  
  
-
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 






Re: T4.1 problem

2006-10-18 Thread James Carman

Why didn't a URL mapping of /* hide everything?

On 10/18/06, Davor Hrg [EMAIL PROTECTED] wrote:


thnx,
actualy it is possible hide the html without implementing pretty url

I moidifed my web.xml
   servlet-mapping
   servlet-nameponpon/servlet-name
   url-pattern/app/url-pattern
   /servlet-mapping
   servlet-mapping
   servlet-nameponpon/servlet-name
   url-pattern*.html/url-pattern
   /servlet-mapping

and reapeated mapping for *.html (since the pattern allows only simple
defs)
now all .html pages are handled by default page

I will definitely implement pretty url, but this was enough to protect the
html source



On 10/18/06, Denis Souza [EMAIL PROTECTED] wrote:

 Try configuring friendly URLs:

 http://tapestry.apache.org/tapestry4.1/usersguide/friendly-urls.html

 If you follow the example on the link it should intercept anything with
an
 html extension.

 Denis

 -Original Message-
 From: Davor Hrg [mailto:[EMAIL PROTECTED]
 Sent: quarta-feira, 18 de outubro de 2006 16:02
 To: Tapestry users
 Subject: Re: T4.1 problem

 if Home.html is in WEB-INF, tapestry doesn't connect with the class,
 if Home.html is in context, tapestry connects it with the class, but
.html
 source
 is downloadable by entering http://localhost:8000/ponpon/Home.html


 :(:(:(
 Davor Hrg



 ?xml version=1.0?
 web-app xmlns=http://java.sun.com/xml/ns/j2ee;
 xmlns:xsi=http://www.w3.org/TR/xmlschema-1/;
 xsi:schemaLocation=
 http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
 version=2.4

 display-nameponpon/display-name
 servlet
 servlet-nameponpon/servlet-name
 servlet-classorg.apache.tapestry.ApplicationServlet
 /servlet-class
 load-on-startup1/load-on-startup
 /servlet
 servlet-mapping
 servlet-nameponpon/servlet-name
 url-pattern/app/url-pattern
 /servlet-mapping
 /web-app




 On 10/18/06, James Carman [EMAIL PROTECTED] wrote:
 
  The servlet engine won't allow the source to be downloaded via URL,
  because
  your tapestry servlet will intercept the request (assuming you've
mapped
  it
  correctly).
 
  On 10/18/06, Davor Hrg [EMAIL PROTECTED] wrote:
  
   It makes all the difference in my project.
   I moved Home.html into WEB-INF
   and it didnt work
   I moved it back into context
   and it worked
   I restarted tomcat each time
  
   finaly, my web app is not packed as .war,
   it is a folder in webapps in tomcat.
  
   another problem is when Home.html is in context dir
   the source of it can be downloaded via url
  
  
  
   Davor Hrg
  
   On 10/18/06, James Carman [EMAIL PROTECTED] wrote:
   
I don't think that makes a difference.  Here's my .application
file
   (with
package names changed to protect the innocent):
   
!DOCTYPE application PUBLIC
-//Apache Software Foundation//Tapestry Specification 4.0
  //EN
http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd;
   
application
meta key=org.apache.tapestry.page-class-packages value=
com.myco.myproject.web.page/
meta key=org.apache.tapestry.component-class-packages
value=
com.myco.myproject.web.component/
library id=contrib
   
specification-path=/org/apache/tapestry/contrib/Contrib.library/
/application
   
On 10/18/06, Denis Souza [EMAIL PROTECTED] wrote:

 I don't know if it actually makes a difference, but I use it in
my
 .application a little bit different:

 I guess it wouldn't hurt to try:

 application
   meta key=org.apache.tapestry.page-class-packages
 hr.hrg.ponpon
/meta
   meta
 key=org.apache.tapestry.component-class-packageshr.hrg.ponpon
   /meta
 /application

 Denis

 -Original Message-
 From: Davor Hrg [mailto:[EMAIL PROTECTED]
 Sent: quarta-feira, 18 de outubro de 2006 10:55
 To: Tapestry users
 Subject: Re: T4.1 problem

 nope,
 I must be doing something very wrong,
 just tried it in T4.0 and it also doesn't work

 here is web.xml
 ?xml version=1.0?
 web-app xmlns=http://java.sun.com/xml/ns/j2ee;
 xmlns:xsi=http://www.w3.org/TR/xmlschema-1/;
 xsi:schemaLocation=
 http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
 version=2.4

 display-nameponpon/display-name
 servlet
 servlet-nameponpon/servlet-name
 servlet-classorg.apache.tapestry.ApplicationServlet
 /servlet-class
 load-on-startup1/load-on-startup
 /servlet
 servlet-mapping
 servlet-nameponpon/servlet-name
 url-pattern/app/url-pattern
 /servlet-mapping
 /web-app

 ponpon.application
 ?xml version=1.0?
 !DOCTYPE application PUBLIC
   -//Apache Software Foundation//Tapestry Specification 4.0
//EN
   http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd;

 application
   meta key=org.apache.tapestry.page-class-packages

RE: RE Component ApplicationRuntimeException... Tap-4.1.1 help please (thanks)

2006-10-17 Thread James Carman
So, this has nothing to do with the location of the component spec/template
itself (not anymore).  It's not finding your component class.  Make sure
that it's in the WEB-INF/classes directory.  You should have a
WEB/INF/classes/proto/component/ShowMessages.class file in there.  Do you?

-Original Message-
From: Ken nashua [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 17, 2006 10:56 AM
To: users@tapestry.apache.org
Subject: RE Component ApplicationRuntimeException... Tap-4.1.1 help please
(thanks)

Thanks James,

The feedback from your suggestion is below. Exception remains even if remove

the spec path (leaving only the module name) from the application file I 
receive the same exception.

?



An exception has occurred.

You may continue by restarting the session.

[ +/- ] Exception: Could not load class proto.component.ShowMessages from 
WebappClassLoader delegate: false repositories: /WEB-INF/classes/ 
-- Parent Classloader: 
[EMAIL PROTECTED] : 
proto.component.ShowMessages
org.apache.hivemind.ApplicationRuntimeException
Could not load class proto.component.ShowMessages from WebappClassLoader 
delegate: false repositories: /WEB-INF/classes/ -- Parent 
Classloader: [EMAIL PROTECTED] : 
proto.component.ShowMessages

[ +/- ] Exception: proto.component.ShowMessages



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


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



RE: RE Component ApplicationRuntimeException... Tap-4.1.1 help please (thanks)

2006-10-17 Thread James Carman
The class=proto.component.ShowMessages part of your component
specification (ShowMessages.jwc) says that there has to be a class called
proto.component.ShowMessages.  

-Original Message-
From: Ken nashua [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 17, 2006 1:56 PM
To: users@tapestry.apache.org
Subject: RE Component ApplicationRuntimeException... Tap-4.1.1 help please
(thanks)

Dude...,

There is no such class file for these components.

I scooped them up from 
http://files.doublenegative.com.au/jumpstart/download.html

And it seems HLS stamped his name on them too. No java files included in the

war at http://files.doublenegative.com.au/jumpstart/download.html

Are you implying that tapestry should pre-compile these during build and 
package?

Do such java files exist?

Should they?

Or does tapestry generate them at runtime?


--- Here is the actual ShowMessages.html
span jwcid=$content$
span jwcid=@If
condition=ognl:page.beans.validationDelegate.hasErrors
span jwcid=@ShowError--- Validation error message
---/span
/span
span jwcid=@If condition=ognl:page.warningMessage
span jwcid=@Insert value=ognl:page.warningMessage
class=warning--- 
Warning message ---/span
/span
span jwcid=@If condition=ognl:page.infoMessage
span jwcid=@Insert value=ognl:page.infoMessage
class=info--- Info 
message ---/span
/span
/span

--- Here is the actual ShowMessages.jwc
?xml version=1.0 encoding=UTF-8?

!DOCTYPE component-specification PUBLIC
  -//Apache Software Foundation//Tapestry Specification 4.0//EN
  http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd;

component-specification class=proto.component.ShowMessages 
allow-body=no allow-informal-parameters=no
/component-specification


How do you arrive at I need *.class files for this when there are no java 
files?
Should there be java files for this component?

Anyhow... I still receive the namespace exception... even after I tore the 
components out and pre-built/deployed them from within their own private 
proto.component maven project as a proto.component-1.0.jar which is a custom

component deliverable... kinda like contrib.

I look forward to your feedback.

- cheers

Ken

-- Here is the new application file
?xml version=1.0 encoding=UTF-8?
!DOCTYPE application PUBLIC
  -//Apache Software Foundation//Tapestry Specification 4.0//EN
  http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd;
!-- generated by Spindle, http://spindle.sourceforge.net --
DEFANGED_application name=tap.proto
DEFANGED_meta key=org.apache.tapestry.page-class-packages
value=proto/
DEFANGED_meta key=org.apache.tapestry.component-class-packages 
value=proto.component/

library id=trails 
specification-path=/org/trails/component/trails.library/
library id=contrib 
specification-path=/org/apache/tapestry/contrib/Contrib.library/
library id=tacos specification-path=/net/sf/tacos/Tacos.library/
library id=proto.component 
specification-path=/proto/component/proto.component.library/

/application

--- Here is the new library file from the private component project
?xml version=1.0 encoding=UTF-8?
!DOCTYPE application
  PUBLIC -//Apache Software Foundation//Tapestry Specification 4.0//EN
  http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd;
!-- generated by Spindle, http://spindle.sourceforge.net --


library-specification

descriptionPrototype Component library/description

DEFANGED_meta key=org.apache.tapestry.component-class-packages 
value=proto.component/

library id=trails 
specification-path=/org/trails/component/trails.library/
library id=contrib 
specification-path=/org/apache/tapestry/contrib/Contrib.library/
library id=tacos
specification-path=/net/sf/tacos/Tacos.library/


component-type type=ShowError specification-path=ShowError.jwc/
component-type type=ShowMessages 
specification-path=ShowMessages.jwc/

/library-specification

Everything is aligned pathwise within each jar/war



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


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



RE: RE Component ApplicationRuntimeException... Tap-4.1.1 help please (thanks)

2006-10-17 Thread James Carman
Where are your .jwc/.html files located now?

-Original Message-
From: Ken nashua [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 17, 2006 2:32 PM
To: users@tapestry.apache.org
Subject: RE Component ApplicationRuntimeException... Tap-4.1.1 help please
(thanks)

Well i went into the private component library and omitted 
class=proto.component.ShowMessages from the jwc

The exception continues even after re-clean and rebuild/deploy.

James, I appreciate your perseverence.

Not sure when I may get onto developing real stuff.

That exception continues to hamper any progress.

I am unable to operate any custom components inplace or from within their 
own jar (like contrib).

Has anyone gotten anything custom going for tap-4.1.1 ?

Additional feedback/suggestions are appreciated.

--- Here is the latest application module
?xml version=1.0 encoding=UTF-8?
!DOCTYPE application PUBLIC
  -//Apache Software Foundation//Tapestry Specification 4.0//EN
  http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd;

DEFANGED_application name=tap.proto
DEFANGED_meta key=org.apache.tapestry.page-class-packages
value=proto/

library id=contrib 
specification-path=/org/apache/tapestry/contrib/Contrib.library/
library id=tacos specification-path=/net/sf/tacos/Tacos.library/
library id=proto.component 
specification-path=/proto/component/proto.component.library/
/application

--- Here is the latest stack trace
An exception has occurred.

You may continue by restarting the session.

[ +/- ] Exception: Component 'ShowMessages' not found in 
[EMAIL PROTECTED]DEFANGED_application].
org.apache.hivemind.ApplicationRuntimeException
Component 'ShowMessages' not found in
[EMAIL PROTECTED]DEFANGED_application].
location:   context:/Login.html, line 5
1   html jwcid=@Shell title=message:page.title
2   body jwcid=@Body
3
4   h1span jwcid=@Insert value=message:page.title//h1
5   span jwcid=@ShowMessages/
6   DEFANGED_form jwcid=@Form
7   success=listener:onFormSubmit
8   cancel=listener:onFormCancel name=loginForm
9   clientValidationEnabled=ognl:true
delegate=bean:validationDelegate
10
Stack Trace:

* 
org.apache.tapestry.resolver.ComponentSpecificationResolverImpl.resolve(Comp
onentSpecificationResolverImpl.java:165)
* 
$ComponentSpecificationResolver_10e57863f3f.resolve($ComponentSpecificationR
esolver_10e57863f3f.java)
* 
$ComponentSpecificationResolver_10e57863f40.resolve($ComponentSpecificationR
esolver_10e57863f40.java)
* 
org.apache.tapestry.services.impl.DefaultParserDelegate.getAllowBody(Default
ParserDelegate.java:70)
* 
org.apache.tapestry.parse.TemplateParser.processComponentStart(TemplateParse
r.java:997)
* 
org.apache.tapestry.parse.TemplateParser.startTag(TemplateParser.java:868)
* 
org.apache.tapestry.parse.TemplateParser.parse(TemplateParser.java:516)
* 
org.apache.tapestry.parse.TemplateParser.parse(TemplateParser.java:358)



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


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



RE: @Component whoas... Tap-4.1.1 help please (thanks)

2006-10-13 Thread James Carman
As I said, Tapestry can't find your page class.  It doesn't know that
Login.html is supposed to use the Login class you've defined.  Have you told
it the default package to look for page classes?  Are your templates/page
classes in the right places?



-Original Message-
From: Ken nashua [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 13, 2006 11:22 AM
To: users@tapestry.apache.org
Subject: @Component whoas... Tap-4.1.1 help please (thanks)

Guys,

All I am trying to do is operate a model object Person.getEmailAddress() 
from html to java.


Whats the deal with this notation...

@Component(type = TextField, id = emailAddress, bindings = {
value = ognl:person.emailAddress,
displayName = message:label.emailAddress, validators = required
})
public abstract TextField getEmailAddressComponent();
public abstract String getEmailAddress();

I cannot get past it. it keeps yeilding

[ +/- ] Exception: Component emailAddress conflicts with a prior declaration

in the specification (at Annotation 
@org.apache.tapestry.annotations.Component(inheritInformalParameters=false, 
type=TextField, bindings=[value = ognl:person.emailAddress, displayName = 
message:label.emailAddress, validators = required], id=emailAddress) of 
public abstract org.apache.tapestry.form.TextField 
proto.Login.getEmailAddress()).

All I want to do is use

td
input jwcid=[EMAIL PROTECTED] value=ognl:person.emailAddress
validators=validators:required 
displayName=message:label.emailAddress /
/td

If I swap or omit any of the accessor methods it keeps complaining.

Is tap-4.1.1 usable?

Thanks in advance



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



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



RE: @Component whoas... Tap-4.1.1 help please (thanks)

2006-10-13 Thread James Carman
The fact that (from his previous email) Tapestry was saying that it can't
find an emailAddress property on the generated page class BasePage_4
means that it's not using his Login page class or else the generated page
class name would be something like Login_x.  So, that leads me to believe
that Tapestry isn't finding his page class.

He may have changed something in the meantime, though.  

-Original Message-
From: Robert Zeigler [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 13, 2006 11:41 AM
To: Tapestry users
Subject: Re: @Component whoas... Tap-4.1.1 help please (thanks)

James Carman wrote:

As I said, Tapestry can't find your page class.  It doesn't know that
Login.html is supposed to use the Login class you've defined.  Have you
told
it the default package to look for page classes?  Are your templates/page
classes in the right places?

  


I'm not so sure that's right... looking at the exception, emailAddress 
conflicts with a prior declaration.
In fact, looking at things more closely... I would agree with tapestry 
(note: Ken, ignore my first e-mail, or,
at least consider this e-mail in conjunction with that e-mail. :):

Quoting Ken:

All I want to do is use

td
input jwcid=[EMAIL PROTECTED] value=ognl:person.emailAddress
validators=validators:required 
displayName=message:label.emailAddress /
/td


It looks to me like he's trying to mix informal components with 
formal ones.
Since he's already defining the emailAddress component via an 
annotation, shouldn't the template be simply:

td
  input jwcid=emailAddress /
/td

??

You would get the same (or a very similar) exception in tapestry3 if you 
tried to do something like:

.page:
  component id=emailAddress type=TextField
 ...
  /component
 
.html:
  input jwcid=[EMAIL PROTECTED]/

... you've already defined the emailAddress component in your .page spec 
(or, in this case, via an annotation in the class file),
and you're attempting to redefine it in the template.


Robert


-Original Message-
From: Ken nashua [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 13, 2006 11:22 AM
To: users@tapestry.apache.org
Subject: @Component whoas... Tap-4.1.1 help please (thanks)

Guys,

All I am trying to do is operate a model object Person.getEmailAddress() 
from html to java.


Whats the deal with this notation...

@Component(type = TextField, id = emailAddress, bindings = {
   value = ognl:person.emailAddress,
   displayName = message:label.emailAddress, validators = required
})
public abstract TextField getEmailAddressComponent();
public abstract String getEmailAddress();

I cannot get past it. it keeps yeilding

[ +/- ] Exception: Component emailAddress conflicts with a prior
declaration

in the specification (at Annotation 
@org.apache.tapestry.annotations.Component(inheritInformalParameters=false,

type=TextField, bindings=[value = ognl:person.emailAddress, displayName = 
message:label.emailAddress, validators = required], id=emailAddress) of 
public abstract org.apache.tapestry.form.TextField 
proto.Login.getEmailAddress()).

All I want to do is use

td
input jwcid=[EMAIL PROTECTED] value=ognl:person.emailAddress
   validators=validators:required 
displayName=message:label.emailAddress /
/td

If I swap or omit any of the accessor methods it keeps complaining.

Is tap-4.1.1 usable?

Thanks in advance



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



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




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



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



RE: @Component whoas... Tap-4.1.1 help please (thanks)

2006-10-13 Thread James Carman
No problem.  I've seen that error many times before (in my own experience
especially).  I've learned to look for BasePage_x when I get those unknown
property things.  

-Original Message-
From: Robert Zeigler [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 13, 2006 12:57 PM
To: Tapestry users
Subject: Re: @Component whoas... Tap-4.1.1 help please (thanks)

Right... I just looked at his original e-mail and the exception is 
different than
the one he reported later (which I didn't realize before; that's what I 
get for 1/2 reading e-mails. :).
Apologies if I came across short.

Robert

James Carman wrote:

The fact that (from his previous email) Tapestry was saying that it can't
find an emailAddress property on the generated page class BasePage_4
means that it's not using his Login page class or else the generated page
class name would be something like Login_x.  So, that leads me to believe
that Tapestry isn't finding his page class.

He may have changed something in the meantime, though.  

-Original Message-
From: Robert Zeigler [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 13, 2006 11:41 AM
To: Tapestry users
Subject: Re: @Component whoas... Tap-4.1.1 help please (thanks)

James Carman wrote:

  

As I said, Tapestry can't find your page class.  It doesn't know that
Login.html is supposed to use the Login class you've defined.  Have you


told
  

it the default package to look for page classes?  Are your templates/page
classes in the right places?

 




I'm not so sure that's right... looking at the exception, emailAddress 
conflicts with a prior declaration.
In fact, looking at things more closely... I would agree with tapestry 
(note: Ken, ignore my first e-mail, or,
at least consider this e-mail in conjunction with that e-mail. :):

Quoting Ken:

All I want to do is use

td
input jwcid=[EMAIL PROTECTED] value=ognl:person.emailAddress
   validators=validators:required 
displayName=message:label.emailAddress /
/td


It looks to me like he's trying to mix informal components with 
formal ones.
Since he's already defining the emailAddress component via an 
annotation, shouldn't the template be simply:

td
  input jwcid=emailAddress /
/td

??

You would get the same (or a very similar) exception in tapestry3 if you 
tried to do something like:

.page:
  component id=emailAddress type=TextField
 ...
  /component
 
.html:
  input jwcid=[EMAIL PROTECTED]/

... you've already defined the emailAddress component in your .page spec 
(or, in this case, via an annotation in the class file),
and you're attempting to redefine it in the template.


Robert

  

-Original Message-
From: Ken nashua [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 13, 2006 11:22 AM
To: users@tapestry.apache.org
Subject: @Component whoas... Tap-4.1.1 help please (thanks)

Guys,

All I am trying to do is operate a model object Person.getEmailAddress() 


from html to java.
  

Whats the deal with this notation...

@Component(type = TextField, id = emailAddress, bindings = {
  value = ognl:person.emailAddress,
  displayName = message:label.emailAddress, validators = required
})
public abstract TextField getEmailAddressComponent();
public abstract String getEmailAddress();

I cannot get past it. it keeps yeilding

[ +/- ] Exception: Component emailAddress conflicts with a prior


declaration
  

in the specification (at Annotation 
@org.apache.tapestry.annotations.Component(inheritInformalParameters=false
,



  

type=TextField, bindings=[value = ognl:person.emailAddress, displayName = 
message:label.emailAddress, validators = required], id=emailAddress) of 
public abstract org.apache.tapestry.form.TextField 
proto.Login.getEmailAddress()).

All I want to do is use

td
   input jwcid=[EMAIL PROTECTED] value=ognl:person.emailAddress
  validators=validators:required 
displayName=message:label.emailAddress /
/td

If I swap or omit any of the accessor methods it keeps complaining.

Is tap-4.1.1 usable?

Thanks in advance



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



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






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



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




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



-
To unsubscribe, e-mail: [EMAIL

RE: RE @Component whoas... Tap-4.1.1 help please (thanks)

2006-10-13 Thread James Carman
The 4.0.x versions were ripe enough for that.  I don't use page spec files
at all in my applications, especially with Tapestry-Autowire.

-Original Message-
From: Ken nashua [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 13, 2006 1:10 PM
To: users@tapestry.apache.org
Subject: RE @Component whoas... Tap-4.1.1 help please (thanks)

Thanks Guys for the attention and apologies for the extra posts... web 
latency I guess. Wasn't sure I even had a mailing list for a bit.

Anyway...

I have checked out and built all the tapestry-4.1.1 etc...

I am trying to create a tapestry app that has no Login.page file

James, I took your advise and added the following to my .application file

DEFANGED_application name=tap.proto 
  DEFANGED_meta key=org.apache.tapestry.page-class-packages
value=proto/
  DEFANGED_meta key=org.apache.tapestry.component-class-packages
value=proto/

library id=contrib 
specification-path=classpath:/org/apache/tapestry/contrib/Contrib.library/


/application

That got me a bit further into the @Component stuff... which happens to be 
my latest last post.

My questions remains... (for 4.1.1 experienced folk out there, no offense)

Is tap-4.1.1 ripe enough to omit the page-specification file altogether and 
go with @Component in the java file?

Thanks in advance



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



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



RE: RE @Component whoas... Tap-4.1.1 help please (thanks)

2006-10-13 Thread James Carman
You're defining your component in both places.  Take it out of the page spec
file and see what happens.


-Original Message-
From: Ken nashua [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 13, 2006 1:17 PM
To: users@tapestry.apache.org
Subject: RE @Component whoas... Tap-4.1.1 help please (thanks)

Ok, so currently I have omitted the inline component annotation from the 
java file and moved it back to the Login.page file

!DOCTYPE page-specification PUBLIC -//Apache Software Foundation//Tapestry

Specification 4.0//EN 
http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd;

page-specification class=proto.Login
descriptionTapestry Proto 1.0/description
component id=emailAddress type=TextField
binding name=value value=ognl:person.emailAddress/
binding name=validators value=validators:required/
binding name=displayName value=message:label.emailAddress/
/component
component id=password type=TextField
binding name=hidden value=true/
binding name=value value=ognl:person.password/
binding name=validators value=validators:required,minLength=6/
binding name=displayName value=message:label.password/
/component
component id=rememberMe type=Checkbox
binding name=value value=ognl:rememberMe/
binding name=displayName value=message:label.rememberMe/
/component
/page-specification

But now I am receiving this...

[ +/- ] Exception: Component emailAddress conflicts with a prior declaration

in the specification (at context:/WEB-INF/Login.page, line 5, column 51).
org.apache.hivemind.ApplicationRuntimeException
Component emailAddress conflicts with a prior declaration in the 
specification (at context:/WEB-INF/Login.page, line 5, column 51).
component:  [EMAIL PROTECTED]
location:   context:/Login.html, line 17
12  tr
13  td
14  span jwcid=@Insert 
value=message:label.emailAddressEmailAddress:/span
15  /td
16
17  tdinput jwcid=[EMAIL PROTECTED] 
value=ognl:person.emailAddress
18  validators=validators:required
displayName=message:label.emailAddress 
size=40 //td

Thanks in advance



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



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



RE: RE @Component whoas... Tap-4.1.1 help please (thanks)

2006-10-13 Thread James Carman
1.  Autowire is a feature that I implemented as a separate library and was
integrated into the 4.1 branch.  Basically, it allows you to declare an
abstract getter for a type of a HiveMind service.  For example, you can do
this:

public abstract HttpServletRequest getHttpServletRequest();

And, Tapestry (in 4.1, but with the assistance of the tapestry-autowire
module in 4.0) will automatically autowire that to the HiveMind service
point tapestry.globals.HttpServletRequest.  If there is exactly one
service point in HiveMind that matches the type of the getter or read-only
property, then it can be autowired.

2.  I do believe Trails is using Tapernate as part of the library now, yes.

3.  There are a lot of folks using Trails currently and I believe they're
close to a 1.0 release.

-Original Message-
From: Ken nashua [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 13, 2006 2:33 PM
To: users@tapestry.apache.org
Subject: RE @Component whoas... Tap-4.1.1 help please (thanks)

Thanks guys,

I omitted the Login.page file and tore out the annotations.

All that was left was the Login.html and thats even better for me.

So it runs alright.

James I has a few ques if you don;t mind.

1. What is Auto-wire?
2. Does trails use your tapernate as part of it's processing?
3. Why has nobody been checking into trails? Is it done?

Thanks in advance



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



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



Re: File include

2006-10-12 Thread James Carman
Write a custom component.  Then, use the component in your page.

 Hi,
 how can I do a file include in tapestry, something like jsp.include in
 jsp?

 thanky you



 __
 LLama Gratis a cualquier PC del Mundo.
 Llamadas a fijos y móviles desde 1 céntimo por minuto.
 http://es.voice.yahoo.com

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



James Carman, President
Carman Consulting, Inc.


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



Re: accessing state objects from EngineService

2006-10-09 Thread James Carman
Dependency injection is much easier in 4.1.  Tapestry will autowire
HiveMind services into your components/pages (provided that there is
exactly one service in the registry of the same type as the property).  If
you're on 4.0, there's a tapestry-autowire subproject (the code was added
into Tapestry in 4.1) in the [EMAIL PROTECTED] project.  It's available
via svn:

http://svn.javaforge.com/svn/tapestry/tapestry-autowire/trunk/


 You might like to check out the following page.

 http://lombok.demon.co.uk/tapestry4Demo/Inject.html

 Shing

 -- Marcus Irven [EMAIL PROTECTED] wrote:

 I have created a new engine service, how can I
 access a State Object?

 Thanks,
 Marcus


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




 Home page :
   http://uk.geocities.com/matmsh/index.html





 ___
 All new Yahoo! Mail The new Interface is stunning in its simplicity and
 ease of use. - PC Magazine
 http://uk.docs.yahoo.com/nowyoucan.html

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



James Carman, President
Carman Consulting, Inc.


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



Re: Thoughts about performance monitoring in Tapestry

2006-10-09 Thread James Carman
Have you tried turning on Tapestry's friendly URLs?  That would give you
some better URLs to deal with maybe.

 Hi,

 I'm currently analyzing an application built completely with Tapestry,
 and additionally uses Spring, Hibernate, and EJBs. The main tool for
 the performance analysis is an agent that is deployed in WebLogic and
 reads HTTP requests, bean calls, and mostly everything that happens
 inside the application (with, of course, a performance penalty while
 the agent is on).

 But, obviously, there are only two main HTTP requests that show up in
 the tool: a GET on /app_name/app, and POST on the same URL. Although
 it is possible to analyze the request parameters, it would be very
 hard to determine which pages are being called the most, which take
 the most time to render, etc, without adding some kind of logging to
 the app source, because most of the time the parameters, as all of you
 know, are everything but friendly (the app is built with TP 3.0).

 So the tool really has a hard time trying to figure which requests are
 the slowest, and the bean request tree is a huge list of all the beans
 that are called from within Tapestry .java controllers, regardless of
 the page. Since the app is using IoC through Spring, this makes it
 even harder to figure which calls are being made at any specific
 point.

 The tool does a fairly good job hooking itself to the app server and
 its JVMs, so there's still a pretty large list of EJBs, SQL commands
 and Spring services that might need to be looked at, because they can
 take as much as 30 seconds to execute. But I'm hearing some voices
 that speak Hmm, maybe Tapestry is to blame here, since all requests
 go through Tapestry's servlet and filter, and I have very few elements
 to fight those voices.

 So I have several thoughts and questions, hoping that somebody will
 shed some light on this:

 * Anyone knows of a tool that might be less request-oriented that
 maybe even know how to interpret TP's parameters?

 * If small logging statements were to be added to the .java pages,
 which would be the method(s) to add the logging to? pageBeginRender is
 the obvious candidate here, but that would only take into account
 rendering, without form submitting and component render cycles...

 * Is there a way to, through configuration, improve Tapestry's reading
 of these kind of statistics? I'm thinking maybe friendly URLs, but
 there might be other answers...

 * How to really determine how much time Tapestry is taking in doing
 its job? For example, he tool is displaying a cumulative time of 4.61
 seconds for /app_name/app, but an exclusive time (meaning the time
 that the method spends by itself, without the accessories) of 0.025
 seconds. Now that sounds great, but does it seem logical? I mean,
 maybe some other components should be taken into account.

 * Anyone knows if Spring's methods to invoke and instantiate EJBs are
 slow? The tool says that it can take as much as 2 seconds to do so!!
 Maybe another place where traditional monitoring lacks?

 Regards,

 Dario

 --
 Some weasel took the cork out of my lunch.
   -- W.C. Fields

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



James Carman, President
Carman Consulting, Inc.


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



Re: tapestry-captcha/acegi integration

2006-10-05 Thread James Carman
HiveMind doesn't require you to explicitly set your properties.  It has an
autowire feature.  So, HiveMind will set those properties for you just
becuase it has service points defined which implement those interfaces.

Tapestry-Acegi is not very well documented currently, but it's not really
rocket science.  All I did was set up the servlet filters as HiveMind
services and create a mechanism where you can supply servlet filters as
web request servicer filters (it wraps them and plugs them into the
pipeline).  I didn't want to rewrite all of the servlet filters that Acegi
is based upon, so I came up with the bridging idea and it seems to work
out well.  I plan on doing more work, like setting up form-based
authentication and giving examples of all of the setup options.


 where did you find any documentation on tapestry-acegi ?  I tried using it
 breifly, but gave up as I couldn't find the source or any documentation.

 On 10/5/06, Denis McCarthy [EMAIL PROTECTED] wrote:

 Thanks for the response James. The relevant part of the hivemodule.xml
 in the version I downloaded looks like this:
 module id=tapestry.captcha version=1.0.0
 .
 .
 .

  service-point id=CaptchaEngineService
 interface=org.apache.tapestry.engine.IEngineService
  invoke-factory
  construct
 class=com.javaforge.tapestry.captcha.service.CaptchaEngineService
  set property=mimeType
 value=${tapestry.captcha.mimeType}/
  /construct
  /invoke-factory
  /service-point
 .
 .
 .

 /module

 As you can see there is no LinkFactory set for the CaptchaEngineService
 here. When I step through the code in the CaptchaEngineService prior to
 the NPE, the LinkFactory is indeed null. Am I missing some extra
 configuration or something?
 Thanks for your help
 Denis
 James Carman wrote:
  Denis,
 
  The hivemodule.xml file for Tapestry-Captcha will take care of wiring
 in
 the
  linkFactory and imageCaptchaService.
 
  James
 
  -Original Message-
  From: Denis McCarthy [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, October 04, 2006 11:08 AM
  To: Tapestry users
  Subject: tapestry-captcha/acegi integration
 
  Hi,
  I'm attempting to integrate James Carman's tapestry-captcha library
 into
  a proof of concept app I'm putting together. The acegi stuff is
  redirecting correctly to a very simple captcha page just containg a
  reference to the captcha component from tapestry-captcha.
  Here's the .page:
  page-specification class=org.apache.tapestry.html.BasePage
 component id=captcha
 type=captcha:CaptchaImage/component
  /page-specification
 
  However, when the app jumps to this page, I'm getting a null pointer
  exception in the getLink() method. After looking at the code in the
  CaptchaEngineService class, it seems like I need to define both a
  LinkFactory and an ImageCaptchaService for the component. I haven't
  messed with services before, so I'd like to know how to go about
  defining a linkfactory for this component?.
 
 
  As I'm using Acegi, I'd like to use acegi's
  CaptchaValidationProcessingFilter to process the captcha's success or
  failure. This filter uses the presence of a validation parameter
  (defined in the spring application context) to decide whether to
  validate the request or not. Is it possible in tapestry to ensure that
  the validation parameter passed back in the http request has a
 specific
  name, so that the filter will pick it up and validate whether the
  captcha was correctly entered?
  If anyone needs any further info just ask
  TIA
  Denis Mc.
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 

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




 --
 Ed Ross
 [EMAIL PROTECTED]



James Carman, President
Carman Consulting, Inc.


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



Re: tapestry-captcha/acegi integration

2006-10-05 Thread James Carman
Denis,

The tapestry-captcha library does work, at least in isolation.  Have you
tried running with without the Acegi stuff baked in too?  Can you turn up
logging to see what HiveMind is trying to wire in when it creates that
CaptchaEngineService?  It will tell you what it wires and I'm pretty sure
that it'll tell you why it doesn't wire the other properties (two service
points exist that match the type, maybe).

James

 Thanks again James.
 I see what you're saying, but the fact is that I _am_ getting an NPE
 when calling a method on the LinkFactory in the CaptchaEngineService,
 and the LinkFactory within the Service is indeed null (meaning that it
 is not getting wired up, I assume). I'm sure I'm missing something in my
 app that's causing this, but I don't know what.

 I'm using tap 4.1. I thought that might be the problem (as
 tapestry-captcha has 4.0 as a dependency in its pom) But I get the same
 exception in CaptchaEngineService when I try it with 4.0.

 If anyone knows of any error that would cause hivemind not to wire up
 services properly I'd be more than grateful - I know this is something
 small
 TIA
 Denis

 James Carman wrote:
 HiveMind doesn't require you to explicitly set your properties.  It has
 an
 autowire feature.  So, HiveMind will set those properties for you just
 becuase it has service points defined which implement those interfaces.

 Tapestry-Acegi is not very well documented currently, but it's not
 really
 rocket science.  All I did was set up the servlet filters as HiveMind
 services and create a mechanism where you can supply servlet filters as
 web request servicer filters (it wraps them and plugs them into the
 pipeline).  I didn't want to rewrite all of the servlet filters that
 Acegi
 is based upon, so I came up with the bridging idea and it seems to work
 out well.  I plan on doing more work, like setting up form-based
 authentication and giving examples of all of the setup options.


 where did you find any documentation on tapestry-acegi ?  I tried using
 it
 breifly, but gave up as I couldn't find the source or any
 documentation.

 On 10/5/06, Denis McCarthy [EMAIL PROTECTED] wrote:
 Thanks for the response James. The relevant part of the hivemodule.xml
 in the version I downloaded looks like this:
 module id=tapestry.captcha version=1.0.0
 .
 .
 .

  service-point id=CaptchaEngineService
 interface=org.apache.tapestry.engine.IEngineService
  invoke-factory
  construct
 class=com.javaforge.tapestry.captcha.service.CaptchaEngineService
  set property=mimeType
 value=${tapestry.captcha.mimeType}/
  /construct
  /invoke-factory
  /service-point
 .
 .
 .

 /module

 As you can see there is no LinkFactory set for the
 CaptchaEngineService
 here. When I step through the code in the CaptchaEngineService prior
 to
 the NPE, the LinkFactory is indeed null. Am I missing some extra
 configuration or something?
 Thanks for your help
 Denis
 James Carman wrote:
 Denis,

 The hivemodule.xml file for Tapestry-Captcha will take care of wiring
 in
 the
 linkFactory and imageCaptchaService.

 James

 -Original Message-
 From: Denis McCarthy [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, October 04, 2006 11:08 AM
 To: Tapestry users
 Subject: tapestry-captcha/acegi integration

 Hi,
 I'm attempting to integrate James Carman's tapestry-captcha library
 into
 a proof of concept app I'm putting together. The acegi stuff is
 redirecting correctly to a very simple captcha page just containg a
 reference to the captcha component from tapestry-captcha.
 Here's the .page:
 page-specification class=org.apache.tapestry.html.BasePage
component id=captcha
 type=captcha:CaptchaImage/component
 /page-specification

 However, when the app jumps to this page, I'm getting a null pointer
 exception in the getLink() method. After looking at the code in the
 CaptchaEngineService class, it seems like I need to define both a
 LinkFactory and an ImageCaptchaService for the component. I haven't
 messed with services before, so I'd like to know how to go about
 defining a linkfactory for this component?.


 As I'm using Acegi, I'd like to use acegi's
 CaptchaValidationProcessingFilter to process the captcha's success or
 failure. This filter uses the presence of a validation parameter
 (defined in the spring application context) to decide whether to
 validate the request or not. Is it possible in tapestry to ensure
 that
 the validation parameter passed back in the http request has a
 specific
 name, so that the filter will pick it up and validate whether the
 captcha was correctly entered?
 If anyone needs any further info just ask
 TIA
 Denis Mc.

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



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED

RE: tapestry-captcha/acegi integration

2006-10-04 Thread James Carman
Denis,

The hivemodule.xml file for Tapestry-Captcha will take care of wiring in the
linkFactory and imageCaptchaService.  

James 

-Original Message-
From: Denis McCarthy [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 04, 2006 11:08 AM
To: Tapestry users
Subject: tapestry-captcha/acegi integration

Hi,
I'm attempting to integrate James Carman's tapestry-captcha library into 
a proof of concept app I'm putting together. The acegi stuff is 
redirecting correctly to a very simple captcha page just containg a 
reference to the captcha component from tapestry-captcha.
Here's the .page:
page-specification class=org.apache.tapestry.html.BasePage
 component id=captcha type=captcha:CaptchaImage/component
/page-specification

However, when the app jumps to this page, I'm getting a null pointer 
exception in the getLink() method. After looking at the code in the 
CaptchaEngineService class, it seems like I need to define both a 
LinkFactory and an ImageCaptchaService for the component. I haven't 
messed with services before, so I'd like to know how to go about 
defining a linkfactory for this component?.


As I'm using Acegi, I'd like to use acegi's 
CaptchaValidationProcessingFilter to process the captcha's success or 
failure. This filter uses the presence of a validation parameter 
(defined in the spring application context) to decide whether to 
validate the request or not. Is it possible in tapestry to ensure that 
the validation parameter passed back in the http request has a specific 
name, so that the filter will pick it up and validate whether the 
captcha was correctly entered?
If anyone needs any further info just ask
TIA
Denis Mc.

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



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



RE: using hivemind in a test situation... looking for example hivemodule xml files.

2006-10-03 Thread James Carman
You can either build up your registry by hand using the RegistryBuilder (do
not call constructDefaultRegistry) or you can test your service
implementations outside the registry and plug in the dependencies (perhaps
using mock objects) by hand.  I usually like to test outside the registry if
at all possible. 

-Original Message-
From: Patrick Moore [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 02, 2006 5:01 PM
To: Tapestry users
Subject: using hivemind in a test situation... looking for example
hivemodule xml files.

Hi there --

I am trying to figure out how to use hivemind in a test situation. I have a
basic problem (and I do mean basic :-)  ) that someone's sample files will
problem easily answer for me. Its been kind of frustrating because the
hivemind documentation says that this a reason to use hivemind -- but then
no example is given!

What I want to do is be able to have test modules be supplied instead of the
'real' modules. So for example, I have module 'A' depend on module 'B'
(using dependency).  However, during test time I want to be able to say
that module 'C' should be used instead of module 'B' to satisfy module 'A's
dependency. Is there a way to do this?

Now I also looked at implementation with the 'if' attribute but there
doesn't seem to be any way to define a value other than on the command-line.
Ideally I would like the module definition to specify whether or not it
wanted to use the test implementation of a service by setting some value.

Any suggestions or examples?

-Pat



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



RE: Timing processing time of a page

2006-09-26 Thread James Carman
Look at the bottom of the generated source.  It will spit out the processing
time automatically for you.  For example:

!-- Render time: ~ 0 ms --



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 26, 2006 1:19 PM
To: users@tapestry.apache.org
Subject: Timing processing time of a page

Hi. I'm wondering if anyone has done any simple timing of the processing for
a page?

I've changed my border slightly so at the start it creates a Date, and at
the end creates another and determines the difference.

However, I think this only works out to be the render time of the page
itself, not the processing time to get all the information for that page
(eg. slow DB queries).

Maybe something like this would go in a Servlet method? I'm really unsure.

Anyone have any insight? This way I can work on tuning my application and
have some hard numbers to see if, on average, they are getting smaller or
not.

Thanks,
Greg

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




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



RE: Timing processing time of a page

2006-09-26 Thread James Carman
I'm on tap4, too.  Maybe it's because I'm using a @Shell component?  I
always just thought it happened automagically.  :-)  


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 26, 2006 1:32 PM
To: users@tapestry.apache.org
Subject: RE: Timing processing time of a page

James,

Does this need to be enabled somehow? I don't see it in the HTML source.
tap 4.

Thanks,
Greg

-Original Message-
From: James Carman [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 26, 2006 1:25 PM
To: 'Tapestry users'
Subject: RE: Timing processing time of a page


Look at the bottom of the generated source.  It will spit out the processing
time automatically for you.  For example:

!-- Render time: ~ 0 ms --



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 26, 2006 1:19 PM
To: users@tapestry.apache.org
Subject: Timing processing time of a page

Hi. I'm wondering if anyone has done any simple timing of the processing for
a page?

I've changed my border slightly so at the start it creates a Date, and at
the end creates another and determines the difference.

However, I think this only works out to be the render time of the page
itself, not the processing time to get all the information for that page
(eg. slow DB queries).

Maybe something like this would go in a Servlet method? I'm really unsure.

Anyone have any insight? This way I can work on tuning my application and
have some hard numbers to see if, on average, they are getting smaller or
not.

Thanks,
Greg

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




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


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




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



RE: How to listent for the Request Cycle End

2006-09-22 Thread James Carman
Sorry.  Try tapestry.request.WebRequestServicerPipeline.  As I said, it was
off the top of my head.  Sorry for the typo.

-Original Message-
From: Dobrin Ivanov [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 22, 2006 1:45 PM
To: Tapestry users
Subject: RE: How to listent for the Request Cycle End

10x

Now i get the error below. Any chance that there are
some docs for this?

1547 [main] ERROR
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/weprom]
 - Servlet /weprom threw load() exception
org.apache.hivemind.ApplicationRuntimeException: Error
at context:/WEB-INF/hivemodule.xml, line 19, column
79: Module weprom has contributed to unknown con
figuration point
hivemind.request.WebRequestServicerPipeline. The
contribution has been ignored.
[context:/WEB-INF/hivemodule.xml, line 19, column 79]
at
org.apache.hivemind.impl.StrictErrorHandler.error(StrictErrorHandler.java:39
)

--- James Carman [EMAIL PROTECTED] wrote:

 You can put it in your WEB-INF folder or in
 WEB-INF/classes/META-INF.
 Tapestry (actually HiveMind) will find it in either
 case.
 
 -Original Message-
 From: Dobrin Ivanov
 [mailto:[EMAIL PROTECTED] 
 Sent: Friday, September 22, 2006 1:26 PM
 To: Tapestry users
 Subject: RE: How to listent for the Request Cycle
 End
 
 And where should be located my hivemodule.xml? (I'm
 using just Tapestry, I know it lies above hivemind
 microkernel...)
 
 
 --- James Carman [EMAIL PROTECTED] wrote:
 
  To plug into the WebRequestServicerPipeline, you
  implement the
  WebRequestServicerFilter interface:
  
  public class MyFilter implements
  WebRequestServicerFilter
  {
  }
  
  Then, in your hivemodule.xml you plug it into the
  pipeline:
  
  contribution
 

configuration-id=hivemind.request.WebRequestServicerPipeline
filter name=MyFilter
 object=instance:MyFilter
  /
  /contribution
  
  That's off the top of my head, but you get the
 idea.
   This basically acts
  like a servlet filter, but you can plug
  hivemind-managed filters in (so you
  can inject stuff into your implementation
 objects).
  
  
  -Original Message-
  From: Dobrin Ivanov
  [mailto:[EMAIL PROTECTED] 
  Sent: Wednesday, September 20, 2006 1:30 PM
  To: Tapestry users
  Subject: Re: How to listent for the Request Cycle
  End
  
  I do not know about this custom Engine classes
  changes
  (frowned)... 
is there some information about this topic? 
  
  .. and also the other one with the
  pipelines/WebRequestServicerPipeline/interceptors?
  
  --- James Carman [EMAIL PROTECTED]
 wrote:
  
   You can plugin to the webrequest servicer
  pipeline.
   
Ummm... you could do that too.  You're correct
   that it would avoid the
visit-from-session inelegant bit.  It would be
   conceptually similar to
the servlet filter approach.  The downside
 would
   be that custom Engine
classes are frowned upon as Tapestry goes
  forward.
I'm not sure there
is an Engine.getVisit() in 4.1.
   
None of the approaches is perfect since
 Tapestry
   doesn't provide a
built-in end-of-request hook.  Well, there is
 a
   call to
monitor.serviceEnd() that you could use
 without
   subclassing Engine.
   
   
Dobrin Ivanov wrote:
Hi,
Thanks Bryan, this looks like a hack:)
   
What do you think if I override the Engine's
   method:
   
  public void service(WebRequest request,
   WebResponse
response) throws IOException {
super.service(request, response);
// insert code here
}
   
Is this a bad approach?
   
   
--- Bryan Lewis [EMAIL PROTECTED] wrote:
   
   
It sounds like a servlet listener method
 could
   work
for you.  Or a
servlet filter as in the previous
 suggestion. 
   Both
would give you a
hook into the end-of-request, and you can
 get
  to
   the
Visit via the
session.  Here's a listener approach.
   
   
public class EventListener implements
ServletRequestListener
{
public void
requestInitialized(ServletRequestEvent sre)
 {
// This method might not need to do
anything.
}
   
public void
   requestDestroyed(ServletRequestEvent
sre)
{
// Call a static method in your
thread-storage class to get your
data.
   
// The slightly messy part is
 getting
   the
Visit from the session.
HttpSession session =
sre.getServletRequest().getSession(false);
String visitKey = state: + appName
 +
:visit;
Visit visit = (Visit)
session.getAttribute(visitKey);
}
}
   
In your web.xml:
   
listener
   
   
   
   
  
 

listener-classyour.package.EventListener/listener-class
   
/listener
   
   
Dobrin Ivanov wrote:
   
I have designed some small API in order to
   provide
   
the
   
session persistance of the presentation
 layer
(Tapestry - Visit object/HttpSession) to
 the
   model
layer (in order

RE: OT - [Tapestry-Users] - prefix in mail subject?

2006-09-21 Thread James Carman
Can't you categorize based on the recipient?  Gmail offers that as an option
when filtering.

-Original Message-
From: Karthik N [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 21, 2006 10:01 AM
To: Tapestry users
Subject: OT - [Tapestry-Users] - prefix in mail subject?

Is there any way to set up the mails that go out prefixed with
[Tapestry-Users]  or something such?  Just helps categorization of mails an
easier tasks, visually.

Thanks, Karthik



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



Re: How to listent for the Request Cycle End

2006-09-20 Thread James Carman
You can plugin to the webrequest servicer pipeline.

 Ummm... you could do that too.  You're correct that it would avoid the
 visit-from-session inelegant bit.  It would be conceptually similar to
 the servlet filter approach.  The downside would be that custom Engine
 classes are frowned upon as Tapestry goes forward.  I'm not sure there
 is an Engine.getVisit() in 4.1.

 None of the approaches is perfect since Tapestry doesn't provide a
 built-in end-of-request hook.  Well, there is a call to
 monitor.serviceEnd() that you could use without subclassing Engine.


 Dobrin Ivanov wrote:
 Hi,
 Thanks Bryan, this looks like a hack:)

 What do you think if I override the Engine's method:

   public void service(WebRequest request, WebResponse
 response) throws IOException {
 super.service(request, response);
 // insert code here
 }

 Is this a bad approach?


 --- Bryan Lewis [EMAIL PROTECTED] wrote:


 It sounds like a servlet listener method could work
 for you.  Or a
 servlet filter as in the previous suggestion.  Both
 would give you a
 hook into the end-of-request, and you can get to the
 Visit via the
 session.  Here's a listener approach.


 public class EventListener implements
 ServletRequestListener
 {
 public void
 requestInitialized(ServletRequestEvent sre) {
 // This method might not need to do
 anything.
 }

 public void requestDestroyed(ServletRequestEvent
 sre)
 {
 // Call a static method in your
 thread-storage class to get your
 data.

 // The slightly messy part is getting the
 Visit from the session.
 HttpSession session =
 sre.getServletRequest().getSession(false);
 String visitKey = state: + appName +
 :visit;
 Visit visit = (Visit)
 session.getAttribute(visitKey);
 }
 }

 In your web.xml:

 listener



 listener-classyour.package.EventListener/listener-class

 /listener


 Dobrin Ivanov wrote:

 I have designed some small API in order to provide

 the

 session persistance of the presentation layer
 (Tapestry - Visit object/HttpSession) to the model
 layer (in order to be able to cache some session
 related stuff without being aware of how the above
 layer is doing it). So the data is attached to the
 thread and at the end of the request cycle I want

 to

 save it into the Visit object.

 --- Martin Strand [EMAIL PROTECTED] wrote:



 Exactly what do you need this for?
 If you don't need any Tapestry logic, there might

 be

 other ways to do it -
 like a servlet filter or a threaded service that
 implements Discardable.

 On Tue, 19 Sep 2006 21:58:20 +0200, Jesse Kuhnert
 [EMAIL PROTECTED]
 wrote:



 It might not be super fun to learn, but I think


 the tapestry way of


 doing
 this would be to contribute something to the


 WebRequestServicerPipeline


 so
 that you know definitively when the cycle ends


 regardless of what


 services/engines are involved..




 http://tapestry.apache.org/tapestry4/tapestry/hivedocs/config/tapestry.request.WebRequestServicerPipeline.html



 On 9/19/06, Dobrin Ivanov


 [EMAIL PROTECTED] wrote:


 Hi,

 I want some advise of which is the best way to


 catch


 the end of the request cycly. I have tried it


 using a


 PageDetachListener, but the problem is that


 sometimes


 there is more than one page involved into the


 request


 cycle and then I get more than one invocation

 on



 the


 pageDetached(...).
 So I'm wondering if overriding the Engine's
 service(...) method is the best place?

 Thanks and best regards,
 Dobrin




 -



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




 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam

 protection around

 http://mail.yahoo.com



 -

 To unsubscribe, e-mail:

 [EMAIL PROTECTED]

 For additional commands, e-mail:

 [EMAIL PROTECTED]






 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam protection around
 http://mail.yahoo.com

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






James Carman, President
Carman Consulting, Inc.


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



RE: changes to @EventListener

2006-09-20 Thread James Carman
Could you override that default behavior if you wanted and tell it not to
submit the form?

-Original Message-
From: Jesse Kuhnert [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 20, 2006 12:47 PM
To: Tapestry users
Subject: changes to @EventListener

I was thinking that it makes a lot more sense to detect whether or not a
component being targeted is a form component and automatically submit that
form dynamically when the event happens.

What do you think?

-- 
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com



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



Re: How to listent for the Request Cycle End

2006-09-20 Thread James Carman
With this approach, you don't need a custom engine.  It really works just
like a servlet filter.

 I have used a custom engine for displaying images as is described in
 Enjoy
 Web development with Tapestry. Is there an alternative (better) way of
 doing this?

 Cheers,

 On 9/20/06, James Carman [EMAIL PROTECTED] wrote:

 To plug into the WebRequestServicerPipeline, you implement the
 WebRequestServicerFilter interface:

 public class MyFilter implements WebRequestServicerFilter
 {
 }

 Then, in your hivemodule.xml you plug it into the pipeline:

 contribution
 configuration-id=hivemind.request.WebRequestServicerPipeline
   filter name=MyFilter object=instance:MyFilter /
 /contribution

 That's off the top of my head, but you get the idea.  This basically
 acts
 like a servlet filter, but you can plug hivemind-managed filters in (so
 you
 can inject stuff into your implementation objects).


 -Original Message-
 From: Dobrin Ivanov [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, September 20, 2006 1:30 PM
 To: Tapestry users
 Subject: Re: How to listent for the Request Cycle End

 I do not know about this custom Engine classes changes
 (frowned)...
   is there some information about this topic?

 .. and also the other one with the
 pipelines/WebRequestServicerPipeline/interceptors?

 --- James Carman [EMAIL PROTECTED] wrote:

  You can plugin to the webrequest servicer pipeline.
 
   Ummm... you could do that too.  You're correct
  that it would avoid the
   visit-from-session inelegant bit.  It would be
  conceptually similar to
   the servlet filter approach.  The downside would
  be that custom Engine
   classes are frowned upon as Tapestry goes forward.
   I'm not sure there
   is an Engine.getVisit() in 4.1.
  
   None of the approaches is perfect since Tapestry
  doesn't provide a
   built-in end-of-request hook.  Well, there is a
  call to
   monitor.serviceEnd() that you could use without
  subclassing Engine.
  
  
   Dobrin Ivanov wrote:
   Hi,
   Thanks Bryan, this looks like a hack:)
  
   What do you think if I override the Engine's
  method:
  
 public void service(WebRequest request,
  WebResponse
   response) throws IOException {
   super.service(request, response);
   // insert code here
   }
  
   Is this a bad approach?
  
  
   --- Bryan Lewis [EMAIL PROTECTED] wrote:
  
  
   It sounds like a servlet listener method could
  work
   for you.  Or a
   servlet filter as in the previous suggestion.
  Both
   would give you a
   hook into the end-of-request, and you can get to
  the
   Visit via the
   session.  Here's a listener approach.
  
  
   public class EventListener implements
   ServletRequestListener
   {
   public void
   requestInitialized(ServletRequestEvent sre) {
   // This method might not need to do
   anything.
   }
  
   public void
  requestDestroyed(ServletRequestEvent
   sre)
   {
   // Call a static method in your
   thread-storage class to get your
   data.
  
   // The slightly messy part is getting
  the
   Visit from the session.
   HttpSession session =
   sre.getServletRequest().getSession(false);
   String visitKey = state: + appName +
   :visit;
   Visit visit = (Visit)
   session.getAttribute(visitKey);
   }
   }
  
   In your web.xml:
  
   listener
  
  
  
  
 
 listener-classyour.package.EventListener/listener-class
  
   /listener
  
  
   Dobrin Ivanov wrote:
  
   I have designed some small API in order to
  provide
  
   the
  
   session persistance of the presentation layer
   (Tapestry - Visit object/HttpSession) to the
  model
   layer (in order to be able to cache some
  session
   related stuff without being aware of how the
  above
   layer is doing it). So the data is attached to
  the
   thread and at the end of the request cycle I
  want
  
   to
  
   save it into the Visit object.
  
   --- Martin Strand [EMAIL PROTECTED]
  wrote:
  
  
  
   Exactly what do you need this for?
   If you don't need any Tapestry logic, there
  might
  
   be
  
   other ways to do it -
   like a servlet filter or a threaded service
  that
   implements Discardable.
  
   On Tue, 19 Sep 2006 21:58:20 +0200, Jesse
  Kuhnert
   [EMAIL PROTECTED]
   wrote:
  
  
  
   It might not be super fun to learn, but I
  think
  
  
   the tapestry way of
  
  
   doing
   this would be to contribute something to the
  
  
   WebRequestServicerPipeline
  
  
   so
   that you know definitively when the cycle
  ends
  
  
   regardless of what
  
  
   services/engines are involved..
  
  
  
  
  
 

 http://tapestry.apache.org/tapestry4/tapestry/hivedocs/config/tapestry.reque
 st.WebRequestServicerPipeline.html
  
  
  
   On 9/19/06, Dobrin Ivanov
  
  
   [EMAIL PROTECTED] wrote:
  
  
   Hi,
  
   I want some advise of which is the best way
  to
  
  
   catch
  
  
   the end of the request cycly. I have tried
  it
  
  
   using a
  
  
   PageDetachListener, but the problem

RE: [OT] Tapestry + IDEA

2006-09-18 Thread James Carman
One reason folks like it is because it makes it easy to debug.  The
launchers will launch with debugging enabled.  Of course, it's easy to
configure your Tomcat instance to launch with remote debugging enabled.

-Original Message-
From: Konstantin Ignatyev [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 18, 2006 2:00 PM
To: Tapestry users
Subject: Re: [OT] Tapestry + IDEA

I work in IDEA all the time and I simply have a
terminal window always running for a server and
relaunch server (if necessary) from there. 

Personally I never understood necessity to have any
kind of launchers within IDE, perhaps because I always
 build script centric in development and that is that
must work reliably and conveniently.  

--- Kevin Menard [EMAIL PROTECTED] wrote:

 Sorry for the OT question, but I figured this was
 about as good as any 
 place to ask.
 
 For a while now, I've been looking to move to IDEA
 for my Tapestry 
 work.  Unfortunately, I've been unable to find
 something that will work 
 as well as JettyLauncher with Eclipse.  Using the
 Tomcat deployer in 
 IDEA, I can't get template changes to appear in the
 Web app unless I 
 build again.  Likewise, I can't seem to easily
 change the port number to 
 bind the servlet container to.
 
 I'm guessing there's something I'm missing here,
 because it's really 
 quite painful to develop this way.  Any help from
 other IDEA users would 
 be much appreciated.
 
 Thanks,
 Kevin
 

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


Konstantin Ignatyev




PS: If this is a typical day on planet earth, humans will add fifteen
million tons of carbon to the atmosphere, destroy 115 square miles of
tropical rainforest, create seventy-two miles of desert, eliminate between
forty to one hundred species, erode seventy-one million tons of topsoil, add
2,700 tons of CFCs to the stratosphere, and increase their population by
263,000

Bowers, C.A.  The Culture of Denial:  Why the Environmental Movement Needs a
Strategy for Reforming Universities and Public Schools.  New York:  State
University of New York Press, 1997: (4) (5) (p.206)

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



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



RE: DirectArea component in Tapestry 4

2006-09-01 Thread James Carman
It's a HiveMind object provider.

http://tapestry.apache.org/tapestry4/tapestry/hivedocs/service/tapestry.serv
ices.EngineServiceObjectProvider.html



-Original Message-
From: Hajaansh [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 01, 2006 7:21 AM
To: Tapestry users
Subject: Re: DirectArea component in Tapestry 4

Perfect.

Where did you find that the name for the engine service was
engine-service:direct ?



On 9/1/06, Brian Long [EMAIL PROTECTED] wrote:

 Hajaansh,

 had the same problem myself when moving from 3 to 4, so here are the
 updated
 AreaLink.jwc and AreaLink.java that I use. The main difference in the use
 of
 property injection for the engine service.

 AreaLink.jwc

 ?xml version=1.0 encoding=UTF-8?
 !DOCTYPE component-specification PUBLIC
   -//Apache Software Foundation//Tapestry Specification 4.0//EN
   http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd;

 component-specification
 class=com.yourProject.web.page.AreaLink
 allow-body=no
 allow-informal-parameters=yes

 !--inject property=directService object=engine-service:direct/--

 description
 Creates a non-contextual link.  Non-persistent state can be stored within
 the link
 using the context.
 /description

 parameter name=listener required=yes /

 parameter name=parameters 
 description
 An object, or list of objects, encoded into the URL
 as service parameters.
 /description
 /parameter

 reserved-parameter name=href/

 /component-specification

 AreaLink.java

 package com.annadaletech.yourProject.web.jwc;

 import org.apache.tapestry.AbstractComponent;
 import org.apache.tapestry.IActionListener;
 import org.apache.tapestry.IDirect;
 import org.apache.tapestry.IMarkupWriter;
 import org.apache.tapestry.IRequestCycle;
 import org.apache.tapestry.Tapestry;
 import org.apache.tapestry.annotations.InjectObject;
 import org.apache.tapestry.engine.DirectServiceParameter;
 import org.apache.tapestry.engine.IEngineService;
 import org.apache.tapestry.engine.ILink;
 import org.apache.tapestry.link.DirectLink;

 public abstract class AreaLink extends AbstractComponent implements
 IDirect
 {

 public abstract Object getParameters();
 public abstract IActionListener getListener();

 @InjectObject(engine-service:direct)
 public abstract IEngineService getDirectService();

 public void renderComponent(IMarkupWriter writer, IRequestCycle cycle)
 {
   if (cycle.isRewinding())
return;

   Object[] parameters = DirectLink.constructServiceParameters
 (getParameters());

   //IEngineService service = getDirectService();
   DirectServiceParameter dsParam = new
 DirectServiceParameter(this,parameters);
   ILink link = getDirectService().getLink(false,dsParam);

   writer.beginEmpty(area);
   writer.attribute(href,link.getURL());

   renderInformalParameters(writer,cycle);
 }

 public void trigger(IRequestCycle cycle)
 {
 IActionListener listener = getListener();

 if (listener == null)
  throw Tapestry.createRequiredParameterException(this,
 listener);

 listener.actionTriggered(this, cycle);
 }

 public boolean isStateful()
 {
  return false;
 }

 }

 hivemodule.xml

 contribution configuration-id=tapestry.url.ServiceEncoders
direct-service-encoder id=direct stateless-extension=direct
  stateful-extension=sdirect/
 /contribution

 yourProject.application

 component-type type=AreaLink specification-path=jwc/AreaLink.jwc /

 I hope this helps . . .

 /Brian.

 On 9/1/06, Hajaansh [EMAIL PROTECTED] wrote:
  I was wondering how to make a DirectArea component (getting callbacks on
  Image Maps) for Tapestry 4 as the implementation for Tapestry 3 does not
  work in Tapestry 4.
 
  And clues? I was looking at using the ILinkRenderer but to be honest I
 am
  just getting in a muddle.
 
  Cheers,
 
  Hajaash
 
 





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



RE: DirectArea component in Tapestry 4

2006-09-01 Thread James Carman
And, you can see where it's contributed as an object provider here:

http://tapestry.apache.org/tapestry4/tapestry/hivedocs/config/hivemind.Objec
tProviders.html



-Original Message-
From: James Carman [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 01, 2006 7:24 AM
To: 'Tapestry users'
Subject: RE: DirectArea component in Tapestry 4

It's a HiveMind object provider.

http://tapestry.apache.org/tapestry4/tapestry/hivedocs/service/tapestry.serv
ices.EngineServiceObjectProvider.html



-Original Message-
From: Hajaansh [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 01, 2006 7:21 AM
To: Tapestry users
Subject: Re: DirectArea component in Tapestry 4

Perfect.

Where did you find that the name for the engine service was
engine-service:direct ?



On 9/1/06, Brian Long [EMAIL PROTECTED] wrote:

 Hajaansh,

 had the same problem myself when moving from 3 to 4, so here are the
 updated
 AreaLink.jwc and AreaLink.java that I use. The main difference in the use
 of
 property injection for the engine service.

 AreaLink.jwc

 ?xml version=1.0 encoding=UTF-8?
 !DOCTYPE component-specification PUBLIC
   -//Apache Software Foundation//Tapestry Specification 4.0//EN
   http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd;

 component-specification
 class=com.yourProject.web.page.AreaLink
 allow-body=no
 allow-informal-parameters=yes

 !--inject property=directService object=engine-service:direct/--

 description
 Creates a non-contextual link.  Non-persistent state can be stored within
 the link
 using the context.
 /description

 parameter name=listener required=yes /

 parameter name=parameters 
 description
 An object, or list of objects, encoded into the URL
 as service parameters.
 /description
 /parameter

 reserved-parameter name=href/

 /component-specification

 AreaLink.java

 package com.annadaletech.yourProject.web.jwc;

 import org.apache.tapestry.AbstractComponent;
 import org.apache.tapestry.IActionListener;
 import org.apache.tapestry.IDirect;
 import org.apache.tapestry.IMarkupWriter;
 import org.apache.tapestry.IRequestCycle;
 import org.apache.tapestry.Tapestry;
 import org.apache.tapestry.annotations.InjectObject;
 import org.apache.tapestry.engine.DirectServiceParameter;
 import org.apache.tapestry.engine.IEngineService;
 import org.apache.tapestry.engine.ILink;
 import org.apache.tapestry.link.DirectLink;

 public abstract class AreaLink extends AbstractComponent implements
 IDirect
 {

 public abstract Object getParameters();
 public abstract IActionListener getListener();

 @InjectObject(engine-service:direct)
 public abstract IEngineService getDirectService();

 public void renderComponent(IMarkupWriter writer, IRequestCycle cycle)
 {
   if (cycle.isRewinding())
return;

   Object[] parameters = DirectLink.constructServiceParameters
 (getParameters());

   //IEngineService service = getDirectService();
   DirectServiceParameter dsParam = new
 DirectServiceParameter(this,parameters);
   ILink link = getDirectService().getLink(false,dsParam);

   writer.beginEmpty(area);
   writer.attribute(href,link.getURL());

   renderInformalParameters(writer,cycle);
 }

 public void trigger(IRequestCycle cycle)
 {
 IActionListener listener = getListener();

 if (listener == null)
  throw Tapestry.createRequiredParameterException(this,
 listener);

 listener.actionTriggered(this, cycle);
 }

 public boolean isStateful()
 {
  return false;
 }

 }

 hivemodule.xml

 contribution configuration-id=tapestry.url.ServiceEncoders
direct-service-encoder id=direct stateless-extension=direct
  stateful-extension=sdirect/
 /contribution

 yourProject.application

 component-type type=AreaLink specification-path=jwc/AreaLink.jwc /

 I hope this helps . . .

 /Brian.

 On 9/1/06, Hajaansh [EMAIL PROTECTED] wrote:
  I was wondering how to make a DirectArea component (getting callbacks on
  Image Maps) for Tapestry 4 as the implementation for Tapestry 3 does not
  work in Tapestry 4.
 
  And clues? I was looking at using the ILinkRenderer but to be honest I
 am
  just getting in a muddle.
 
  Cheers,
 
  Hajaash
 
 





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



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



RE: DirectArea component in Tapestry 4

2006-09-01 Thread James Carman
Oh, that.  You can see that here:

http://tapestry.apache.org/tapestry4/tapestry/hivedocs/module/tapestry.servi
ces.html

The engine services are contributed to the tapestry.services.FactoryServices
configuration point.

-Original Message-
From: Hajaansh [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 01, 2006 7:36 AM
To: Tapestry users
Subject: Re: DirectArea component in Tapestry 4

I meant the direct part not the engine-service:  part.

Cheers,



On 9/1/06, James Carman [EMAIL PROTECTED] wrote:

 It's a HiveMind object provider.



http://tapestry.apache.org/tapestry4/tapestry/hivedocs/service/tapestry.serv
 ices.EngineServiceObjectProvider.html



 -Original Message-
 From: Hajaansh [mailto:[EMAIL PROTECTED]
 Sent: Friday, September 01, 2006 7:21 AM
 To: Tapestry users
 Subject: Re: DirectArea component in Tapestry 4

 Perfect.

 Where did you find that the name for the engine service was
 engine-service:direct ?



 On 9/1/06, Brian Long [EMAIL PROTECTED] wrote:
 
  Hajaansh,
 
  had the same problem myself when moving from 3 to 4, so here are the
  updated
  AreaLink.jwc and AreaLink.java that I use. The main difference in the
 use
  of
  property injection for the engine service.
 
  AreaLink.jwc
 
  ?xml version=1.0 encoding=UTF-8?
  !DOCTYPE component-specification PUBLIC
-//Apache Software Foundation//Tapestry Specification 4.0//EN
http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd;
 
  component-specification
  class=com.yourProject.web.page.AreaLink
  allow-body=no
  allow-informal-parameters=yes
 
  !--inject property=directService object=engine-service:direct/--
 
  description
  Creates a non-contextual link.  Non-persistent state can be stored
 within
  the link
  using the context.
  /description
 
  parameter name=listener required=yes /
 
  parameter name=parameters 
  description
  An object, or list of objects, encoded into the URL
  as service parameters.
  /description
  /parameter
 
  reserved-parameter name=href/
 
  /component-specification
 
  AreaLink.java
 
  package com.annadaletech.yourProject.web.jwc;
 
  import org.apache.tapestry.AbstractComponent;
  import org.apache.tapestry.IActionListener;
  import org.apache.tapestry.IDirect;
  import org.apache.tapestry.IMarkupWriter;
  import org.apache.tapestry.IRequestCycle;
  import org.apache.tapestry.Tapestry;
  import org.apache.tapestry.annotations.InjectObject;
  import org.apache.tapestry.engine.DirectServiceParameter;
  import org.apache.tapestry.engine.IEngineService;
  import org.apache.tapestry.engine.ILink;
  import org.apache.tapestry.link.DirectLink;
 
  public abstract class AreaLink extends AbstractComponent implements
  IDirect
  {
 
  public abstract Object getParameters();
  public abstract IActionListener getListener();
 
  @InjectObject(engine-service:direct)
  public abstract IEngineService getDirectService();
 
  public void renderComponent(IMarkupWriter writer, IRequestCycle
 cycle)
  {
if (cycle.isRewinding())
 return;
 
Object[] parameters = DirectLink.constructServiceParameters
  (getParameters());
 
//IEngineService service = getDirectService();
DirectServiceParameter dsParam = new
  DirectServiceParameter(this,parameters);
ILink link = getDirectService().getLink(false,dsParam);
 
writer.beginEmpty(area);
writer.attribute(href,link.getURL());
 
renderInformalParameters(writer,cycle);
  }
 
  public void trigger(IRequestCycle cycle)
  {
  IActionListener listener = getListener();
 
  if (listener == null)
   throw Tapestry.createRequiredParameterException(this,
  listener);
 
  listener.actionTriggered(this, cycle);
  }
 
  public boolean isStateful()
  {
   return false;
  }
 
  }
 
  hivemodule.xml
 
  contribution configuration-id=tapestry.url.ServiceEncoders
 direct-service-encoder id=direct stateless-extension=direct
   stateful-extension=sdirect/
  /contribution
 
  yourProject.application
 
  component-type type=AreaLink specification-path=jwc/AreaLink.jwc /
 
  I hope this helps . . .
 
  /Brian.
 
  On 9/1/06, Hajaansh [EMAIL PROTECTED] wrote:
   I was wondering how to make a DirectArea component (getting callbacks
 on
   Image Maps) for Tapestry 4 as the implementation for Tapestry 3 does
 not
   work in Tapestry 4.
  
   And clues? I was looking at using the ILinkRenderer but to be honest I
  am
   just getting in a muddle.
  
   Cheers,
  
   Hajaash
  
  
 
 



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





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



RE: Tapestry Acegi

2006-09-01 Thread James Carman
Tapestry-Acegi doesn't use Spring at all.  Can you send me the error
messages?  You need hivemind-acegi.jar in your classpath.

-Original Message-
From: Robert Cole [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 01, 2006 9:53 AM
To: Tapestry users
Cc: 'Tapestry users'
Subject: RE: Tapestry Acegi


Hi James,

I've managed to get Acegi up and running with our own custom filter but when
I put the Tapestry Acegi jar into my build I get errors about various beans
not being present. Is there any documentation on what Spring beans TA
depends on?

Also, looking at the hivemodule, most of the configuration is in Hivemind
with some dependencies on other Acegi objects being created somewhere else,
i.e. in Spring. While we make extensive use of both, we have Hivemind
sitting on top of Spring. In otherwords, while Hivemind can retrieve Spring
beans, Spring cannot gain access to Hivemind services. This is to stop any
circular depencecies being created. Could this cause a problem for TA?

I guess I'm kind of working in the cark at the moment, but the concept of TA
looks very, very promising!

Rob Cole



 

 James Carman [EMAIL PROTECTED]

 

 31/08/2006 18:11
To 
 
'Tapestry users' users@tapestry.apache.org

 
cc 
 
Please respond to

 
Tapestry users users@tapestry.apache.org
Subject 
 
RE: Tapestry Acegi

 

 

 

 

 

 





Oh, as for the @Secured annotation not being present, you have to add the
acegi-security-tiger.jar file (tiger = JDK5) to your classpath.
Tapestry-Acegi uses the built-in @Secured annotation available from Acegi to
secure page classes and listener methods.

For the build to work, you will have to install some of the sun jars (it's
a pain in the rear, I know) and you can refer to the maven documentation
here:

http://maven.apache.org/guides/mini/guide-coping-with-sun-jars.html

There is a bit (a very bit, sorry :-) of documentation available at:

http://www.carmanconsulting.com/tapestry-acegi

Again, I am going to have some time off next week and the next and I plan on
updating all of this stuff.

-Original Message-
From: Robert Cole [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 31, 2006 12:53 PM
To: users@tapestry.apache.org
Subject: Tapestry Acegi


Has anyone used the Tapestry-Acegi project? I'm about to implement some role
based security on our project and we're looking at this as its linked on the
Tapestry home page. Unfortunately there's no doc and the builds don't appear
to work as when I tried one (the latest one from June some time) it looks
like there's some hivemind configuration missing. Plus the annotation file
that's supposed to do all of the work for me is missing from the build!

Its not going to be that hard to implement our own Acegi based security but
it would be nice if the Tapestry one could do 90% of the work for us.

Thanks,

Rob Cole

---

This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.


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



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




---

This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.


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



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



RE: Auto-wiring in AssetService shouldn't be auto-wired?

2006-08-31 Thread James Carman
You can't use an interceptor to inject dependencies reliably.  Just adding
an interceptor to a service shouldn't prohibit it from being autowired
properly or make it stop working.  Are you sure you've added your
interceptor properly?  Did you write your own interceptor factory to do it?



-Original Message-
From: Robert Cole [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 31, 2006 6:47 AM
To: users@tapestry.apache.org
Subject: Auto-wiring in AssetService shouldn't be auto-wired?


Hi all

I'm hitting an issue that is really, really starting to get my goat. The
AssetService service appears to have the WebRequest object auto-wired into
it via Hivemind. This is a little odd as all of the other dependencies are
wired in normally via the Hivemind mapping. I'm sure its just an oversite by
whoever wired up the AssetService in Tapestry but its now causing me
problems.

Normally this wouldn't be a problem but I'm trying to get around my cookie
writing problem (previously posted), the last bit of it is that
WebRequest.forward doesn't flush the applications state when it sends a
redirect to the client (possibly a bug?). To get around this I've written an
Interceptor that intercepts calls to the WebRequest.forward method and uses
the ApplicationStateManger.flush to write out the application state.

All fine so far. Unfortnately this somehow stops the auto-wiring from wiring
the WebRequest into the AssetService so I now get lots of
NullPointerExceptions in AssetService. I'm thinking that the auto-wiring of
WebRequest into AssetService shouldn't be happening (so another bug?) but is
there a way around it for the moment? I could write another interceptor for
the AsserService to inject the WebRequest into it but then I could hit the
problem in another location for another service and end up having
interceptors all over the place. Is there a better solution?

Thanks,

Rob Cole

---

This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.


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



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



RE: Tapestry Acegi

2006-08-31 Thread James Carman
Yes, we use Tapestry-Acegi at work and it works just fine for us.  You have
to make sure you get all of the dependencies.  A lot of the work is done by
the hivemind-acegi module (also available at JavaForge) and the
hivemind-acegi-dao module (if you want to use it).  

-Original Message-
From: Robert Cole [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 31, 2006 12:53 PM
To: users@tapestry.apache.org
Subject: Tapestry Acegi


Has anyone used the Tapestry-Acegi project? I'm about to implement some role
based security on our project and we're looking at this as its linked on the
Tapestry home page. Unfortunately there's no doc and the builds don't appear
to work as when I tried one (the latest one from June some time) it looks
like there's some hivemind configuration missing. Plus the annotation file
that's supposed to do all of the work for me is missing from the build!

Its not going to be that hard to implement our own Acegi based security but
it would be nice if the Tapestry one could do 90% of the work for us.

Thanks,

Rob Cole

---

This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.


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



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



RE: Tapestry Acegi

2006-08-31 Thread James Carman
Oh, as for the @Secured annotation not being present, you have to add the
acegi-security-tiger.jar file (tiger = JDK5) to your classpath.
Tapestry-Acegi uses the built-in @Secured annotation available from Acegi to
secure page classes and listener methods.

For the build to work, you will have to install some of the sun jars (it's
a pain in the rear, I know) and you can refer to the maven documentation
here:

http://maven.apache.org/guides/mini/guide-coping-with-sun-jars.html

There is a bit (a very bit, sorry :-) of documentation available at:

http://www.carmanconsulting.com/tapestry-acegi

Again, I am going to have some time off next week and the next and I plan on
updating all of this stuff.  

-Original Message-
From: Robert Cole [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 31, 2006 12:53 PM
To: users@tapestry.apache.org
Subject: Tapestry Acegi


Has anyone used the Tapestry-Acegi project? I'm about to implement some role
based security on our project and we're looking at this as its linked on the
Tapestry home page. Unfortunately there's no doc and the builds don't appear
to work as when I tried one (the latest one from June some time) it looks
like there's some hivemind configuration missing. Plus the annotation file
that's supposed to do all of the work for me is missing from the build!

Its not going to be that hard to implement our own Acegi based security but
it would be nice if the Tapestry one could do 90% of the work for us.

Thanks,

Rob Cole

---

This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.


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



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



RE: TapIDEA future, post Time to move on

2006-08-31 Thread James Carman
This conversation isn't heading in the right direction.  As the Tapestry
community, we need to focus on trying to make Tapestry better.  Personal
attacks against people that you don't agree with are not going to help the
situation (not blaming either party here, but I've seen a similar thread in
the past that got somewhat ugly).  

Yes, there is indeed somewhat of a disagreement here between the user
community and the development community with respect to the future
development of Tapestry.  How about we focus on figuring out what we can do
to remedy that disagreement and come to a compromise?  

-Original Message-
From: Francis Amanfo [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 31, 2006 1:28 PM
To: Tapestry users
Subject: Re: TapIDEA future, post Time to move on

Yeah Jesse, I don't blame you. If I were the Yes Sir kind I would also say
only Yes to my boss on anything without first analyzing myself if what he's
doing makes sense. Fortunately I'm not that kind. I first think through my
boss's request before going with him or her on issues. And in the
environment that I live and work in, that is cherished very much. Better
than following your boss blindly anywhere regardless of what.
On the other hand, I may understand you. Being a commiter, I can imagine
your sole goal may be to do cool things. But remember in the real world
people are investing big bucks for results. To them, it's not about what
Jesse finds cool and enjoy developing. They want results. Therefore in the
real world if you tell people that during any major release they have to
throw away their code base and invest another 100Ks' of dollars to be able
to enjoy any new feature, all these because you had the appetite to do cool
things, then to them you belong to the hobby group and no one would take
your product seriously. I hope you would realize this fact someday.

My .02 cent.
Regards,
F

On 8/31/06, Jesse Kuhnert [EMAIL PROTECTED] wrote:

 But you forget that I'm in Howard's camp as well...So please when you
 mention facist regimes to include me as a leutenient at least. I would
 make
 the decision to support it again and again if given the chance.

 I mock you Mr. Amanfo. ~mock~

 On 8/31/06, Francis Amanfo [EMAIL PROTECTED] wrote:
 
  Well, Mr. Mind, let me humbly say that I'm not trolling. I'm mentioning
  things which I know are of great concern to very many people.
  Having read the following post by you on July 28:
 
  ... the majority of people will expect some kind of backward
  compatibility
  between T4 and T5 and that expectation would be natural. Perhaps if T5
  is renamed (e.g. 'Tapestries 1.0' or 'Lace 1.0' or sth else) then the
  expectation about backward compatibility will not be there?
 
  I know you and I are not very far from each other in certain important
  issues. Being a Tapestry commiter, I wish you could use your influence
 to
  discourage all these craziness going on with Tapestry of late. Namely,
  every
  major release equals radically re-inventing the wheel disregarding
  backward
  compatibility. And that decision made solely by one dictator who
 wouldn't
  listen to his users and community.
 
  Regards,
  F
 
 
  On 8/31/06, Mind Bridge [EMAIL PROTECTED] wrote:
  
  
   Howard sugested Geoff as a Tapestry committer entirely based on his
 work
   on
   Spindle. In addition Geoff specifically asked you NOT to hijack his
 name
   for
   your vendetta. Do the facts matter to you at all?
  
   Secondly, I presume you have written code that adds the T4 features to
  T3,
  
   while keeping it absolutely compatible. Is that correct?
  
   If this is not so, then your repeated comments are no longer
  constructive
   criticism, but trolls instead, aimed to further an agenda that has
  nothing
   to do with Tapestry at all. Interestingly, the very fact that you
  consider
   Tapestry important enough to warrant your attention means that it is a
   very
   good alternative to what you really care about and must be eliminated
 at
   all
   costs. Thank you, we should be honored that you think so highly of
   Tapestry!
  
  
   Francis Amanfo wrote:
   
Henrik,
   
Stop dreaming. If what you're saying is valid then we should have
 got
Spindle for Tap 4 now.
The fact of the matter is Howard just didn't listen to Geoff. With
Howard's
current opinion on tools, I don't think he would make a tool drive
 his
fanatic and radical design decisions.
   
My .02 cent.
F
   
On 8/30/06, hv @ Fashion Content [EMAIL PROTECTED] wrote:
   
I think the best thing is building on WST and Tap5, while Tap5 is
developed.
The amount of special tooling needed for Tap5 should be limited.
   
Judging form Geoff's posts the main problem with Spindle for Tap4
 is
   the
large number of possible ways to configure an application. One of
 the
goals
for Tap5 is to simplify. So if we can start over on a new Spindle
  while
Tap5
is
still in its infancy, we can 

RE: Populating Tapestry ASO after successful Acegi Auth

2006-08-30 Thread James Carman
Well, hopefully we can move all of this stuff into a Tapestry Commons
subproject of the TLP.  Then we won't have these issues.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 30, 2006 11:17 AM
To: users@tapestry.apache.org
Subject: RE: Populating Tapestry ASO after successful Acegi Auth

James:

I can't get access to the svn repo.  Can you send the jars?

Thanks,

-jason

-Original Message-
From: James Carman [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 30, 2006 10:41 AM
To: 'Tapestry users'
Subject: RE: Populating Tapestry ASO after successful Acegi Auth

You can use the tapestry-acegi module found at [EMAIL PROTECTED] (if
you
can get the stupid anonymous login to work).  If you can't let me know
and I
can send you the jar files directly.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 30, 2006 10:29 AM
To: users@tapestry.apache.org
Subject: RE: Populating Tapestry ASO after successful Acegi Auth

Hi John,

Just curious. . . would that code need to be inserted in *every* page's
pageValidate() method considering that a user can bookmark or type in
any secured URL?  

Acegi will intercept the request, throw up the Login page and then
redirect to the requested page (which in this example would not be the
default page and would therefore require it's on pageValidate() code)

Or is there a more clever way to do this?

Thanks,
Tom

-Original Message-
From: Jonathan Barker [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 30, 2006 10:05 AM
To: 'Tapestry users'
Subject: RE: Populating Tapestry ASO after successful Acegi Auth


I can't say it's a best practice, but it should be a reasonable
strategy.  

In your pageValidate() method, 
if your ASO is not set
Authentication auth = 
SecurityContext.getContext().getAuthentication();
If auth is not null
Object principal = auth.getPrincipal();
If (principal instanceof UserDetails)
Cast and put into ASO

If you are using Hibernate or another persistence framework, and need to
navigate the object graph from your ASO, reattach / refresh before doing
it.
I'm doing that in pageValidate() as well (and I'm using the Spring OSIV
filter).


It would be a little neater to extract out all of the Acegi stuff so
your UI
code doesn't depend on Acegi.


Jonathan

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, August 30, 2006 7:34 AM
 To: users@tapestry.apache.org
 Subject: Populating Tapestry ASO after successful Acegi Auth
 
 Greetings:
 
 I'm using Tapestry 4 and Acegi 1.0.1.  I have acegi set up to perform
 authentication using the AuthenticationProcessingFilter.  I have a
 requirement to place the domain object the Acegi UserDetails object is
 based upon into a Tapestry ASO for use during the user session. =20
 
 My question is: what the best practice for filling the Tapestry ASO
with
 the domain model's user object upon successful authentication with
 Acegi?
 
 Thanks,
 
 -jason
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


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


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




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


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




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



RE: Anyone ever use StringEscapeUtils.unescapeHtml

2006-08-29 Thread James Carman
Have you tried setting the raw property to true?

-Original Message-
From: Teofilus Maximillian
[mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 29, 2006 10:56 PM
To: tapestry-user@jakarta.apache.org
Subject: Anyone ever use StringEscapeUtils.unescapeHtml

Hi guys, I tried to use StringEscapeUtils.unescapeHtml, from hardcoded  
in the java class, until I put in the .page file. I show my example...  
probably you can help me to figure out


import org.apache.commons.lang.StringEscapeUtils;

public String getThreadBody(){

dCon=strongtest/strong;

String strUnEscapeHTML = StringEscapeUtils.unescapeHtml(dCon);

return strUnEscapeHTML;
}


and also in the .page file I put :

component id = threadBody type=Insert
binding name=value  
value=ognl:@[EMAIL PROTECTED](threadBo
dy)/
/component


but it is not working, the display still like strongtest/strong  
not test in bold

Thanks

Teo
-- 
Posted with http://DevLists.com.  Sign up and save your mailbox.

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



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



RE: tapernate question

2006-08-19 Thread James Carman
Yeah, I know about the new getCurrentSession() stuff.  It's just a matter of
me finding the time to sit down and write the stuff that I want.  As I said,
it shouldn't be that hard really.  Spring ORM does really save the code
required to enforce real TX demarcation, though (such as REQUIRES_NEW). 

-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of hv @ Fashion Content
Sent: Saturday, August 19, 2006 9:00 AM
To: users@tapestry.apache.org
Subject: Re: tapernate question

SessionFactory has a getCurrentSession function now, and you can define a 
policy if you dont like the existing. All you need is a servlet filter to 
commit  close the current session. It's very few lines of code saved by 
using Spring ORM.

Henrik

James Carman [EMAIL PROTECTED] skrev i en meddelelse 
news:[EMAIL PROTECTED]
 The main reason that I use the Spring stuff is for the transaction
 demarcation stuff.  Hibernate doesn't include anything out-of-the-box 
 that
 allows you to do nested transactions (i.e. REQUIRES_NEW).  You'd have to
 roll that yourself and Spring has already done that for me.  Although, I'm
 looking into just implementing it on my own, since it's really not that
 difficult to do (keep a stack around for your current session).

 -Original Message-
 From: news [mailto:[EMAIL PROTECTED] On Behalf Of hv @ Fashion Content
 Sent: Wednesday, August 16, 2006 3:35 PM
 To: users@tapestry.apache.org
 Subject: Re: tapernate question

 I had a similar concern with Trails, and made my own persistence service
 that uses Hibernate directly.
 With Hibernate 3.1 you don't really need the Spring ORM stuff.

 Xiaoshu Wang [EMAIL PROTECTED] skrev i en meddelelse
 news:[EMAIL PROTECTED]
 Thanks, James.

 I am able to get the exception now.  However, the exceptions seem to be
 wrapped into spring's DataAccessException.  The original cause of
 HibernateException is gone.  I tried to traverse the Exception track by
 getCause(), but only get the DataIntegrityViolationException and
 java.sql.BatchUpdateException.

 I am writing an application that has two fields that can violate the same
 contraints.  The lost of HibernateException won't allow me to figure out
 the
 which field is duplicated.

 Xiaoshu

 -Original Message-
 From: James Carman [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, August 16, 2006 6:05 AM
 To: 'Tapestry users'
 Subject: RE: tapernate question

 If you want more fine-grained control over what's going on,
 turn off transaction-per-request and use service methods with
 transaction interceptors on them to achieve what you want.
 The reason that you didn't get the exception is that the
 transaction isn't committing until the end of the request and
 that's when you'll get the unique constraint violation
 exception.  The exception presenter might not even catch
 this, come to think of it.  I actually changed the way
 Tapernate is implemented in my local copy.  I might need to
 push that out to the rest of you.

 -Original Message-
 From: Xiaoshu Wang [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, August 15, 2006 9:45 PM
 To: 'Tapestry users'
 Subject: RE: tapernate question

 I tried to put something like

 try {
   getSession.update(message);
 } catch (Throwable e) {
System.out.println(Catch it.);
 }

 under the MessageDaoImpl.update(Message), but it seems not
 doing anything.

 How to hook with ExceptionPresenter?

 Xiaoshu


  -Original Message-
  From: James Carman [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, August 15, 2006 9:09 PM
  To: 'Tapestry users'
  Subject: RE: tapernate question
 
  You can put in a hook into the ExceptionPresenter or wrap your call
  with a try/catch block.  The HibernateService class can be found at:
 
  http://svn.javaforge.com/svn/hivemind/hivemind-utils/trunk/src
 /main/java/com
  /javaforge/hivemind/util/HiveMindService.java
 
  The username/password is anonymous/anon.
 
 
  -Original Message-
  From: Xiaoshu Wang [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, August 15, 2006 9:03 PM
  To: users@tapestry.apache.org
  Subject: tapernate question
 
  Hi, I am playing around Tapernate, which I have a question
 to ask.  It
  seems that the exception thrown by a database query would
 not be able
  to be catched at the application level.
  For isnstance, I justed added a unique constraints on the
  Message.value property.  If I ever try to created a message
 that has a
  duplicated value with an existing Message, it break the
 application.
  I didn't find a way to catch the exception.  Is this
 expected behavior
  or not?
 
  Also, where I can find the source code for the HibernateService?
 
  Thanks,
 
  XW
 
 
 
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail

RE: tapernate question

2006-08-17 Thread James Carman
The main reason that I use the Spring stuff is for the transaction
demarcation stuff.  Hibernate doesn't include anything out-of-the-box that
allows you to do nested transactions (i.e. REQUIRES_NEW).  You'd have to
roll that yourself and Spring has already done that for me.  Although, I'm
looking into just implementing it on my own, since it's really not that
difficult to do (keep a stack around for your current session).

-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of hv @ Fashion Content
Sent: Wednesday, August 16, 2006 3:35 PM
To: users@tapestry.apache.org
Subject: Re: tapernate question

I had a similar concern with Trails, and made my own persistence service 
that uses Hibernate directly.
With Hibernate 3.1 you don't really need the Spring ORM stuff.

Xiaoshu Wang [EMAIL PROTECTED] skrev i en meddelelse 
news:[EMAIL PROTECTED]
 Thanks, James.

 I am able to get the exception now.  However, the exceptions seem to be
 wrapped into spring's DataAccessException.  The original cause of
 HibernateException is gone.  I tried to traverse the Exception track by
 getCause(), but only get the DataIntegrityViolationException and
 java.sql.BatchUpdateException.

 I am writing an application that has two fields that can violate the same
 contraints.  The lost of HibernateException won't allow me to figure out 
 the
 which field is duplicated.

 Xiaoshu

 -Original Message-
 From: James Carman [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, August 16, 2006 6:05 AM
 To: 'Tapestry users'
 Subject: RE: tapernate question

 If you want more fine-grained control over what's going on,
 turn off transaction-per-request and use service methods with
 transaction interceptors on them to achieve what you want.
 The reason that you didn't get the exception is that the
 transaction isn't committing until the end of the request and
 that's when you'll get the unique constraint violation
 exception.  The exception presenter might not even catch
 this, come to think of it.  I actually changed the way
 Tapernate is implemented in my local copy.  I might need to
 push that out to the rest of you.

 -Original Message-
 From: Xiaoshu Wang [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, August 15, 2006 9:45 PM
 To: 'Tapestry users'
 Subject: RE: tapernate question

 I tried to put something like

 try {
   getSession.update(message);
 } catch (Throwable e) {
System.out.println(Catch it.);
 }

 under the MessageDaoImpl.update(Message), but it seems not
 doing anything.

 How to hook with ExceptionPresenter?

 Xiaoshu


  -Original Message-
  From: James Carman [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, August 15, 2006 9:09 PM
  To: 'Tapestry users'
  Subject: RE: tapernate question
 
  You can put in a hook into the ExceptionPresenter or wrap your call
  with a try/catch block.  The HibernateService class can be found at:
 
  http://svn.javaforge.com/svn/hivemind/hivemind-utils/trunk/src
 /main/java/com
  /javaforge/hivemind/util/HiveMindService.java
 
  The username/password is anonymous/anon.
 
 
  -Original Message-
  From: Xiaoshu Wang [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, August 15, 2006 9:03 PM
  To: users@tapestry.apache.org
  Subject: tapernate question
 
  Hi, I am playing around Tapernate, which I have a question
 to ask.  It
  seems that the exception thrown by a database query would
 not be able
  to be catched at the application level.
  For isnstance, I justed added a unique constraints on the
  Message.value property.  If I ever try to created a message
 that has a
  duplicated value with an existing Message, it break the
 application.
  I didn't find a way to catch the exception.  Is this
 expected behavior
  or not?
 
  Also, where I can find the source code for the HibernateService?
 
  Thanks,
 
  XW
 
 
 
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 


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



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





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

 




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



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

RE: Search Text

2006-08-17 Thread James Carman
Are you talking about searching for text within the page that you're
reading? 

-Original Message-
From: Peter Dawn [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 17, 2006 1:39 AM
To: tapestry-user@jakarta.apache.org
Subject: Search Text

guys,
is there a component which allows text search. its sort of similar to
what the tassel site has, but i want the user to search through text,
as in general paragraphs. this info is not stored in the db but
locally within that page. so the ability to search within the content
of a page.
any ideas.

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



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



RE: Search Text

2006-08-17 Thread James Carman
Hitting Ctrl-F on your browser won't do it?  If it's the currently-displayed
HTML document, your browser can do the searching for you, no?


-Original Message-
From: Peter Dawn [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 17, 2006 8:53 AM
To: Tapestry users
Subject: Re: Search Text

yes. thats the idea. i have been reading about lucene too. anyone tried
that.

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



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



RE: Search Text

2006-08-17 Thread James Carman
Okay, cool.  I am one of those guys who try to use the simplest solution
that works.  I was just checking if Ctrl-F applied. :-)


-Original Message-
From: Peter Dawn [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 17, 2006 5:50 PM
To: Tapestry users
Subject: Re: Search Text

i will try albartell's approach and see if it works. i was hoping
there would be a tapestry component i could use. and James i dont want
to use ctrl+f. i mean i can, but i would like to create something more
specific to my web app.

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



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



RE: tapernate question

2006-08-16 Thread James Carman
If you want more fine-grained control over what's going on, turn off
transaction-per-request and use service methods with transaction
interceptors on them to achieve what you want.  The reason that you didn't
get the exception is that the transaction isn't committing until the end of
the request and that's when you'll get the unique constraint violation
exception.  The exception presenter might not even catch this, come to think
of it.  I actually changed the way Tapernate is implemented in my local
copy.  I might need to push that out to the rest of you. 

-Original Message-
From: Xiaoshu Wang [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 15, 2006 9:45 PM
To: 'Tapestry users'
Subject: RE: tapernate question

I tried to put something like

try {
  getSession.update(message);
} catch (Throwable e) {
   System.out.println(Catch it.);
}

under the MessageDaoImpl.update(Message), but it seems not doing anything.

How to hook with ExceptionPresenter? 

Xiaoshu


 -Original Message-
 From: James Carman [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, August 15, 2006 9:09 PM
 To: 'Tapestry users'
 Subject: RE: tapernate question
 
 You can put in a hook into the ExceptionPresenter or wrap 
 your call with a try/catch block.  The HibernateService class 
 can be found at:
 
 http://svn.javaforge.com/svn/hivemind/hivemind-utils/trunk/src
/main/java/com
 /javaforge/hivemind/util/HiveMindService.java
 
 The username/password is anonymous/anon.
 
 
 -Original Message-
 From: Xiaoshu Wang [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, August 15, 2006 9:03 PM
 To: users@tapestry.apache.org
 Subject: tapernate question
 
 Hi, I am playing around Tapernate, which I have a question to 
 ask.  It seems that the exception thrown by a database query 
 would not be able to be catched at the application level.  
 For isnstance, I justed added a unique constraints on the 
 Message.value property.  If I ever try to created a message 
 that has a duplicated value with an existing Message, it 
 break the application.  I didn't find a way to catch the 
 exception.  Is this expected behavior or not?
 
 Also, where I can find the source code for the HibernateService?
 
 Thanks,
 
 XW
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 


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



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



RE: tapernate question

2006-08-16 Thread James Carman
H.  Well, that's the way Spring wraps it by default.  I don't have time
to look into it right now, but maybe you can check the Spring docs to see
what to do in your situation.  The Spring library is pretty thorough, so I
would imagine that there's something you can do.

James

-Original Message-
From: Xiaoshu Wang [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 16, 2006 12:00 PM
To: 'Tapestry users'
Subject: RE: tapernate question

Thanks, James.  

I am able to get the exception now.  However, the exceptions seem to be
wrapped into spring's DataAccessException.  The original cause of
HibernateException is gone.  I tried to traverse the Exception track by
getCause(), but only get the DataIntegrityViolationException and
java.sql.BatchUpdateException.

I am writing an application that has two fields that can violate the same
contraints.  The lost of HibernateException won't allow me to figure out the
which field is duplicated.

Xiaoshu

 -Original Message-
 From: James Carman [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, August 16, 2006 6:05 AM
 To: 'Tapestry users'
 Subject: RE: tapernate question
 
 If you want more fine-grained control over what's going on, 
 turn off transaction-per-request and use service methods with 
 transaction interceptors on them to achieve what you want.  
 The reason that you didn't get the exception is that the 
 transaction isn't committing until the end of the request and 
 that's when you'll get the unique constraint violation 
 exception.  The exception presenter might not even catch 
 this, come to think of it.  I actually changed the way 
 Tapernate is implemented in my local copy.  I might need to 
 push that out to the rest of you. 
 
 -Original Message-
 From: Xiaoshu Wang [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, August 15, 2006 9:45 PM
 To: 'Tapestry users'
 Subject: RE: tapernate question
 
 I tried to put something like
 
 try {
   getSession.update(message);
 } catch (Throwable e) {
System.out.println(Catch it.);
 }
 
 under the MessageDaoImpl.update(Message), but it seems not 
 doing anything.
 
 How to hook with ExceptionPresenter? 
 
 Xiaoshu
 
 
  -Original Message-
  From: James Carman [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, August 15, 2006 9:09 PM
  To: 'Tapestry users'
  Subject: RE: tapernate question
  
  You can put in a hook into the ExceptionPresenter or wrap your call 
  with a try/catch block.  The HibernateService class can be found at:
  
  http://svn.javaforge.com/svn/hivemind/hivemind-utils/trunk/src
 /main/java/com
  /javaforge/hivemind/util/HiveMindService.java
  
  The username/password is anonymous/anon.
  
  
  -Original Message-
  From: Xiaoshu Wang [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, August 15, 2006 9:03 PM
  To: users@tapestry.apache.org
  Subject: tapernate question
  
  Hi, I am playing around Tapernate, which I have a question 
 to ask.  It 
  seems that the exception thrown by a database query would 
 not be able 
  to be catched at the application level.
  For isnstance, I justed added a unique constraints on the 
  Message.value property.  If I ever try to created a message 
 that has a 
  duplicated value with an existing Message, it break the 
 application.  
  I didn't find a way to catch the exception.  Is this 
 expected behavior 
  or not?
  
  Also, where I can find the source code for the HibernateService?
  
  Thanks,
  
  XW
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 


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



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



RE: Xerces version

2006-08-16 Thread James Carman
We've (the HiveMind team) had a lot of trouble with OC4J.  So, I feel your
pain!

-Original Message-
From: Vinicius Carvalho [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 16, 2006 1:46 PM
To: Tapestry users
Subject: Re: Xerces version

Hello folks, thanks for all the help. Well I'm using the 10.1.3
version of AS, I believe that is the latest version, and even that is
buggy :(

I believe (not sure, because I haven't checked) that Oracle is not
replacing the parser, even though I'm setting it on the properties of
my app. I'll do a stupid-lazy approach, and debug the hivemind code to
see which parser is being injected.

Thanks for all the help, I'll keep you guys informed.

Jesse, thanks, as soon as I find a way out, It would be my pleasure to
post every step for a FAQ (although I think the better solution is: do
not use oracle products, they are buggy, and unstable ;) )

On 8/16/06, Javier Sanchez [EMAIL PROTECTED] wrote:
 .. and I really don't recommend to just replace the XML jars.  I tried
 to do that and other components of OC4J got problems.  It's better to
 migrate to a new release.

 JAVIER SANCHEZ
 CIO EDESA S.A.
 Bogota, Colombia

 On 8/16/06, Javier Sanchez [EMAIL PROTECTED] wrote:
  This issue is already on http://wiki.apache.org/tapestry/Gotchas
 
  The first version of OC4J I tried was 9.0.4.   Every version of OAS
  10g since 10.1.2 have the XML parser fixed.
 
  My application is still using T3, so I really don't know if T4 could
  still have problems with OC4J. I recommend to migrate to the last
  release, 10.1.3
 
  JAVIER SANCHEZ
  CIO EDESA S.A.
  Bogota, Colombia
 
  On 8/16/06, Jesse Kuhnert [EMAIL PROTECTED] wrote:
   Can you post back to the list with the correct version of xerces (and
the
   exact version of oracle j2ee used) so that I can add a FAQ entry for
this?
  
   On 8/16/06, yesidredondo [EMAIL PROTECTED] wrote:
   
Yes Vinicius, you've got to change the xerces jar too, i'm going to
send
you
the xercesImpl that worked for me when deploying the app in OAS 10G.
   
Ing. Hermann Yesid Redondo Eslava
IT-GROUP LTDA
   
-- Original Message ---
From: Vinicius Carvalho [EMAIL PROTECTED]
To: Tapestry users users@tapestry.apache.org
Sent: Wed, 16 Aug 2006 12:12:35 -0300
Subject: Xerces version
   
 Hello there! I'm still having big problems with the crap oc4j
server.
 I've tried to change the xml parser, but Hivemind is still
throwing
 errors...

 Here's my lib versions:

 Tapestry 4.0.2
 Hivemind 1.1.1
 Xerces 2.8.0
 xml-apis 1.3.03b

 I'm wondering if now the problem is the xerces version...

 Any help would be most appreciated

 Best regards


-
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
--- End of Original Message ---
   
   
   
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
   
  
  
   --
   Jesse Kuhnert
   Tapestry/Dojo/(and a dash of TestNG), team member/developer
  
   Open source based consulting work centered around
   dojo/tapestry/tacos/hivemind.
  
  
 

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



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



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



RE: Tapestry 3 Iterating over a map.

2006-08-16 Thread James Carman
Do you want to iterate the keys or the values?

-Original Message-
From: Mark Stang [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 16, 2006 3:36 PM
To: Tapestry users; Tapestry users
Subject: Tapestry 3 Iterating over a map.

Can I treat it like a list?  Anyone know what the syntax is?  I don't want
to convert it back and forth...

thanks,

Mark



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



RE: Tapestry 3 Iterating over a map.

2006-08-16 Thread James Carman
You can iterate over the entries and they have key/value properties.  

-Original Message-
From: Mark Stang [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 16, 2006 3:43 PM
To: Tapestry users; Tapestry users
Subject: RE: Tapestry 3 Iterating over a map.


Keys.  And I want to print the values.

-Original Message-
From: James Carman [mailto:[EMAIL PROTECTED]
Sent: Wed 8/16/2006 1:39 PM
To: 'Tapestry users'
Subject: RE: Tapestry 3 Iterating over a map.
 
Do you want to iterate the keys or the values?

-Original Message-
From: Mark Stang [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 16, 2006 3:36 PM
To: Tapestry users; Tapestry users
Subject: Tapestry 3 Iterating over a map.

Can I treat it like a list?  Anyone know what the syntax is?  I don't want
to convert it back and forth...

thanks,

Mark



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





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



RE: Tapestry 3 Iterating over a map.

2006-08-16 Thread James Carman
Well, you'd have to call map.entrySet() and for each entry in there, you'd
call entry.getKey() or entry.getValue() (they're of type Map.Entry).

-Original Message-
From: Mark Stang [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 16, 2006 3:48 PM
To: Tapestry users; Tapestry users
Subject: RE: Tapestry 3 Iterating over a map.

That sounds great, do you have any syntax?


-Original Message-
From: James Carman [mailto:[EMAIL PROTECTED]
Sent: Wed 8/16/2006 1:45 PM
To: 'Tapestry users'
Subject: RE: Tapestry 3 Iterating over a map.
 
You can iterate over the entries and they have key/value properties.  

-Original Message-
From: Mark Stang [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 16, 2006 3:43 PM
To: Tapestry users; Tapestry users
Subject: RE: Tapestry 3 Iterating over a map.


Keys.  And I want to print the values.

-Original Message-
From: James Carman [mailto:[EMAIL PROTECTED]
Sent: Wed 8/16/2006 1:39 PM
To: 'Tapestry users'
Subject: RE: Tapestry 3 Iterating over a map.
 
Do you want to iterate the keys or the values?

-Original Message-
From: Mark Stang [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 16, 2006 3:36 PM
To: Tapestry users; Tapestry users
Subject: Tapestry 3 Iterating over a map.

Can I treat it like a list?  Anyone know what the syntax is?  I don't want
to convert it back and forth...

thanks,

Mark



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





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





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



RE: Tapestry 3 Iterating over a map.

2006-08-16 Thread James Carman
It should because a java.util.Set (the entrySet() method returns a Set) is a
java.util.Collection.

-Original Message-
From: Mark Stang [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 16, 2006 3:57 PM
To: Tapestry users; Tapestry users
Subject: RE: Tapestry 3 Iterating over a map.

This will work with a Foreach?


-Original Message-
From: James Carman [mailto:[EMAIL PROTECTED]
Sent: Wed 8/16/2006 1:53 PM
To: 'Tapestry users'
Subject: RE: Tapestry 3 Iterating over a map.
 
Well, you'd have to call map.entrySet() and for each entry in there, you'd
call entry.getKey() or entry.getValue() (they're of type Map.Entry).

-Original Message-
From: Mark Stang [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 16, 2006 3:48 PM
To: Tapestry users; Tapestry users
Subject: RE: Tapestry 3 Iterating over a map.

That sounds great, do you have any syntax?


-Original Message-
From: James Carman [mailto:[EMAIL PROTECTED]
Sent: Wed 8/16/2006 1:45 PM
To: 'Tapestry users'
Subject: RE: Tapestry 3 Iterating over a map.
 
You can iterate over the entries and they have key/value properties.  

-Original Message-
From: Mark Stang [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 16, 2006 3:43 PM
To: Tapestry users; Tapestry users
Subject: RE: Tapestry 3 Iterating over a map.


Keys.  And I want to print the values.

-Original Message-
From: James Carman [mailto:[EMAIL PROTECTED]
Sent: Wed 8/16/2006 1:39 PM
To: 'Tapestry users'
Subject: RE: Tapestry 3 Iterating over a map.
 
Do you want to iterate the keys or the values?

-Original Message-
From: Mark Stang [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 16, 2006 3:36 PM
To: Tapestry users; Tapestry users
Subject: Tapestry 3 Iterating over a map.

Can I treat it like a list?  Anyone know what the syntax is?  I don't want
to convert it back and forth...

thanks,

Mark



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





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





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





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



RE: how can i solve this problem

2006-08-15 Thread James Carman
But, the parameter is based on a form field (a drop-down).  So, wouldn't he
have to submit the form to get the currently selected value?

-Original Message-
From: Chris Chiappone [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 15, 2006 3:13 PM
To: Tapestry users
Subject: Re: how can i solve this problem

If its a DirectLink or something similiar you need to pass parameters
instead of using getTutor.
For example your onClick() method would look like this:

pubilc IPage onClick(String tutor){
etc...

}


On 8/15/06, zqzuk [EMAIL PROTECTED] wrote:


 Helllo, i have two pages, suppose Teacher.html and Rota.html.

 on Teacher.html, theres a dropdownlist where i can select a teacher's
 name,
 and a link which on click, needs to open up another window and pass the
 selected value to the page Rota.html. i tried something like the followin
 to
 test whether it works, and it doesnt

 in Teacher.java

 public abstract String getTutor();
 abstract public void setTutor(String s);
 public IPropertySelection (){
 .
 .
 }

 public IPage onClick(){
 Rota page = getRotaPage();
 page.setSelectedTeacher(The selected value is  + getTutor());

 }

 and no matter what i select the value is always NULL. how comes the
 selected
 value is not passed over? what is the right way to do this please? thanks!

 --
 View this message in context:
 http://www.nabble.com/how-can-i-solve-this-problem-tf2110818.html#a5819804
 Sent from the Tapestry - User forum at Nabble.com.


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




-- 
~chris



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



RE: Strange HiveMind/T4 error message

2006-08-11 Thread James Carman
There is a workaround for this.  I don't remember it off the top of my head,
but many have encountered this.  Just search this list for the answer.  It
has something to do with the Jetty launcher in Eclipse setting up duplicate
classpaths or something.

-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of hv @ Fashion Content
Sent: Friday, August 11, 2006 11:02 AM
To: users@tapestry.apache.org
Subject: Re: Strange HiveMind/T4 error message

Hivemind and Tapestry JARs need to be in the same place if you use Tomcat, 
not sure about Jetty. The problem arisises if they are not using the same 
classloader. Do you have HM JARs in a shared/lib directory?
I just put everything in WEB-INF/lib. Other options are just too much bother

with classloader issues.

Henrik

Michael Gentry (Yes, I'm a Contractor) [EMAIL PROTECTED] 
skrev i en meddelelse news:[EMAIL PROTECTED]
Environment: T4 4.0.2, HM 1.1.1, Jetty 5.1.8, Eclipse 3.2, JettyLauncher
1.4.1

In Eclipse, I have a Tapestry and HiveMind User Library defined which
specifies all the JAR files in a directory path outside of the Eclipse
workspace.  I included these User Libraries in my project and all was fine.
I could launch using JettyLauncher and run/debug.  I then removed the User
Libraries from the project and copied the JAR files directly into the
project¹s context/WEB-INF/lib directory.  All was no longer fine.  I would
get the following strange error.  If you look closely, the path it specifies
as containing the duplicate module is the same exact path.  Any ideas why?
I removed all the JAR files and went back to using the User Library
defintions.

Thanks!

/dev/mrg

PS. When I ran using the HiveMind User Library definition, but had the T4
JAR files copied into context/WEB-INF/lib, I¹d get a similar error message.
In a nutshell, I couldn¹t have HiveMind or Tapestry JAR files in
context/WEB-INF/lib.



org.apache.hivemind.ApplicationRuntimeException: Error: Module hivemind is
duplicated!  Definition in
jar:file:/usr/local/mrg/Projects/eclipse/workspace/TapestryStarter/context/W
EB-INF/lib/hivemind-1.1.1.jar!/META-INF/hivemodule.xml has been ignored in
favor of existing definition from
jar:file:/usr/local/mrg/Projects/eclipse/workspace/TapestryStarter/context/W
EB-INF/lib/hivemind-1.1.1.jar!/META-INF/hivemodule.xml.
org.apache.hivemind.impl.StrictErrorHandler.error(StrictErrorHandler.java:39
)
org.apache.hivemind.impl.RegistryInfrastructureConstructor.addModuleDescript
or(RegistryInfrastructureConstructor.java:202)
org.apache.hivemind.impl.RegistryBuilder.processModuleDescriptorProvider(Reg
istryBuilder.java:168)
org.apache.hivemind.impl.RegistryBuilder.constructRegistry(RegistryBuilder.j
ava:143)
org.apache.tapestry.ApplicationServlet.constructRegistry(ApplicationServlet.
java:253)
org.apache.tapestry.ApplicationServlet.init(ApplicationServlet.java:194)
org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:383)
org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:243)
org.mortbay.jetty.servlet.ServletHandler.initializeServlets(ServletHandler.j
ava:446)
org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplic
ationHandler.java:321)
org.mortbay.jetty.servlet.WebApplicationContext.doStart(WebApplicationContex
t.java:509)
org.mortbay.util.Container.start(Container.java:72)
org.mortbay.http.HttpServer.doStart(HttpServer.java:708)
org.mortbay.util.Container.start(Container.java:72)
com.iw.plugins.jettyrunner.PluginRunner.launch(PluginRunner.java:282)
com.iw.plugins.jettyrunner.PluginRunner.launch(PluginRunner.java:104)
com.iw.plugins.jettyrunner.PluginRunner.main(PluginRunner.java:75)





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



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



RE: Tapestry 5 Discussions

2006-08-08 Thread James Carman
Isn't there some sort of ExpressionEvaluator service in HiveMind now?  Is
that where you'd plug in another expression language?

-Original Message-
From: Ben Eng [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 08, 2006 3:33 PM
To: Tapestry users
Subject: Re: Tapestry 5 Discussions

Howard,

I was only offering up an idea in response to your comment about OGNL
not providing an adequate solution for Tapestry 5. You seemed to be
searching for an expression language that could translate into both
server-side and client-side implementations.

Ben

On Tue, Aug 08, 2006 at 09:07:13AM -0700, Howard Lewis Ship wrote:
 Everything will be pluggable, just like in Tapestry 4.  Why not create
this
 for Tapesty 4 today?
 
 On 8/8/06, Ben Eng [EMAIL PROTECTED] wrote:
 
 Howard,
 
 How about adopting XPath expressions as an alternative to OGNL? Apache
 Commons JXPath could provide a server-side implementation, while
 something like Google AJAXSLT can implement XPath (as a part of XSLT)
 in JavaScript on the client side. See
 http://goog-ajaxslt.sourceforge.net/
 
 Ben
 
 On Thu, Aug 03, 2006 at 11:47:46AM -0700, Howard Lewis Ship wrote:
  As per my early blog post (
 

http://howardlewisship.com/blog/2006/03/from-fanciful-ideas-category.html),
  I would like to see object editting be dirt simple in Tapestry 5, using
  built in components.  I'll be discussing some of this with Chris Nelson
 this
  weekend.
 
  I would like to see Trails5 be an Apache project next to Tapestry5.
 
  One thing I hope to do is bridge the gap between Tapestry components
and
 the
  entity objects that contain the properties being updated.  To wit, a
  component such as TextField should be able to see the setter method
that
 it
  will ultimately invoke, and be able to convert annotations (both
defined
 by
  Tapestry and defined by external sources such as EJB3 and Hibernate)
 into
  server-side and client-side validation logic.
 
  The upside is automatic coordination of validation at multiple layers.
 
  The downside is that we may leave OGNL behind in the process, since its
 APIs
  don't support anything like this.  I'll be discussing that with Drew
  Davidson next week.  Of course, synthetic properties and instant class
  reloading will reduce the necessity of OGNL.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -- 
 Howard M. Lewis Ship
 TWD Consulting, Inc.
 Independent J2EE / Open-Source Java Consultant
 Creator and PMC Chair, Apache Tapestry
 Creator, Apache HiveMind
 
 Professional Tapestry training, mentoring, support
 and project work.  http://howardlewisship.com

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



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



RE: how to do pagin

2006-08-02 Thread James Carman
Are you looking to only query for the rows that you need?  Are you using
Hibernate?  If so, then I need to get my HibernateTableModel out there
somewhere.  OR, you can use the one that's becoming available in Trails.
Chris IMed me this morning and said that he's done with it!  Chris, I hope I
didn't steal your thunder or let the proverbial cat out of the bag.

-Original Message-
From: Danny Mandel [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 02, 2006 11:56 AM
To: Tapestry users
Subject: Re: how to do pagin

Hi,

Take a look at contrib:table:

http://tapestry.apache.org/tapestry4/tapestry-contrib/ComponentReference/Tab
le.html

This will do what you want.

Danny

zqzuk wrote:
 hi, just wondering if theres any element that allows auto-paging search
 results... im using the FOR element to output search results btw. thank u 
   


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



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



RE: Tapestry 5 Discussions

2006-08-01 Thread James Carman
Finally, let's take a sober look

Isn't that a bit much to ask?  I mean, who's sober on Tuesday?!?!?! :-)


-Original Message-
From: Adam Zimowski [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 01, 2006 9:35 AM
To: Tapestry users
Subject: Re: Tapestry 5 Discussions

Well, that's not so much suggestion, as what I think is probably best
course of action in the long run. Based on what Howard said (going
from T4 to T5 is more like from Struts to Tapestry), the whole notion
of migration path from T4 to T5 should be considered in the context:

Should I be rewriting my T4 app in another framework? (Another
framework being Tapestry with a version label increased to 5..)

That's what's really happening here. And I have to say I fully support
Howard, because as someone said earlier in the thread - he's having
fun doing it. Well, if T5 is too much for my app where I invested so
much time in T4, I will stay on T4 and maintain T4 if I have to. Or
maybe someone could maintain it for me. You James?  Next to Howard and
Jessee you are like the guru many people look up to regarding this
stuff. Maybe someone else will take over T4. I don't know, but it's
certainly what it looks like may happen.

If migrating to another version of the same framework is like
rewriting my app in ANOTHER framework, then I say no, thank you. No
migration path for me, because I'm staying on what I have. Then, all
it takes is one application written on T4 base whose benefits of
maintaining T4 outgrow rewriting it in T5, and you got yourself a life
T4.x.x.x branch.

Finally, let's take a sober look. Of all the production apps written
in T4, how many do you REALLY BELIEVE would be ported to T5? I'd say 1
of a hundread, if that. Again, I think time will tell if T4 will grow
into its own thing...




On 8/1/06, James Carman [EMAIL PROTECTED] wrote:
 So, you suggest waiting until the product is completely finished/usable
 before worrying about backward compatibility at all?  I don't know about
 that.  It might be wise to consider backward compatibility issues while
 architecting it.  I don't think it's too early to start raising the red
flag
 when the person designing it is already saying that it's going to be very
 difficult to migrate existing applications to T5.  I'm not saying that I
 think T5 should be completely constrained by backward compatibility
 concerns, but it would be good to think how would I migrate a T4
 application if T5 were architected this way while making design
decisions,
 since a migration path has been promised and if it's that difficult to
 provide, it may take a long time before a reliable/robust solution comes
 out.

 The funny thing is that nobody has really talked about (at least from my
 recollection) providing a migration path from T3 to T5 yet, either.
That's
 going to cover a lot of folks.  Many didn't upgrade to T4 because of the
 potential headaches.  Those people will still be left even further behind
in
 the dust if there's no easy way for them to migrate their apps to T5.

 -Original Message-
 From: Adam Zimowski [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, August 01, 2006 8:40 AM
 To: Tapestry users
 Subject: Re: Tapestry 5 Discussions

 There is couple such simple answer to all this:

 1) Time will tell..
 2) The beauty of open source..

 1) Why all the fuss about this NOW? T5 isn't going to happen for a
 while yet, so why all that stress about something that you can't use
 yet? Use T4, support it, pretend T5 isn't there (because it isn't),
 and when T5 comes out make the decision to move onto T5 OR see the 2nd
 point below.

 2) I see this as a GOLDEN opportunity to all those who are looking for
 fame and success in the open source world. I mean, here you are handed
 a chance to take over a successfull open source project (T4) with
 ALREADY ESTABLISHED USER BASE that is HUNGRY for future support of the
 product. So if T5 is not for everyone, and T4 as it seems to be
 reapeated by many, has lots of room to grow, why not fork T4 when the
 time comes and move on with life?

 On 7/28/06, Jesse Kuhnert [EMAIL PROTECTED] wrote:
  Yes really...That is pretty horribly inappropriate.
 
  Reading the spindle blog doesn't even give me the impression Geoff has
run
  off to make babies with GWT either. In fact, it looks like he just
 released
  a T4 compatible spindle plugin.
 
  Please keep your personal attacks for some other forum, like a private
 email
  or your own website. They aren't appropriate/wanted/appreciated here.
 
  thanks
 
 
  On 7/28/06, Francis Amanfo [EMAIL PROTECTED] wrote:
  
   ... And that's why Geoff Longman dropped off the boat to pursue
 something
   more innovative (GWT) having a solid backing by a reputable company.
Not
   with by a sole Saddam-like dictator like Howard. He pretends he's
   democratic
   by throwing his ideas under the umbrella Discuss but meanwhile he's
 made
   up his mind already and won't thus listen to anyone. He didn't listen
to
   Geoff that's why

RE: Tapestry 5 Discussions

2006-08-01 Thread James Carman
Mark, you also have to consider a different type of user.  For me, a
component/framework extension developer (Tapernate, tapestry-acegi, etc.), I
am not going to want to rewrite all of my cool stuff each time a new version
of Tapestry comes out.  No way will I maintain a version of my components
for each version of Tapestry.  What about Trails, which is helping Tapestry
gain some attention by providing a cool RAD environment?  If innovative
folks get sick of having to rewrite their stuff all the time, then they'll
just stop writing components for Tapestry altogether and that'll hurt the
community.  Also, what about tool developers?  The cognition folks have a
pretty cool Eclipse plugin that will probably have to be reworked for T5.
Spindle also suffered the same growing pains.  I don't want to put words
into Geoff's mouth, but he seemed somewhat troubled by the fact that he had
to totally rework Spindle for T4 from T3.  Hugo Palma is creating a TapIDEA,
an Intellij IDEA plugin.  He'll also be impacted by this as his IDE
extension will probably have to be completely reworked.  I know that some
folks aren't very impressed by tools and they don't think that tool support
should be the reason that people choose a platform, but to some they are
very important.

-Original Message-
From: Mark Stang [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 01, 2006 10:25 AM
To: Tapestry users; Tapestry users
Subject: RE: Tapestry 5 Discussions

I don't think I agree.  We switched to Tapestry from Struts because 
it gave us a component framework.  Internally, we have three projects 
on Tapestry.  One is 4.x and the other two are 3.x.  For the 3.x projects 
we have looked at 4.x and while we would like to be on the latest 
and greatest, there isn't enough of a ROI to justify moving at this 
time.  And since 5.x is in the near future we are waiting.  
However, we might not ever upgrade.  What would cause us to upgrade?  
Everything works.  And when we have had problems we post it to the 
group, which usually results in a fairly quick fix.  Or if push comes 
to shove, we pay Howard.  What more could you ask of a framework?

And if you think about what brought us to Tapestry, it wasn't the 
upgrade path or support, it was the ability to develop components.  
From everything I have read, we will still have pages and 
components.  Will we have to rewrite all of our components?  I don't 
think we will have to do so, mainly because they are not that tied to 
the API.

regards,

Mark


-Original Message-
From: Danny Angus [mailto:[EMAIL PROTECTED]
Sent: Tue 8/1/2006 7:51 AM
To: Tapestry users
Subject: Re: Tapestry 5 Discussions
 


 Finally, let's take a sober look. Of all the production apps written
 in T4, how many do you REALLY BELIEVE would be ported to T5? I'd say 1
 of a hundread, if that.

On the other hand tapestry provides us the the ability to re-use
components.
If we want to write new applications in Tapestry5 do we throw away all our
old components and lose their value? Or do we go to the expense of
migrating them and writing new ones?

For the people who are stuck requiring support for product which is likely
to be ending its life the choice will be a stark one, not whether to
upgrade to Tapestry 5, but what framework to migrate to. I would predict
that most of the people who see their investment in components become
increasingly worthless will have little loyalty left and will plump for
something which is more likely to protect their investment, no matter what
the technical limitations are. Look out for people offering a Tapestry4 to
JSF migration path.

d.



***
The information in this e-mail is confidential and for use by the
addressee(s) only. If you are not the intended recipient please delete the
message from your computer. You may not copy or forward it or use or
disclose its contents to any other person. As Internet communications are
capable of data corruption Student Loans Company Limited does not accept any
responsibility for changes made to this message after it was sent. For this
reason it may be inappropriate to rely on advice or opinions contained in an
e-mail without obtaining written confirmation of it. Neither Student Loans
Company Limited or the sender accepts any liability or responsibility for
viruses as it is your responsibility to scan attachments (if any). Opinions
and views expressed in this e-mail are those of the sender and may not
reflect the opinions and views of The Student Loans Company Limited.

This footnote also confirms that this email message has been swept for the
presence of computer viruses.




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






RE: Tapestry 5 Discussions -- Nice to see people paying attention

2006-07-30 Thread James Carman
First of all, let me say that I don't appreciate the name-calling.  I am not
personally attacking anyone here.  I am a very active member of the open
source community and I too do it because I enjoy it.  I enjoy working with
Tapestry and I believe that Tapestry is a very well-designed framework.
That's why I feel so strongly about its future.  The only real issue that I
have is that there's no migration path.  As many others on this thread have
agreed, no migration path really makes the businessey folks very nervous and
they might not let us techey folks use Tapestry because of it and that would
be a shame. 

I have read the documentation on the new IoC container and I've already
started discussion with the HiveMind team about including some of Howard's
concepts into HiveMind itself.  That's not an argument that Tapestry should
keep HiveMind, but an illustration that I actually do support the direction
that Tapestry is heading with the new IoC container.  

James

p.s. Sorry to dual post, but this thread got splintered onto both lists.

-Original Message-
From: Jesse Kuhnert [mailto:[EMAIL PROTECTED] 
Sent: Saturday, July 29, 2006 10:07 AM
To: Tapestry development
Subject: Re: Tapestry 5 Discussions -- Nice to see people paying attention

Wow, I have to say I'm pretty disappointed in such talk from someone who is
supposed to be the chairman of Hivemind. I'd almost say it sounds kind of
immature.

I support Howard's work on T5 completely, and since he and I are currently
the two most active developers I think it has to count for something.

We do this because we enjoy it, please don't try and take that away. If you
think you can do a better job the door is always open. It ~is~ open source
after all :)

On 7/29/06, James Carman [EMAIL PROTECTED] wrote:

 Again, Howard, don't get me wrong.  I really like some of the cool new
 stuff
 you're doing with Tap5, except for maybe Tapioca (that's not the official
 name, but my pet name) vs. HiveMind.  Anyway, one might interpret what
 you've basically said here:

 future users vastly outnumber the current users

 to mean that you don't mind leaving your current users out in the cold
 when
 it comes to the future of Tapestry.  I'm not saying that's what you said,
 necessarily, but I'm saying it could be interpreted that way.

 Here's an interesting question.  When writing T4, did you know that T5 was
 going to be such a drastic rewrite?  Probably not, or you would have just
 architected T4 the right way to avoid the rewrite.  Correct?  Well, then,
 who is to say that two years down the road whenever you get down to
 working
 on T6 that won't you decide the T5 architecture just won't work?  You
 probably thought at the time of writing T4 that the architecture was the
 right way to go for the future and now it's untenable w.r.t. to adding
 new
 features without breaking backwards compatibility.

 I have (not that I necessarily think you were addressing me, but just in
 case) started to help make Tapestry more popular (Hibernate, Acegi, and
 AspectJ integration for starters) and I've contributed to Tapestry itself
 (autowiring), but a lot of my work will have to be completely rewritten
 for
 T5!

 Also, as a consultant, I have to recommend to my clients what technologies
 to use in their best interest.  If Tapestry continues down the path that
 it's going, I could not endorse Tapestry as a viable technology solution
 for
 a large, on-going project.  In other words, I wouldn't stick my neck out
 to
 suggest Tapestry given its track record.

 -Original Message-
 From: Howard Lewis Ship [mailto:[EMAIL PROTECTED]
 Sent: Friday, July 28, 2006 6:12 PM
 To: Tapestry development
 Subject: Re: Tapestry 5 Discussions -- Nice to see people paying attention

 The current state of the T4 code is untenable w.r.t. to adding new
 features without breaking backwards compatibility.  Each upgrade of
 Tapestry (2 to 3 to 4) has had major upgrade problems because of a
 number of factors, mostly the design of the APIs and the need to
 extend from base classes (as the base classes provide much of the
 component functionality).

 In the long view of Tapestry, the future users vastly outnumber the
 current users. Tapestry 5 is targetting that group of users.

 Existing applications coded to Tapestry 4 ... well, leave them on
 Tapestry 4!  Many users prefer to stay on Tapestry 3.  They don't want
 to face the upgrade from 3 to 4 if their application is working.  The
 design of Tapestry 5 will facilitate easy upgrades from 5 on ...
 mainly because the API is minimal and flexible, consisting almost
 entirely of annotations, rather the classes to extend and interfaces
 to extend.

 Having an easy upgrade path from Tapestry 4 to 5 is a near
 insurmountable challenge.

 Is Tapestry 5 a new framework?  Yes.  Will it be an easy transition
 for developers (not code)?  Yes.  Tapestry 4 developers will see
 Tapestry 5 and understand it quickly and easily, and be happy about
 the new

RE: Hivemind: creating a pooled service

2006-07-28 Thread James Carman
FYI, the HiveMind mailing lists have been moved.  We are moving to an Apache
top-level project, but we haven't moved the website yet.  Anyway, have you
tried this:

service-point id=pooledObjectProvider
interface=org.apache.hivemind.ServiceImplementationFactory
paramaters-occurs=none /

This tells HiveMind that your implementation factory doesn't expect any
parameters.

-Original Message-
From: Kristian Marinkovic [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 28, 2006 6:28 AM
To: Tapestry users
Subject: Hivemind: creating a pooled service


hi,

could someone tell me howto configure hivemind to get me a
object with a pooled  lifecycle which, if the pool is empty, uses
a own factory or provider to generate it?

my configuration doesn't pool the object and returns a
Parameters to service implementation factory
pooledObjectProvider contains no contributions
but expects exactly one contribution. error
message

service-point id=pooledObject
interface=pool.IPooledObject /
service-point id=pooledObjectProvider
interface=org.apache.hivemind.ServiceImplementationFactory /

implementation service-id=pooledObjectProvider
invoke-factory model=singleton
construct class=pool.PooledObjectProvider /
/invoke-factory
/implementation

implementation service-id=pooledObject
invoke-factory model=pooled
   service-id=pooledObjectProvider /
/implementation


g,
kris

P.S. i always get a failure notive when i try to subscribe to the hivemind
mailinglist


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



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



RE: RE: Hivemind: creating a pooled service

2006-07-28 Thread James Carman
Try this:

public void run() 
{
  IPooledObject o = (IPooledObject) registry
  .getService(cross.pooledObject,IPooledObject.class);
  System.out.println(ObjectID:  + o.getValue());
  registry.cleanupThread();
}

See what you get.  The pooled lifecycle model doesn't know when to release
stuff if you don't clean up your current thread.  

-Original Message-
From: Kristian Marinkovic [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 28, 2006 8:09 AM
To: Tapestry users
Subject: RE: RE: Hivemind: creating a pooled service

hi james,

the error message does not occur any more. But the objects are still
not being pooled. my testcode looks like this:

public class PoolTest implements Runnable {

public static Registry registry = null;

public static void main(String[] args) throws InterruptedException {
registry = RegistryBuilder.constructDefaultRegistry();

Thread[] a = new Thread[10];
for(int i=0;ia.length;i++)  a[i] = new Thread(new PoolTest());
for(Thread t: a) t.start();
for(Thread t: a) t.join();

for(int i=0;ia.length;i++) a[i] = new Thread(new PoolTest());
for(Thread t: a) t.start();
for(Thread t: a) t.join();



public void run() {
IPooledObject o = (IPooledObject) registry
.getService(cross.pooledObject,IPooledObject.class);
System.out.println(ObjectID:  + o.getValue());
}

I'm getting 20 different object ids. i'd except to have less than 20
different object ids :)

g,
 kris




   
 James Carman
 [EMAIL PROTECTED] 
 ulting.comAn 
'Tapestry users' 
 28.07.2006 13:32   users@tapestry.apache.org
 Kopie 
   
  Bitte antwortenThema 
an  RE: Hivemind: creating a pooled
 Tapestry users   service
 [EMAIL PROTECTED] 
pache.org 
   
   
   
   




FYI, the HiveMind mailing lists have been moved.  We are moving to an
Apache
top-level project, but we haven't moved the website yet.  Anyway, have you
tried this:

service-point id=pooledObjectProvider
interface=org.apache.hivemind.ServiceImplementationFactory
paramaters-occurs=none /

This tells HiveMind that your implementation factory doesn't expect any
parameters.

-Original Message-
From: Kristian Marinkovic [mailto:[EMAIL PROTECTED]
Sent: Friday, July 28, 2006 6:28 AM
To: Tapestry users
Subject: Hivemind: creating a pooled service


hi,

could someone tell me howto configure hivemind to get me a
object with a pooled  lifecycle which, if the pool is empty, uses
a own factory or provider to generate it?

my configuration doesn't pool the object and returns a
Parameters to service implementation factory
pooledObjectProvider contains no contributions
but expects exactly one contribution. error
message

service-point id=pooledObject
interface=pool.IPooledObject /
service-point id=pooledObjectProvider
interface=org.apache.hivemind.ServiceImplementationFactory /

implementation service-id=pooledObjectProvider
invoke-factory model=singleton
construct class=pool.PooledObjectProvider /
/invoke-factory
/implementation

implementation service-id=pooledObject
invoke-factory model=pooled
   service-id=pooledObjectProvider /
/implementation


g,
kris

P.S. i always get a failure notive when i try to subscribe to the hivemind
mailinglist


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



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




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



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

RE: RE: RE: Hivemind: creating a pooled service

2006-07-28 Thread James Carman
Glad to help!  Yeah, the cleanupThread() stuff is *very* important in
HiveMind.  That's how we cleanup thread-local resources and the like.  So,
if you ever do any asynchronous processing inside a registry, make sure you
call cleanupThread() when the asynchronous process is done or you'll waste
resources.

-Original Message-
From: Kristian Marinkovic [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 28, 2006 8:30 AM
To: Tapestry users
Subject: RE: RE: RE: Hivemind: creating a pooled service

ok, now i get it in order to put an object back to the pool i
have to release it somehow my mistake

 i've seen it in org.apache.tapestry.ApplicationServlet but had no
clue what it was for :)

it works fine now

thank you




   
 James Carman
 [EMAIL PROTECTED] 
 ulting.comAn 
'Tapestry users' 
 28.07.2006 14:12   users@tapestry.apache.org
 Kopie 
   
  Bitte antwortenThema 
an  RE: RE: Hivemind: creating a   
 Tapestry users   pooled service 
 [EMAIL PROTECTED] 
pache.org 
   
   
   
   




Try this:

public void run()
{
  IPooledObject o = (IPooledObject) registry
  .getService(cross.pooledObject,IPooledObject.class);
  System.out.println(ObjectID:  + o.getValue());
  registry.cleanupThread();
}

See what you get.  The pooled lifecycle model doesn't know when to release
stuff if you don't clean up your current thread.

-Original Message-
From: Kristian Marinkovic [mailto:[EMAIL PROTECTED]
Sent: Friday, July 28, 2006 8:09 AM
To: Tapestry users
Subject: RE: RE: Hivemind: creating a pooled service

hi james,

the error message does not occur any more. But the objects are still
not being pooled. my testcode looks like this:

public class PoolTest implements Runnable {

public static Registry registry = null;

public static void main(String[] args) throws InterruptedException {
registry = RegistryBuilder.constructDefaultRegistry();

Thread[] a = new Thread[10];
for(int i=0;ia.length;i++)  a[i] = new Thread(new PoolTest());
for(Thread t: a) t.start();
for(Thread t: a) t.join();

for(int i=0;ia.length;i++) a[i] = new Thread(new PoolTest());
for(Thread t: a) t.start();
for(Thread t: a) t.join();



public void run() {
IPooledObject o = (IPooledObject) registry
.getService(cross.pooledObject,IPooledObject.class);
System.out.println(ObjectID:  + o.getValue());
}

I'm getting 20 different object ids. i'd except to have less than 20
different object ids :)

g,
 kris





 James Carman
 [EMAIL PROTECTED]
 ulting.comAn
'Tapestry users'
 28.07.2006 13:32   users@tapestry.apache.org
 Kopie

  Bitte antwortenThema
an  RE: Hivemind: creating a pooled
 Tapestry users   service
 [EMAIL PROTECTED]
pache.org








FYI, the HiveMind mailing lists have been moved.  We are moving to an
Apache
top-level project, but we haven't moved the website yet.  Anyway, have you
tried this:

service-point id=pooledObjectProvider
interface=org.apache.hivemind.ServiceImplementationFactory
paramaters-occurs=none /

This tells HiveMind that your implementation factory doesn't expect any
parameters.

-Original Message-
From: Kristian Marinkovic [mailto:[EMAIL PROTECTED]
Sent: Friday, July 28, 2006 6:28 AM
To: Tapestry users
Subject: Hivemind: creating a pooled service


hi,

could someone tell me howto configure hivemind to get me a
object with a pooled  lifecycle which, if the pool is empty, uses
a own factory or provider to generate it?

my configuration doesn't pool the object and returns a
Parameters to service implementation factory

RE: Any news on Tap 4.1?

2006-07-27 Thread James Carman
Components can be autowired too! :-)


-Original Message-
From: Martin Strand [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 27, 2006 3:21 PM
To: Tapestry users
Subject: Re: Any news on Tap 4.1?

I just changed to 4.1 in pom.xml and everything still works. :)
Nice to see autowiring for page classes.

Martin

On Thu, 27 Jul 2006 19:45:20 +0200, Jesse Kuhnert [EMAIL PROTECTED]  
wrote:

 Yeah, I had intended to release it Wednesday but I found too many places
 that needed a lot more documentation so it didn't come to pass.

 Most of the code is about as stable as it can be until we get more
 feedback/people using it. I'll probably end up making the official  
 release
 Friday, but it won't involve too many code changes so anyone waiting may  
 as
 well start now.

 I'd reccomend using maven2 snapshot builds of it anyway as it is likely  
 that
 I'll continue to make daily/weekly/etc updates to them as bugs are
 fixed/features added.

 I can't give it a seal of approval stability wise, but from what I know  
 of
 the tapestry ajax community I'd say this very early alpha release is
 probably the most stable/well tested implementation of it you can find.  
 :)

 Please, do start using it. The release is really a formality at this  
 point.

 On 7/27/06, Rui Pacheco [EMAIL PROTECTED] wrote:

 Didn't someone announce a couple of weeks ago that it would be done in  
 a
 couple of weeks?
 Thats why I'm asking today, I thought the date would be near.

 On 7/27/06, Spencer Crissman [EMAIL PROTECTED] wrote:
 
  No one who is involved in the voting process can estimate how stable  
 the
  current build is, just approximately, any closer than that?
 
  We are in a similar boat, and would love to have just some kind of
  ballpark
  guess, like, all features are in and it is mostly stable - maybe a  
 few
  weeks vs. features are present but significant issues are known -
 maybe
  a
  couple months vs. missing features and many issues - several  
 months.
 
 
 
  On 7/27/06, Kevin Menard [EMAIL PROTECTED] wrote:
  
   I believe a new model is being used now.  4.1 releases will be made
 and
   eventually one will be voted stable.  So, I don't think there's any
   definite
   timeline other than ASAP.
  
   --
   Kevin
  
-Original Message-
From: Rui Pacheco [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 27, 2006 11:53 AM
To: Tapestry users; Tapestry users
Subject: Any news on Tap 4.1?
   
We've been thinking about redoing some of our internal web apps  
 with
   Ajax,
but we decided to wait until Tap4.1 was out.
Any dates for when that's to happen?
   
--
Cumprimentos,
Rui Pacheco
  
  

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


 --
 Cumprimentos,
 Rui Pacheco






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



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



RE: Any news on Tap 4.1?

2006-07-27 Thread James Carman
No, Spring beans are not real HiveMind services by default.

-Original Message-
From: Payne, Matthew [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 27, 2006 3:57 PM
To: Tapestry users
Subject: RE: Any news on Tap 4.1?


Just curious, when this is combined with the spring
plugin(tapestry-spring.jar), do components from spring get autowired as
well?

Thanks,

Matt
 -Original Message-
From:   James Carman [mailto:[EMAIL PROTECTED] 
Sent:   Thursday, July 27, 2006 3:27 PM
To: 'Tapestry users'
Subject:RE: Any news on Tap 4.1?

Components can be autowired too! :-)


-Original Message-
From: Martin Strand [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 27, 2006 3:21 PM
To: Tapestry users
Subject: Re: Any news on Tap 4.1?

I just changed to 4.1 in pom.xml and everything still works. :)
Nice to see autowiring for page classes.

Martin

On Thu, 27 Jul 2006 19:45:20 +0200, Jesse Kuhnert [EMAIL PROTECTED]  
wrote:

 Yeah, I had intended to release it Wednesday but I found too many places
 that needed a lot more documentation so it didn't come to pass.

 Most of the code is about as stable as it can be until we get more
 feedback/people using it. I'll probably end up making the official  
 release
 Friday, but it won't involve too many code changes so anyone waiting may  
 as
 well start now.

 I'd reccomend using maven2 snapshot builds of it anyway as it is likely  
 that
 I'll continue to make daily/weekly/etc updates to them as bugs are
 fixed/features added.

 I can't give it a seal of approval stability wise, but from what I know  
 of
 the tapestry ajax community I'd say this very early alpha release is
 probably the most stable/well tested implementation of it you can find.  
 :)

 Please, do start using it. The release is really a formality at this  
 point.

 On 7/27/06, Rui Pacheco [EMAIL PROTECTED] wrote:

 Didn't someone announce a couple of weeks ago that it would be done in  
 a
 couple of weeks?
 Thats why I'm asking today, I thought the date would be near.

 On 7/27/06, Spencer Crissman [EMAIL PROTECTED] wrote:
 
  No one who is involved in the voting process can estimate how stable  
 the
  current build is, just approximately, any closer than that?
 
  We are in a similar boat, and would love to have just some kind of
  ballpark
  guess, like, all features are in and it is mostly stable - maybe a  
 few
  weeks vs. features are present but significant issues are known -
 maybe
  a
  couple months vs. missing features and many issues - several  
 months.
 
 
 
  On 7/27/06, Kevin Menard [EMAIL PROTECTED] wrote:
  
   I believe a new model is being used now.  4.1 releases will be made
 and
   eventually one will be voted stable.  So, I don't think there's any
   definite
   timeline other than ASAP.
  
   --
   Kevin
  
-Original Message-
From: Rui Pacheco [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 27, 2006 11:53 AM
To: Tapestry users; Tapestry users
Subject: Any news on Tap 4.1?
   
We've been thinking about redoing some of our internal web apps  
 with
   Ajax,
but we decided to wait until Tap4.1 was out.
Any dates for when that's to happen?
   
--
Cumprimentos,
Rui Pacheco
  
  

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


 --
 Cumprimentos,
 Rui Pacheco






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



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

This message, including any attachments, is intended only for the
recipient(s) 
named above. It may contain confidential and privileged information. If you
have 
received this communication in error, please notify the sender immediately
and 
destroy or delete the original message. Also, please be aware that if you
are not 
the intended recipient, any review, disclosure, copying, distribution or any

action or reliance based on this message is prohibited by law.  


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




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



RE: global hivemind service

2006-07-26 Thread James Carman
Yes, of course.  You can implement your own service models however you want.
You could store an implementation object in a database if you really wanted
to.  I meant that Tapestry doesn't (out of the box) have support for that
feature.  You have to be careful, though.  Using session-scoped
implementation objects does still have its drawbacks.  If a user submits two
requests from the same session, you can screw up your session-scoped data
(just as you can with any session-scoped data).  There are ways to avoid
this, of course, but you just have to be careful. 

-Original Message-
From: Jean-Francois Poilpret [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 26, 2006 9:33 AM
To: 'Tapestry users'
Subject: RE: global hivemind service

If you allow me James, although HiveMind does not provide a session-scoped
or user-scoped service model, you can find external implementations out
there...
Where? Check HiveMind Utilities hivelock module for example. I know there
are other existing code for this as well.

Cheers

Jean-Francois

-Original Message-
From: James Carman [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 26, 2006 8:23 PM
To: 'Tapestry users'
Subject: RE: global hivemind service

There is no such thing as a session-scoped (or user-scoped) service model
in HiveMind.  So, the singleton model will instantiate exactly one
implementation which will be used by everyone.  If you want to lookup an ASO
in your HiveMind service, you use the ApplicationStateManager.  Just declare
a property of type ApplicationStateManager and provide a setter for it.
When HiveMind builds your service implementation (assuming you're using
BuilderFactory), it will automatically inject the ApplicationStateManager
into your implementation object.  Then, you can use it to lookup the ASO you
want by name.

-Original Message-
From: xVik [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 26, 2006 9:18 AM
To: users@tapestry.apache.org
Subject: RE: global hivemind service


i really dont know how to invoke application state object into hivemind
service.

and about singleton model.. i think it creates instance of service on first
reference and this instance is also individual for each user.. may be im
wrong

in general i need somthing like global application state object to store
some common data.
-- 
View this message in context:
http://www.nabble.com/global-hivemind-service-tf2003454.html#a5503015
Sent from the Tapestry - User forum at Nabble.com.


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



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




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



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



RE: PermGen space - Caching is ON

2006-07-24 Thread James Carman
How many pages does your application have roughly?

 Thanks for your comments, discussion.  However, this occurs when caching
 is turned on, i.e.
 -Dorg.apache.tapestry.disable-caching=false.

 I sure hope there's a fix, I don't know if MaxPermSize can be made any
 larger in production and it sounds from your discussion that making it
 larger will just delay the OOM condition anyway.

 Anybody else have any ideas?

 -Original Message-
 From: James Carman [mailto:[EMAIL PROTECTED]
 Sent: Sunday, July 23, 2006 6:03 AM
 To: Tapestry users
 Subject: Re: PermGen space

 Actually, Tapestry (and HiveMind as well) uses Javassist to generate
 classes at runtime, but all the rest is still true with Javassist as it is
 with CGLIB (hibernate uses CGLIB).  As Martin said, enabling caching
 should fix the problem.  Tapestry will only generate (and cache) the
 classes for each page/component one time with caching enabled.  In a
 production environment, you really shouldn't run into this, since you
 would have caching enabled and you wouldn't be hot redeploying your
 application.

 James

 Hi all,
 This problem is very common with Tapestry applications. This is due to
 the fact that Tapestry uses cglib to generate classes at runtime.
 Java uses a separate Heap space called PermGenSpace to put meta-data
 about classes, which is never garbage collected (this is normal
 since normally, classes never change...) but with cglib, classes are
 generated, which add to the PermGenSpace. And the next time your
 application is deployed, new classes are generated which add to the
 PermGenSpace, etc... So it fills and become full.
 So this problem is common to Java+Tapestry/cglib+deployed webapps.
 I hope this explaination is clear. Else ask questions.
 -jec

 Harvey, David a écrit :
 Hello all,

 We've been having occasional problems with PermGen out of space
 errors thrown during the execution of our Tapestry application.  We
 usually get a stack trace with something about hivemind at the top (see
 below).
 Then, of course, we have to restart our app server.  Our environment
 is

 Tapestry 4.0.1 and Tacos4-Beta3
 Jboss 4.0.3 sp1 (Tomcat 5.5 embedded) JRE 1.5.0_03

 The java runtime is initialized with
 -XX:PermSize=96M -XX:MaxPermSize=128M

 The stack trace we get at various times is:

 2006-07-20 17:25:11,415 ERROR
 [net.sf.tacos.ajax.impl.AjaxDirectServiceImpl] Error invoking
 listener on component $AjaxForm_40
 org.apache.hivemind.ApplicationRuntimeException: PermGen space
 [context:/WEB-INF/pages/claims/addEdit.page, line 6, column 93]
 at
 org.apache.tapestry.engine.RequestCycle.rewindForm(RequestCycle.java:
 461
 )
 at
 net.sf.tacos.ajax.components.AjaxForm.trigger(AjaxForm.java:418)
 at
 net.sf.tacos.ajax.impl.AjaxDirectServiceImpl.triggerComponent(AjaxDir
 ect
 ServiceImpl.java:348)
 .
 .
 .

 Caused by: java.lang.OutOfMemoryError: PermGen space


 Anybody have any clues as to what we can do about this?

 Regards,
 David Harvey
 Ingenix, Inc.

 Secure Server BSK made the following  annotations on 07/21/2006
 03:28:13 PM --This e-mail, including
 attachments, may include confidential and/or proprietary information,
 and may be used only by the person or entity to which it is
 addressed. If the reader of this e-mail is not the intended recipient
 or his or her authorized agent, the reader is hereby notified that
 any dissemination, distribution or copying of this e-mail is
 prohibited. If you have received this e-mail in error, please notify
 the sender by replying to this message and delete this e-mail
 immediately.
 ==

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


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



 James Carman, President
 Carman Consulting, Inc.


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




 Secure Server BSK made the following
  annotations on 07/23/2006 09:50:20 PM
 --This e-mail, including attachments, may
 include confidential and/or proprietary information, and may be used only
 by the person or entity to which it is addressed. If the reader of this
 e-mail is not the intended recipient or his or her authorized agent, the
 reader is hereby notified that any dissemination, distribution or copying
 of this e-mail is prohibited. If you have received this e-mail in error,
 please notify the sender by replying to this message and delete this
 e-mail immediately.
 ==

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

RE: Are components treated as pages?

2006-07-24 Thread James Carman
I am doing exactly as you are and it works just fine for me.

-Original Message-
From: Rui Pacheco [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 24, 2006 7:44 AM
To: Tapestry users
Subject: Re: Are components treated as pages?

I am looking at another project where I defined the form inline in the HTML
and it worked without it. I just defined a form as DEFANGED_form
jwcid=[EMAIL PROTECTED]
and had no problems.

Whats the difference between declaring the form properties inline and in the
component specification, why does it work in one instance and not on the
other?

I know I could put the form specification in the html template, but I want
to keep all my specifications in the component specification. Its just the
philosophy we chose for our project.

On 7/24/06, Shing Hing Man [EMAIL PROTECTED] wrote:

 I think you have left out the delegate attribute in
 the Form component.

 http://tapestry.apache.org/tapestry4/tapestry/ComponentReference/Form.html

 Shing


 --- Rui Pacheco [EMAIL PROTECTED] wrote:

  Here they go:
 
  This is my .jwc:
  ?xml version=1.0 encoding=UTF-8?
  !DOCTYPE component-specification PUBLIC  -//Apache
  Software
  Foundation//Tapestry Specification 4.0//EN  
 
 http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd;
  component-specification
  class=pt.te.universal.components.login.Login
  allow-body=no allow-informal-parameters=no
 
  component id=form type=Form
  binding name=listener
  value=listeners.doLogin/
  /component
 
  component id=uname type=TextField
   binding name=value value=ognl:uname/
   binding name=validators
  value=validators:required/
  /component
 
  component id=password type=TextField
  binding name=value
  value=ognl:password/
   binding name=hidden value=ognl:true/
   binding name=validators
  value=validators:required/
  /component
 
  asset name=submit
  path=imagens/botao_ok_up.gif/
  /component-specification
 
  This is my .java:
  public abstract class Login extends
  AbstractBaseComponent {
 
  public abstract String getUname();
  public abstract String getPassword();
 
 
  public void doLogin(IRequestCycle cycle){
 
  System.err.println(getUname());
  }
  }
 
  This is my .html:
  table width=100% border=0 cellspacing=0
  cellpadding=2
  trtd class=tituloLogin/td/tr
  trtdinput type=text DEFANGED_STYLE=FONT-SIZE:
  9px; WIDTH: 100px; HEIGHT:
  19px jwcid=uname//td/tr
  trtd class=tituloPassword/td/tr
  trtd width=81%input jwcid=password
  type=password
  style=FONT-SIZE: 9px; WIDTH: 100px; HEIGHT:
  19px//td/tr
  trtd width=81%input type=image jwcid=
  [EMAIL PROTECTED]
  width=23 height=17
  image=asset:submit//td/tr
  /table
 
  On 7/24/06, Shing Hing Man [EMAIL PROTECTED] wrote:
  
   I have no problem with validators for a  TextField
   within a custom component.
  
   You might like  to post your component's .java,
  .jwc.
   and .html  and see if anyone in the list can help.
  
   Shing
  
  
   --- Rui Pacheco [EMAIL PROTECTED] wrote:
  
Hi all
   
I've been knocking my head on the wall trying to
find whats wrong here, and
I can't see anything.
   
I have a set of fields, inside a form, in an
  html
snippet I defined as a
component. I created a html file that contains
  just
a snippet of that file,
a .jwc file that contains the definition for the
elements inside the
template and a corresponding class.
   
Everything works fine, except for Validators.
   
I the .jwc file I defined my fields as being
required, but there is no
validation being done at runtime. If I don't
  insert
something on the fields,
I get an NPE on my bean, which is obviously
expecting something from the
template.
   
I've had validators work before, and the
  difference
between those pages and
this one is the fact that I'm doing everything
inside a .jwc and not a .page
file.
   
This is my component definition:
component id=password type=TextField
binding name=value
value=ognl:password/
 binding name=hidden
  value=ognl:true/
 binding name=validators
value=validators:required/
/component
   
Has anyone seen anything like this? Have you had
validators working on
component definitions?
--
Cumprimentos,
Rui Pacheco
   
  
  
   Home page :
 http://uk.geocities.com/matmsh/index.html
  
  
  
  
 
 ___
   Copy addresses and emails from any email account
  to Yahoo! Mail - quick,
   easy and free.
  http://uk.docs.yahoo.com/trueswitch2.html
  
  
 
 -
   To unsubscribe, e-mail:
  [EMAIL PROTECTED]
   For additional commands, e-mail:
  [EMAIL PROTECTED]
  
  
 
 
  --
  Cumprimentos,
  Rui Pacheco
 


 Home page :
   

RE: Hivemind: Difference between invoke-factory and create-instance

2006-07-24 Thread James Carman
Kris,

The create-instance is a very simplistic mechanism.  All it does is
instantiate that class.  It does no configuration or wiring of the
instantiated object.  If you want dependency injection, use invoke-factory
instead, which by default uses the BuilderFactory to instantiate and
configure your implementation object.

James

-Original Message-
From: Kristian Marinkovic [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 24, 2006 10:44 AM
To: Tapestry users
Subject: Hivemind: Difference between invoke-factory and create-instance


Hi,

can somebody explain to me the difference between
invoke-factory and create-instance? Is there any
difference in behaviour as long as the class referenced
by invoke-factory does not implement
ServiceImplementationFactory?

Or am i completely wrong :) I'm not sure how to use them.

Thanks in advance

g,
kris


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



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



Re: PermGen space

2006-07-23 Thread James Carman
Actually, Tapestry (and HiveMind as well) uses Javassist to generate
classes at runtime, but all the rest is still true with Javassist as it is
with CGLIB (hibernate uses CGLIB).  As Martin said, enabling caching
should fix the problem.  Tapestry will only generate (and cache) the
classes for each page/component one time with caching enabled.  In a
production environment, you really shouldn't run into this, since you
would have caching enabled and you wouldn't be hot redeploying your
application.

James

 Hi all,
 This problem is very common with Tapestry applications. This is due to
 the fact that Tapestry uses cglib to generate classes at runtime.
 Java uses a separate Heap space called PermGenSpace to put meta-data
 about classes, which is never garbage collected (this is normal since
 normally, classes never change...) but with cglib, classes are
 generated, which add to the PermGenSpace. And the next time your
 application is deployed, new classes are generated which add to the
 PermGenSpace, etc... So it fills and become full.
 So this problem is common to Java+Tapestry/cglib+deployed webapps.
 I hope this explaination is clear. Else ask questions.
 -jec

 Harvey, David a écrit :
 Hello all,

 We've been having occasional problems with PermGen out of space errors
 thrown during the execution of our Tapestry application.  We usually get
 a stack trace with something about hivemind at the top (see below).
 Then, of course, we have to restart our app server.  Our environment is

 Tapestry 4.0.1 and Tacos4-Beta3
 Jboss 4.0.3 sp1 (Tomcat 5.5 embedded)
 JRE 1.5.0_03

 The java runtime is initialized with
 -XX:PermSize=96M -XX:MaxPermSize=128M

 The stack trace we get at various times is:

 2006-07-20 17:25:11,415 ERROR
 [net.sf.tacos.ajax.impl.AjaxDirectServiceImpl] Error invoking listener
 on component $AjaxForm_40
 org.apache.hivemind.ApplicationRuntimeException: PermGen space
 [context:/WEB-INF/pages/claims/addEdit.page, line 6, column 93]
  at
 org.apache.tapestry.engine.RequestCycle.rewindForm(RequestCycle.java:461
 )
  at
 net.sf.tacos.ajax.components.AjaxForm.trigger(AjaxForm.java:418)
  at
 net.sf.tacos.ajax.impl.AjaxDirectServiceImpl.triggerComponent(AjaxDirect
 ServiceImpl.java:348)
 .
 .
 .

 Caused by: java.lang.OutOfMemoryError: PermGen space


 Anybody have any clues as to what we can do about this?

 Regards,
 David Harvey
 Ingenix, Inc.

 Secure Server BSK made the following
  annotations on 07/21/2006 03:28:13 PM
 --This e-mail, including attachments, may
 include confidential and/or proprietary information, and may be used
 only by the person or entity to which it is addressed. If the reader of
 this e-mail is not the intended recipient or his or her authorized
 agent, the reader is hereby notified that any dissemination,
 distribution or copying of this e-mail is prohibited. If you have
 received this e-mail in error, please notify the sender by replying to
 this message and delete this e-mail immediately.
 ==

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


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



James Carman, President
Carman Consulting, Inc.


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



Re: Explicitly setting the locale

2006-07-23 Thread James Carman
Would this work?

http://tapestry.apache.org/tapestry4/UsersGuide/localization.html#localization.changing


 Hello all,

 I am developing a multilingual personal site for myself using Tapestry. I
 am
 constantly setting my browser preferences to set the locale so that I can
 view the page in each locale for testing.

 This is somewhat time consuming. I would rather have links on the web page
 that override the locale sent by the browser ('Click here for German',
 'Click here for English').

 Does anyone know how to do this?

 Sincerely,
 Daniel Trebbien.



James Carman, President
Carman Consulting, Inc.


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



Re: Table with large data set

2006-07-23 Thread James Carman
Chris,

Well, some of the code uses other classes that are part of the project I'm
on.  I need to refactor it out so that it can stand alone.  I'll try to do
that soon.  Sorry for the delay.

James

 James,

 Any chance you could share that HibernateTableModel code?

 Much Appreciated,

 ~chris

 On 7/19/06, Jonathan Barker [EMAIL PROTECTED] wrote:

 +1 for wiki or SVN

 Jonathan


 -Original Message-
 From: James Carman [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 19, 2006 4:38 PM
 To: 'Tapestry users'
 Subject: RE: Table with large data set

 I have a HibernateTableModel (an IBasicTableModel impl) if you're
 interested.  There's only one issue which I couldn't really overcome
 nicely.
 It has to do with the sorting of the columns.  I didn't want to give up
 the
 ability to easily define my columns in the HTML (using the columns
 attribute
 of the @contrib:Table component), so I put in a little hack.  Basically,
 what you return from your DAO methods is a PagingQueryResult object
 which
 is
 what the HibernateTableModel uses to ask for the data for each page.
 But,
 in each PagingQueryResult you have to register what columns are
 sortable
 and how you sort them.  Anyway, I'll email it to you Chris if you want
 it.
 Or, if there is more interest, I'll package it up nicely and put it in
 my
 SVN repository.


 -Original Message-
 From: Chris Chiappone [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 19, 2006 2:23 PM
 To: Tapestry List
 Subject: Table with large data set

 I was wondering what the best approach would be for creating a
 contrib:Table
 with a large data set.  My dataSet my contain thousands of entry's and
 loading the page using contrib:Table would take forever not to mention
 consume large amounts of memory.  Currently I am getting the data from
 Hibernate.  What have you guys done to load just the data needed for the
 current page then load the next pages data when using tablePages.

 Thanks,

 --
 ~chris



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


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




 --
 ~chris



James Carman, President
Carman Consulting, Inc.


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



RE: Tapestry AspectJ

2006-07-21 Thread James Carman
I wrote a HiveMind module that allows you to inject HiveMind
services/configurations into AspectJ aspects.  It works similar to the way
Spring does it.

-Original Message-
From: Adam Zimowski [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 21, 2006 10:30 AM
To: users@tapestry.apache.org
Subject: Tapestry  AspectJ

Can anybody reflect on their experience with combining a large Tap (4)
application with AspectJ? I am most interested in advising Tapestry
pages but also any other object that I may not have configured
explicitly in Hivemind.

* By using AspectJ was cross cutting truly easier on your application
and team of developers?
* Was it easy and practical when dealing with multiple environments
(system, readiness, production)? I mean, if you wanted to deploy
un-adviced codebase to production, and performance-logging advice to
readiness, and method-tracing plus performance-logging advice to
system environment?
* If you did use AspectJ, did you abandon Hivemind around advice
model? Are you using both? * Are you using Spring AOP as well? Any
other AOP framework? If so, what drives your motivation to use (or not
use) AspectJ ?

I am very encouraged by Eclipse IDE support for AspectJ, and it's
undesputed power and flexibility it brings to AOP. I've never worked
with it however, and am a bit resistant to integrate it without some
feedback from Tapestry people who may have gone thru some good and
bads with it.

Thank You

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



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



RE: ASO and hivemind.xml

2006-07-20 Thread James Carman
You can use whatever you want for the module id (usually your application
name, though) and the version has to have the format 1.0.0 (three
dot-separated version numbers) .

-Original Message-
From: Blackwings [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 20, 2006 7:34 AM
To: Tapestry users
Subject: Re: ASO and hivemind.xml

Thanks a lot, but I have a question again: To what, the id in the module
tag, refer? Is it the name of my context? is it app? is it the package where
something (what?) is store? Same question for the version.

Thanks anyway

BW

2006/7/20, Geoff Callender [EMAIL PROTECTED]:

 BW,

 No need to touch hivemind.xml.  Add a file called hivemodule.xml to
 WEB-INF, with content similar to this:

 ?xml version=1.0?

 module id=jumpstart version=1.0.0 package=jumpstart.web

 !--  ServiceLocator and Visit --

 contribution configuration-id=tapestry.state.ApplicationObjects
 
 state-object name=serviceLocator scope=application
 create-instance class=
 jumpstart.web.base.ServiceLocator/
 /state-object
 /contribution

 contribution configuration-id=tapestry.state.ApplicationObjects
 
 state-object name=visit scope=session
 create-instance class=jumpstart.web.base.Visit
 /
 /state-object
 /contribution

 /module

 In that example, ServiceLocator performs a similar function to the
 typical Global.  Visit is just like the old Visit.  Note that the
 scope of ServiceLocator is application and the scope of Visit is
 session.

 Here's an example of them being referenced in a page:

 @InjectState(serviceLocator)
 public abstract ServiceLocator getServiceLocator();

 @InjectState(visit)
 // Can't call it getVisit() because it conflicts with a deprecated
 IPage method
 public abstract Visit getMyVisit();

 Hope this helps.

 Geoff
 http://tapestry.apache.org/tapestry4.1/QuickStart/contributed.html


 On 20/07/2006, at 7:58 PM, Blackwings wrote:

  Hi,
 
  I found in the document what is the line to add into hivemind.xml
  file to
  create an ASO since getGlobal is deprecated. But I didn't find a
  standard
  hivemind.xml file and I have no idea what is mandatory to put in. I
  just
  want to declare my ASO object to be able to inject it in my page.
 
  So, where can I find a standard hivemind.xml or what do I have to
  put in to
  still have my application working normally?
 
  Thanks
 
  BW


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





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



RE: ASO and hivemind.xml

2006-07-20 Thread James Carman
Have you tried using a StateObjectFactory?

-Original Message-
From: Blackwings [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 20, 2006 9:07 AM
To: Tapestry users
Subject: Re: ASO and hivemind.xml

The situation is :

I create class that extends ApplicationServlet and I specify it as the
tapestry main servlet in web.xml. In this class I call a class that
initialise some application objects such as list of element common to
everybody from the database.
My class also set a bean member and implement the get/set method.

I also specified this class as an ASO as you told me to do Geoff and I put
the inject tag in my Home.page.
At the loading of the application, my application object is loaded
normally and contains all the list.
When I call the Home.page, the inject seems to work and the pageBeginRender
is called normally. I call getMyASO() I declared abstract, but when I try to
get the application object it is null!!

I think Tapestry recreate an instance of MyASO instead of directly get the
first loaded :

web.xml
  ...
  servlet
servlet-namedm/servlet-name
display-nameDM Initialization servlet/display-name
servlet-classdgt.dm.controller.DossierManagerApplication
/servlet-class
load-on-startup0/load-on-startup
  /servlet
  ...

hivemodule.xml
?xml version=1.0 encoding=UTF-8?
module id=dgt.dm.controller version=06.02.01 package=dgt.dm.controller

  contribution configuration-id=tapestry.state.ApplicationObjects
state-object name=dossierManagerApplication scope=application
  create-instance class=dgt.dm.controller.DossierManagerApplication/
/state-object
  /contribution
/module

DossierManagerApplication.java
public class DossierManagerApplication extends ApplicationServlet {

  private ApplicationSettings appSettings = null;
  public ApplicationSettings getAppSettings() { return appSettings; }
  public void setAppSettings(ApplicationSettings appSettings) {
this.appSettings = appSettings; }

  private InitServlet is = null;

  public void init(ServletConfig arg0) throws ServletException {
super.init(arg0);
String webRootPath = getServletContext().getRealPath(/);
is = new InitServlet();
is.init(webRootPath);
appSettings = is.getAppSettings();
// NOT NULL WHEN I DEBUG
  }
  ...

HomePage.page
...
page-specification class=dgt.dm.pages.HomePage
  inject property=dossierManagerApplication type=state
object=dossierManagerApplication/
/page-specification

HomePage.java
  public abstract DossierManagerApplication getDossierManagerApplication();
  public abstract void
setDossierManagerApplication(DossierManagerApplication
dossierManagerApplication);

  public void pageBeginRender(PageEvent event) {
  DossierManagerApplication dossierManagerApplication =
getDossierManagerApplication();
  ApplicationSettings appSettings =
dossierManagerApplication.getAppSettings();
  // IS NULL
  setRequesters(appSettings.getRequesters());
  setLanguages(appSettings.getLanguages());
  }

Thanks for help...

BW

2006/7/20, Blackwings [EMAIL PROTECTED]:

 Thanks a lot, but I have a question again: To what, the id in the module
 tag, refer? Is it the name of my context? is it app? is it the package
where
 something (what?) is store? Same question for the version.

 Thanks anyway

 BW

 2006/7/20, Geoff Callender [EMAIL PROTECTED]:

  BW,
 
  No need to touch hivemind.xml.  Add a file called hivemodule.xml to
  WEB-INF, with content similar to this:
 
  ?xml version=1.0?
 
  module id=jumpstart version= 1.0.0 package=jumpstart.web
 
  !--  ServiceLocator and Visit --
 
  contribution configuration-id=
  tapestry.state.ApplicationObjects
  state-object name=serviceLocator scope=application
 
  create-instance class=
  jumpstart.web.base.ServiceLocator/
  /state-object
  /contribution
 
  contribution configuration-id=
  tapestry.state.ApplicationObjects
  state-object name=visit scope=session
  create-instance
class=jumpstart.web.base.Visit/
 
  /state-object
  /contribution
 
  /module
 
  In that example, ServiceLocator performs a similar function to the
  typical Global.  Visit is just like the old Visit.  Note that the
  scope of ServiceLocator is application and the scope of Visit is
  session.
 
  Here's an example of them being referenced in a page:
 
  @InjectState(serviceLocator)
  public abstract ServiceLocator getServiceLocator();
 
  @InjectState(visit)
  // Can't call it getVisit() because it conflicts with a
  deprecated
  IPage method
  public abstract Visit getMyVisit();
 
  Hope this helps.
 
  Geoff
  http://tapestry.apache.org/tapestry4.1/QuickStart/contributed.html
 
 
  On 20/07/2006, at 7:58 PM, Blackwings wrote:
 
   Hi,
  
   I found in the document what is the line to add into hivemind.xml
   file to
   create an ASO since getGlobal is deprecated. But I 

RE: Re: JFly Application Framework is out

2006-07-19 Thread James Carman
Why do you even have Hibernate in the description of your project?  It
doesn't use Hibernate at all.  At least your build.xml doesn't download any
Hibernate library jars:

target name=get-ext-libs
ibiblio-dependency artifact=commons-codec version=1.3
group=commons-codec /
ibiblio-dependency artifact=commons-fileupload
version=1.1 group=commons-fileupload /
ibiblio-dependency artifact=commons-io version=1.1
group=commons-io /
ibiblio-dependency artifact=commons-logging
version=1.0.4 group=commons-logging /
ibiblio-dependency artifact=hivemind version=1.1.1
group=hivemind /
ibiblio-dependency artifact=hivemind-lib version=1.1.1
group=hivemind /
ibiblio-dependency artifact=javassist version=3.0
group=javassist /
ibiblio-dependency artifact=ognl version=2.6.7
group=ognl /
ibiblio-dependency artifact=oro version=2.0.8
group=oro /
ibiblio-dependency artifact=tapestry version=4.0.2
group=tapestry /
get dest=${lib.dir}/${nsutils-jar} 

src=${erinors}/${nsutils-lib}/${nsutils-version}/${nsutils-jar}
verbose=true usetimestamp=true /   
/target

-Original Message-
From: kiuma [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 19, 2006 8:10 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
users@tapestry.apache.org; [EMAIL PROTECTED]
Subject: RE: Re: JFly Application Framework is out

Sorry from where I am it works, I'll test it more when I'll be back to home.
Anyway for now you can access JFly From here 
http://tapestry-jfly.sourceforge.net/

- --- Original Message --- -
From: [EMAIL PROTECTED]
To: users@tapestry.apache.org,
[EMAIL PROTECTED]
Sent: Wed, 19 Jul 2006 12:50:08

You've probably noticed but the site doesn't seem
to be working.
I'm getting:

File does not exist: /home/groups/w/ww/www/htdocs/

On 7/19/06, kiuma [EMAIL PROTECTED]
wrote:

 Hello everybody,
 I have the pleasure to inform you that JFly
Application framework is out.
 You can find it at http://www.jfly.org

 JFly is an Open-Source set of tools that
facilitate business web
 application development when you use Tapestry,
Hivemind and Hibernate.

 kiuma


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


You've probably noticed but the site doesn't seem
to be working.brI'm getting:brbrFile does not
exist:
/home/groups/w/ww/www/htdocs/brbrdivspan
class=gmail_quoteOn 7/19/06, b
class=gmail_sendernamekiuma
/b a
href=mailto:[EMAIL PROTECTED]kiuma.ta
[EMAIL PROTECTED]/a
wrote:/spanblockquote class=gmail_quote
style=border-left: 1px solid rgb(204, 204, 204);
margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;
Hello everybody,brI have the pleasure to inform
you that JFly Application framework is out.brYou
can find it at a
href=http://www.jfly.org;http://www.jfly.org/a
brbrJFly is an Open-Source set of tools that
facilitate business web application development
when you use Tapestry, Hivemind and Hibernate.
brbrkiumabrbr--
---brTo
unsubscribe, e-mail: a
href=mailto:[EMAIL PROTECTED]
[EMAIL PROTECTED]/abrFor
additional commands, e-mail: 
a
href=mailto:[EMAIL PROTECTED]users-
[EMAIL PROTECTED]/abrbr/blockquote/
divbr

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



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



RE: JFly Application Framework is out

2006-07-19 Thread James Carman
With all this hype, it had better be something really cool! :-)


-Original Message-
From: kiuma [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 19, 2006 8:40 AM
To: users@tapestry.apache.org; users@tapestry.apache.org;
users@tapestry.apache.org; [EMAIL PROTECTED]
Subject: Re: JFly Application Framework is out

Ok next commit will be the Hibernate things asap!
I'll post a news here when I'm ready.

kiuma

- --- Original Message --- -
From: users@tapestry.apache.org
To: users@tapestry.apache.org,
[EMAIL PROTECTED]
Sent: Wed, 19 Jul 2006 08:33:33

Well, it would be nice to have some Hibernate stuff
available in the source
download if you actually claim that it's an
Open-Source set of tools that
facilitate business web application development
when you use Tapestry,
Hivemind and Hibernate.  I downloaded the source
code and browsed through
it looking for any cool Hibernate nuggets that I
might be able to use, but
it was a complete waste of my time since there's
absolutely nothing in there
related to Hibernate.

I don't need a comparator implementation that
compares two objects based on
one of their property values.  I can use a commons
collections transforming
comparator (along with a bean transformer to
transform it to its property
value) for that.

-Original Message-

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



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



RE: RE: JFly Application Framework is out

2006-07-19 Thread James Carman
Hehe.  Kill is a strong word.  How about deprecate?

-Original Message-
From: kiuma [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 19, 2006 8:47 AM
To: users@tapestry.apache.org
Subject: RE: RE: JFly Application Framework is out

LOL!

I hope too, if not I think you'll come here to kill me :-D


- --- Original Message --- -
From: James Carman [EMAIL PROTECTED]
To: 'Tapestry users' users@tapestry.apache.org,

'kiuma' [EMAIL PROTECTED]
Sent: Wed, 19 Jul 2006 08:41:59

With all this hype, it had better be something
really cool! :-)


-Original Message-
From: kiuma [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 19, 2006 8:40 AM
To: users@tapestry.apache.org;
users@tapestry.apache.org;
users@tapestry.apache.org;
[EMAIL PROTECTED]
Subject: Re: JFly Application Framework is out

Ok next commit will be the Hibernate things asap!
I'll post a news here when I'm ready.

kiuma

- --- Original Message --- -
From: users@tapestry.apache.org
To: users@tapestry.apache.org,
[EMAIL PROTECTED]
Sent: Wed, 19 Jul 2006 08:33:33

Well, it would be nice to have some Hibernate
stuff
available in the source
download if you actually claim that it's an
Open-Source set of tools that
facilitate business web application development
when you use Tapestry,
Hivemind and Hibernate.  I downloaded the source
code and browsed through
it looking for any cool Hibernate nuggets that I
might be able to use, but
it was a complete waste of my time since there's
absolutely nothing in there
related to Hibernate.

I don't need a comparator implementation that
compares two objects based on
one of their property values.  I can use a commons

collections transforming
comparator (along with a bean transformer to
transform it to its property
value) for that.

-Original Message-

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



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

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



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



RE: Table with large data set

2006-07-19 Thread James Carman
I have a HibernateTableModel (an IBasicTableModel impl) if you're
interested.  There's only one issue which I couldn't really overcome nicely.
It has to do with the sorting of the columns.  I didn't want to give up the
ability to easily define my columns in the HTML (using the columns attribute
of the @contrib:Table component), so I put in a little hack.  Basically,
what you return from your DAO methods is a PagingQueryResult object which is
what the HibernateTableModel uses to ask for the data for each page.  But,
in each PagingQueryResult you have to register what columns are sortable
and how you sort them.  Anyway, I'll email it to you Chris if you want it.
Or, if there is more interest, I'll package it up nicely and put it in my
SVN repository.
  

-Original Message-
From: Chris Chiappone [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 19, 2006 2:23 PM
To: Tapestry List
Subject: Table with large data set

I was wondering what the best approach would be for creating a contrib:Table
with a large data set.  My dataSet my contain thousands of entry's and
loading the page using contrib:Table would take forever not to mention
consume large amounts of memory.  Currently I am getting the data from
Hibernate.  What have you guys done to load just the data needed for the
current page then load the next pages data when using tablePages.

Thanks,

-- 
~chris



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



RE: hivemind help

2006-07-19 Thread James Carman
Ron,

Are you sure there are no other error messages above that?  The resulting
exception sounds like something that might happen with an invalid schema.
Can you check the logs for other error/warn messages?

James

-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Ron Piterman
Sent: Wednesday, July 19, 2006 4:41 PM
To: users@tapestry.apache.org
Subject: OT: hivemind help

hi - I try to pass a parameter to a serviceIMplementationFactory but get 
an exception from hivemind:

Parameter parameters must not be null.

here is the xml:


service-point id=ViewControllerFactory
   interface=org.apache.hivemind.ServiceImplementationFactory
   parameters-occurs=0..1

   parameters-schema
 element name=view
  attribute name=name required=true/
  attribute name=api required=true translator=class/
  attribute name=view-data required=true translator=class/
  conversion class=ViewDef
map attribute=name property=name/
map attribute=api property=apiClass/
map attribute=view-data property=viewTransientDataClass/
  /conversion
 /element
   /parameters-schema

   invoke-factory
 construct class=ViewControllerFactory/
   /invoke-factory
/service-point

and in another module:

service-point id=BGController
   interface=ViewController
   invoke-factory service-id=share.ViewControllerFactory
 model=pooled
 view
name=bg
api=BGAPI
view-data=BGViewData
 /view
   /invoke-factory
/service-point

the exception:

java.lang.NullPointerException
Parameter parameters must not be null.
org.apache.hivemind.util.Defense.notNull(Defense.java:41)
org.apache.hivemind.impl.ServiceImplementationFactoryParametersImpl.init(S
erviceImplementationFactoryParametersImpl.java:47)
org.apache.hivemind.impl.InvokeFactoryServiceConstructor.constructCoreServic
eImplementation(InvokeFactoryServiceConstructor.java:59)
org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl.constructCore
ServiceImplementation(AbstractServiceModelImpl.java:108)
org.apache.hivemind.impl.servicemodel.PooledServiceModel.constructPooledServ
ice(PooledServiceModel.java:210)
org.apache.hivemind.impl.servicemodel.PooledServiceModel.obtainPooledService
(PooledServiceModel.java:186)
org.apache.hivemind.impl.servicemodel.PooledServiceModel.getServiceImplement
ationForCurrentThread(PooledServiceModel.java:170)


Any Idea what I am doing wrong here ?

Cheers,
Ron


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



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



RE: external link to a tapestry page

2006-07-18 Thread James Carman
If you can get to the HiveMind registry, you can lookup the ExternalService
and use it.

-Original Message-
From: Valdemaras Repšys [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 18, 2006 8:27 AM
To: Tapestry users
Subject: Re: external link to a tapestry page

Thanks for the answer, Aleksej.

The problem is, this URL must be generated on a java thread (or class) that
is not an instance of BasePage and is not a tapestry page. That means i have
no access to ExternalService, right?
Also, I can't use @Any component because this url will be sent as an email
to the user (as a simple text).

Valdemaras Repšys

On 7/18/06, Aleksej [EMAIL PROTECTED] wrote:

 Valdemaras Repšys wrote:
  Hi,
  i need my application to send emails with the link to the specific
  tapestry
  page. How would i generate a link?
 
  I tried extending a page with IExternalPage and using the address:
  http://localhost:8080/BioJazz/app?service=external/HitList
  What i get is RuntimeException: No engine service named
  'external/HitList'
  is available.
 
  Link (as in ExternalService API doc):
  http://localhost:8080/BioJazz/app?service=externalcontext=HitList
  gives a
  null pointer exception:
 
- org.apache.hivemind.util.Defense.notNull(Defense.java:41)
-
  org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:242)
 
- org.apache.tapestry.engine.ExternalService.service(
ExternalService.java:144)
-
 $IEngineService_10c8121ee8c.service($IEngineService_10c8121ee8c.java)
 
 
  Any hint?
  Thanks,
  Valdemaras Repšys
 
 Do not form links manually, use tapestry.services.External service (
 in your case ).
 First inject it into your page with something like:
 inject property=externalService
 object=service:tapestry.services.External / in your page file.
 Be sure that you have a externalService property getter like:
 public abstract IEngineService getExternalService();
 Then, when you need to generate link, just use
 org.apache.tapestry.engine.ExternalServiceParameter
 to generate your page parameters ( name and Object[] ) and call
 getExternalService().getLink(  your parameter object ).
 This will return ILink object and you will be able to call
 getAbsoluteURL on it, which will return required Link as a string.
 On the page you can probably put it using @Any component, like:
 a jwcid=@Any href=yourLinkgo go go/a
 -
 GL




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





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



RE: A bit OT: how to manage database connections for multiple components rendered simultaneously.

2006-07-17 Thread James Carman
All code within one request can easily just use one connection.  That's what
we do with Tapernate.

-Original Message-
From: Rui Pacheco [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 17, 2006 10:13 AM
To: Tapestry users; Tapestry users
Subject: A bit OT: how to manage database connections for multiple
components rendered simultaneously.

Hi all

This is not a pure Tapestry question, but I believe you have seen this
before and might be able to give me some guiding light.

I have a web application, which I am splitting into several fragments, ie,
components, each one rendering content stored in a database. I just realised
my index page would have 9 such fragments and if each is to retrieve a
connection from the pool to get its content, the stress on the db server
might be crazy, even if each request is quite short.

I have a connection pool, but even with that I don't believe its healthy to
use 9 connections at the same time. What about the other users?

How would you deal with this issue?
-- 
Cumprimentos,
Rui Pacheco



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



RE: A bit OT: how to manage database connections for multiple components rendered simultaneously.

2006-07-17 Thread James Carman
So, you'd be okay with opening/closing 9 connections to the database during
each request cycle?  I'd think it would be better to just use one during the
entire request cycle.

-Original Message-
From: kranga [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 17, 2006 12:40 PM
To: Tapestry users
Subject: Re: A bit OT: how to manage database connections for multiple
components rendered simultaneously.

Even if all components ask for their own connection, assuming components 
release connections when they are done, you would still expect only 1 
connection in use (though it may physically travel on upto 8 different 
connection, there is only 1 connection open at any given time).

A much better optimization would be to add an observer/mediator style 
pattern - a data provider that each component is able to tell what data it

needs (perhaps in the renderComponent method) and when the first request for

the data is made, the provider creates a SQL encompassing all requests, gets

it and is able to dish it out. However, I personally (without any more info)

would classify this optimization as pre-mature. 8 requests to the database 
may only result in about 400ms while I have a monster elsewhere slowing 
everything down. Plus you need to take into account how often the index page

is actually invoked.

- Original Message - 
From: James Carman [EMAIL PROTECTED]
To: 'Tapestry users' users@tapestry.apache.org
Sent: Monday, July 17, 2006 11:36 AM
Subject: RE: A bit OT: how to manage database connections for multiple 
components rendered simultaneously.


 Unless all components ask for their own connection, which I think is what
 they were saying.

 -Original Message-
 From: kranga [mailto:[EMAIL PROTECTED]
 Sent: Monday, July 17, 2006 11:28 AM
 To: Tapestry users
 Subject: Re: A bit OT: how to manage database connections for multiple
 components rendered simultaneously.

 Unless I'm missing something, you will not be using 9 connections as the
 components will render in serial order. So you will make 9 requests over a
 single connection.

 - Original Message - 
 From: James Carman [EMAIL PROTECTED]
 To: 'Tapestry users' users@tapestry.apache.org; 'Tapestry users'
 tapestry-user@jakarta.apache.org
 Sent: Monday, July 17, 2006 10:19 AM
 Subject: RE: A bit OT: how to manage database connections for multiple
 components rendered simultaneously.


 All code within one request can easily just use one connection.  That's
 what
 we do with Tapernate.

 -Original Message-
 From: Rui Pacheco [mailto:[EMAIL PROTECTED]
 Sent: Monday, July 17, 2006 10:13 AM
 To: Tapestry users; Tapestry users
 Subject: A bit OT: how to manage database connections for multiple
 components rendered simultaneously.

 Hi all

 This is not a pure Tapestry question, but I believe you have seen this
 before and might be able to give me some guiding light.

 I have a web application, which I am splitting into several fragments, 
 ie,
 components, each one rendering content stored in a database. I just
 realised
 my index page would have 9 such fragments and if each is to retrieve a
 connection from the pool to get its content, the stress on the db server
 might be crazy, even if each request is quite short.

 I have a connection pool, but even with that I don't believe its healthy
 to
 use 9 connections at the same time. What about the other users?

 How would you deal with this issue?
 -- 
 Cumprimentos,
 Rui Pacheco



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




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



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

 


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



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



RE: A bit OT: how to manage database connections for multiple components rendered simultaneously.

2006-07-17 Thread James Carman
Well, what you do is tell your pool to wait until one comes back into the
pool.  So, you set your maximum pool size to something like 200 (if your db
can handle more, do more if needed) connections.  That, along with using
only one connection per request cycle should help out.

-Original Message-
From: Rui Pacheco [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 17, 2006 12:50 PM
To: Tapestry users
Subject: Re: A bit OT: how to manage database connections for multiple
components rendered simultaneously.

If I make my components wait, won't I be stalling the creation of the page?
Under heavy loads, how feasible will that be?

On 7/17/06, James Carman [EMAIL PROTECTED] wrote:

 Oh, if you're worried about simultaneous connections to the database, you
 don't have to worry.  You can set the maximum size of your pool to some
 reasonable number.  Then, have your components wait until a connection is
 available in the pool.

 -Original Message-
 From: Rui Pacheco [mailto:[EMAIL PROTECTED]
 Sent: Monday, July 17, 2006 12:05 PM
 To: Tapestry users
 Subject: Re: A bit OT: how to manage database connections for multiple
 components rendered simultaneously.

 I have several components. Each will retrieve one connection from the
 pool,
 do its thing and return it.

 If they are done one at the time, then its great for me. But if each user
 that calls the page causes 9 simultaneous connections to open, I'll need
 to
 revise my strategy.

 On 7/17/06, James Carman [EMAIL PROTECTED] wrote:
 
  Unless all components ask for their own connection, which I think is
 what
  they were saying.
 
  -Original Message-
  From: kranga [mailto:[EMAIL PROTECTED]
  Sent: Monday, July 17, 2006 11:28 AM
  To: Tapestry users
  Subject: Re: A bit OT: how to manage database connections for multiple
  components rendered simultaneously.
 
  Unless I'm missing something, you will not be using 9 connections as the
  components will render in serial order. So you will make 9 requests over
 a
  single connection.
 
  - Original Message -
  From: James Carman [EMAIL PROTECTED]
  To: 'Tapestry users' users@tapestry.apache.org; 'Tapestry users'
  tapestry-user@jakarta.apache.org
  Sent: Monday, July 17, 2006 10:19 AM
  Subject: RE: A bit OT: how to manage database connections for multiple
  components rendered simultaneously.
 
 
   All code within one request can easily just use one
 connection.  That's
   what
   we do with Tapernate.
  
   -Original Message-
   From: Rui Pacheco [mailto:[EMAIL PROTECTED]
   Sent: Monday, July 17, 2006 10:13 AM
   To: Tapestry users; Tapestry users
   Subject: A bit OT: how to manage database connections for multiple
   components rendered simultaneously.
  
   Hi all
  
   This is not a pure Tapestry question, but I believe you have seen this
   before and might be able to give me some guiding light.
  
   I have a web application, which I am splitting into several fragments,
  ie,
   components, each one rendering content stored in a database. I just
   realised
   my index page would have 9 such fragments and if each is to retrieve a
   connection from the pool to get its content, the stress on the db
 server
   might be crazy, even if each request is quite short.
  
   I have a connection pool, but even with that I don't believe its
 healthy
   to
   use 9 connections at the same time. What about the other users?
  
   How would you deal with this issue?
   --
   Cumprimentos,
   Rui Pacheco
  
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 Cumprimentos,
 Rui Pacheco



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




-- 
Cumprimentos,
Rui Pacheco



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



RE: A bit OT: how to manage database connections for multiple components rendered simultaneously.

2006-07-17 Thread James Carman
Not if you set the maximum size of the pool to some reasonable number.

-Original Message-
From: Rui Pacheco [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 17, 2006 1:18 PM
To: Tapestry users
Subject: Re: A bit OT: how to manage database connections for multiple
components rendered simultaneously.

I am using a connection pool.
My problem is, if each one of those 9 components retrieve a connection from
the pool for each page rendered, multiplied by the number of users, this
could lead to a quick exhaustion of resources.

On 7/17/06, James Carman [EMAIL PROTECTED] wrote:

 Yes, a connection pool does help a bit.  I didn't see where they were
 using
 a pool before.  So, you're right, if the connections are being pooled
 properly, nothing will be opening/closing.

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
 Of
 Matt Welch
 Sent: Monday, July 17, 2006 1:08 PM
 To: Tapestry users
 Subject: Re: A bit OT: how to manage database connections for multiple
 components rendered simultaneously.

 This seems to be much ado about nothing:

 1) He likely won't be actually opening or closing 9 connections in a
 request. I hope it's a safe assumption that a connection pool is being
 used.


 2) Unless I'm mistaken about Tapestry's architecture, these 9 separate
 components won't be processed simultaneously within the context of a
 single
 request. All of the actions within that request will occur within the
 thread
 allocated by the servlet container to handle that request so your 9
 different data requests will happen one after the other and and no more
 than
 one connection will be used by that request at any one time.

 I suppose that under special circumstances you might need to be worried
 about this. Let's say, perhaps, that these 9 components made repeated
 simultaneous AJAX-style requests. In such a situation you might begin to
 have an issue with strained connection pools.

 Matt



 On 7/17/06, Rui Pacheco [EMAIL PROTECTED] wrote:
 
  If I make my components wait, won't I be stalling the creation of the
  page?
  Under heavy loads, how feasible will that be?
 
  On 7/17/06, James Carman [EMAIL PROTECTED] wrote:
  
   Oh, if you're worried about simultaneous connections to the database,
  you
   don't have to worry.  You can set the maximum size of your pool to
 some
   reasonable number.  Then, have your components wait until a connection
  is
   available in the pool.
  
   -Original Message-
   From: Rui Pacheco [mailto:[EMAIL PROTECTED]
   Sent: Monday, July 17, 2006 12:05 PM
   To: Tapestry users
   Subject: Re: A bit OT: how to manage database connections for multiple
   components rendered simultaneously.
  
   I have several components. Each will retrieve one connection from the
   pool,
   do its thing and return it.
  
   If they are done one at the time, then its great for me. But if each
  user
   that calls the page causes 9 simultaneous connections to open, I'll
 need
   to
   revise my strategy.
  
   On 7/17/06, James Carman [EMAIL PROTECTED] wrote:
   
Unless all components ask for their own connection, which I think is
   what
they were saying.
   
-Original Message-
From: kranga [mailto:[EMAIL PROTECTED]
Sent: Monday, July 17, 2006 11:28 AM
To: Tapestry users
Subject: Re: A bit OT: how to manage database connections for
 multiple
components rendered simultaneously.
   
Unless I'm missing something, you will not be using 9 connections as
  the
components will render in serial order. So you will make 9 requests
  over
   a
single connection.
   
- Original Message -
From: James Carman [EMAIL PROTECTED]
To: 'Tapestry users' users@tapestry.apache.org; 'Tapestry
 users'
tapestry-user@jakarta.apache.org
Sent: Monday, July 17, 2006 10:19 AM
Subject: RE: A bit OT: how to manage database connections for
 multiple
components rendered simultaneously.
   
   
 All code within one request can easily just use one
   connection.  That's
 what
 we do with Tapernate.

 -Original Message-
 From: Rui Pacheco [mailto:[EMAIL PROTECTED]
 Sent: Monday, July 17, 2006 10:13 AM
 To: Tapestry users; Tapestry users
 Subject: A bit OT: how to manage database connections for multiple
 components rendered simultaneously.

 Hi all

 This is not a pure Tapestry question, but I believe you have seen
  this
 before and might be able to give me some guiding light.

 I have a web application, which I am splitting into several
  fragments,
ie,
 components, each one rendering content stored in a database. I
 just
 realised
 my index page would have 9 such fragments and if each is to
 retrieve
  a
 connection from the pool to get its content, the stress on the db
   server
 might be crazy, even if each request is quite short.

 I have a connection pool, but even with that I don't

Re: How do I do a Servlet filter, or similar functionality... help please!

2006-07-17 Thread James Carman
Why reinvent the wheel?  Try tapernate:

www.carmanconsulting.com/tapernate

You can use anonymous/anon to check it out from the SVN repository.

 Hi all,

 I have tried to implement a Servlet Filter but my Tapestry 4 app will not
 take it... I get some weird errors - is it not supposed to work?

 I have also read about the ServletRequestServicerFilter but I cannot find
 any decent documentation - is there any? ... I lack documentation about
 many
 things - where is the best way to go anyway?

 What I'm really trying to do is to manage my Hibernate transactions, I'd
 like to have one transaction per HTTP request. So I thought I'd do it like
 a
 servlet filter - is this the wrong way?
 Then I thought maybe I could use my border component which wraps all pages
 -
 would that be possible? Better?

 Any help appreciated.

 Malin



James Carman, President
Carman Consulting, Inc.


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



Re: Question about PageValidate

2006-07-17 Thread James Carman
When you say direct link, do you mean a @DirectLink component which
calls a listener?  Or, do you mean a @PageLink?

 I am curious if what I have been experiencing with pageValidate is normal
 behavior.  My pageValidate gets called when I click on a direct link that
 goes to another page.  I would have expected pageValidate should only get
 called when visiting only the enclosed page.

 --
 ~chris



James Carman, President
Carman Consulting, Inc.


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



RE: Retrieve hivemind messages from plain old java program

2006-07-16 Thread James Carman
Maybe you could mock the Messages object?

-Original Message-
From: spamsucks [mailto:[EMAIL PROTECTED] 
Sent: Sunday, July 16, 2006 3:56 PM
To: Tapestry users
Subject: Retrieve hivemind messages from plain old java program

Hi everyone,
I am trying to create some tests that depend upon the hivemind Messages 
object. 
While this is not a problem to do this in the context of a tapestry 
application, I am trying to do this from outside a web app (from a java 
program).

I figured that I would have to create the Hivemind registry, and call it 
to get my Messages object.  Currently,  the messages objected returned 
from the registry are null.
Here is what I have.  My WEB-INF/hive-module.xml is in my classpath when 
I invoke the following, messages are always null.  hra is the name of 
my tapestry app.

I would really appreciate a pointer on how to get around this problem.  
Thanks.




RegistryBuilder builder = new RegistryBuilder();
builder.addDefaultModuleDescriptorProvider();
Registry registry = builder.constructRegistry(Locale.getDefault());
Messages messages = registry.getModuleMessages(hra);
   
if (messages == null) throw new Exception(messages are null);






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


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



RE: Inject and the infrastructure namespace

2006-07-14 Thread James Carman
Okay, take a look here:

http://tapestry.apache.org/tapestry4/tapestry/hivedocs/config/tapestry.Infra
structure.html


Those are all of the contributions to the tapestry.Infrastructure
configuration point.



-Original Message-
From: Epstein, Ezra [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 14, 2006 1:21 PM
To: Tapestry users
Subject: RE: Inject and the infrastructure namespace

http://tapestry.apache.org/tapestry4/tapestry/apidocs/org/apache/tapestry/se
rvices/Infrastructure.html

But clearly the converse is not true: there are properties available via the
infrastructure: prefix that are not in the interface.  The WebContext
(infrastructure:context) is an example that comes to mind.

Isn't it odd that one can't inspect the service providers for their
contents?  String interpretation can still be idiosyncratic and the s.ps
could still have a way to expose what they've parsed.  I'm surprised if
HiveMind lacks this feature common to most IoC containers.

Thanks, 

Ezra Epstein

-Original Message-
From: James Carman [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 13, 2006 5:28 PM
To: 'Tapestry users'
Subject: RE: Inject and the infrastructure namespace

Take a look at the Infrastructure interface.  Any property from the
interface is available via the infrastructure: prefix.

-Original Message-
From: Epstein, Ezra [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 13, 2006 7:07 PM
To: Tapestry users
Subject: Inject and the infrastructure namespace

This:

@InjectObject(infrastructure:context)

works fine.  And of course there's the 'request' available from
infrastructure.  Can someone kindly point me to the docs that list all the
possible values that may be placed after the infrastructure: tag/namespace
for a default tapestry+portlet deployment?

Thanks, 

Ezra Epstein 

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




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

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




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



RE: Inject and the infrastructure namespace

2006-07-13 Thread James Carman
Take a look at the Infrastructure interface.  Any property from the
interface is available via the infrastructure: prefix.

-Original Message-
From: Epstein, Ezra [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 13, 2006 7:07 PM
To: Tapestry users
Subject: Inject and the infrastructure namespace

This:

@InjectObject(infrastructure:context)

works fine.  And of course there's the 'request' available from
infrastructure.  Can someone kindly point me to the docs that list all the
possible values that may be placed after the infrastructure: tag/namespace
for a default tapestry+portlet deployment?

Thanks, 

Ezra Epstein 

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




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



RE: Inject and the infrastructure namespace GENERALIZED

2006-07-13 Thread James Carman
No, you can't do that.  The object providers use locator strings (the
stuff after the ':' to find/create objects).  It is entirely up to the
object provider how it wants to interpret them.  Here's a description of the
canned object providers that come with HiveMind.  For a listing of all
object providers that are registered in an off-the-shelf Tapestry
application, refer to:

http://tapestry.apache.org/tapestry4/tapestry/hivedocs/config/hivemind.Objec
tProviders.html

This HiveDoc lists all contributions to the hivemind.ObjectProviders
configuration point. 

If you're asking for how do you know what all the
modules/services/configuration points are in the registry, you can construct
HiveDoc for your registry. 


-Original Message-
From: Epstein, Ezra [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 13, 2006 7:32 PM
To: Tapestry users
Subject: RE: Inject and the infrastructure namespace GENERALIZED

More generally, how does one introspect the entire HiveMind registry?  I'd
really like to list out the top level entry points (namespaces) and then
crawl those printing out what I find.  Is there some sample code to do that?

Thanks, 

Ezra Epstein 


-Original Message-
From: Epstein, Ezra [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 13, 2006 4:07 PM
To: Tapestry users
Subject: Inject and the infrastructure namespace

This:

@InjectObject(infrastructure:context)

works fine.  And of course there's the 'request' available from
infrastructure.  Can someone kindly point me to the docs that list all the
possible values that may be placed after the infrastructure: tag/namespace
for a default tapestry+portlet deployment?

Thanks, 

Ezra Epstein 

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

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




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



RE: suggestions on a conditonal render in the rewind

2006-07-13 Thread James Carman
Don't put a listener on the form itself and put one on the submit button (or
@LinkSubmit or whatever).  That's what I'm doing.  I am implementing my own
validation delegate which only displays error message indicators if its
validated flag is set (which I do in my submit button listeners). 

-Original Message-
From: Dan Adams [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 13, 2006 9:37 PM
To: Tapestry users
Subject: Re: suggestions on a conditonal render in the rewind

Perhaps I could phrase it another way. I've got a set of fields that I
only want to be validated against when a particular submit button is
clicked. Any ideas?

On Thu, 2006-07-13 at 21:30 -0400, Dan Adams wrote:
 Okay, I've got a component that is used in a form and basically to solve
 some validation problems i need to have the component not render a
 couple form fields when performing validation based on which submit
 button was clicked. my question is, have people had experience with this
 and what's the least problematic way to do it? the tapestry docs say
 that using @If with volatile=true can cause problems. How are these
 problems manifested? Thanks in advance for the suggestions/comments.
 
-- 
Dan Adams
Software Engineer
Interactive Factory
617.235.5857


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



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



RE: How to do Tapestry 4.1 form cancel listener?

2006-07-13 Thread James Carman
Is there any way to specify, via JavaScript what listener method to call
upon form submit?  That'd be just as good as having an EventSubmit
component.

-Original Message-
From: Jesse Kuhnert [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 13, 2006 10:32 PM
To: Tapestry users
Subject: Re: How to do Tapestry 4.1 form cancel listener?

sighh.. in the last example, this should be this.form.

On 7/13/06, Jesse Kuhnert [EMAIL PROTECTED] wrote:

 Oops...That doesn't help you as much in the context of the example you
 gave, you can also do it this way ~if~ the context is within an html
 onEvent attribute (such as your example.P.S. you don't need to add
 javascript: anymore):

 onClick=tapestry.form.submit(this,'cancel')

 The first parameter will take a node id or actual node. This should be
 true for almost all js functions you see in tapestry now as well.


 On 7/13/06, Jesse Kuhnert [EMAIL PROTECTED] wrote:
 
  Ah. You have got me there, I've failed to provide explicit function
  calls for cancel/refresh. For now, you can call:
 
  tapestry.form.submit(your form name/id, cancel);
 
  So, if your rendered page had a form element that looked like:
DEFANGED_form
  name=MyTapForm method=POST , the script would be:
 
  tapestry.form.submit(MyTapForm, cancel);
 
  I will provide specific function calls for cancel/refresh before
  officially releasing though, thank you for reminding me.
 
  As for the form.events logic, I don't plan on providing backwards
  compatible support for it unless there is a very compelling reason to
modify
  native js objects. I could go into a big tirade about it if anyone is
  interested but will save the list from it unless prompted.
 
  The memory footprint required to to display forms (for the browser)
  should now be much smaller. Not important for the majority of users but
very
  important for some.
 
  (P.S., You can see most of the new form related functions here:
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src
/js/tapestry/form.js?view=markup
  )
 
 
  On 7/13/06, Jun Tsai  [EMAIL PROTECTED] wrote:
  
   In Tapestry 4.0.2,I use
onClick=DEFANGED_javascript:this.form.events.cancel
   ();,But
   after I upgrade to 4.1,I find the method doesn't work?
  
   How to ?
  
   Thanks
  
   --
   Welcome to China Java Users Group(CNJUG).
   http://cnjug.dev.java.net
  
  
 
 
  --
  Jesse Kuhnert
  Tacos/Tapestry, team member/developer
 
  Open source based consulting work centered around
  dojo/tapestry/tacos/hivemind.
 



 --
 Jesse Kuhnert
 Tacos/Tapestry, team member/developer

 Open source based consulting work centered around
 dojo/tapestry/tacos/hivemind.




-- 
Jesse Kuhnert
Tacos/Tapestry, team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.



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



<    1   2   3   4   >