RE: licensing q.

2006-05-25 Thread Kristian Marinkovic
i think this link might help:

http://people.apache.org/~cliffs/3party.html

regards,
kris


   
 Norbert Sándor  
 <[EMAIL PROTECTED] 
 s.com> An
Tapestry users 
 26.05.2006 08:48   ,   
hivemind-user@jakarta.apache.org
 Kopie
  Bitte antworten  
an   Thema
 "Tapestry users"   licensing q.   
 <[EMAIL PROTECTED] 
pache.org> 
   
   
   
   




Hello,

My question: with what conditions is it allowed for a GLP licensed
software to use the ASL licensed Hivemind and Tapestry?
Could you please point me a resource which answers this question?

Thanks in advance,
Norbi

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



licensing q.

2006-05-25 Thread Norbert Sándor

Hello,

My question: with what conditions is it allowed for a GLP licensed 
software to use the ASL licensed Hivemind and Tapestry?

Could you please point me a resource which answers this question?

Thanks in advance,
Norbi

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



Re: ibasictablemodel help

2006-05-25 Thread Gunna Satria
Hi Amit,
  
  Make sure you implement your getCurrentPageRows() method right.
  Why don't you post the code for the method above, it may help us to figure 
out the problem.
  
  Thanks.
  
  
  Gunna

Jun Tsai <[EMAIL PROTECTED]> wrote:  2006/5/3, Amit Gupta :
>
> hi all,
> am working on a ibasictablemodel implementation. i am
> executing a query and returning all results into this
> table. now the table returns all good queries, however
> the navigation on the table does not work. if i click
> on any other page link, the same page (first page)
> loads up. can somebody tell me what i am doing wrong.
> i just want the navigation to work so that i can
> navigate to different pages.
> thanks in advance.


 Did you have a solution?

Thanks .



-- 
Welcome to China Java Users Group(CNJUG).
http://cnjug.dev.java.net



-
Love cheap thrills? Enjoy PC-to-Phone  calls to 30+ countries for just 2¢/min 
with Yahoo! Messenger with Voice.

Re: Hibernate persisted data never makes it to DB

2006-05-25 Thread Mark

No, I know that...
I'm just playing around with the simple baby steps for now and will add 
Transactions later on...


But thank you for the warning.

MARK

Konstantin Iignatyev wrote:
autocommit is not the best approach. I suggest you to have a glance at 
the article for inspiration

http://www.onjava.com/pub/a/onjava/2005/05/18/swingxactions.html?page=1

Mark wrote:
I added "hibernate.connection.autocommit=true" to my 
hibernate.properties and that fixed it...


So I assume Spring by default does no Session/TX handling, unless I 
use the HibernateTransactionManager or do programmatic transaction 
handling...
One last question, to get back to Tapestry - is Spring's 
OpenSessionInViewFilter  going to work 
with Tapestry without limitations?
I see all these posts about Tapernate and others, but I'm not sure 
whether OpenSessionInViewFilter will work...


Thanks,

MARK



Mark wrote:

Lutz Hühnken wrote:

I asked for applicationContext.xml, and I get a mysql log... well,
near enough :)
Sorry, I thought what I had found in the mysql log (the "set 
autocommit=0, no "commit" call and explicit "Rollback" call issued 
by Hibernate at shutdown) changed things a lot, but maybe not.

From your last mail I understand you have the same problem if you use
the mysql command line client. 
No, the command line INSERT does make it, the records just don't get 
picked up by Hibernate...

So generally, your sql statements never get committed... which is
weird, because by default, mysql starts new connections with
autocommit enabled.

No, only the ones coming from my webapp do not get committed.


If you connect to mysql from the command line and do
select @@autocommit;
what do you get?

I get "1"

Oh, and although the classname you use for the jdbc driver still
works, since the mysql connector/j provides backwards compatibility in
this respect, nowadays people tend to use "com.mysql.jdbc.Driver"
because of a name change four years ago.

Ok, thanks, I changed 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] 






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



Re: Hibernate persisted data never makes it to DB

2006-05-25 Thread Konstantin Iignatyev
autocommit is not the best approach. I suggest you to have a glance at 
the article for inspiration

http://www.onjava.com/pub/a/onjava/2005/05/18/swingxactions.html?page=1

Mark wrote:
I added "hibernate.connection.autocommit=true" to my 
hibernate.properties and that fixed it...


So I assume Spring by default does no Session/TX handling, unless I 
use the HibernateTransactionManager or do programmatic transaction 
handling...
One last question, to get back to Tapestry - is Spring's 
OpenSessionInViewFilter  going to work 
with Tapestry without limitations?
I see all these posts about Tapernate and others, but I'm not sure 
whether OpenSessionInViewFilter will work...


Thanks,

MARK



Mark wrote:

Lutz Hühnken wrote:

I asked for applicationContext.xml, and I get a mysql log... well,
near enough :)
Sorry, I thought what I had found in the mysql log (the "set 
autocommit=0, no "commit" call and explicit "Rollback" call issued by 
Hibernate at shutdown) changed things a lot, but maybe not.

From your last mail I understand you have the same problem if you use
the mysql command line client. 
No, the command line INSERT does make it, the records just don't get 
picked up by Hibernate...

So generally, your sql statements never get committed... which is
weird, because by default, mysql starts new connections with
autocommit enabled.

No, only the ones coming from my webapp do not get committed.


If you connect to mysql from the command line and do
select @@autocommit;
what do you get?

I get "1"

Oh, and although the classname you use for the jdbc driver still
works, since the mysql connector/j provides backwards compatibility in
this respect, nowadays people tend to use "com.mysql.jdbc.Driver"
because of a name change four years ago.

Ok, thanks, I changed 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] 



--
Thanks,

Konstantin Ignatyev

http://www.kgionline.com





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]



Re: Hibernate persisted data never makes it to DB

2006-05-25 Thread Mark




I added "hibernate.connection.autocommit=true" to my
hibernate.properties and that fixed it...

So I assume Spring by default does no Session/TX handling, unless I use
the HibernateTransactionManager or do programmatic transaction
handling...
One last question, to get back to Tapestry - is Spring's OpenSessionInViewFilter
going to work with Tapestry without limitations?
I see all these posts about Tapernate and others, but I'm not sure
whether OpenSessionInViewFilter will work...

Thanks,

MARK



Mark wrote:
Lutz
Hühnken wrote:
  
  I asked for applicationContext.xml, and I get
a mysql log... well,

near enough :)

  
Sorry, I thought what I had found in the mysql log (the "set
autocommit=0, no "commit" call and explicit "Rollback" call issued by
Hibernate at shutdown) changed things a lot, but maybe not.
  
  
From your last mail I understand you have
the same problem if you use
  

the mysql command line client. 
No, the command line INSERT does make it, the records just don't get
picked up by Hibernate...
  
  So generally, your sql statements never get
committed... which is

weird, because by default, mysql starts new connections with

autocommit enabled.

  
No, only the ones coming from my webapp do not get committed.
  
  
If you connect to mysql from the command line and do

select @@autocommit;

what do you get?

  
I get "1"
  
  Oh, and although the classname you use for
the jdbc driver still

works, since the mysql connector/j provides backwards compatibility in

this respect, nowadays people tend to use "com.mysql.jdbc.Driver"

because of a name change four years ago.

  
Ok, thanks, I changed 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]



How to store the query parameters in a Table component?

2006-05-25 Thread Jun Tsai

hi all,
  I have a search form and a talbe in a page.When I enter some search text
in form and click search button,results  was shown in table
component.ButWhen I click the second page
link.I found the results is all records not by search parameters.How to
store the search text in table pages?

I had used a  ,but it still
had a same problem .

How to ?

Thanks

Jun Tsai
--
Welcome to China Java Users Group(CNJUG).
http://cnjug.dev.java.net


Re: ibasictablemodel help

2006-05-25 Thread Jun Tsai

2006/5/3, Amit Gupta <[EMAIL PROTECTED]>:


hi all,
am working on a ibasictablemodel implementation. i am
executing a query and returning all results into this
table. now the table returns all good queries, however
the navigation on the table does not work. if i click
on any other page link, the same page (first page)
loads up. can somebody tell me what i am doing wrong.
i just want the navigation to work so that i can
navigate to different pages.
thanks in advance.



Did you have a solution?

Thanks .



--
Welcome to China Java Users Group(CNJUG).
http://cnjug.dev.java.net


Re: Hibernate persisted data never makes it to DB

2006-05-25 Thread Mark

Lutz Hühnken wrote:

I asked for applicationContext.xml, and I get a mysql log... well,
near enough :)
Sorry, I thought what I had found in the mysql log (the "set 
autocommit=0, no "commit" call and explicit "Rollback" call issued by 
Hibernate at shutdown) changed things a lot, but maybe not.

From your last mail I understand you have the same problem if you use
the mysql command line client. 
No, the command line INSERT does make it, the records just don't get 
picked up by Hibernate...

So generally, your sql statements never get committed... which is
weird, because by default, mysql starts new connections with
autocommit enabled.

No, only the ones coming from my webapp do not get committed.


If you connect to mysql from the command line and do
select @@autocommit;
what do you get?

I get "1"

Oh, and although the classname you use for the jdbc driver still
works, since the mysql connector/j provides backwards compatibility in
this respect, nowadays people tend to use "com.mysql.jdbc.Driver"
because of a name change four years ago.

Ok, thanks, I changed that.

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



Re: Lazy Exception in Contrib:Table

2006-05-25 Thread Shovon

We may have the same underlying issue. I think the component saves some
object in the session, and tries to reuse it instead of reading it from the
source each time. 

I will try your recommendations.

Thank you. 

Shovon
--
View this message in context: 
http://www.nabble.com/Lazy+Exception+in+Contrib%3ATable-t1673050.html#a4567149
Sent from the Tapestry - User forum at Nabble.com.


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



RE: Hibernate modifying POJOs before rollback...

2006-05-25 Thread James Carman
Thanks, but I've already written it.  I will take a look, though.

-Original Message-
From: Javier Sanchez [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 25, 2006 5:42 PM
To: Tapestry users
Subject: Re: Hibernate modifying POJOs before rollback...

I think you need a Transactions Manager for Java Objects such as JBoss
Transactions to do that.  Look at
http://labs.jboss.com/portal/index.html?ctrl:id=page.default.info&project=jb
osstm

JAVIER SANCHEZ.

On 5/23/06, James Carman <[EMAIL PROTECTED]> wrote:
> All,
>
> I am trying to add some code into Tapernate which will "rollback" the
POJOs
> that Hibernate has changed when a transaction is rolled back (the version
or
> auto-generated id properties).  I am going to attempt it using an
> interceptor.  Has anyone every tried to do this before?  I'm just
wondering
> if there is a better approach.
>
> I'm actually changing Tapernate to include a "hibernate interceptor
> pipeline" so that you can contribute your own "interceptor filters" to do
> whatever you want.  The "endpoint" of the pipeline will be an
> EmptyInterceptor, so if no interceptor filters are contributed to the
> pipeline, then nothing will happen.
>
> James
>
>
>
> -
> 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: Hibernate modifying POJOs before rollback...

2006-05-25 Thread Javier Sanchez

I think you need a Transactions Manager for Java Objects such as JBoss
Transactions to do that.  Look at
http://labs.jboss.com/portal/index.html?ctrl:id=page.default.info&project=jbosstm

JAVIER SANCHEZ.

On 5/23/06, James Carman <[EMAIL PROTECTED]> wrote:

All,

I am trying to add some code into Tapernate which will "rollback" the POJOs
that Hibernate has changed when a transaction is rolled back (the version or
auto-generated id properties).  I am going to attempt it using an
interceptor.  Has anyone every tried to do this before?  I'm just wondering
if there is a better approach.

I'm actually changing Tapernate to include a "hibernate interceptor
pipeline" so that you can contribute your own "interceptor filters" to do
whatever you want.  The "endpoint" of the pipeline will be an
EmptyInterceptor, so if no interceptor filters are contributed to the
pipeline, then nothing will happen.

James



-
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: What do you think of my horrible testing strategy

2006-05-25 Thread Henri Dupre

Ah that is funny! We have a similar strategy except we don't have any fake
service implementation or lower level testing... That is too much work and
too much code to write all the jmock stuff. We had some for T3 but we are
slowly dropping them. We only have jmock for several small things.
We found out that building the real war to tomcat and running the htmlunit
tests is very usefull. Having the war deployed helped to prevent several
deployment bugs to go in production... And I am more confident by testing
the real war... There are many things that can go wrong even in the building
process.


Thanks,

Henri.


Re: Hibernate persisted data never makes it to DB

2006-05-25 Thread Henri Dupre

On 5/25/06, Lutz Hühnken <[EMAIL PROTECTED]> wrote:


Yes, the Spring HibernateTemplate will take care of that for you. The
actual behaviour depends on your transaction management, but let's not
get into that for now.

So, the save you call will commit the changes to the database.
Hibernate then disconnects the session, I believe, anyhow, there is no
need for you to add extra code.



I don't believe the hibernate template disconnects the session for you. The
hibernate template is just a facility to access hibernate functions. The DAO
functions seem to commit and flush according to the transactional behavior
(I did not find any exact information on that).

I agree with Lutz, this has something to do with your spring configuration.
Somehow your transactional configuration doesn't commit the operations.

Thanks,

Henri.


Script component placement

2006-05-25 Thread Eric Schneider

Hi,

I have a Script component that renders an embedded video player with
javascript document.write() statements.  Problem I'm having is that
the video player renders directly under the  tag regardless of
where the script component declaration is in the template.

Is there a way to change that?

Thanks,
Eric

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



RE: Tapernate "squeezer" refactored...

2006-05-25 Thread James Carman
I mean that he doesn't have to have Tapernate reattach them for him.  He can
work with the detached objects and choose when to reattach them manually.
But, as you point out, I don't like to have to think about it.  It's nice
that they're automatically reattached for me. :-)


-Original Message-
From: Jesse Kuhnert [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 25, 2006 2:56 PM
To: Tapestry users
Subject: Re: Tapernate "squeezer" refactored...

I prefer having my objects re-attached when possible. It's a slipperly slope
to go down with hibernate when you have to start thinking about which
members have been lazily initialized and which have not.

On 5/25/06, James Carman <[EMAIL PROTECTED]> wrote:
>
> Well, you don't have to auto-reattach them if you don't want.
>
> -Original Message-
> From: Ted Steen [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 25, 2006 2:50 PM
> To: Tapestry users
> Subject: Re: Tapernate "squeezer" refactored...
>
> Absolutely, that would really suck. As I said, it is really redundant.
>
> What are your thoughts on the edit-domain-objects-problem?
> I can see, in your example, that you simply setRollbackOnly(); when
> something didn't validate, but I can't say that I think it is a clean
> solution.
> What do you think of the idea of just working on detached objects when
> editing?
>
> What do other people in this list do in this situation?
>
> 2006/5/25, James Carman <[EMAIL PROTECTED]>:
> > Yes, but if you edit a copy of the domain object, then you start to
> develop
> > the "parallel hierarchy" code smell (assuming you'd create a "value
> object"
> > for each type of domain object).
> >
> >
> > -Original Message-
> > From: Ted Steen [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, May 25, 2006 2:29 PM
> > To: Tapestry users
> > Subject: Re: Tapernate "squeezer" refactored...
> >
> > Ah, this is a lot cleaner than the previous solution with DataClasses.
> > The URLs are prettier too, nice work!
> >
> > The problem with editing a talked about in another thread could be
> > solved by not working on the domain object, but a copy of the domain
> > object, or individual getters and setters for every property of the
> > object.
> > Problem is that it is so redundant.. :/
> >
> > Another thought was to work on detached objects when editing, and
> > explicitly session.save(...) them when all is validated and ready to
> > be saved.
> >
> > I can't say that I have thought this through as much as I should but..
> :)
> >
> > 2006/5/25, James Carman <[EMAIL PROTECTED]>:
> > > Oh, this feature, the squeezer pipeline has been submitted as a patch
> for
> > > Tapestry 4.1.  So, in the future, I'll probably just re-implement my
> > filter
> > > using the Tapestry 4.1 API as opposed to the Tapernate API.  Either
> way,
> > > there should be no impact to client code (unless you write your own
> > filter).
> > >
> > > -Original Message-
> > > From: James Carman [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, May 25, 2006 11:29 AM
> > > To: 'Tapestry users'
> > > Subject: Tapernate "squeezer" refactored...
> > >
> > > All,
> > >
> > > Tapernate's entity "squeezer" has been refactored.  No longer do you
> need
> > to
> > > tell it what your "data class" (the common entity
> superclass/interface)
> > is.
> > > Tapernate turns the data squeezer service into a pipeline and puts its
> > > EntitySqueezerFilter into the pipeline.  If it can't squeeze the
> object
> > (the
> > > object isn't persistent), then it just lets the rest of the pipeline
> take
> > > care of it.  If it can squeeze it, it does.  The squeezed string will
> look
> > > something like this (from the example application):
> > >
> > > HIBRN8:0::l1
> > >
> > > The "HIBER8" part is a token that tells me that I squeezed this
> object.
> > The
> > > '0' is an abbreviation for the entity name (just print a number rather
> > than
> > > printing out com.mycompany.domain.entity.MyDomainClass).  And, the
> "l1"
> is
> > > how the rest of the pipeline squeezes my long (value 1).  Enjoy!
> > >
> > > James
> > >
> > > p.s. Yes, I'm going to move it!
> > >
> > >
> > >
> > > -
> > > 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]
> > >
> > >
> >
> >
> > --
> > /ted
> >
> > -
> > 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]
> >
> >
>
>
> --
> /ted
>
> --

TablePages Component Question

2006-05-25 Thread Robert Breidecker
I'm working on a table that uses a TablePages
component to navigate from page to page within the
tables data model.  The table is editable, so I am
trying to hook validation up onto one of the columns.
However, when I click on one of the TaglePages
navigation links, it looks like the validation is
working, however, navigation continues to the next
page.  Since, there was an error, I would like to
cancel the navigation and leave the user on the
previous page of data.  I don't see any attributes to
help me do this on the TablePages component.  Does
anyone have any ideas to help me get started.

Thanks in advance.
Rob

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



Re: Tapernate "squeezer" refactored...

2006-05-25 Thread Jesse Kuhnert

I prefer having my objects re-attached when possible. It's a slipperly slope
to go down with hibernate when you have to start thinking about which
members have been lazily initialized and which have not.

On 5/25/06, James Carman <[EMAIL PROTECTED]> wrote:


Well, you don't have to auto-reattach them if you don't want.

-Original Message-
From: Ted Steen [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 25, 2006 2:50 PM
To: Tapestry users
Subject: Re: Tapernate "squeezer" refactored...

Absolutely, that would really suck. As I said, it is really redundant.

What are your thoughts on the edit-domain-objects-problem?
I can see, in your example, that you simply setRollbackOnly(); when
something didn't validate, but I can't say that I think it is a clean
solution.
What do you think of the idea of just working on detached objects when
editing?

What do other people in this list do in this situation?

2006/5/25, James Carman <[EMAIL PROTECTED]>:
> Yes, but if you edit a copy of the domain object, then you start to
develop
> the "parallel hierarchy" code smell (assuming you'd create a "value
object"
> for each type of domain object).
>
>
> -Original Message-
> From: Ted Steen [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 25, 2006 2:29 PM
> To: Tapestry users
> Subject: Re: Tapernate "squeezer" refactored...
>
> Ah, this is a lot cleaner than the previous solution with DataClasses.
> The URLs are prettier too, nice work!
>
> The problem with editing a talked about in another thread could be
> solved by not working on the domain object, but a copy of the domain
> object, or individual getters and setters for every property of the
> object.
> Problem is that it is so redundant.. :/
>
> Another thought was to work on detached objects when editing, and
> explicitly session.save(...) them when all is validated and ready to
> be saved.
>
> I can't say that I have thought this through as much as I should but..
:)
>
> 2006/5/25, James Carman <[EMAIL PROTECTED]>:
> > Oh, this feature, the squeezer pipeline has been submitted as a patch
for
> > Tapestry 4.1.  So, in the future, I'll probably just re-implement my
> filter
> > using the Tapestry 4.1 API as opposed to the Tapernate API.  Either
way,
> > there should be no impact to client code (unless you write your own
> filter).
> >
> > -Original Message-
> > From: James Carman [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, May 25, 2006 11:29 AM
> > To: 'Tapestry users'
> > Subject: Tapernate "squeezer" refactored...
> >
> > All,
> >
> > Tapernate's entity "squeezer" has been refactored.  No longer do you
need
> to
> > tell it what your "data class" (the common entity
superclass/interface)
> is.
> > Tapernate turns the data squeezer service into a pipeline and puts its
> > EntitySqueezerFilter into the pipeline.  If it can't squeeze the
object
> (the
> > object isn't persistent), then it just lets the rest of the pipeline
take
> > care of it.  If it can squeeze it, it does.  The squeezed string will
look
> > something like this (from the example application):
> >
> > HIBRN8:0::l1
> >
> > The "HIBER8" part is a token that tells me that I squeezed this
object.
> The
> > '0' is an abbreviation for the entity name (just print a number rather
> than
> > printing out com.mycompany.domain.entity.MyDomainClass).  And, the
"l1"
is
> > how the rest of the pipeline squeezes my long (value 1).  Enjoy!
> >
> > James
> >
> > p.s. Yes, I'm going to move it!
> >
> >
> >
> > -
> > 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]
> >
> >
>
>
> --
> /ted
>
> -
> 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]
>
>


--
/ted

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





--
Jesse Kuhnert
Tacos/Tapestry, team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.


RE: Tapernate "squeezer" refactored...

2006-05-25 Thread James Carman
Well, you don't have to auto-reattach them if you don't want.

-Original Message-
From: Ted Steen [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 25, 2006 2:50 PM
To: Tapestry users
Subject: Re: Tapernate "squeezer" refactored...

Absolutely, that would really suck. As I said, it is really redundant.

What are your thoughts on the edit-domain-objects-problem?
I can see, in your example, that you simply setRollbackOnly(); when
something didn't validate, but I can't say that I think it is a clean
solution.
What do you think of the idea of just working on detached objects when
editing?

What do other people in this list do in this situation?

2006/5/25, James Carman <[EMAIL PROTECTED]>:
> Yes, but if you edit a copy of the domain object, then you start to
develop
> the "parallel hierarchy" code smell (assuming you'd create a "value
object"
> for each type of domain object).
>
>
> -Original Message-
> From: Ted Steen [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 25, 2006 2:29 PM
> To: Tapestry users
> Subject: Re: Tapernate "squeezer" refactored...
>
> Ah, this is a lot cleaner than the previous solution with DataClasses.
> The URLs are prettier too, nice work!
>
> The problem with editing a talked about in another thread could be
> solved by not working on the domain object, but a copy of the domain
> object, or individual getters and setters for every property of the
> object.
> Problem is that it is so redundant.. :/
>
> Another thought was to work on detached objects when editing, and
> explicitly session.save(...) them when all is validated and ready to
> be saved.
>
> I can't say that I have thought this through as much as I should but.. :)
>
> 2006/5/25, James Carman <[EMAIL PROTECTED]>:
> > Oh, this feature, the squeezer pipeline has been submitted as a patch
for
> > Tapestry 4.1.  So, in the future, I'll probably just re-implement my
> filter
> > using the Tapestry 4.1 API as opposed to the Tapernate API.  Either way,
> > there should be no impact to client code (unless you write your own
> filter).
> >
> > -Original Message-
> > From: James Carman [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, May 25, 2006 11:29 AM
> > To: 'Tapestry users'
> > Subject: Tapernate "squeezer" refactored...
> >
> > All,
> >
> > Tapernate's entity "squeezer" has been refactored.  No longer do you
need
> to
> > tell it what your "data class" (the common entity superclass/interface)
> is.
> > Tapernate turns the data squeezer service into a pipeline and puts its
> > EntitySqueezerFilter into the pipeline.  If it can't squeeze the object
> (the
> > object isn't persistent), then it just lets the rest of the pipeline
take
> > care of it.  If it can squeeze it, it does.  The squeezed string will
look
> > something like this (from the example application):
> >
> > HIBRN8:0::l1
> >
> > The "HIBER8" part is a token that tells me that I squeezed this object.
> The
> > '0' is an abbreviation for the entity name (just print a number rather
> than
> > printing out com.mycompany.domain.entity.MyDomainClass).  And, the "l1"
is
> > how the rest of the pipeline squeezes my long (value 1).  Enjoy!
> >
> > James
> >
> > p.s. Yes, I'm going to move it!
> >
> >
> >
> > -
> > 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]
> >
> >
>
>
> --
> /ted
>
> -
> 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]
>
>


-- 
/ted

-
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 "squeezer" refactored...

2006-05-25 Thread Ted Steen

Absolutely, that would really suck. As I said, it is really redundant.

What are your thoughts on the edit-domain-objects-problem?
I can see, in your example, that you simply setRollbackOnly(); when
something didn't validate, but I can't say that I think it is a clean
solution.
What do you think of the idea of just working on detached objects when editing?

What do other people in this list do in this situation?

2006/5/25, James Carman <[EMAIL PROTECTED]>:

Yes, but if you edit a copy of the domain object, then you start to develop
the "parallel hierarchy" code smell (assuming you'd create a "value object"
for each type of domain object).


-Original Message-
From: Ted Steen [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 25, 2006 2:29 PM
To: Tapestry users
Subject: Re: Tapernate "squeezer" refactored...

Ah, this is a lot cleaner than the previous solution with DataClasses.
The URLs are prettier too, nice work!

The problem with editing a talked about in another thread could be
solved by not working on the domain object, but a copy of the domain
object, or individual getters and setters for every property of the
object.
Problem is that it is so redundant.. :/

Another thought was to work on detached objects when editing, and
explicitly session.save(...) them when all is validated and ready to
be saved.

I can't say that I have thought this through as much as I should but.. :)

2006/5/25, James Carman <[EMAIL PROTECTED]>:
> Oh, this feature, the squeezer pipeline has been submitted as a patch for
> Tapestry 4.1.  So, in the future, I'll probably just re-implement my
filter
> using the Tapestry 4.1 API as opposed to the Tapernate API.  Either way,
> there should be no impact to client code (unless you write your own
filter).
>
> -Original Message-
> From: James Carman [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 25, 2006 11:29 AM
> To: 'Tapestry users'
> Subject: Tapernate "squeezer" refactored...
>
> All,
>
> Tapernate's entity "squeezer" has been refactored.  No longer do you need
to
> tell it what your "data class" (the common entity superclass/interface)
is.
> Tapernate turns the data squeezer service into a pipeline and puts its
> EntitySqueezerFilter into the pipeline.  If it can't squeeze the object
(the
> object isn't persistent), then it just lets the rest of the pipeline take
> care of it.  If it can squeeze it, it does.  The squeezed string will look
> something like this (from the example application):
>
> HIBRN8:0::l1
>
> The "HIBER8" part is a token that tells me that I squeezed this object.
The
> '0' is an abbreviation for the entity name (just print a number rather
than
> printing out com.mycompany.domain.entity.MyDomainClass).  And, the "l1" is
> how the rest of the pipeline squeezes my long (value 1).  Enjoy!
>
> James
>
> p.s. Yes, I'm going to move it!
>
>
>
> -
> 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]
>
>


--
/ted

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





--
/ted

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



RE: Tapernate "squeezer" refactored...

2006-05-25 Thread James Carman
Yes, but if you edit a copy of the domain object, then you start to develop
the "parallel hierarchy" code smell (assuming you'd create a "value object"
for each type of domain object).


-Original Message-
From: Ted Steen [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 25, 2006 2:29 PM
To: Tapestry users
Subject: Re: Tapernate "squeezer" refactored...

Ah, this is a lot cleaner than the previous solution with DataClasses.
The URLs are prettier too, nice work!

The problem with editing a talked about in another thread could be
solved by not working on the domain object, but a copy of the domain
object, or individual getters and setters for every property of the
object.
Problem is that it is so redundant.. :/

Another thought was to work on detached objects when editing, and
explicitly session.save(...) them when all is validated and ready to
be saved.

I can't say that I have thought this through as much as I should but.. :)

2006/5/25, James Carman <[EMAIL PROTECTED]>:
> Oh, this feature, the squeezer pipeline has been submitted as a patch for
> Tapestry 4.1.  So, in the future, I'll probably just re-implement my
filter
> using the Tapestry 4.1 API as opposed to the Tapernate API.  Either way,
> there should be no impact to client code (unless you write your own
filter).
>
> -Original Message-
> From: James Carman [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 25, 2006 11:29 AM
> To: 'Tapestry users'
> Subject: Tapernate "squeezer" refactored...
>
> All,
>
> Tapernate's entity "squeezer" has been refactored.  No longer do you need
to
> tell it what your "data class" (the common entity superclass/interface)
is.
> Tapernate turns the data squeezer service into a pipeline and puts its
> EntitySqueezerFilter into the pipeline.  If it can't squeeze the object
(the
> object isn't persistent), then it just lets the rest of the pipeline take
> care of it.  If it can squeeze it, it does.  The squeezed string will look
> something like this (from the example application):
>
> HIBRN8:0::l1
>
> The "HIBER8" part is a token that tells me that I squeezed this object.
The
> '0' is an abbreviation for the entity name (just print a number rather
than
> printing out com.mycompany.domain.entity.MyDomainClass).  And, the "l1" is
> how the rest of the pipeline squeezes my long (value 1).  Enjoy!
>
> James
>
> p.s. Yes, I'm going to move it!
>
>
>
> -
> 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]
>
>


-- 
/ted

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



Fwd: InputValidation

2006-05-25 Thread Pedro Garcia

Hi,
I am writing just to tell that I found the solution. That problem was that I
was looking at the wrong place.

   
   
   
   
   
   

Thanks for the attention
Pedro

-- Forwarded message --
From: Pedro Garcia
Date: May 25, 2006 11:33 AM
Subject: InputValidation
To: Tapestry users 

Hi,
I'm using Tapestry 4 and I am having a hard time with number inputvalidation
with TextField component.
Can anyone tell me
how to check if the value is an Integer and
how to check if the value is a Float and
how to check if the value is a Double.

and how to set the decimal separator to be a ',' .

Thanks,
Pedro da Silva Garcia


--
Atenciosamente,
Pedro da Silva Garcia


Re: Tapernate "squeezer" refactored...

2006-05-25 Thread Ted Steen

Ah, this is a lot cleaner than the previous solution with DataClasses.
The URLs are prettier too, nice work!

The problem with editing a talked about in another thread could be
solved by not working on the domain object, but a copy of the domain
object, or individual getters and setters for every property of the
object.
Problem is that it is so redundant.. :/

Another thought was to work on detached objects when editing, and
explicitly session.save(...) them when all is validated and ready to
be saved.

I can't say that I have thought this through as much as I should but.. :)

2006/5/25, James Carman <[EMAIL PROTECTED]>:

Oh, this feature, the squeezer pipeline has been submitted as a patch for
Tapestry 4.1.  So, in the future, I'll probably just re-implement my filter
using the Tapestry 4.1 API as opposed to the Tapernate API.  Either way,
there should be no impact to client code (unless you write your own filter).

-Original Message-
From: James Carman [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 25, 2006 11:29 AM
To: 'Tapestry users'
Subject: Tapernate "squeezer" refactored...

All,

Tapernate's entity "squeezer" has been refactored.  No longer do you need to
tell it what your "data class" (the common entity superclass/interface) is.
Tapernate turns the data squeezer service into a pipeline and puts its
EntitySqueezerFilter into the pipeline.  If it can't squeeze the object (the
object isn't persistent), then it just lets the rest of the pipeline take
care of it.  If it can squeeze it, it does.  The squeezed string will look
something like this (from the example application):

HIBRN8:0::l1

The "HIBER8" part is a token that tells me that I squeezed this object.  The
'0' is an abbreviation for the entity name (just print a number rather than
printing out com.mycompany.domain.entity.MyDomainClass).  And, the "l1" is
how the rest of the pipeline squeezes my long (value 1).  Enjoy!

James

p.s. Yes, I'm going to move it!



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





--
/ted

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



Re: Help in writing a custom annotation

2006-05-25 Thread Jesse Kuhnert

It's like that at all. The annotation workers run before the normal
enhancement workers (like property setters and such), whoever claims the
property first wins. (you can control when your worker is called via
hivemind's awesome pipeline ability ).

On 5/25/06, Dan Adams <[EMAIL PROTECTED]> wrote:


Hmmm. That gives me an idea. I was thinking that the reason I couldn't
claim the method is that it would be possible for another annotation
like @InjectObject for instance to be used and then I would have to
preserve whatever changes were put in there by InjectObject. But since I
suppose this annotation will only be used for non-abstract accessors
that do some sort of calculation that it would be okay to claim the
property. I'll give that a go and I think I should be all set. Thanks
Jesse! Keep up the good work on Tapestry. :)

On Thu, 2006-05-25 at 12:35 -0400, Jesse Kuhnert wrote:
> You should be able to do this fine using the existing annotation page
logic.
>
>
> In your annotation stuff for handling your specific type "claim" the
> property specified using EnhancementOperation and then define a method
body
> that does the caching logic you describe and you'll be all set. (there
are
> other annotations in there that provide method body stuff to javassist
for
> you to reference)
>
> On 5/25/06, Dan Adams <[EMAIL PROTECTED]> wrote:
> >
> > Thank you for the time you guys have already spent on this, but if you
> > have any other comments I would really appreciate them. Is there just
no
> > way to do this given the current tapestry annotation class structure?
> >
> > On Thu, 2006-05-25 at 10:51 -0400, Dan Adams wrote:
> > > Well, I've been digging around in all the annotation source for
4.0.1
> > > and I seem to be stuck. It seems like there isn't any way to get to
the
> > > javassist methods or to do what I'm trying to do. I've looked at the
> > > hivemind config and how to add the annotation. My only problem is
how to
> > > actually get the annotation to do what it needs to do. Any
suggestions
> > > on how to approach the problems I mentioned earlier? I also attached
the
> > > source which is pretty short.
> > >
> > > On Thu, 2006-05-25 at 10:42 -0400, Jesse Kuhnert wrote:
> > > > Ah well...The annotations stuff in tapestry is pretty easy to
follow
> > (just
> > > > added a lot of logic in this area myself). It would be best for
you to
> > refer
> > > > to the tapestry annotations source, but the biggest thing is to
also
> > > > remember that annotations are done almost the same way that the
> > > > "enhancement" stuff is done - with a hivemind chained pipeline
> > > > configuration. There is an annotations hivemind configuration
section
> > that
> > > > configures and sets up all of them as well.
> > > >
> > > > On 5/25/06, Dan Adams <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > > You are right about this. I hadn't realized you could do that
with
> > > > > parameters. But that doesn't really apply to my problem since
@Once
> > > > > won't normally be used on parameters. It came up because in some
> > > > > situations you have a method that does a hibernate query and
returns
> > a
> > > > > list of objects and you'd like to be able to easily refer to
that
> > > > > property more than once in the template. A common situation is
> > checking
> > > > > the list size in an @If before doing something with it.
> > > > >
> > > > > On Thu, 2006-05-25 at 10:28 -0400, Jesse Kuhnert wrote:
> > > > > > Doesn't tapestry support marking a parameter as cache-able
> > already?
> > > > > >
> > > > > > On 5/25/06, James Carman <[EMAIL PROTECTED]> wrote:
> > > > > > >
> > > > > > > Have you looked into AspectJ?
> > > > > > >
> > > > > > > -Original Message-
> > > > > > > From: Dan Adams [mailto:[EMAIL PROTECTED]
> > > > > > > Sent: Thursday, May 25, 2006 10:00 AM
> > > > > > > To: Tapestry users
> > > > > > > Subject: RE: Help in writing a custom annotation
> > > > > > >
> > > > > > > Okay, my annotation is called @Once and if put on accessor
will
> > make
> > > > > > > sure that the method is only executed once and then the
return
> > value
> > > > > is
> > > > > > > cached. Any further calls to the method will just return the
> > saved
> > > > > > > value. I've got pretty far but I think I'm stuck as I want
to do
> > > > > > > something that I could do with javassist but I'm not sure
how to
> > do
> > > > > > > within the tapestry enhancement classes. I've attached what
I
> > have so
> > > > > > > far and I would greatly appreciated it if someone could give
me
> > some
> > > > > > > suggestions on what to do. My big problem is:
> > > > > > >
> > > > > > > - I could add code at the beginning and end of the method
with
> > > > > javassit
> > > > > > > but can't see a way to do that
> > > > > > > - Perhaps I could somehow rename the old method to something
> > else and
> > > > > > > put in a new method that calls it?
> > > > > > >
> > > > > > > Thanks a lot.
> > > > > > >
> > > > > > > On Thu, 2006-05-25 at 07:11 -0400, J

Re: Help in writing a custom annotation

2006-05-25 Thread Dan Adams
Hmmm. That gives me an idea. I was thinking that the reason I couldn't
claim the method is that it would be possible for another annotation
like @InjectObject for instance to be used and then I would have to
preserve whatever changes were put in there by InjectObject. But since I
suppose this annotation will only be used for non-abstract accessors
that do some sort of calculation that it would be okay to claim the
property. I'll give that a go and I think I should be all set. Thanks
Jesse! Keep up the good work on Tapestry. :)

On Thu, 2006-05-25 at 12:35 -0400, Jesse Kuhnert wrote:
> You should be able to do this fine using the existing annotation page logic.
> 
> 
> In your annotation stuff for handling your specific type "claim" the
> property specified using EnhancementOperation and then define a method body
> that does the caching logic you describe and you'll be all set. (there are
> other annotations in there that provide method body stuff to javassist for
> you to reference)
> 
> On 5/25/06, Dan Adams <[EMAIL PROTECTED]> wrote:
> >
> > Thank you for the time you guys have already spent on this, but if you
> > have any other comments I would really appreciate them. Is there just no
> > way to do this given the current tapestry annotation class structure?
> >
> > On Thu, 2006-05-25 at 10:51 -0400, Dan Adams wrote:
> > > Well, I've been digging around in all the annotation source for 4.0.1
> > > and I seem to be stuck. It seems like there isn't any way to get to the
> > > javassist methods or to do what I'm trying to do. I've looked at the
> > > hivemind config and how to add the annotation. My only problem is how to
> > > actually get the annotation to do what it needs to do. Any suggestions
> > > on how to approach the problems I mentioned earlier? I also attached the
> > > source which is pretty short.
> > >
> > > On Thu, 2006-05-25 at 10:42 -0400, Jesse Kuhnert wrote:
> > > > Ah well...The annotations stuff in tapestry is pretty easy to follow
> > (just
> > > > added a lot of logic in this area myself). It would be best for you to
> > refer
> > > > to the tapestry annotations source, but the biggest thing is to also
> > > > remember that annotations are done almost the same way that the
> > > > "enhancement" stuff is done - with a hivemind chained pipeline
> > > > configuration. There is an annotations hivemind configuration section
> > that
> > > > configures and sets up all of them as well.
> > > >
> > > > On 5/25/06, Dan Adams <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > > You are right about this. I hadn't realized you could do that with
> > > > > parameters. But that doesn't really apply to my problem since @Once
> > > > > won't normally be used on parameters. It came up because in some
> > > > > situations you have a method that does a hibernate query and returns
> > a
> > > > > list of objects and you'd like to be able to easily refer to that
> > > > > property more than once in the template. A common situation is
> > checking
> > > > > the list size in an @If before doing something with it.
> > > > >
> > > > > On Thu, 2006-05-25 at 10:28 -0400, Jesse Kuhnert wrote:
> > > > > > Doesn't tapestry support marking a parameter as cache-able
> > already?
> > > > > >
> > > > > > On 5/25/06, James Carman <[EMAIL PROTECTED]> wrote:
> > > > > > >
> > > > > > > Have you looked into AspectJ?
> > > > > > >
> > > > > > > -Original Message-
> > > > > > > From: Dan Adams [mailto:[EMAIL PROTECTED]
> > > > > > > Sent: Thursday, May 25, 2006 10:00 AM
> > > > > > > To: Tapestry users
> > > > > > > Subject: RE: Help in writing a custom annotation
> > > > > > >
> > > > > > > Okay, my annotation is called @Once and if put on accessor will
> > make
> > > > > > > sure that the method is only executed once and then the return
> > value
> > > > > is
> > > > > > > cached. Any further calls to the method will just return the
> > saved
> > > > > > > value. I've got pretty far but I think I'm stuck as I want to do
> > > > > > > something that I could do with javassist but I'm not sure how to
> > do
> > > > > > > within the tapestry enhancement classes. I've attached what I
> > have so
> > > > > > > far and I would greatly appreciated it if someone could give me
> > some
> > > > > > > suggestions on what to do. My big problem is:
> > > > > > >
> > > > > > > - I could add code at the beginning and end of the method with
> > > > > javassit
> > > > > > > but can't see a way to do that
> > > > > > > - Perhaps I could somehow rename the old method to something
> > else and
> > > > > > > put in a new method that calls it?
> > > > > > >
> > > > > > > Thanks a lot.
> > > > > > >
> > > > > > > On Thu, 2006-05-25 at 07:11 -0400, James Carman wrote:
> > > > > > > > I'd look at the one that injects messages, or beans, or even
> > the one
> > > > > > > that
> > > > > > > I
> > > > > > > > wrote for "autowiring" (available in SVN on the 4.1 branch).
> > > > > > > >
> > > > > > > > -Original Message-
> > > > > > > > From

Re: new logo for Tapestry - more comps

2006-05-25 Thread Peter Svensson

Ac!!(ref: http://en.wikipedia.org/wiki/Bill_the_Cat)   :)

This is the first time things really clicked!
I like the braids. I can't defend them, and I don't know why, but I like
them. A lot.
Very good work!

Cheers,
PS

On 5/25/06, Steve Motola <[EMAIL PROTECTED]> wrote:


More braid.  I'm diggin the brown and orange.  Comments?

Color exercise:

  http://www.thelabllc.com/lab/tapestrylogos/color%20test%20copy.pdf

Positioning exercise:

  http://www.thelabllc.com/lab/tapestrylogos/position%20test.pdf

Ack:

  http://www.thelabllc.com/lab/tapestrylogos/




Steve Motola
[EMAIL PROTECTED]
(310) 422-5521

The Lab, LLC
http://www.thelabllc.com

Content is for intended recipient only.


This message was sent using IMP, the Internet Messaging Program.

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




Re: Hibernate persisted data never makes it to DB

2006-05-25 Thread Lutz Hühnken

I asked for applicationContext.xml, and I get a mysql log... well,
near enough :)


From your last mail I understand you have the same problem if you use

the mysql command line client. Makes me wonder why you thought the
problem had to do with Hibernate in the first place (let alone
Tapestry, for this Tapestry mailing list this has been OT for a while
now...).

So generally, your sql statements never get committed... which is
weird, because by default, mysql starts new connections with
autocommit enabled.

If you connect to mysql from the command line and do
select @@autocommit;
what do you get?

About your Hibernate configuration, since you use Spring anyway, I
would recommend you use Spring for the datasource setup, makes it
easier to switch, plus it makes sense (to me, anyway) to have it in
the same place as the SessionFactory.
Oh, and although the classname you use for the jdbc driver still
works, since the mysql connector/j provides backwards compatibility in
this respect, nowadays people tend to use "com.mysql.jdbc.Driver"
because of a name change four years ago.


lutz

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



Re: new logo for Tapestry - more comps

2006-05-25 Thread Steve Motola
More braid.  I'm diggin the brown and orange.  Comments?

Color exercise:

  http://www.thelabllc.com/lab/tapestrylogos/color%20test%20copy.pdf

Positioning exercise:

  http://www.thelabllc.com/lab/tapestrylogos/position%20test.pdf
 
Ack:

  http://www.thelabllc.com/lab/tapestrylogos/




Steve Motola
[EMAIL PROTECTED]
(310) 422-5521

The Lab, LLC
http://www.thelabllc.com

Content is for intended recipient only.


This message was sent using IMP, the Internet Messaging Program.

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



Re: Help in writing a custom annotation

2006-05-25 Thread Jesse Kuhnert

You should be able to do this fine using the existing annotation page logic.


In your annotation stuff for handling your specific type "claim" the
property specified using EnhancementOperation and then define a method body
that does the caching logic you describe and you'll be all set. (there are
other annotations in there that provide method body stuff to javassist for
you to reference)

On 5/25/06, Dan Adams <[EMAIL PROTECTED]> wrote:


Thank you for the time you guys have already spent on this, but if you
have any other comments I would really appreciate them. Is there just no
way to do this given the current tapestry annotation class structure?

On Thu, 2006-05-25 at 10:51 -0400, Dan Adams wrote:
> Well, I've been digging around in all the annotation source for 4.0.1
> and I seem to be stuck. It seems like there isn't any way to get to the
> javassist methods or to do what I'm trying to do. I've looked at the
> hivemind config and how to add the annotation. My only problem is how to
> actually get the annotation to do what it needs to do. Any suggestions
> on how to approach the problems I mentioned earlier? I also attached the
> source which is pretty short.
>
> On Thu, 2006-05-25 at 10:42 -0400, Jesse Kuhnert wrote:
> > Ah well...The annotations stuff in tapestry is pretty easy to follow
(just
> > added a lot of logic in this area myself). It would be best for you to
refer
> > to the tapestry annotations source, but the biggest thing is to also
> > remember that annotations are done almost the same way that the
> > "enhancement" stuff is done - with a hivemind chained pipeline
> > configuration. There is an annotations hivemind configuration section
that
> > configures and sets up all of them as well.
> >
> > On 5/25/06, Dan Adams <[EMAIL PROTECTED]> wrote:
> > >
> > > You are right about this. I hadn't realized you could do that with
> > > parameters. But that doesn't really apply to my problem since @Once
> > > won't normally be used on parameters. It came up because in some
> > > situations you have a method that does a hibernate query and returns
a
> > > list of objects and you'd like to be able to easily refer to that
> > > property more than once in the template. A common situation is
checking
> > > the list size in an @If before doing something with it.
> > >
> > > On Thu, 2006-05-25 at 10:28 -0400, Jesse Kuhnert wrote:
> > > > Doesn't tapestry support marking a parameter as cache-able
already?
> > > >
> > > > On 5/25/06, James Carman <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > > Have you looked into AspectJ?
> > > > >
> > > > > -Original Message-
> > > > > From: Dan Adams [mailto:[EMAIL PROTECTED]
> > > > > Sent: Thursday, May 25, 2006 10:00 AM
> > > > > To: Tapestry users
> > > > > Subject: RE: Help in writing a custom annotation
> > > > >
> > > > > Okay, my annotation is called @Once and if put on accessor will
make
> > > > > sure that the method is only executed once and then the return
value
> > > is
> > > > > cached. Any further calls to the method will just return the
saved
> > > > > value. I've got pretty far but I think I'm stuck as I want to do
> > > > > something that I could do with javassist but I'm not sure how to
do
> > > > > within the tapestry enhancement classes. I've attached what I
have so
> > > > > far and I would greatly appreciated it if someone could give me
some
> > > > > suggestions on what to do. My big problem is:
> > > > >
> > > > > - I could add code at the beginning and end of the method with
> > > javassit
> > > > > but can't see a way to do that
> > > > > - Perhaps I could somehow rename the old method to something
else and
> > > > > put in a new method that calls it?
> > > > >
> > > > > Thanks a lot.
> > > > >
> > > > > On Thu, 2006-05-25 at 07:11 -0400, James Carman wrote:
> > > > > > I'd look at the one that injects messages, or beans, or even
the one
> > > > > that
> > > > > I
> > > > > > wrote for "autowiring" (available in SVN on the 4.1 branch).
> > > > > >
> > > > > > -Original Message-
> > > > > > From: Dan Adams [mailto:[EMAIL PROTECTED]
> > > > > > Sent: Wednesday, May 24, 2006 10:44 PM
> > > > > > To: Tapestry users
> > > > > > Subject: Help in writing a custom annotation
> > > > > >
> > > > > > I want to write an annotation that will intercept a method and
add a
> > > > > > property to the class. I've started digging around in some of
the
> > > > > > annotation sources but it's going pretty slow. Can someone
point me
> > > at
> > > > > > the right place to look for where to start?
> > > > > >
> > > > > --
> > > > > Dan Adams
> > > > > Software Engineer
> > > > > Interactive Factory
> > > > > 617.235.5857
> > > > >
> > > > >
> > > > >
> > > > >
-
> > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > >
> > > > >
> > > >
> > > >
> > > --
> > > Dan Adams
> > > Software Engineer
> > > Interactive Facto

Re: Help in writing a custom annotation

2006-05-25 Thread Dan Adams
Thank you for the time you guys have already spent on this, but if you
have any other comments I would really appreciate them. Is there just no
way to do this given the current tapestry annotation class structure?

On Thu, 2006-05-25 at 10:51 -0400, Dan Adams wrote:
> Well, I've been digging around in all the annotation source for 4.0.1
> and I seem to be stuck. It seems like there isn't any way to get to the
> javassist methods or to do what I'm trying to do. I've looked at the
> hivemind config and how to add the annotation. My only problem is how to
> actually get the annotation to do what it needs to do. Any suggestions
> on how to approach the problems I mentioned earlier? I also attached the
> source which is pretty short.
> 
> On Thu, 2006-05-25 at 10:42 -0400, Jesse Kuhnert wrote:
> > Ah well...The annotations stuff in tapestry is pretty easy to follow (just
> > added a lot of logic in this area myself). It would be best for you to refer
> > to the tapestry annotations source, but the biggest thing is to also
> > remember that annotations are done almost the same way that the
> > "enhancement" stuff is done - with a hivemind chained pipeline
> > configuration. There is an annotations hivemind configuration section that
> > configures and sets up all of them as well.
> > 
> > On 5/25/06, Dan Adams <[EMAIL PROTECTED]> wrote:
> > >
> > > You are right about this. I hadn't realized you could do that with
> > > parameters. But that doesn't really apply to my problem since @Once
> > > won't normally be used on parameters. It came up because in some
> > > situations you have a method that does a hibernate query and returns a
> > > list of objects and you'd like to be able to easily refer to that
> > > property more than once in the template. A common situation is checking
> > > the list size in an @If before doing something with it.
> > >
> > > On Thu, 2006-05-25 at 10:28 -0400, Jesse Kuhnert wrote:
> > > > Doesn't tapestry support marking a parameter as cache-able already?
> > > >
> > > > On 5/25/06, James Carman <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > > Have you looked into AspectJ?
> > > > >
> > > > > -Original Message-
> > > > > From: Dan Adams [mailto:[EMAIL PROTECTED]
> > > > > Sent: Thursday, May 25, 2006 10:00 AM
> > > > > To: Tapestry users
> > > > > Subject: RE: Help in writing a custom annotation
> > > > >
> > > > > Okay, my annotation is called @Once and if put on accessor will make
> > > > > sure that the method is only executed once and then the return value
> > > is
> > > > > cached. Any further calls to the method will just return the saved
> > > > > value. I've got pretty far but I think I'm stuck as I want to do
> > > > > something that I could do with javassist but I'm not sure how to do
> > > > > within the tapestry enhancement classes. I've attached what I have so
> > > > > far and I would greatly appreciated it if someone could give me some
> > > > > suggestions on what to do. My big problem is:
> > > > >
> > > > > - I could add code at the beginning and end of the method with
> > > javassit
> > > > > but can't see a way to do that
> > > > > - Perhaps I could somehow rename the old method to something else and
> > > > > put in a new method that calls it?
> > > > >
> > > > > Thanks a lot.
> > > > >
> > > > > On Thu, 2006-05-25 at 07:11 -0400, James Carman wrote:
> > > > > > I'd look at the one that injects messages, or beans, or even the one
> > > > > that
> > > > > I
> > > > > > wrote for "autowiring" (available in SVN on the 4.1 branch).
> > > > > >
> > > > > > -Original Message-
> > > > > > From: Dan Adams [mailto:[EMAIL PROTECTED]
> > > > > > Sent: Wednesday, May 24, 2006 10:44 PM
> > > > > > To: Tapestry users
> > > > > > Subject: Help in writing a custom annotation
> > > > > >
> > > > > > I want to write an annotation that will intercept a method and add a
> > > > > > property to the class. I've started digging around in some of the
> > > > > > annotation sources but it's going pretty slow. Can someone point me
> > > at
> > > > > > the right place to look for where to start?
> > > > > >
> > > > > --
> > > > > Dan Adams
> > > > > Software Engineer
> > > > > Interactive Factory
> > > > > 617.235.5857
> > > > >
> > > > >
> > > > >
> > > > > -
> > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > >
> > > > >
> > > >
> > > >
> > > --
> > > Dan Adams
> > > Software Engineer
> > > Interactive Factory
> > > 617.235.5857
> > >
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > 
> > 
-- 
Dan Adams
Software Engineer
Interactive Factory
617.235.5857


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

Re: Best directory stucture

2006-05-25 Thread Carl Pelletier
Thank you very much, that what I looking for. Sorry to ask a stupid question 
like that, I scan the Documentation many times, but english is not my natural 
language and I guess I just never read it like it should be.

Thanks again!

Carl Pelletier

- Original Message 
From: Erik Husby <[EMAIL PROTECTED]>
To: Tapestry users 
Sent: Thursday, May 25, 2006 10:34:51 AM
Subject: Re: Best directory stucture

In Tapestry 4, you can put your pages (the .html and .page files) in  
subdirectories that live under WEB-INF. That means that you address  
your pages like "contact/home" or "contact/gestionContacts/contactList"

So your directories would be WEB-INF/contact and WEB-INF/contact/ 
gestionContacts


On May 25, 2006, at 10:16 AM, Rui Pacheco wrote:

> I may be wrong, but I think you can put your .page files under WEB- 
> INF and
> your .html under the context. That way you'll have them separated.
>
> On 5/25/06, Carl Pelletier <[EMAIL PROTECTED]> wrote:
>>
>> Hi everyone, I`m starting a project with Tapestry 4.0 and was  
>> wondering if
>> someone have recommendation on how to structure my project.
>>
>> I don`t really understand how Tapestry work with directory. It`s like
>> everything is in the same folder.
>>
>> For us, it`s doesnt fit to have juste one directory with all  
>> the .page
>> .html and component in the same folder.
>>
>> I know I can specify where are the component by using
>> org.apache.tapestry.component-class-packages but it`s just work  
>> for the
>> java files.
>>
>> Is there a way to specify all this without adding each page in the
>> .application ?
>>
>> For now, we doing something like:
>>
>>> specification-path="contact/gestionContacts/contactList.page" />
>>> specification-path="contact/gestionContacts/contact.page"/>
>>> specification-path="contact/gestionContacts/contact.page" />
>>> specification-path="contact/gestionContacts/conjointCRUD.page" />
>>> specification-path="contact/gestionContacts/adjointCRUD.page" />
>>> specification-path="contact/gestionContacts/entrepriseCRUD.page" />
>>> specification-path="contact/gestionContacts/consommationCRUD.page" />
>>
>> For each section and sub section. At the end of the project, we  
>> will have
>> ~200 pages. It's we be a real mess in the .application, don`t you  
>> think ?
>>
>> Thanks for any advise, help or recommendation!
>>
>> Really sorry for the bad english, I`m french.
>>
>> Carl Pelletier
>>
>>
>>
>
>
> -- 
> Cumprimentos,
> Rui Pacheco

---
Erik Husby
Senior Software Engineer
Broad Institute of MIT and Harvard
Rm. 2192, 320 Charles St, Cambridge, MA 02141-2023
mobile: 781.354.6669, office: 617.258.9227
email: [EMAIL PROTECTED] AIM: ErikAtBroad






RE: Tapernate "squeezer" refactored...

2006-05-25 Thread James Carman
Oh, this feature, the squeezer pipeline has been submitted as a patch for
Tapestry 4.1.  So, in the future, I'll probably just re-implement my filter
using the Tapestry 4.1 API as opposed to the Tapernate API.  Either way,
there should be no impact to client code (unless you write your own filter).

-Original Message-
From: James Carman [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 25, 2006 11:29 AM
To: 'Tapestry users'
Subject: Tapernate "squeezer" refactored...

All,

Tapernate's entity "squeezer" has been refactored.  No longer do you need to
tell it what your "data class" (the common entity superclass/interface) is.
Tapernate turns the data squeezer service into a pipeline and puts its
EntitySqueezerFilter into the pipeline.  If it can't squeeze the object (the
object isn't persistent), then it just lets the rest of the pipeline take
care of it.  If it can squeeze it, it does.  The squeezed string will look
something like this (from the example application):

HIBRN8:0::l1

The "HIBER8" part is a token that tells me that I squeezed this object.  The
'0' is an abbreviation for the entity name (just print a number rather than
printing out com.mycompany.domain.entity.MyDomainClass).  And, the "l1" is
how the rest of the pipeline squeezes my long (value 1).  Enjoy!

James

p.s. Yes, I'm going to move it!



-
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: Hibernate persisted data never makes it to DB

2006-05-25 Thread Mark




So...
- have you checked the rest of your code? Are you sure this piece of
code is actually called? Step through it or add debugging output.

I don't know how else I would get the Hibernate log output:
   "Hibernate: insert into room (roomType, roomNumber, smoking, active) 
values (?, ?, ?, ?)"

How can I get Hibernate to show the log output with the values?

I went over the mysql logs and at the end finally found something. If 
you want, you can skip directly to the place where I say "Oops"


I checked the MySQL logs and I even have the query in there...

Here are the mysql logs:
Here is my insert...
 3 Prepare [7]
 3 Execute [7] insert into room (roomType, roomNumber, 
smoking, active) values ('PRM', '12', 'F', 'F')


Then comes the select that displayes the new list
060525  8:14:45  3 Prepare [8]
 3 Execute [8] select room0_.id as id0_, 
room0_.roomType as roomType0_, room0_.roomNumber as roomNumber0_, 
room0_.smoking as smoking0_, room0_.active as active0_ from room room0_

The room is in the list

Then comes my mysql command line client to check the table:
060525  8:16:53  4 Connect [EMAIL PROTECTED] on rbs1
 4 Query   select * from room
060525  8:17:01  4 Query   select * from room
And the result is "Empty set"

Now I try to insert the same record ( just with number 120 rather than 
12) from the command line:
060525  8:19:36  4 Query   insert into room (roomType, 
roomNumber, smoking, active) values ('PRM', '120', 'F', 'F')


And another commandline select to verify:
060525  8:19:40  4 Query   select * from room
It comes back with the new record (120)

Then comes Hibernate (I refresh the browser list page):
060525  8:21:00  3 Prepare [12]
 3 Execute [12] select room0_.id as id0_, 
room0_.roomType as roomType0_, room0_.roomNumber as roomNumber0_, 
room0_.smoking as smoking0_, room0_.active as active0_ from room room0_

The result is still the old one (only room 12, not room 120)

Now I restart Tomcat...

Oops... I just found something interesting:

This was called when Tomcat shut down:
060525  8:22:48  3 Query   rollback
 3 Quit  
This was called in the beginning when Tomcat started:

 3 Query   SET autocommit=1
 3 Query   SET autocommit=0


So Spring never executed commit, instead goes through all my web 
requests on just one session and at the end calls rollback (no idea why 
it doesn't commit).


So I guess this is what happens... now the question: how do I fix it?

MARK


P.S.: Here is my Hibernate configuration:

hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect
hibernate.connection.driver_class=org.gjt.mm.mysql.Driver
hibernate.connection.password=password
hibernate.connection.url=jdbc:mysql://localhost/rbs1
hibernate.connection.username=rbs
hibernate.cache.provider_class = org.hibernate.cache.HashtableCacheProvider
hibernate.show_sql = true




- if you're sure your application is otherwise correct, the code gets
executed with the room object you intend it to, and you still don't
have anything in your database, I believe you have something severely
misconfigured and suggest you post your configuration.
That would be the part of your Spring applicationContext.xml (or
whatever it is called in your case) where you set up the data source
and the session factory.

some more comments...


I figured since everybody has problems with Spring closing sessions too
early and thereby causing problems with lazy-load, it should not affect
me in this case and actually work for me.
But maybe not???


Since you have no problem with lazy loading, in fact, you are not even
loading, I believe keeping the session open until the view is rendered
will not help you.


The Page gets the Service (a singleton SpringBean) via tapestry-spring
library ("spring:...").
The Service gets a DAO through Spring IoC.


Just out of curiosity: Why do you not inject your Dao into the page?
What does "the Service"? do?


So I guess the DAO is a singleton that opens a session once and never
closes it? Does that mean that everything is one session/transaction,
across all requests and user-web-sessions?


No.


hth,
Lutz

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



Tapernate "squeezer" refactored...

2006-05-25 Thread James Carman
All,

Tapernate's entity "squeezer" has been refactored.  No longer do you need to
tell it what your "data class" (the common entity superclass/interface) is.
Tapernate turns the data squeezer service into a pipeline and puts its
EntitySqueezerFilter into the pipeline.  If it can't squeeze the object (the
object isn't persistent), then it just lets the rest of the pipeline take
care of it.  If it can squeeze it, it does.  The squeezed string will look
something like this (from the example application):

HIBRN8:0::l1

The "HIBER8" part is a token that tells me that I squeezed this object.  The
'0' is an abbreviation for the entity name (just print a number rather than
printing out com.mycompany.domain.entity.MyDomainClass).  And, the "l1" is
how the rest of the pipeline squeezes my long (value 1).  Enjoy!

James

p.s. Yes, I'm going to move it!



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



Overriding Default Radio Button Renderer

2006-05-25 Thread Jeff Parsons

I've extended RadioPropertySelectionRenderer and overridden the appropriate
methods. I'm brand new to Tapestry and I'm stuck trying to figure out how to
tell Tapestry to use my new Renderer class.

Any help would be appreciated.

Thanks


RE: Help in writing a custom annotation

2006-05-25 Thread Dan Adams
True. But, on the one hand it would be relatively easy to have an aspect
put the code in wherever the annotation is used. But on the other hand:
- it should also be easy to add new annotations using hivemind
- i would like throw any exceptions about mis-use of the annotation when
the class is constructed, not when the method is executed
- doing it using tapestry gives me access to classes that make it easier
such as EnhancementOperation and such

On Thu, 2006-05-25 at 10:43 -0400, James Carman wrote:
> Don't get me wrong, I understand your reluctance to introduce AspectJ into
> your build environment.  But, this is a perfect case for AspectJ, IMHO.
> 
> -Original Message-
> From: Dan Adams [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, May 25, 2006 10:39 AM
> To: Tapestry users
> Subject: RE: Help in writing a custom annotation
> 
> I thought about using it but I thought that putting in an annotation
> seemed like a natural course of action. Plus, using aspecj would put
> some constraints on the project build environment.
> 
> On Thu, 2006-05-25 at 10:02 -0400, James Carman wrote:
> > Have you looked into AspectJ?
> > 
> > -Original Message-
> > From: Dan Adams [mailto:[EMAIL PROTECTED] 
> > Sent: Thursday, May 25, 2006 10:00 AM
> > To: Tapestry users
> > Subject: RE: Help in writing a custom annotation
> > 
> > Okay, my annotation is called @Once and if put on accessor will make
> > sure that the method is only executed once and then the return value is
> > cached. Any further calls to the method will just return the saved
> > value. I've got pretty far but I think I'm stuck as I want to do
> > something that I could do with javassist but I'm not sure how to do
> > within the tapestry enhancement classes. I've attached what I have so
> > far and I would greatly appreciated it if someone could give me some
> > suggestions on what to do. My big problem is:
> > 
> > - I could add code at the beginning and end of the method with javassit
> > but can't see a way to do that
> > - Perhaps I could somehow rename the old method to something else and
> > put in a new method that calls it?
> > 
> > Thanks a lot.
> > 
> > On Thu, 2006-05-25 at 07:11 -0400, James Carman wrote:
> > > I'd look at the one that injects messages, or beans, or even the one
> that
> > I
> > > wrote for "autowiring" (available in SVN on the 4.1 branch).
> > > 
> > > -Original Message-
> > > From: Dan Adams [mailto:[EMAIL PROTECTED] 
> > > Sent: Wednesday, May 24, 2006 10:44 PM
> > > To: Tapestry users
> > > Subject: Help in writing a custom annotation
> > > 
> > > I want to write an annotation that will intercept a method and add a
> > > property to the class. I've started digging around in some of the
> > > annotation sources but it's going pretty slow. Can someone point me at
> > > the right place to look for where to start?
> > > 
-- 
Dan Adams
Software Engineer
Interactive Factory
617.235.5857


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



Re: Help in writing a custom annotation

2006-05-25 Thread Dan Adams
Well, I've been digging around in all the annotation source for 4.0.1
and I seem to be stuck. It seems like there isn't any way to get to the
javassist methods or to do what I'm trying to do. I've looked at the
hivemind config and how to add the annotation. My only problem is how to
actually get the annotation to do what it needs to do. Any suggestions
on how to approach the problems I mentioned earlier? I also attached the
source which is pretty short.

On Thu, 2006-05-25 at 10:42 -0400, Jesse Kuhnert wrote:
> Ah well...The annotations stuff in tapestry is pretty easy to follow (just
> added a lot of logic in this area myself). It would be best for you to refer
> to the tapestry annotations source, but the biggest thing is to also
> remember that annotations are done almost the same way that the
> "enhancement" stuff is done - with a hivemind chained pipeline
> configuration. There is an annotations hivemind configuration section that
> configures and sets up all of them as well.
> 
> On 5/25/06, Dan Adams <[EMAIL PROTECTED]> wrote:
> >
> > You are right about this. I hadn't realized you could do that with
> > parameters. But that doesn't really apply to my problem since @Once
> > won't normally be used on parameters. It came up because in some
> > situations you have a method that does a hibernate query and returns a
> > list of objects and you'd like to be able to easily refer to that
> > property more than once in the template. A common situation is checking
> > the list size in an @If before doing something with it.
> >
> > On Thu, 2006-05-25 at 10:28 -0400, Jesse Kuhnert wrote:
> > > Doesn't tapestry support marking a parameter as cache-able already?
> > >
> > > On 5/25/06, James Carman <[EMAIL PROTECTED]> wrote:
> > > >
> > > > Have you looked into AspectJ?
> > > >
> > > > -Original Message-
> > > > From: Dan Adams [mailto:[EMAIL PROTECTED]
> > > > Sent: Thursday, May 25, 2006 10:00 AM
> > > > To: Tapestry users
> > > > Subject: RE: Help in writing a custom annotation
> > > >
> > > > Okay, my annotation is called @Once and if put on accessor will make
> > > > sure that the method is only executed once and then the return value
> > is
> > > > cached. Any further calls to the method will just return the saved
> > > > value. I've got pretty far but I think I'm stuck as I want to do
> > > > something that I could do with javassist but I'm not sure how to do
> > > > within the tapestry enhancement classes. I've attached what I have so
> > > > far and I would greatly appreciated it if someone could give me some
> > > > suggestions on what to do. My big problem is:
> > > >
> > > > - I could add code at the beginning and end of the method with
> > javassit
> > > > but can't see a way to do that
> > > > - Perhaps I could somehow rename the old method to something else and
> > > > put in a new method that calls it?
> > > >
> > > > Thanks a lot.
> > > >
> > > > On Thu, 2006-05-25 at 07:11 -0400, James Carman wrote:
> > > > > I'd look at the one that injects messages, or beans, or even the one
> > > > that
> > > > I
> > > > > wrote for "autowiring" (available in SVN on the 4.1 branch).
> > > > >
> > > > > -Original Message-
> > > > > From: Dan Adams [mailto:[EMAIL PROTECTED]
> > > > > Sent: Wednesday, May 24, 2006 10:44 PM
> > > > > To: Tapestry users
> > > > > Subject: Help in writing a custom annotation
> > > > >
> > > > > I want to write an annotation that will intercept a method and add a
> > > > > property to the class. I've started digging around in some of the
> > > > > annotation sources but it's going pretty slow. Can someone point me
> > at
> > > > > the right place to look for where to start?
> > > > >
> > > > --
> > > > Dan Adams
> > > > Software Engineer
> > > > Interactive Factory
> > > > 617.235.5857
> > > >
> > > >
> > > >
> > > > -
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > >
> > --
> > Dan Adams
> > Software Engineer
> > Interactive Factory
> > 617.235.5857
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
-- 
Dan Adams
Software Engineer
Interactive Factory
617.235.5857


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



RE: Help in writing a custom annotation

2006-05-25 Thread James Carman
Don't get me wrong, I understand your reluctance to introduce AspectJ into
your build environment.  But, this is a perfect case for AspectJ, IMHO.

-Original Message-
From: Dan Adams [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 25, 2006 10:39 AM
To: Tapestry users
Subject: RE: Help in writing a custom annotation

I thought about using it but I thought that putting in an annotation
seemed like a natural course of action. Plus, using aspecj would put
some constraints on the project build environment.

On Thu, 2006-05-25 at 10:02 -0400, James Carman wrote:
> Have you looked into AspectJ?
> 
> -Original Message-
> From: Dan Adams [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, May 25, 2006 10:00 AM
> To: Tapestry users
> Subject: RE: Help in writing a custom annotation
> 
> Okay, my annotation is called @Once and if put on accessor will make
> sure that the method is only executed once and then the return value is
> cached. Any further calls to the method will just return the saved
> value. I've got pretty far but I think I'm stuck as I want to do
> something that I could do with javassist but I'm not sure how to do
> within the tapestry enhancement classes. I've attached what I have so
> far and I would greatly appreciated it if someone could give me some
> suggestions on what to do. My big problem is:
> 
> - I could add code at the beginning and end of the method with javassit
> but can't see a way to do that
> - Perhaps I could somehow rename the old method to something else and
> put in a new method that calls it?
> 
> Thanks a lot.
> 
> On Thu, 2006-05-25 at 07:11 -0400, James Carman wrote:
> > I'd look at the one that injects messages, or beans, or even the one
that
> I
> > wrote for "autowiring" (available in SVN on the 4.1 branch).
> > 
> > -Original Message-
> > From: Dan Adams [mailto:[EMAIL PROTECTED] 
> > Sent: Wednesday, May 24, 2006 10:44 PM
> > To: Tapestry users
> > Subject: Help in writing a custom annotation
> > 
> > I want to write an annotation that will intercept a method and add a
> > property to the class. I've started digging around in some of the
> > annotation sources but it's going pretty slow. Can someone point me at
> > the right place to look for where to start?
> > 
-- 
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: Help in writing a custom annotation

2006-05-25 Thread Jesse Kuhnert

Ah well...The annotations stuff in tapestry is pretty easy to follow (just
added a lot of logic in this area myself). It would be best for you to refer
to the tapestry annotations source, but the biggest thing is to also
remember that annotations are done almost the same way that the
"enhancement" stuff is done - with a hivemind chained pipeline
configuration. There is an annotations hivemind configuration section that
configures and sets up all of them as well.

On 5/25/06, Dan Adams <[EMAIL PROTECTED]> wrote:


You are right about this. I hadn't realized you could do that with
parameters. But that doesn't really apply to my problem since @Once
won't normally be used on parameters. It came up because in some
situations you have a method that does a hibernate query and returns a
list of objects and you'd like to be able to easily refer to that
property more than once in the template. A common situation is checking
the list size in an @If before doing something with it.

On Thu, 2006-05-25 at 10:28 -0400, Jesse Kuhnert wrote:
> Doesn't tapestry support marking a parameter as cache-able already?
>
> On 5/25/06, James Carman <[EMAIL PROTECTED]> wrote:
> >
> > Have you looked into AspectJ?
> >
> > -Original Message-
> > From: Dan Adams [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, May 25, 2006 10:00 AM
> > To: Tapestry users
> > Subject: RE: Help in writing a custom annotation
> >
> > Okay, my annotation is called @Once and if put on accessor will make
> > sure that the method is only executed once and then the return value
is
> > cached. Any further calls to the method will just return the saved
> > value. I've got pretty far but I think I'm stuck as I want to do
> > something that I could do with javassist but I'm not sure how to do
> > within the tapestry enhancement classes. I've attached what I have so
> > far and I would greatly appreciated it if someone could give me some
> > suggestions on what to do. My big problem is:
> >
> > - I could add code at the beginning and end of the method with
javassit
> > but can't see a way to do that
> > - Perhaps I could somehow rename the old method to something else and
> > put in a new method that calls it?
> >
> > Thanks a lot.
> >
> > On Thu, 2006-05-25 at 07:11 -0400, James Carman wrote:
> > > I'd look at the one that injects messages, or beans, or even the one
> > that
> > I
> > > wrote for "autowiring" (available in SVN on the 4.1 branch).
> > >
> > > -Original Message-
> > > From: Dan Adams [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, May 24, 2006 10:44 PM
> > > To: Tapestry users
> > > Subject: Help in writing a custom annotation
> > >
> > > I want to write an annotation that will intercept a method and add a
> > > property to the class. I've started digging around in some of the
> > > annotation sources but it's going pretty slow. Can someone point me
at
> > > the right place to look for where to start?
> > >
> > --
> > Dan Adams
> > Software Engineer
> > Interactive Factory
> > 617.235.5857
> >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
--
Dan Adams
Software Engineer
Interactive Factory
617.235.5857


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





--
Jesse Kuhnert
Tacos/Tapestry, team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.


RE: Help in writing a custom annotation

2006-05-25 Thread Dan Adams
I thought about using it but I thought that putting in an annotation
seemed like a natural course of action. Plus, using aspecj would put
some constraints on the project build environment.

On Thu, 2006-05-25 at 10:02 -0400, James Carman wrote:
> Have you looked into AspectJ?
> 
> -Original Message-
> From: Dan Adams [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, May 25, 2006 10:00 AM
> To: Tapestry users
> Subject: RE: Help in writing a custom annotation
> 
> Okay, my annotation is called @Once and if put on accessor will make
> sure that the method is only executed once and then the return value is
> cached. Any further calls to the method will just return the saved
> value. I've got pretty far but I think I'm stuck as I want to do
> something that I could do with javassist but I'm not sure how to do
> within the tapestry enhancement classes. I've attached what I have so
> far and I would greatly appreciated it if someone could give me some
> suggestions on what to do. My big problem is:
> 
> - I could add code at the beginning and end of the method with javassit
> but can't see a way to do that
> - Perhaps I could somehow rename the old method to something else and
> put in a new method that calls it?
> 
> Thanks a lot.
> 
> On Thu, 2006-05-25 at 07:11 -0400, James Carman wrote:
> > I'd look at the one that injects messages, or beans, or even the one that
> I
> > wrote for "autowiring" (available in SVN on the 4.1 branch).
> > 
> > -Original Message-
> > From: Dan Adams [mailto:[EMAIL PROTECTED] 
> > Sent: Wednesday, May 24, 2006 10:44 PM
> > To: Tapestry users
> > Subject: Help in writing a custom annotation
> > 
> > I want to write an annotation that will intercept a method and add a
> > property to the class. I've started digging around in some of the
> > annotation sources but it's going pretty slow. Can someone point me at
> > the right place to look for where to start?
> > 
-- 
Dan Adams
Software Engineer
Interactive Factory
617.235.5857


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



Re: Help in writing a custom annotation

2006-05-25 Thread Dan Adams
You are right about this. I hadn't realized you could do that with
parameters. But that doesn't really apply to my problem since @Once
won't normally be used on parameters. It came up because in some
situations you have a method that does a hibernate query and returns a
list of objects and you'd like to be able to easily refer to that
property more than once in the template. A common situation is checking
the list size in an @If before doing something with it.

On Thu, 2006-05-25 at 10:28 -0400, Jesse Kuhnert wrote:
> Doesn't tapestry support marking a parameter as cache-able already?
> 
> On 5/25/06, James Carman <[EMAIL PROTECTED]> wrote:
> >
> > Have you looked into AspectJ?
> >
> > -Original Message-
> > From: Dan Adams [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, May 25, 2006 10:00 AM
> > To: Tapestry users
> > Subject: RE: Help in writing a custom annotation
> >
> > Okay, my annotation is called @Once and if put on accessor will make
> > sure that the method is only executed once and then the return value is
> > cached. Any further calls to the method will just return the saved
> > value. I've got pretty far but I think I'm stuck as I want to do
> > something that I could do with javassist but I'm not sure how to do
> > within the tapestry enhancement classes. I've attached what I have so
> > far and I would greatly appreciated it if someone could give me some
> > suggestions on what to do. My big problem is:
> >
> > - I could add code at the beginning and end of the method with javassit
> > but can't see a way to do that
> > - Perhaps I could somehow rename the old method to something else and
> > put in a new method that calls it?
> >
> > Thanks a lot.
> >
> > On Thu, 2006-05-25 at 07:11 -0400, James Carman wrote:
> > > I'd look at the one that injects messages, or beans, or even the one
> > that
> > I
> > > wrote for "autowiring" (available in SVN on the 4.1 branch).
> > >
> > > -Original Message-
> > > From: Dan Adams [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, May 24, 2006 10:44 PM
> > > To: Tapestry users
> > > Subject: Help in writing a custom annotation
> > >
> > > I want to write an annotation that will intercept a method and add a
> > > property to the class. I've started digging around in some of the
> > > annotation sources but it's going pretty slow. Can someone point me at
> > > the right place to look for where to start?
> > >
> > --
> > Dan Adams
> > Software Engineer
> > Interactive Factory
> > 617.235.5857
> >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
-- 
Dan Adams
Software Engineer
Interactive Factory
617.235.5857


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



Re: Best directory stucture

2006-05-25 Thread Erik Husby
In Tapestry 4, you can put your pages (the .html and .page files) in  
subdirectories that live under WEB-INF. That means that you address  
your pages like "contact/home" or "contact/gestionContacts/contactList"


So your directories would be WEB-INF/contact and WEB-INF/contact/ 
gestionContacts



On May 25, 2006, at 10:16 AM, Rui Pacheco wrote:

I may be wrong, but I think you can put your .page files under WEB- 
INF and

your .html under the context. That way you'll have them separated.

On 5/25/06, Carl Pelletier <[EMAIL PROTECTED]> wrote:


Hi everyone, I`m starting a project with Tapestry 4.0 and was  
wondering if

someone have recommendation on how to structure my project.

I don`t really understand how Tapestry work with directory. It`s like
everything is in the same folder.

For us, it`s doesnt fit to have juste one directory with all  
the .page

.html and component in the same folder.

I know I can specify where are the component by using
org.apache.tapestry.component-class-packages but it`s just work  
for the

java files.

Is there a way to specify all this without adding each page in the
.application ?

For now, we doing something like:
   
   
   
   
   
   
   
   

For each section and sub section. At the end of the project, we  
will have
~200 pages. It's we be a real mess in the .application, don`t you  
think ?


Thanks for any advise, help or recommendation!

Really sorry for the bad english, I`m french.

Carl Pelletier






--
Cumprimentos,
Rui Pacheco


---
Erik Husby
Senior Software Engineer
Broad Institute of MIT and Harvard
Rm. 2192, 320 Charles St, Cambridge, MA 02141-2023
mobile: 781.354.6669, office: 617.258.9227
email: [EMAIL PROTECTED] AIM: ErikAtBroad



InputValidation

2006-05-25 Thread Pedro Garcia

Hi,
I'm using Tapestry 4 and I am having a hard time with number inputvalidation
with TextField component.
Can anyone tell me
how to check if the value is an Integer and
how to check if the value is a Float and
how to check if the value is a Double.

and how to set the decimal separator to be a ',' .

Thanks,
Pedro da Silva Garcia


Re: Best directory stucture

2006-05-25 Thread corsair

Hello!
Try to read UsersGuide
http://jakarta.apache.org/tapestry/UsersGuide/template.html#template.locations
http://jakarta.apache.org/tapestry/UsersGuide/page-class.html
http://jakarta.apache.org/tapestry/UsersGuide/configuration.html


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



Re: Help in writing a custom annotation

2006-05-25 Thread Jesse Kuhnert

Doesn't tapestry support marking a parameter as cache-able already?

On 5/25/06, James Carman <[EMAIL PROTECTED]> wrote:


Have you looked into AspectJ?

-Original Message-
From: Dan Adams [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 25, 2006 10:00 AM
To: Tapestry users
Subject: RE: Help in writing a custom annotation

Okay, my annotation is called @Once and if put on accessor will make
sure that the method is only executed once and then the return value is
cached. Any further calls to the method will just return the saved
value. I've got pretty far but I think I'm stuck as I want to do
something that I could do with javassist but I'm not sure how to do
within the tapestry enhancement classes. I've attached what I have so
far and I would greatly appreciated it if someone could give me some
suggestions on what to do. My big problem is:

- I could add code at the beginning and end of the method with javassit
but can't see a way to do that
- Perhaps I could somehow rename the old method to something else and
put in a new method that calls it?

Thanks a lot.

On Thu, 2006-05-25 at 07:11 -0400, James Carman wrote:
> I'd look at the one that injects messages, or beans, or even the one
that
I
> wrote for "autowiring" (available in SVN on the 4.1 branch).
>
> -Original Message-
> From: Dan Adams [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 24, 2006 10:44 PM
> To: Tapestry users
> Subject: Help in writing a custom annotation
>
> I want to write an annotation that will intercept a method and add a
> property to the class. I've started digging around in some of the
> annotation sources but it's going pretty slow. Can someone point me at
> the right place to look for where to start?
>
--
Dan Adams
Software Engineer
Interactive Factory
617.235.5857



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





--
Jesse Kuhnert
Tacos/Tapestry, team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.


Re: Best directory stucture

2006-05-25 Thread Rui Pacheco

I may be wrong, but I think you can put your .page files under WEB-INF and
your .html under the context. That way you'll have them separated.

On 5/25/06, Carl Pelletier <[EMAIL PROTECTED]> wrote:


Hi everyone, I`m starting a project with Tapestry 4.0 and was wondering if
someone have recommendation on how to structure my project.

I don`t really understand how Tapestry work with directory. It`s like
everything is in the same folder.

For us, it`s doesnt fit to have juste one directory with all the .page
.html and component in the same folder.

I know I can specify where are the component by using
org.apache.tapestry.component-class-packages but it`s just work for the
java files.

Is there a way to specify all this without adding each page in the
.application ?

For now, we doing something like:
   
   
   
   
   
   
   
   

For each section and sub section. At the end of the project, we will have
~200 pages. It's we be a real mess in the .application, don`t you think ?

Thanks for any advise, help or recommendation!

Really sorry for the bad english, I`m french.

Carl Pelletier






--
Cumprimentos,
Rui Pacheco


Best directory stucture

2006-05-25 Thread Carl Pelletier
Hi everyone, I`m starting a project with Tapestry 4.0 and was wondering if 
someone have recommendation on how to structure my project.

I don`t really understand how Tapestry work with directory. It`s like 
everything is in the same folder.

For us, it`s doesnt fit to have juste one directory with all the .page .html 
and component in the same folder.

I know I can specify where are the component by using 
org.apache.tapestry.component-class-packages but it`s just work for the java 
files.

Is there a way to specify all this without adding each page in the .application 
?

For now, we doing something like:
   
   
   
   
   
   
   
   

For each section and sub section. At the end of the project, we will have ~200 
pages. It's we be a real mess in the .application, don`t you think ?

Thanks for any advise, help or recommendation!

Really sorry for the bad english, I`m french.

Carl Pelletier



RE: Help in writing a custom annotation

2006-05-25 Thread James Carman
Have you looked into AspectJ?

-Original Message-
From: Dan Adams [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 25, 2006 10:00 AM
To: Tapestry users
Subject: RE: Help in writing a custom annotation

Okay, my annotation is called @Once and if put on accessor will make
sure that the method is only executed once and then the return value is
cached. Any further calls to the method will just return the saved
value. I've got pretty far but I think I'm stuck as I want to do
something that I could do with javassist but I'm not sure how to do
within the tapestry enhancement classes. I've attached what I have so
far and I would greatly appreciated it if someone could give me some
suggestions on what to do. My big problem is:

- I could add code at the beginning and end of the method with javassit
but can't see a way to do that
- Perhaps I could somehow rename the old method to something else and
put in a new method that calls it?

Thanks a lot.

On Thu, 2006-05-25 at 07:11 -0400, James Carman wrote:
> I'd look at the one that injects messages, or beans, or even the one that
I
> wrote for "autowiring" (available in SVN on the 4.1 branch).
> 
> -Original Message-
> From: Dan Adams [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, May 24, 2006 10:44 PM
> To: Tapestry users
> Subject: Help in writing a custom annotation
> 
> I want to write an annotation that will intercept a method and add a
> property to the class. I've started digging around in some of the
> annotation sources but it's going pretty slow. Can someone point me at
> the right place to look for where to start?
> 
-- 
Dan Adams
Software Engineer
Interactive Factory
617.235.5857



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



RE: Help in writing a custom annotation

2006-05-25 Thread Dan Adams
Okay, my annotation is called @Once and if put on accessor will make
sure that the method is only executed once and then the return value is
cached. Any further calls to the method will just return the saved
value. I've got pretty far but I think I'm stuck as I want to do
something that I could do with javassist but I'm not sure how to do
within the tapestry enhancement classes. I've attached what I have so
far and I would greatly appreciated it if someone could give me some
suggestions on what to do. My big problem is:

- I could add code at the beginning and end of the method with javassit
but can't see a way to do that
- Perhaps I could somehow rename the old method to something else and
put in a new method that calls it?

Thanks a lot.

On Thu, 2006-05-25 at 07:11 -0400, James Carman wrote:
> I'd look at the one that injects messages, or beans, or even the one that I
> wrote for "autowiring" (available in SVN on the 4.1 branch).
> 
> -Original Message-
> From: Dan Adams [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, May 24, 2006 10:44 PM
> To: Tapestry users
> Subject: Help in writing a custom annotation
> 
> I want to write an annotation that will intercept a method and add a
> property to the class. I've started digging around in some of the
> annotation sources but it's going pretty slow. Can someone point me at
> the right place to look for where to start?
> 
-- 
Dan Adams
Software Engineer
Interactive Factory
617.235.5857
package com.ifactory.cms.annotations;

import static java.lang.String.format;

import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.List;

import org.apache.hivemind.ApplicationRuntimeException;
import org.apache.hivemind.Location;
import org.apache.hivemind.Resource;
import org.apache.hivemind.service.MethodSignature;
import org.apache.tapestry.annotations.AnnotationUtils;
import org.apache.tapestry.annotations.SecondaryAnnotationWorker;
import org.apache.tapestry.enhance.EnhanceUtils;
import org.apache.tapestry.enhance.EnhancementOperation;
import org.apache.tapestry.enhance.EnhancementWorker;
import org.apache.tapestry.event.PageDetachListener;
import org.apache.tapestry.spec.IComponentSpecification;

public class OnceAnnotationWorker implements EnhancementWorker {

	public OnceAnnotationWorker() {
		super();
	}

	public void performEnhancement(EnhancementOperation op, IComponentSpecification spec) {
		// find all methods that have the once annotation and process them
		for (Method method : getAnnotatedMethods(op)) {
			// method must have a return type
			if (method.getReturnType().equals(void.class))
throw new ApplicationRuntimeException("Method must have a return type: " + method.getName());

			String propertyName = AnnotationUtils.getPropertyName(method);
			
			// add a property to store whether or not the method has been called
			String fieldName = "_$" + propertyName;
			String calledField = fieldName + "$called";
			
			op.addField(fieldName, method.getReturnType());
			op.addField(calledField, boolean.class);
			
			// on page detach, reset the field values
			op.extendMethodImplementation(
	PageDetachListener.class, 
	EnhanceUtils.PAGE_DETACHED_SIGNATURE, 
	format("%s = null; %s = false;", fieldName, calledField));

			// how to override the method or add to it? 
		}
	}

	/** Returns all the methods that are annotated with Once */
	private List getAnnotatedMethods(EnhancementOperation op) {
		List methods = new ArrayList();
		for(Method m : op.getBaseClass().getMethods()) {
			if (m.getAnnotation(Once.class) != null)
methods.add(m);
		}
		return methods;
	}
}

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

RE: Help in writing a custom annotation

2006-05-25 Thread James Carman
I'd look at the one that injects messages, or beans, or even the one that I
wrote for "autowiring" (available in SVN on the 4.1 branch).

-Original Message-
From: Dan Adams [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 24, 2006 10:44 PM
To: Tapestry users
Subject: Help in writing a custom annotation

I want to write an annotation that will intercept a method and add a
property to the class. I've started digging around in some of the
annotation sources but it's going pretty slow. Can someone point me at
the right place to look for where to start?

-- 
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: [OT] hivemind book

2006-05-25 Thread James Carman
I have spoken with a publishing company about putting together a HiveMind
book in the past.  I think I'll probably wait until we get the 2.0 version
of HiveMind out the door before writing it, though.  And, as someone else
said, an Eclipse plugin for HiveMind would be really cool too.
Unfortunately, I don't know the first thing about developing Eclipse
plugins.  But, that never stopped me before.  I don't really know much about
Acegi, but I'm creating a HiveMind module for it! :-)
 

-Original Message-
From: Dan Adams [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 24, 2006 4:42 PM
To: Tapestry users
Subject: [OT] hivemind book

Any plans for a hivemind book? I, for one, would get it if such a book
existed.

-- 
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: [OT] hivemind book

2006-05-25 Thread Hugo Palma

There's an effort to provide a hivemind descriptor editor here
http://sourceforge.net/projects/hivemind-editor.

In my opinion, i really don't think that a Hivemind book is necessary.
I find that Jame's excellent article on TSS does a great job as a first
introduction. Once you get all the concepts right, the Hivemind site
provides all the reference material you need.

Cheers

Hugo

On 5/25/06, Aleksej <[EMAIL PROTECTED]> wrote:


Looking at hivemind mailing list aktivity I hardly believe in it.
IMO, good Eclipse plugin for Hivemind is more required ( and real ).

Peter Svensson wrote:
> +Sixteen bushels of wheat
>
> On 5/24/06, Dan Adams <[EMAIL PROTECTED]> wrote:
>>
>> Any plans for a hivemind book? I, for one, would get it if such a book
>> existed.
>>
>> --
>> 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: Lazy Exception in Contrib:Table

2006-05-25 Thread Jérôme BERNARD

I'm not sure I'm talking about the same problem as you have, but I
found a way to solve pagination problems with LazyExceptions
(basically the first page was ok, but not the others -- don't know
why).

What I did was to use a different source for the table: instead of
giving the whole list returned by Hibernate, I wrote my own
IBasicTableModel. It's quite easy to write except for the columns
sorting where I had to use a few tricks to keep the code short. The
nice side effect being that you don't load the whole content at once,
but only one page at a time, so depending on how large is your data,
that can be convenient.

Jérôme.

On 5/25/06, Shovon <[EMAIL PROTECTED]> wrote:


Can anyone shed some light on my original problem? I am upgrading from
Tapestry 3.x to 4.x. I would look at something like Tapernate once the
upgrade is done.

Thank you for your help.

Shovon

--
View this message in context: 
http://www.nabble.com/Lazy+Exception+in+Contrib%3ATable-t1673050.html#a4554283
Sent from the Tapestry - User forum at Nabble.com.


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





--
Jérôme BERNARD,
Kalixia, SARL.
http://weblog.kalixia.com

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



Re: Hibernate persisted data never makes it to DB

2006-05-25 Thread Lutz Hühnken

Yes, the Spring HibernateTemplate will take care of that for you. The
actual behaviour depends on your transaction management, but let's not
get into that for now.

So, the save you call will commit the changes to the database.
Hibernate then disconnects the session, I believe, anyhow, there is no
need for you to add extra code.
Since you even flush your session, there is no doubt Hibernate will
try to store your object in the database. Even if it doesn't work, you
should get some exception.

So...
- have you checked the rest of your code? Are you sure this piece of
code is actually called? Step through it or add debugging output.
- if you're sure your application is otherwise correct, the code gets
executed with the room object you intend it to, and you still don't
have anything in your database, I believe you have something severely
misconfigured and suggest you post your configuration.
That would be the part of your Spring applicationContext.xml (or
whatever it is called in your case) where you set up the data source
and the session factory.

some more comments...


I figured since everybody has problems with Spring closing sessions too
early and thereby causing problems with lazy-load, it should not affect
me in this case and actually work for me.
But maybe not???


Since you have no problem with lazy loading, in fact, you are not even
loading, I believe keeping the session open until the view is rendered
will not help you.


The Page gets the Service (a singleton SpringBean) via tapestry-spring
library ("spring:...").
The Service gets a DAO through Spring IoC.


Just out of curiosity: Why do you not inject your Dao into the page?
What does "the Service"? do?


So I guess the DAO is a singleton that opens a session once and never
closes it? Does that mean that everything is one session/transaction,
across all requests and user-web-sessions?


No.


hth,
Lutz

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