Antwort: get perthread_scope service from singleton_scope service

2008-04-08 Thread Kristian Marinkovic
pass in a factory service to your ChatCoordinator that will 
return a new instance on every invocation (eg. create())

g
kris



Foror <[EMAIL PROTECTED]> 
09.04.2008 06:08
Bitte antworten an
"Tapestry users" 


An
Tapestry users 
Kopie

Thema
get perthread_scope service from singleton_scope service







// singleton
public IChatCoordinator buildChatCoordinator() {...}

@Scope(IOCConstants.PERTHREAD_SCOPE)
public IPerthredService buildPerthreadService(@Inject 
IOtherPerthredService) {...}

---

// singleton
public class ChatCoordinator implements IChatCoordinator {

// for every call this method needed new IPerthredService
public void someMethod() {
   IPerthredService service = ? // who build new IPerthredService?
}
}

public class ChatJobSchedule extends TimerTask {

  private IChatCoordinator op;

  public ChatJobSchedule(IChatCoordinator op) {
this.op = op;
  }

  @Override
  public void run() {
op.someMethod();
  }
}


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




get perthread_scope service from singleton_scope service

2008-04-08 Thread Foror
// singleton
public IChatCoordinator buildChatCoordinator() {...}

@Scope(IOCConstants.PERTHREAD_SCOPE)
public IPerthredService buildPerthreadService(@Inject IOtherPerthredService) 
{...}

---

// singleton
public class ChatCoordinator implements IChatCoordinator {

// for every call this method needed new IPerthredService
public void someMethod() {
   IPerthredService service = ? // who build new IPerthredService?
}
}

public class ChatJobSchedule extends TimerTask {

  private IChatCoordinator op;

  public ChatJobSchedule(IChatCoordinator op) {
this.op = op;
  }

  @Override
  public void run() {
op.someMethod();
  }
}


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



Using Upload inside a component

2008-04-08 Thread Imants Firsts
I would like to create a component, which I could add
to AppPropertyEditBlocks and would be able to edit
entity fields of type MyFile by utilizing tapestry
Upload component to upload the file.

AppPropertyEditBlocks.tml:

  
  


AppPropertyEditBlocks.java:
@Component(parameters = {"value=context.propertyValue",
"label=prop:context.label",
"clientId=prop:context.propertyId"})
private MyFileField myfileField;

MyFileField.tml:
http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"/>

public class MyFileField extends AbstractField {
@Parameter
private MyFile value;

@Property
private UploadedFile uploadedFile;
...
}

I would like to execute the following code on form
submission, so that my bound value parameter is updated
with just uploaded file.
if (uploadedFile != null) {
  value = new MyFile(uploadedFile);
}

I have tried 2 solutions but none of them works:
1) This fails because processSubmission() for tapestry
Upload component is not called yet and thus
uploadedFile is always null.
protected void processSubmission(String elementName) {
  if (uploadedFile != null) {
value = new MyFile(uploadedFile);
  }
}
2) In this case uploadedFile is filled by tapestry
Upload, but the code fails, because value is bound to a
field, which uses PropertyContext, which is already
popped out of the Environment, when the defer() executes.

protected void processSubmission(String elementName) {
  formSupport.defer(new Runnable() {
public void run() {
  if (uploadedFile != null) {
value = new MyFile(uploadedFile);
  }
}
  });
}

Any solutions?

Thanks in advance,
Imants


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



Re: T5: when is a filed with @Retain cleaned?

2008-04-08 Thread Filip S. Adamsen

org.apache.tapestry.annotations
Annotation Type Retain

Marker annotation placed on fields whose value should be retained past 
the end of the request. This is most often associated with fields that 
are lazily loaded. By marking such fields with the Retain annotation, 
the fields will not be discarded at the end of the request.


This is quite different from Persist, because the value that's allowed 
to be retained is not stored persistently; it is simply not cleared out. 
A subsequent request, even from the same user, may be processed by a 
different instance of the page where the value is still null.


This annotation should only be used with lazily-evaluated objects that 
contain no client-specific information.


http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry/annotations/Retain.html

-Filip

On 2008-04-08 23:08, DavidWei wrote:

I am using T5 for my current application. There are cases when I need to have
a field's value retain after the request. I know using @Persist it will
work, but I do not want to store so many values in session. I found there
are some samples which use @Retain. By definition, it is said as "By marking
such fields with the Retain annotation, the fields will not be discarded at
the end of the request... This is quite different from Persist, because the
value that's allowed to be retained is not stored persistently; it is simply
not cleared out...".

If it is not cleaned out after the request, when is it cleaned out?

Thanks,

David


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



T5: when is a filed with @Retain cleaned?

2008-04-08 Thread DavidWei

I am using T5 for my current application. There are cases when I need to have
a field's value retain after the request. I know using @Persist it will
work, but I do not want to store so many values in session. I found there
are some samples which use @Retain. By definition, it is said as "By marking
such fields with the Retain annotation, the fields will not be discarded at
the end of the request... This is quite different from Persist, because the
value that's allowed to be retained is not stored persistently; it is simply
not cleared out...".

If it is not cleaned out after the request, when is it cleaned out?

Thanks,

David
-- 
View this message in context: 
http://www.nabble.com/T5%3A-when-is-a-filed-with-%40Retain-cleaned--tp16573382p16573382.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: T4.1.5 / BeanForm 0.7 - component throws exception during render

2008-04-08 Thread lenards

Thank you Andreas!

Quoting Andreas Andreou <[EMAIL PROTECTED]>:


beanform has since moved into tacos
http://tacos.sourceforge.net/tacos4.1/
http://tacos.sourceforge.net/tacos4.1/beanform/index.html

and also into the central maven repo (latest version is 0.9)
http://mirrors.ibiblio.org/pub/mirrors/maven2/net/sf/tacos/beanform-core/0.9/
groupId=net.sf.tacos
artifactId=beanform-core





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



Re: T4.1.5 / BeanForm 0.7 - component throws exception during render

2008-04-08 Thread Andreas Andreou
beanform has since moved into tacos
http://tacos.sourceforge.net/tacos4.1/
http://tacos.sourceforge.net/tacos4.1/beanform/index.html

and also into the central maven repo (latest version is 0.9)
http://mirrors.ibiblio.org/pub/mirrors/maven2/net/sf/tacos/beanform-core/0.9/
groupId=net.sf.tacos
artifactId=beanform-core

On Tue, Apr 8, 2008 at 8:25 PM,  <[EMAIL PROTECTED]> wrote:
> Hi,
>
>  I'm working in Tapestry 4.1.5 trying to get some edit pages using BeanForm.  
> I
>  noticed that there seems to be a version 0.8 of BeanForm out there somewhere.
>  But the sourceforge website downloads only has 0.7 available.
>
>  I followed the walkthrough (provided on the BeanForm's site under 'Component
>  Reference') and was getting the runtime application exception:
>
>  Exception: Unable to lookup $BeanFormButtons_9: $BeanFormButtons_9
>
>  Then I remembered that I forget to persist the pojo on session.  And the 
> runtime
>  application exception changed to this:
>
>  Exception: Unable to lookup $BeanFormButtons_31: $BeanFormButtons_31
>
>  So I went back to the walkthrough and checked off that I did all the steps.
>
>  Then I did that silly thing when I'm stumped - I googled for the two 
> exceptions
>  I was getting and came across a message to this list:
>
>  
> http://72.14.253.104/search?q=cache:uI3GqdsRdG8J:mail-archives.apache.org/mod_mbox/tapestry-users/200708.mbox/%253CC2C75972-4DF6-41EF-80F8-0D2AEBF04F9F%40gmail.com%253E+Exception:+Unable+to+lookup+%24BeanFormButtons_31:+%24BeanFormButtons_31&hl=en&ct=clnk&cd=1&gl=us&client=firefox-a
>  (I'm linking to the Google Cache because I couldn't get the Apache Lists 
> site to
>  load)
>
>  I appear to be having the same problem that Goeff Callender was getting (e.g.
>  that my stack trace looks like his, and that I had gotten each of the 
> Exception
>  messages mentioned in the post).
>
>  I wasn't able to see a solution to this.  I've been on Tapestry list for a 
> week
>  and I see how accurately and quickly questions are answers - so I figured 
> there
>  has to be a solution (and it's likely something silly and stupid on my part).
>
>  Does anyone remember the resolution to this?
>
>  Thanks!
>
>  Andy
>
>  /
>   * @author:  Andrew Lenards
>   * @email:   [EMAIL PROTECTED]
>   * @title:   Systems Programmer, Principal
>   * @project: Tree of Life Web Project
>   * @website: http://tolweb.org/
>   * @dept:Dept. of Entomology
>   * @school:  University of Arizona
>   * @geo-loc: Tucson, AZ 85721
>   ***/
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Andreas Andreou - [EMAIL PROTECTED] - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting

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



[T5] Zone within Form (component dynamically adding form components)

2008-04-08 Thread Peter Beshai
I have a component that will be used to edit a list in a form. It has the
ability to add/remove items from the list and when it adds one, fields to
edit the new item become available. I would like to have the add action be
asynchronous so that any other edited fields in the form do not get reset
when the user clicks add, so I figure I will need to use the zone component.

I thought it would make sense for the component itself to provide a zone
that it will handle updating all on its own, but when I try having a zone
inside a form I get (when I click add):

[ERROR] RequestExceptionHandler> Processing of request failed with uncaught
exception: Render queue error in
SetupRender[test/Sandbox:listbeaneditor.beaneditor]: No object of type
org.apache.tapestry.services.FormSupport is available from the Environment.
Available types are org.apache.tapestry.PageRenderSupport,
org.apache.tapestry.ValidationDecorator,
org.apache.tapestry.internal.services.ClientBehaviorSupport,
org.apache.tapestry.services.Heartbeat.


It seems to work when I have a zone around the form and pass that zone as a
parameter to the component, but I would ideally have this component used as
a block in AppPropertyEditBlocks, which I don't think allows me to pass in
the zone as a parameter. Plus, by having a zone around the entire form, the
entire form gets refreshed instead of just this one section.

Does anybody know a solution to this problem?

Peter Beshai


Re: 答复: Why it convert my path

2008-04-08 Thread Thiago HP
On 4/8/08, Chris Lewis <[EMAIL PROTECTED]> wrote:
> If I'm understanding you, it seems that your problem is getting the path
>  (url) for asset files like JS and CSS. DO NOT hard code these in
>  templates! Use the @IncludeJavaScriptLibrary and @IncludeStylesheet
>  annotations on the page class, and that's it.

Another option is using something like
${asset:context:/css/style.css}. Tapestry will always output the
correct path.

-- 
Thiago

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



BeginRender/etc for zones

2008-04-08 Thread Fernando Padilla
So.. is there such a thing as the render life cycle for the 
Ajax/Zone/FormZone renderings? (setupRender, beginRender, etc)



I am just lucky that I have a Form within my Zone, so I get a 
"prepareForRender" callback, that I can setup the state for the Zone 
rendering..


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



T5: PageTester example broken

2008-04-08 Thread Zheng, Xiahong
Example fails to compile due to the missing "Element.getChildText()"
method. It's probably removed from 5.0.11 release. What is the
replacement for this method?

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



T4.1.5 / BeanForm 0.7 - component throws exception during render

2008-04-08 Thread lenards
Hi,

I'm working in Tapestry 4.1.5 trying to get some edit pages using BeanForm.  I
noticed that there seems to be a version 0.8 of BeanForm out there somewhere.
But the sourceforge website downloads only has 0.7 available.

I followed the walkthrough (provided on the BeanForm's site under 'Component
Reference') and was getting the runtime application exception:

Exception: Unable to lookup $BeanFormButtons_9: $BeanFormButtons_9

Then I remembered that I forget to persist the pojo on session.  And the runtime
application exception changed to this:

Exception: Unable to lookup $BeanFormButtons_31: $BeanFormButtons_31

So I went back to the walkthrough and checked off that I did all the steps.

Then I did that silly thing when I'm stumped - I googled for the two exceptions
I was getting and came across a message to this list:

http://72.14.253.104/search?q=cache:uI3GqdsRdG8J:mail-archives.apache.org/mod_mbox/tapestry-users/200708.mbox/%253CC2C75972-4DF6-41EF-80F8-0D2AEBF04F9F%40gmail.com%253E+Exception:+Unable+to+lookup+%24BeanFormButtons_31:+%24BeanFormButtons_31&hl=en&ct=clnk&cd=1&gl=us&client=firefox-a
(I'm linking to the Google Cache because I couldn't get the Apache Lists site to
load)

I appear to be having the same problem that Goeff Callender was getting (e.g.
that my stack trace looks like his, and that I had gotten each of the Exception
messages mentioned in the post).

I wasn't able to see a solution to this.  I've been on Tapestry list for a week
and I see how accurately and quickly questions are answers - so I figured there
has to be a solution (and it's likely something silly and stupid on my part).

Does anyone remember the resolution to this?

Thanks!

Andy

/
 * @author:  Andrew Lenards
 * @email:   [EMAIL PROTECTED]
 * @title:   Systems Programmer, Principal
 * @project: Tree of Life Web Project
 * @website: http://tolweb.org/
 * @dept:Dept. of Entomology
 * @school:  University of Arizona
 * @geo-loc: Tucson, AZ 85721
 ***/


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



Re: How to override a service create with @Marker

2008-04-08 Thread Robin Helgelin
On Tue, Apr 8, 2008 at 7:07 PM, Dave Dombrosky <[EMAIL PROTECTED]> wrote:
> Is there still no solution to this problem?  I am also trying to
>  override the default SaltSource, but the tapestry5-acegi package
>  always wants to use the one it defines.
>
>  I tried using contributions to Alias and AliasOverrides, and also
>  annotating my own buildMySaltSource() method with
>  @Marker(AcegiServices.class), but nothing seems to work.

Yes, I'll have a solution for this, I'll have a new 1.0.4-SNAPSHOT out
in a day or two that fixes this.

-- 
 regards,
 Robin

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



Re: How to override a service create with @Marker

2008-04-08 Thread Dave Dombrosky
Is there still no solution to this problem?  I am also trying to
override the default SaltSource, but the tapestry5-acegi package
always wants to use the one it defines.

I tried using contributions to Alias and AliasOverrides, and also
annotating my own buildMySaltSource() method with
@Marker(AcegiServices.class), but nothing seems to work.

I can get the two services to conflict and throw the following error,
but this is as far as I've gotten:

Exception constructing service 'DaoAuthenticationProvider': Error
invoking service builder method
nu.localhost.tapestry.acegi.services.SecurityModule.buildDaoAuthenticationProvider(UserDetailsService,
PasswordEncoder, SaltSource) (at SecurityModule.java:267) (for service
'DaoAuthenticationProvider'): Unable to locate a single service
assignable to type org.acegisecurity.providers.dao.SaltSource with
marker annotation nu.localhost.tapestry.acegi.services.AcegiServices.

-Dave

On Fri, Mar 21, 2008 at 5:04 AM, Christian Gorbach <[EMAIL PROTECTED]> wrote:
>
>  hmm.
>  I'm also interested in a solution for this issue..
>  anyone?
>  c)hristian
>
>
>
>
>
>
>  Robin Helgelin wrote:
>  >
>  > Any help on this? Howard?
>  >
>  > On Sun, Mar 16, 2008 at 12:16 PM, Robin Helgelin <[EMAIL PROTECTED]> wrote:
>  >> Hi,
>  >>
>  >>  This is my SaltSource service from tapestry5-acegi package.
>  >>
>  >> @Marker(AcegiServices.class)
>  >> public static SaltSource buildSaltSource(@Inject
>  >>  @Value("${acegi.password.salt}") final String salt) {
>  >> SystemWideSaltSource s = new SystemWideSaltSource();
>  >> s.setSystemWideSalt(salt);
>  >> return s;
>  >> }
>  >>
>  >>  How do I go ahead a create an alias override for that? This code from
>  >>  my example application seemed to work before I added the @Marker
>  >>  annotation.
>  >>
>  >> public static void bind(ServiceBinder binder) {
>  >> binder.bind(SaltSource.class,
>  >>  SaltSourceImpl.class).withId("MySaltSource");
>  >> }
>  >>
>  >> public static SaltSource buildMySaltSource() throws Exception {
>  >> SaltSourceImpl saltSource = new SaltSourceImpl();
>  >> saltSource.setSystemWideSalt("ANOTHERBEEFYSALT");
>  >> saltSource.afterPropertiesSet();
>  >> return saltSource;
>  >> }
>  >>
>  >> public static void contributeAlias(@InjectService("MySaltSource")
>  >>  SaltSource saltSource,
>  >> Configuration configuration) {
>  >> configuration.add(AliasContribution.create(SaltSource.class,
>  >>  saltSource));
>  >> }
>  >>
>  >>
>  >>  --
>  >>   regards,
>  >>   Robin
>  >>
>  >
>  >
>  >
>  > --
>  >  regards,
>  >  Robin
>  >
>  > -
>  > To unsubscribe, e-mail: [EMAIL PROTECTED]
>  > For additional commands, e-mail: [EMAIL PROTECTED]
>  >
>  >
>  >
>
>  --
>  View this message in context: 
> http://www.nabble.com/How-to-override-a-service-create-with-%40Marker-tp16077914p16194944.html
>  Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



RE: [T5] Need AppPropertyEditBlocks to reload page-load values

2008-04-08 Thread Jonathan Barker

pageLoaded() is something that may only happen once for many, many requests.

You might want to move it to pageAttached which will move it to per-request.
Also, check out the @Cached annotation that you could apply to the
getAllCategories() function if it is used more than once in a request.


> -Original Message-
> From: Peter Beshai [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, April 08, 2008 11:01 AM
> To: Tapestry User Mailing List
> Subject: Re: [T5] Need AppPropertyEditBlocks to reload page-load values
> 
> My current workaround it to just grab from the database on every
> getAllCategories() call and get rid of the pageLoaded method. I'd be
> interested to hear if there are any different approaches.
> 
> Peter Beshai
> 
> On Tue, Apr 8, 2008 at 10:51 AM, Peter Beshai <[EMAIL PROTECTED]>
> wrote:
> 
> > I have a block in my AppPropertyEditBlocks that grabs a list of data
> from
> > the database, which works fine. The problem happens if I modify what
> should
> > be in that list (say I add another row to the db), the edit block
> doesn't
> > update it's list. I currently am populating the list in the pageLoaded
> > method:
> >
> > void pageLoaded()
> > {
> > _allCategories = _categoryDAO.findAll();
> > }
> >
> > Any idea what I can do to fix this?
> >
> > Peter Beshai
> >


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



Re: [T5] Need AppPropertyEditBlocks to reload page-load values

2008-04-08 Thread Peter Beshai
Thanks Robert, I was unaware of the Cached annotation.

Peter

On Tue, Apr 8, 2008 at 11:13 AM, Robert Zeigler <[EMAIL PROTECTED]> wrote:

> This is the expected behavior for pageLoaded. See:
>
> http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/apache/tapestry/annotations/PageLoaded.html
> In particular:
> "This is useful for one-time component initializations..."
>
> How about using the @Cached annotation on the getAllCategories() method?
> I haven't used @Cached, personally, but my understanding of it is that it
> caches the results on first call to the method, for that particular request.
> On next request, the results will once again be refreshed, and the new
> results cached for that render.  You get the benefit of decreased overhead
> (you're not hitting the db every time getAllCategories() is called),
> and you still get the most up to date dataset.
>
> Cheers,
>
> Robert
>
>
> On Apr 8, 2008, at 4/810:01 AM , Peter Beshai wrote:
>
> > My current workaround it to just grab from the database on every
> > getAllCategories() call and get rid of the pageLoaded method. I'd be
> > interested to hear if there are any different approaches.
> >
> > Peter Beshai
> >
> > On Tue, Apr 8, 2008 at 10:51 AM, Peter Beshai <[EMAIL PROTECTED]>
> > wrote:
> >
> >  I have a block in my AppPropertyEditBlocks that grabs a list of data
> > > from
> > > the database, which works fine. The problem happens if I modify what
> > > should
> > > be in that list (say I add another row to the db), the edit block
> > > doesn't
> > > update it's list. I currently am populating the list in the pageLoaded
> > > method:
> > >
> > > void pageLoaded()
> > > {
> > >   _allCategories = _categoryDAO.findAll();
> > > }
> > >
> > > Any idea what I can do to fix this?
> > >
> > > Peter Beshai
> > >
> > >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


RE: T5: Using expression language in If component

2008-04-08 Thread Jonathan Barker

There is also a binding for OGNL in tapestry5-components.  I did see some
odd behavior that may have been caching results that should not be cached,
but it has been useful to me.

http://213.160.23.119:8080/t5components/t5c-commons/howto_ognlbinding.html


It's something I missed from T4.



> -Original Message-
> From: Joshua Jackson [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, April 08, 2008 9:44 AM
> To: Tapestry users
> Subject: Re: T5: Using expression language in If component
> 
> Thanks for the confirmation Igor :)
> 
> On 4/8/08, Igor Drobiazko <[EMAIL PROTECTED]> wrote:
> > Nope. But you can try the Tacos Seam integration. There is a binding for
> EL.
> > See the last section here:
> > http://tacos.sourceforge.net/tacos5/tacos-seam/bijection.html
> >
> > On Tue, Apr 8, 2008 at 1:55 PM, Joshua Jackson <[EMAIL PROTECTED]>
> > wrote:
> >
> > > Dear all,
> > >
> > > Is it possible to use expression language with If component as in JSP?
> > >
> > > Thanks in advance
> 
> --
> Let's show the world what we've got.
> 
> Blog: http://joshuajava.wordpress.com/
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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



Re: [T5] Need AppPropertyEditBlocks to reload page-load values

2008-04-08 Thread Robert Zeigler

This is the expected behavior for pageLoaded. See:
http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/apache/tapestry/annotations/PageLoaded.html
In particular:
"This is useful for one-time component initializations..."

How about using the @Cached annotation on the getAllCategories() method?
I haven't used @Cached, personally, but my understanding of it is that  
it caches the results on first call to the method, for that particular  
request.
On next request, the results will once again be refreshed, and the new  
results cached for that render.  You get the benefit of decreased  
overhead (you're not hitting the db every time getAllCategories() is  
called),

and you still get the most up to date dataset.

Cheers,

Robert

On Apr 8, 2008, at 4/810:01 AM , Peter Beshai wrote:

My current workaround it to just grab from the database on every
getAllCategories() call and get rid of the pageLoaded method. I'd be
interested to hear if there are any different approaches.

Peter Beshai

On Tue, Apr 8, 2008 at 10:51 AM, Peter Beshai <[EMAIL PROTECTED]>
wrote:

I have a block in my AppPropertyEditBlocks that grabs a list of  
data from
the database, which works fine. The problem happens if I modify  
what should
be in that list (say I add another row to the db), the edit block  
doesn't
update it's list. I currently am populating the list in the  
pageLoaded

method:

void pageLoaded()
{
   _allCategories = _categoryDAO.findAll();
}

Any idea what I can do to fix this?

Peter Beshai




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



T5 : session timeout

2008-04-08 Thread Stephane Decleire

Hi,

I would like to know how do you handle session timeout with T5 or if 
there is a "design pattern" for this case.
When a session timeout occurs, a lot of pages won't work because of a 
lack of data (for example, normaly setted before returning the page). So 
i need to write a piece of code in the activation event of almost of my 
pages. In T4, i would have writen it in a parent page and would have 
subclassed all the pages from it. In T5 should i consider writing a 
mixin or something else ?


Thanks in advance.

Stephane


Re: [T5] Need AppPropertyEditBlocks to reload page-load values

2008-04-08 Thread Peter Beshai
My current workaround it to just grab from the database on every
getAllCategories() call and get rid of the pageLoaded method. I'd be
interested to hear if there are any different approaches.

Peter Beshai

On Tue, Apr 8, 2008 at 10:51 AM, Peter Beshai <[EMAIL PROTECTED]>
wrote:

> I have a block in my AppPropertyEditBlocks that grabs a list of data from
> the database, which works fine. The problem happens if I modify what should
> be in that list (say I add another row to the db), the edit block doesn't
> update it's list. I currently am populating the list in the pageLoaded
> method:
>
> void pageLoaded()
> {
> _allCategories = _categoryDAO.findAll();
> }
>
> Any idea what I can do to fix this?
>
> Peter Beshai
>


Re: T5 : Strange exception ...

2008-04-08 Thread Stephane Decleire
Thanks to both of you, i don't know why but i used to see enums more as 
constants declarations than as "classic" Java classes.


Howard Lewis Ship a écrit :

If ManagerStates is an enum, it does not belong in the components
package. It should be moved out to a more general package, such as
com.mycompany.data.  Anything under the components package is handled
specially by Tapestry.

On Tue, Apr 8, 2008 at 6:12 AM, Stephane Decleire
<[EMAIL PROTECTED]> wrote:
  

Sorry Ted but i don't see any non component in my component package ...

 Ted Steen a écrit :





You shouldn't put non components under the components package.
If you do that Tapestry will do runtime class instrumentation on the
class and you will end up with exceptions like that.
Atleast this is what I think.

Maybe we could check this and show a more human readable error message?

Hope it helps!
/Ted

2008/4/8, Stephane Decleire <[EMAIL PROTECTED]>:


  

Has anybody already get such a strange exception ?

org.apache.tapestry.ioc.internal.util.TapestryException
:
 com.mycompany.components.accounts.ManagerStates cannot be
cast to com.mycompany.components.accounts.ManagerStates

 ???

 My ManagerStates class is an enum and here is the stack trace :

  *



com.mycompany.components.accounts.Manager.containingPageDidAttach(Manager.java)


  *



org.apache.tapestry.internal.structure.ComponentPageElementImpl$2.run(ComponentPageElementImpl.java:71)


  *



org.apache.tapestry.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:874)


  *



org.apache.tapestry.internal.structure.ComponentPageElementImpl.containingPageDidAttach(ComponentPageElementImpl.java:706)


  *



org.apache.tapestry.internal.structure.PageImpl.attached(PageImpl.java:146)


  *



org.apache.tapestry.internal.services.RequestPageCacheImpl.get(RequestPageCacheImpl.java:45)


  *



org.apache.tapestry.internal.services.ComponentSourceImpl.getPage(ComponentSourceImpl.java:51)


  *



com.mycompany.accounts.services.impl.AccessController.checkAccess(AccessController.java:88)


  *



com.mycompany.accounts.services.impl.AccessController.dispatch(AccessController.java:77)


  *



org.apache.tapestry.services.TapestryModule$13.service(TapestryModule.java:955)


  *
com.mycompany.services.AppModule$1.service(AppModule.java:96)
  *



org.apache.tapestry.internal.services.LocalizationFilter.service(LocalizationFilter.java:42)


  *



org.apache.tapestry.services.TapestryModule$3.service(TapestryModule.java:564)


  *



org.apache.tapestry.services.TapestryModule$2.service(TapestryModule.java:515)


  *



org.apache.tapestry.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:79)


  *



org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:93)


  *



org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:84)


  *



org.apache.tapestry.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:77)


  *



org.apache.tapestry.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:106)


  *



org.apache.tapestry.services.TapestryModule$12.service(TapestryModule.java:935)


  *



org.apache.tapestry.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)


  *
org.apache.tapestry.TapestryFilter.doFilter(TapestryFilter.java:168)
  *



org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)


  *



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


  *



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


  *



org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)


  *



org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471)


  *
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
  *
org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
  *



org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)


  *
org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
  *
org.mortbay.http.HttpServer.service(HttpServer.java:909)
  *
org.mortbay.http.HttpConnection.service(HttpConnection.java:820)
  *
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:986)
  *
org.mortbay.http.HttpConnection.handle(HttpConnection.java:837)
  *



org.mortbay.h

Re: T5: Base class java.text.Format (super class of my.package.MyFormat) is not in a controlled package

2008-04-08 Thread nille hammer
Hi Jack,

>> my.package.tapestry.pages.util.MyFormat
Putting a none page class into the page package is a bad idea! Only Page 
classes should go into the pages package. If you just need a custom Format move 
it to some other package (excluding pages, components, base and services). If 
you want to inject your format into other objects put it into the services 
subpackage and either write a build-Method in AppModule or use autobuild 
(http://tapestry.apache.org/tapestry5/tapestry-ioc/service.html).

Greetz nillehammer

- original Nachricht 

Betreff: T5: Base class java.text.Format (super class of my.package.MyFormat) 
is not in a controlled package
Gesendet: Di, 08. Apr 2008
Von: Jack Nuzbit<[EMAIL PROTECTED]>

> Hi All,
> 
> I'm trying to use a custom Format object with the output component but I'm
> getting the following exception:
> 
> Caused by: java.lang.RuntimeException: Base class java.text.Format (super
> class of my.package.tapestry.pages.util.MyFormat) is not in a controlled
> package and is therefore not valid. You should try moving the class to
> package my.package.tapestry.base.
> at
> org.apache.tapestry.internal.services.ComponentClassTransformerImpl.transfor
> mComponentClass(ComponentClassTransformerImpl.java:126)
> at
> $ComponentClassTransformer_1192e553582.transformComponentClass($ComponentCla
> ssTransformer_1192e553582.java)
> at
> org.apache.tapestry.internal.services.ComponentInstantiatorSourceImpl.onLoad
> (ComponentInstantiatorSourceImpl.java:166)
> at javassist.Loader.findClass(Loader.java:340)
> 
> Does anyone have any experience with this? Does tapestry 5 not support
> custom Format objects and if so is there any reason for this?
> 
> Many thanks,
> 
> Jack
> 

--- original Nachricht Ende 


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



[T5] Need AppPropertyEditBlocks to reload page-load values

2008-04-08 Thread Peter Beshai
I have a block in my AppPropertyEditBlocks that grabs a list of data from
the database, which works fine. The problem happens if I modify what should
be in that list (say I add another row to the db), the edit block doesn't
update it's list. I currently am populating the list in the pageLoaded
method:

void pageLoaded()
{
_allCategories = _categoryDAO.findAll();
}

Any idea what I can do to fix this?

Peter Beshai


T5: Base class java.text.Format (super class of my.package.MyFormat) is not in a controlled package

2008-04-08 Thread Jack Nuzbit
Hi All,

I'm trying to use a custom Format object with the output component but I'm
getting the following exception:

Caused by: java.lang.RuntimeException: Base class java.text.Format (super
class of my.package.tapestry.pages.util.MyFormat) is not in a controlled
package and is therefore not valid. You should try moving the class to
package my.package.tapestry.base.
at
org.apache.tapestry.internal.services.ComponentClassTransformerImpl.transformComponentClass(ComponentClassTransformerImpl.java:126)
at
$ComponentClassTransformer_1192e553582.transformComponentClass($ComponentClassTransformer_1192e553582.java)
at
org.apache.tapestry.internal.services.ComponentInstantiatorSourceImpl.onLoad(ComponentInstantiatorSourceImpl.java:166)
at javassist.Loader.findClass(Loader.java:340)

Does anyone have any experience with this? Does tapestry 5 not support
custom Format objects and if so is there any reason for this?

Many thanks,

Jack


Re: Page Name Problem

2008-04-08 Thread Adam Zimowski
Not only on/off but ability to contribute some sort of exclusion set
would be nice. In this case:

set.add("pe");

Or perhaps a regular expression?

-adam

On Tue, Apr 8, 2008 at 9:01 AM, Marcelo Lotif <[EMAIL PROTECTED]> wrote:
> Just a suggestion
>  I think this feature should have an "on/off" switch somewhere (AppModule?).
>  This is a very nice and useful feature, but it tricks me up sometimes...
>
>  2008/4/8, Chris Lewis <[EMAIL PROTECTED]>:
>
>
> >
>  > Unfortunately that's a feature and not a bug. See here:
>  >
>  > 
> http://tapestry.apache.org/tapestry5/tapestry-core/guide/component-classes.html
>  > ,
>  > the section named "Sub-Folders / Sub-Packages":
>  >
>  > "Tapestry performs some simple optimizations of the logical page name
>  > (or component type, or mixin type). It checks to see if the package name
>  > is either a prefix or a suffix of the unqualified class name (case
>  > insensitively, of course) and removes the prefix or suffix if so. The
>  > net result is that a class name such as
>  > com.example.myapp.pages.user.EditUser will have a page name of user/Edit
>  > (not user/EditUser). The goal here is to provide shorter, more natural
>  > URLs."
>  >
>  > So what's happening is T5 sees 'pe' as a package, and therefore removes
>  > it from 'person,' resulting in the nonsensical name 'pe/rson.' I'm not a
>  > fan of this behavior, especially since I don't believe it's configurable
>  > (perhaps some magic contribution via module).
>  >
>  > good luck
>  >
>  > chris
>  >
>  >
>  > Peter Stavrinides wrote:
>  > > Hi
>  > >
>  > > I have a small issue with a page name returning incorrectly...
>  > >
>  > > My URL looks like this:
>  > > http://mysite/myapp/pe/person/34687
>  > >
>  > > @Inject
>  > > private ComponentResources resources_;
>  > >
>  > > String nameRaw = resources_.getPageName();
>  > > gives me: "pe/rson" instead of "person"
>  > >
>  > > What am I doing wrong here?
>  > >
>  > > Thanks
>  > > Peter
>  > >
>  > > -
>  > > To unsubscribe, e-mail: [EMAIL PROTECTED]
>  > > For additional commands, e-mail: [EMAIL PROTECTED]
>  > >
>  > >
>  >
>  >
>  > --
>  > http://thegodcode.net
>  >
>  >
>  >
>  > -
>  > To unsubscribe, e-mail: [EMAIL PROTECTED]
>  > For additional commands, e-mail: [EMAIL PROTECTED]
>  >
>  >
>
>
>  --
>  Atenciosamente,
>  Marcelo Lotif
>

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



Re: Page Name Problem

2008-04-08 Thread Marcelo Lotif
Just a suggestion
I think this feature should have an "on/off" switch somewhere (AppModule?).
This is a very nice and useful feature, but it tricks me up sometimes...

2008/4/8, Chris Lewis <[EMAIL PROTECTED]>:
>
> Unfortunately that's a feature and not a bug. See here:
>
> http://tapestry.apache.org/tapestry5/tapestry-core/guide/component-classes.html
> ,
> the section named "Sub-Folders / Sub-Packages":
>
> "Tapestry performs some simple optimizations of the logical page name
> (or component type, or mixin type). It checks to see if the package name
> is either a prefix or a suffix of the unqualified class name (case
> insensitively, of course) and removes the prefix or suffix if so. The
> net result is that a class name such as
> com.example.myapp.pages.user.EditUser will have a page name of user/Edit
> (not user/EditUser). The goal here is to provide shorter, more natural
> URLs."
>
> So what's happening is T5 sees 'pe' as a package, and therefore removes
> it from 'person,' resulting in the nonsensical name 'pe/rson.' I'm not a
> fan of this behavior, especially since I don't believe it's configurable
> (perhaps some magic contribution via module).
>
> good luck
>
> chris
>
>
> Peter Stavrinides wrote:
> > Hi
> >
> > I have a small issue with a page name returning incorrectly...
> >
> > My URL looks like this:
> > http://mysite/myapp/pe/person/34687
> >
> > @Inject
> > private ComponentResources resources_;
> >
> > String nameRaw = resources_.getPageName();
> > gives me: "pe/rson" instead of "person"
> >
> > What am I doing wrong here?
> >
> > Thanks
> > Peter
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> http://thegodcode.net
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Atenciosamente,
Marcelo Lotif


Re: T5: Using expression language in If component

2008-04-08 Thread Joshua Jackson
Thanks for the confirmation Igor :)

On 4/8/08, Igor Drobiazko <[EMAIL PROTECTED]> wrote:
> Nope. But you can try the Tacos Seam integration. There is a binding for EL.
> See the last section here:
> http://tacos.sourceforge.net/tacos5/tacos-seam/bijection.html
>
> On Tue, Apr 8, 2008 at 1:55 PM, Joshua Jackson <[EMAIL PROTECTED]>
> wrote:
>
> > Dear all,
> >
> > Is it possible to use expression language with If component as in JSP?
> >
> > Thanks in advance

-- 
Let's show the world what we've got.

Blog: http://joshuajava.wordpress.com/

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



Re: T5: Using expression language in If component

2008-04-08 Thread Igor Drobiazko
Nope. But you can try the Tacos Seam integration. There is a binding for EL.
See the last section here:
http://tacos.sourceforge.net/tacos5/tacos-seam/bijection.html

On Tue, Apr 8, 2008 at 1:55 PM, Joshua Jackson <[EMAIL PROTECTED]>
wrote:

> Dear all,
>
> Is it possible to use expression language with If component as in JSP?
>
> Thanks in advance
>
> --
> Let's show the world what we've got.
>
> Blog: http://joshuajava.wordpress.com/
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Best regards,

Igor Drobiazko


RE: 答复: from T5.0.11 to T5.0.6

2008-04-08 Thread Jonathan Barker
Rob, 

If the world is going to pass you by, you should at least be comfortable.
Enjoy that chair!

Jonathan


> -Original Message-
> From: Rob Smeets [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, April 08, 2008 5:18 AM
> To: Tapestry users
> Subject: Re: 答复: from T5.0.11 to T5.0.6
> 
> When I see these kinds of issues, all what I do is lean back in my nice,
> soft and comfortable chair and LOL!!! Welcome to the harsh reality world
> of
> Tapestry! Imagine when Tapestry 6 comes out- you'll shed bloody tears :-)
> 
> Cheers,
> Rob
> 
> 2008/4/8 Natia Gdzelishvili <[EMAIL PROTECTED]>:
> 
> > i change version because i had problem:
> > AddCelebrity.tml
> > 
> >
> > AddCelebrity.java
> > public class AddCelebrity {
> >@Persist
> >private Celebrity celebrity;
> >
> >public Celebrity getCelebrity() {
> >return celebrity;
> >}
> >
> >public void setCelebrity(Celebrity celebrity) {
> >this.celebrity = celebrity;
> >}
> >
> > }
> >
> > Celebrity.java
> > public class Celebrity {
> >private long id;
> >private String firstName;
> >private String lastName;
> >private Date dateOfBirth;
> >private Occupation occupation;
> >private String biography;
> >private boolean birthDateVerified;
> >
> >public Celebrity() {
> >}
> >
> >public Celebrity(String firstName, String lastName,Date dateOfBirth,
> >Occupation occupation) {
> >this.firstName = firstName;
> >this.lastName = lastName;
> >this.dateOfBirth = Formats.parseDate("12/02/1981");
> >this.occupation = occupation;
> >}
> > 
> > setter and getter methods
> > }
> >
> > I  was using tapestry 5.0.10 everything worked fine, but when I upgraded
> > application to 5.0.11 I'm getting error:
> >
> > org.apache.tapestry.internal.services.RenderQueueException Render queue
> > error in SetupRender[AddCelebrity:celebrity.editor]: Exception
> > instantiating
> > instance of ge.bog.celebrities.entity.Celebrity (for component
> > 'AddCelebrity:celebrity.editor'): Error invoking constructor
> > ge.bog.celebrities.entity.Celebrity(String, String, Date, Occupation)
> (at
> > Celebrity.java:35) (for service 'BeanModelSource'): No service
> implements
> > the interface java.util.Date.
> > ...
> > java.lang.RuntimeException No service implements the interface
> > java.util.Date.
> > and no one answered , i was stucked, and i preferred to go back to old
> > version
> >
> >
> > 2008/4/8 Michael Gerzabek <[EMAIL PROTECTED]>:
> >
> > > Natia Gdzelishvili schrieb:
> > > > can anyone help..
> > > >
> > > Try this:
> > >
> > > 1. *Use T5.0.11*, it's the latest stable release, also voted beta from
> > > dev team. There is not a single reason why you would use 5.0.6. You
> even
> > > can continue using the book. There are only very few things that
> changed
> > > from 5.0.6 to 5.0.11. You can find those things when you double check
> > > the release notes [1] that are on the T5 homepage and the upgrade
> notes
> > > [2] that are on the nightly builds website. Sounds a lot read but is
> > > really fast forward.
> > >
> > > 2. use the extension .tml for your template files
> > > 3. put your templates either on your context root, which is
> > > YOUR_PROJECT/src/main/webapp if you used the maven archetype, or put
> > > them into your resources package, which is
> > > YOUR_PROJECT/src/main/resources/YOUR_JAVA_PACKAGE/PAGENAME.tml. The
> > > preferred option is to put your templates in your resources section.
> > > More info on this can be found in the online documentation in the
> > > section project layout [3].
> > > 4. restart jetty
> > >
> > > now everything should be fine.
> > > Regards,
> > > Michael
> > >
> > > [1] http://tapestry.apache.org/tapestry5/release-notes.html
> > > [2]
> > > http://tapestry.formos.com/nightly/tapestry5/tapestry-
> core/upgrade.html
> > > [3]
> > >
> > >
> > http://tapestry.formos.com/nightly/tapestry5/tapestry-
> core/guide/project-layout.html
> > >
> > >
> > > -
> > > 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: 答复: from T5.0.11 to T5.0.6

2008-04-08 Thread Ted Steen
Are you aware of the fact that T5 is alpha software?
And open source for that matter, feel free to contribute...

2008/4/8, Rob Smeets <[EMAIL PROTECTED]>:
> Of course with T5.0.6- even within different versions of T5 there is no
>  backward compatibility. What a pity!
>
>  Rob
>
>  2008/4/8 Ted Steen <[EMAIL PROTECTED]>:
>
>
>  > Good to hear!
>  > With T5.0.6 or T5.0.11?
>  >
>  > 2008/4/8, Natia Gdzelishvili <[EMAIL PROTECTED]>:
>  > > I've made new project and add my classes and now every thing work
>  > >
>  > >
>  > >  2008/4/8 Natia Gdzelishvili <[EMAIL PROTECTED]>:
>  > >
>  > >
>  > > > i change version because i had problem:
>  > >  > AddCelebrity.tml
>  > >  > 
>  > >  >
>  > >  > AddCelebrity.java
>  > >  > public class AddCelebrity {
>  > >  > @Persist
>  > >  > private Celebrity celebrity;
>  > >  >
>  > >  > public Celebrity getCelebrity() {
>  > >  > return celebrity;
>  > >  > }
>  > >  >
>  > >  > public void setCelebrity(Celebrity celebrity) {
>  > >  > this.celebrity = celebrity;
>  > >  > }
>  > >  >
>  > >  > }
>  > >  >
>  > >  > Celebrity.java
>  > >  > public class Celebrity {
>  > >  > private long id;
>  > >  > private String firstName;
>  > >  > private String lastName;
>  > >  > private Date dateOfBirth;
>  > >  > private Occupation occupation;
>  > >  > private String biography;
>  > >  > private boolean birthDateVerified;
>  > >  >
>  > >  > public Celebrity() {
>  > >  > }
>  > >  >
>  > >  > public Celebrity(String firstName, String lastName,Date
>  > dateOfBirth,
>  > >  > Occupation occupation) {
>  > >  > this.firstName = firstName;
>  > >  > this.lastName = lastName;
>  > >  > this.dateOfBirth = Formats.parseDate("12/02/1981");
>  > >  > this.occupation = occupation;
>  > >  > }
>  > >  > 
>  > >  > setter and getter methods
>  > >  > }
>  > >  >
>  > >  > I  was using tapestry 5.0.10 everything worked fine, but when I
>  > upgraded
>  > >  > application to 5.0.11 I'm getting error:
>  > >  >
>  > >  > org.apache.tapestry.internal.services.RenderQueueException Render
>  > queue
>  > >  > error in SetupRender[AddCelebrity:celebrity.editor]: Exception
>  > instantiating
>  > >  > instance of ge.bog.celebrities.entity.Celebrity (for component
>  > >  > 'AddCelebrity:celebrity.editor'): Error invoking constructor
>  > >  > ge.bog.celebrities.entity.Celebrity(String, String, Date, Occupation)
>  > (at
>  > >  > Celebrity.java:35) (for service 'BeanModelSource'): No service
>  > implements
>  > >  > the interface java.util.Date.
>  > >  > ...
>  > >  > java.lang.RuntimeException No service implements the interface
>  > >  > java.util.Date.
>  > >  > and no one answered , i was stucked, and i preferred to go back to
>  > old
>  > >  > version
>  > >  >
>  > >  >
>  > >  > 2008/4/8 Michael Gerzabek <[EMAIL PROTECTED]>:
>  > >  >
>  > >  > Natia Gdzelishvili schrieb:
>  > >  > > > can anyone help..
>  > >  > > >
>  > >  > > Try this:
>  > >  > >
>  > >  > > 1. *Use T5.0.11*, it's the latest stable release, also voted beta
>  > from
>  > >  > > dev team. There is not a single reason why you would use 5.0.6. You
>  > even
>  > >  > > can continue using the book. There are only very few things that
>  > changed
>  > >  > > from 5.0.6 to 5.0.11. You can find those things when you double
>  > check
>  > >  > > the release notes [1] that are on the T5 homepage and the upgrade
>  > notes
>  > >  > > [2] that are on the nightly builds website. Sounds a lot read but
>  > is
>  > >  > > really fast forward.
>  > >  > >
>  > >  > > 2. use the extension .tml for your template files
>  > >  > > 3. put your templates either on your context root, which is
>  > >  > > YOUR_PROJECT/src/main/webapp if you used the maven archetype, or
>  > put
>  > >  > > them into your resources package, which is
>  > >  > > YOUR_PROJECT/src/main/resources/YOUR_JAVA_PACKAGE/PAGENAME.tml. The
>  > >  > > preferred option is to put your templates in your resources
>  > section.
>  > >  > > More info on this can be found in the online documentation in the
>  > >  > > section project layout [3].
>  > >  > > 4. restart jetty
>  > >  > >
>  > >  > > now everything should be fine.
>  > >  > > Regards,
>  > >  > > Michael
>  > >  > >
>  > >  > > [1] http://tapestry.apache.org/tapestry5/release-notes.html
>  > >  > > [2]
>  > >  > >
>  > http://tapestry.formos.com/nightly/tapestry5/tapestry-core/upgrade.html
>  > >  > > [3]
>  > >  > >
>  > >  > >
>  > 
> http://tapestry.formos.com/nightly/tapestry5/tapestry-core/guide/project-layout.html
>  > >  > >
>  > >  > >
>  > >  > >
>  > -
>  > >  > > To unsubscribe, e-mail: [EMAIL PROTECTED]
>  > >  > > For additional commands, e-mail: [EMAIL PROTECTED]
>  > >  > >
>  > >  > >
>  > >  >
>  > >
>  >
>  >
>  > --
>  > /ted
>  >
>  > -

Re: T5 : Strange exception ...

2008-04-08 Thread Howard Lewis Ship
If ManagerStates is an enum, it does not belong in the components
package. It should be moved out to a more general package, such as
com.mycompany.data.  Anything under the components package is handled
specially by Tapestry.

On Tue, Apr 8, 2008 at 6:12 AM, Stephane Decleire
<[EMAIL PROTECTED]> wrote:
> Sorry Ted but i don't see any non component in my component package ...
>
>  Ted Steen a écrit :
>
>
>
> > You shouldn't put non components under the components package.
> > If you do that Tapestry will do runtime class instrumentation on the
> > class and you will end up with exceptions like that.
> > Atleast this is what I think.
> >
> > Maybe we could check this and show a more human readable error message?
> >
> > Hope it helps!
> > /Ted
> >
> > 2008/4/8, Stephane Decleire <[EMAIL PROTECTED]>:
> >
> >
> > > Has anybody already get such a strange exception ?
> > >
> > > org.apache.tapestry.ioc.internal.util.TapestryException
> > > :
> > >  com.mycompany.components.accounts.ManagerStates cannot be
> > > cast to com.mycompany.components.accounts.ManagerStates
> > >
> > >  ???
> > >
> > >  My ManagerStates class is an enum and here is the stack trace :
> > >
> > >   *
> > >
> com.mycompany.components.accounts.Manager.containingPageDidAttach(Manager.java)
> > >   *
> > >
> org.apache.tapestry.internal.structure.ComponentPageElementImpl$2.run(ComponentPageElementImpl.java:71)
> > >   *
> > >
> org.apache.tapestry.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:874)
> > >   *
> > >
> org.apache.tapestry.internal.structure.ComponentPageElementImpl.containingPageDidAttach(ComponentPageElementImpl.java:706)
> > >   *
> > >
> org.apache.tapestry.internal.structure.PageImpl.attached(PageImpl.java:146)
> > >   *
> > >
> org.apache.tapestry.internal.services.RequestPageCacheImpl.get(RequestPageCacheImpl.java:45)
> > >   *
> > >
> org.apache.tapestry.internal.services.ComponentSourceImpl.getPage(ComponentSourceImpl.java:51)
> > >   *
> > >
> com.mycompany.accounts.services.impl.AccessController.checkAccess(AccessController.java:88)
> > >   *
> > >
> com.mycompany.accounts.services.impl.AccessController.dispatch(AccessController.java:77)
> > >   *
> > >
> org.apache.tapestry.services.TapestryModule$13.service(TapestryModule.java:955)
> > >   *
> > > com.mycompany.services.AppModule$1.service(AppModule.java:96)
> > >   *
> > >
> org.apache.tapestry.internal.services.LocalizationFilter.service(LocalizationFilter.java:42)
> > >   *
> > >
> org.apache.tapestry.services.TapestryModule$3.service(TapestryModule.java:564)
> > >   *
> > >
> org.apache.tapestry.services.TapestryModule$2.service(TapestryModule.java:515)
> > >   *
> > >
> org.apache.tapestry.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:79)
> > >   *
> > >
> org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:93)
> > >   *
> > >
> org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:84)
> > >   *
> > >
> org.apache.tapestry.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:77)
> > >   *
> > >
> org.apache.tapestry.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:106)
> > >   *
> > >
> org.apache.tapestry.services.TapestryModule$12.service(TapestryModule.java:935)
> > >   *
> > >
> org.apache.tapestry.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
> > >   *
> > > org.apache.tapestry.TapestryFilter.doFilter(TapestryFilter.java:168)
> > >   *
> > >
> org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
> > >   *
> > >
> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
> > >   *
> > >
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
> > >   *
> > >
> org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
> > >   *
> > >
> org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471)
> > >   *
> > > org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
> > >   *
> > > org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
> > >   *
> > >
> org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
> > >   *
> > > org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
> > >   *
> > > org.mortbay.http.HttpServer.service(HttpServer.java:909)
> > >   *
> > > org.mortbay.http.HttpConnection.service(HttpConnection.java:820)
> > >   *
> > > org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:986)
> > >   *
> > > org.mortbay.http.HttpConnection.handle(HttpConnection.java:837)
> > >   *
> > >
> org.mortbay.http.SocketListener.handleCo

Re: 答复: from T5.0.11 to T5.0.6

2008-04-08 Thread Rob Smeets
Of course with T5.0.6- even within different versions of T5 there is no
backward compatibility. What a pity!

Rob

2008/4/8 Ted Steen <[EMAIL PROTECTED]>:

> Good to hear!
> With T5.0.6 or T5.0.11?
>
> 2008/4/8, Natia Gdzelishvili <[EMAIL PROTECTED]>:
> > I've made new project and add my classes and now every thing work
> >
> >
> >  2008/4/8 Natia Gdzelishvili <[EMAIL PROTECTED]>:
> >
> >
> > > i change version because i had problem:
> >  > AddCelebrity.tml
> >  > 
> >  >
> >  > AddCelebrity.java
> >  > public class AddCelebrity {
> >  > @Persist
> >  > private Celebrity celebrity;
> >  >
> >  > public Celebrity getCelebrity() {
> >  > return celebrity;
> >  > }
> >  >
> >  > public void setCelebrity(Celebrity celebrity) {
> >  > this.celebrity = celebrity;
> >  > }
> >  >
> >  > }
> >  >
> >  > Celebrity.java
> >  > public class Celebrity {
> >  > private long id;
> >  > private String firstName;
> >  > private String lastName;
> >  > private Date dateOfBirth;
> >  > private Occupation occupation;
> >  > private String biography;
> >  > private boolean birthDateVerified;
> >  >
> >  > public Celebrity() {
> >  > }
> >  >
> >  > public Celebrity(String firstName, String lastName,Date
> dateOfBirth,
> >  > Occupation occupation) {
> >  > this.firstName = firstName;
> >  > this.lastName = lastName;
> >  > this.dateOfBirth = Formats.parseDate("12/02/1981");
> >  > this.occupation = occupation;
> >  > }
> >  > 
> >  > setter and getter methods
> >  > }
> >  >
> >  > I  was using tapestry 5.0.10 everything worked fine, but when I
> upgraded
> >  > application to 5.0.11 I'm getting error:
> >  >
> >  > org.apache.tapestry.internal.services.RenderQueueException Render
> queue
> >  > error in SetupRender[AddCelebrity:celebrity.editor]: Exception
> instantiating
> >  > instance of ge.bog.celebrities.entity.Celebrity (for component
> >  > 'AddCelebrity:celebrity.editor'): Error invoking constructor
> >  > ge.bog.celebrities.entity.Celebrity(String, String, Date, Occupation)
> (at
> >  > Celebrity.java:35) (for service 'BeanModelSource'): No service
> implements
> >  > the interface java.util.Date.
> >  > ...
> >  > java.lang.RuntimeException No service implements the interface
> >  > java.util.Date.
> >  > and no one answered , i was stucked, and i preferred to go back to
> old
> >  > version
> >  >
> >  >
> >  > 2008/4/8 Michael Gerzabek <[EMAIL PROTECTED]>:
> >  >
> >  > Natia Gdzelishvili schrieb:
> >  > > > can anyone help..
> >  > > >
> >  > > Try this:
> >  > >
> >  > > 1. *Use T5.0.11*, it's the latest stable release, also voted beta
> from
> >  > > dev team. There is not a single reason why you would use 5.0.6. You
> even
> >  > > can continue using the book. There are only very few things that
> changed
> >  > > from 5.0.6 to 5.0.11. You can find those things when you double
> check
> >  > > the release notes [1] that are on the T5 homepage and the upgrade
> notes
> >  > > [2] that are on the nightly builds website. Sounds a lot read but
> is
> >  > > really fast forward.
> >  > >
> >  > > 2. use the extension .tml for your template files
> >  > > 3. put your templates either on your context root, which is
> >  > > YOUR_PROJECT/src/main/webapp if you used the maven archetype, or
> put
> >  > > them into your resources package, which is
> >  > > YOUR_PROJECT/src/main/resources/YOUR_JAVA_PACKAGE/PAGENAME.tml. The
> >  > > preferred option is to put your templates in your resources
> section.
> >  > > More info on this can be found in the online documentation in the
> >  > > section project layout [3].
> >  > > 4. restart jetty
> >  > >
> >  > > now everything should be fine.
> >  > > Regards,
> >  > > Michael
> >  > >
> >  > > [1] http://tapestry.apache.org/tapestry5/release-notes.html
> >  > > [2]
> >  > >
> http://tapestry.formos.com/nightly/tapestry5/tapestry-core/upgrade.html
> >  > > [3]
> >  > >
> >  > >
> http://tapestry.formos.com/nightly/tapestry5/tapestry-core/guide/project-layout.html
> >  > >
> >  > >
> >  > >
> -
> >  > > 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: T5 : Strange exception ...

2008-04-08 Thread Stephane Decleire

Sorry Ted but i don't see any non component in my component package ...

Ted Steen a écrit :

You shouldn't put non components under the components package.
If you do that Tapestry will do runtime class instrumentation on the
class and you will end up with exceptions like that.
Atleast this is what I think.

Maybe we could check this and show a more human readable error message?

Hope it helps!
/Ted

2008/4/8, Stephane Decleire <[EMAIL PROTECTED]>:
  

Has anybody already get such a strange exception ?

org.apache.tapestry.ioc.internal.util.TapestryException
:
 com.mycompany.components.accounts.ManagerStates cannot be
cast to com.mycompany.components.accounts.ManagerStates

 ???

 My ManagerStates class is an enum and here is the stack trace :

   *
com.mycompany.components.accounts.Manager.containingPageDidAttach(Manager.java)
   *
org.apache.tapestry.internal.structure.ComponentPageElementImpl$2.run(ComponentPageElementImpl.java:71)
   *
org.apache.tapestry.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:874)
   *
org.apache.tapestry.internal.structure.ComponentPageElementImpl.containingPageDidAttach(ComponentPageElementImpl.java:706)
   *
org.apache.tapestry.internal.structure.PageImpl.attached(PageImpl.java:146)
   *
org.apache.tapestry.internal.services.RequestPageCacheImpl.get(RequestPageCacheImpl.java:45)
   *
org.apache.tapestry.internal.services.ComponentSourceImpl.getPage(ComponentSourceImpl.java:51)
   *
com.mycompany.accounts.services.impl.AccessController.checkAccess(AccessController.java:88)
   *
com.mycompany.accounts.services.impl.AccessController.dispatch(AccessController.java:77)
   *
org.apache.tapestry.services.TapestryModule$13.service(TapestryModule.java:955)
   *
com.mycompany.services.AppModule$1.service(AppModule.java:96)
   *
org.apache.tapestry.internal.services.LocalizationFilter.service(LocalizationFilter.java:42)
   *
org.apache.tapestry.services.TapestryModule$3.service(TapestryModule.java:564)
   *
org.apache.tapestry.services.TapestryModule$2.service(TapestryModule.java:515)
   *
org.apache.tapestry.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:79)
   *
org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:93)
   *
org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:84)
   *
org.apache.tapestry.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:77)
   *
org.apache.tapestry.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:106)
   *
org.apache.tapestry.services.TapestryModule$12.service(TapestryModule.java:935)
   *
org.apache.tapestry.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
   *
org.apache.tapestry.TapestryFilter.doFilter(TapestryFilter.java:168)
   *
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
   *
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
   *
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
   *
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
   *
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471)
   *
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
   *
org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
   *
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
   *
org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
   *
org.mortbay.http.HttpServer.service(HttpServer.java:909)
   *
org.mortbay.http.HttpConnection.service(HttpConnection.java:820)
   *
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:986)
   *
org.mortbay.http.HttpConnection.handle(HttpConnection.java:837)
   *
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:245)
   *
org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
   *
org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)

 Thanks in advance

 Stephane




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

  


Re: 答复: from T5.0.11 to T5.0.6

2008-04-08 Thread Ted Steen
Good to hear!
With T5.0.6 or T5.0.11?

2008/4/8, Natia Gdzelishvili <[EMAIL PROTECTED]>:
> I've made new project and add my classes and now every thing work
>
>
>  2008/4/8 Natia Gdzelishvili <[EMAIL PROTECTED]>:
>
>
> > i change version because i had problem:
>  > AddCelebrity.tml
>  > 
>  >
>  > AddCelebrity.java
>  > public class AddCelebrity {
>  > @Persist
>  > private Celebrity celebrity;
>  >
>  > public Celebrity getCelebrity() {
>  > return celebrity;
>  > }
>  >
>  > public void setCelebrity(Celebrity celebrity) {
>  > this.celebrity = celebrity;
>  > }
>  >
>  > }
>  >
>  > Celebrity.java
>  > public class Celebrity {
>  > private long id;
>  > private String firstName;
>  > private String lastName;
>  > private Date dateOfBirth;
>  > private Occupation occupation;
>  > private String biography;
>  > private boolean birthDateVerified;
>  >
>  > public Celebrity() {
>  > }
>  >
>  > public Celebrity(String firstName, String lastName,Date dateOfBirth,
>  > Occupation occupation) {
>  > this.firstName = firstName;
>  > this.lastName = lastName;
>  > this.dateOfBirth = Formats.parseDate("12/02/1981");
>  > this.occupation = occupation;
>  > }
>  > 
>  > setter and getter methods
>  > }
>  >
>  > I  was using tapestry 5.0.10 everything worked fine, but when I upgraded
>  > application to 5.0.11 I'm getting error:
>  >
>  > org.apache.tapestry.internal.services.RenderQueueException Render queue
>  > error in SetupRender[AddCelebrity:celebrity.editor]: Exception 
> instantiating
>  > instance of ge.bog.celebrities.entity.Celebrity (for component
>  > 'AddCelebrity:celebrity.editor'): Error invoking constructor
>  > ge.bog.celebrities.entity.Celebrity(String, String, Date, Occupation) (at
>  > Celebrity.java:35) (for service 'BeanModelSource'): No service implements
>  > the interface java.util.Date.
>  > ...
>  > java.lang.RuntimeException No service implements the interface
>  > java.util.Date.
>  > and no one answered , i was stucked, and i preferred to go back to old
>  > version
>  >
>  >
>  > 2008/4/8 Michael Gerzabek <[EMAIL PROTECTED]>:
>  >
>  > Natia Gdzelishvili schrieb:
>  > > > can anyone help..
>  > > >
>  > > Try this:
>  > >
>  > > 1. *Use T5.0.11*, it's the latest stable release, also voted beta from
>  > > dev team. There is not a single reason why you would use 5.0.6. You even
>  > > can continue using the book. There are only very few things that changed
>  > > from 5.0.6 to 5.0.11. You can find those things when you double check
>  > > the release notes [1] that are on the T5 homepage and the upgrade notes
>  > > [2] that are on the nightly builds website. Sounds a lot read but is
>  > > really fast forward.
>  > >
>  > > 2. use the extension .tml for your template files
>  > > 3. put your templates either on your context root, which is
>  > > YOUR_PROJECT/src/main/webapp if you used the maven archetype, or put
>  > > them into your resources package, which is
>  > > YOUR_PROJECT/src/main/resources/YOUR_JAVA_PACKAGE/PAGENAME.tml. The
>  > > preferred option is to put your templates in your resources section.
>  > > More info on this can be found in the online documentation in the
>  > > section project layout [3].
>  > > 4. restart jetty
>  > >
>  > > now everything should be fine.
>  > > Regards,
>  > > Michael
>  > >
>  > > [1] http://tapestry.apache.org/tapestry5/release-notes.html
>  > > [2]
>  > > http://tapestry.formos.com/nightly/tapestry5/tapestry-core/upgrade.html
>  > > [3]
>  > >
>  > > 
> http://tapestry.formos.com/nightly/tapestry5/tapestry-core/guide/project-layout.html
>  > >
>  > >
>  > > -
>  > > 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: T5 : Strange exception ...

2008-04-08 Thread Ted Steen
You shouldn't put non components under the components package.
If you do that Tapestry will do runtime class instrumentation on the
class and you will end up with exceptions like that.
Atleast this is what I think.

Maybe we could check this and show a more human readable error message?

Hope it helps!
/Ted

2008/4/8, Stephane Decleire <[EMAIL PROTECTED]>:
> Has anybody already get such a strange exception ?
>
> org.apache.tapestry.ioc.internal.util.TapestryException
> :
>  com.mycompany.components.accounts.ManagerStates cannot be
> cast to com.mycompany.components.accounts.ManagerStates
>
>  ???
>
>  My ManagerStates class is an enum and here is the stack trace :
>
>*
> com.mycompany.components.accounts.Manager.containingPageDidAttach(Manager.java)
>*
> org.apache.tapestry.internal.structure.ComponentPageElementImpl$2.run(ComponentPageElementImpl.java:71)
>*
> org.apache.tapestry.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:874)
>*
> org.apache.tapestry.internal.structure.ComponentPageElementImpl.containingPageDidAttach(ComponentPageElementImpl.java:706)
>*
> org.apache.tapestry.internal.structure.PageImpl.attached(PageImpl.java:146)
>*
> org.apache.tapestry.internal.services.RequestPageCacheImpl.get(RequestPageCacheImpl.java:45)
>*
> org.apache.tapestry.internal.services.ComponentSourceImpl.getPage(ComponentSourceImpl.java:51)
>*
> com.mycompany.accounts.services.impl.AccessController.checkAccess(AccessController.java:88)
>*
> com.mycompany.accounts.services.impl.AccessController.dispatch(AccessController.java:77)
>*
> org.apache.tapestry.services.TapestryModule$13.service(TapestryModule.java:955)
>*
> com.mycompany.services.AppModule$1.service(AppModule.java:96)
>*
> org.apache.tapestry.internal.services.LocalizationFilter.service(LocalizationFilter.java:42)
>*
> org.apache.tapestry.services.TapestryModule$3.service(TapestryModule.java:564)
>*
> org.apache.tapestry.services.TapestryModule$2.service(TapestryModule.java:515)
>*
> org.apache.tapestry.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:79)
>*
> org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:93)
>*
> org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:84)
>*
> org.apache.tapestry.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:77)
>*
> org.apache.tapestry.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:106)
>*
> org.apache.tapestry.services.TapestryModule$12.service(TapestryModule.java:935)
>*
> org.apache.tapestry.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
>*
> org.apache.tapestry.TapestryFilter.doFilter(TapestryFilter.java:168)
>*
> org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
>*
> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
>*
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
>*
> org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
>*
> org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471)
>*
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
>*
> org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
>*
> org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
>*
> org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
>*
> org.mortbay.http.HttpServer.service(HttpServer.java:909)
>*
> org.mortbay.http.HttpConnection.service(HttpConnection.java:820)
>*
> org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:986)
>*
> org.mortbay.http.HttpConnection.handle(HttpConnection.java:837)
>*
> org.mortbay.http.SocketListener.handleConnection(SocketListener.java:245)
>*
> org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
>*
> org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
>
>  Thanks in advance
>
>  Stephane
>

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



Re: tapestry hibernate breakage in Apr 6 5.0.12-SNAPSHOT

2008-04-08 Thread Angelo Chen

that will be a problem to all the tapestry-hibernate apps as we all assumes
the transaction will be committed at end of session, now we need to add a
commit ourself. however, i welcome this change.


Julian Wood wrote:
> 
> Thanks Angelo, that was exactly it.
> 
> J
> 
> On Apr 6, 2008, at 9:59 PM, Angelo Chen wrote:
> 
>>
>> Hi Julian,
>>
>> I've seen https://issues.apache.org/jira/browse/TAPESTRY-2247  
>> closed, is it
>> the reason for ur code not to work?
>>
>>
>> Julian Wood wrote:
>>>
>>> The latest snapshot changed something with tapestry-ioc or tapestry-
>>> hibernate.
>>>
>>> I had an ApplicationInitializer in my AppModule:
>>>
>>> public static void
>>> contributeApplicationInitializer
>>> (OrderedConfiguration configuration,
>>>
>>> org.hibernate.Session session) {
>>> BootStrapper bootStrapper = new DataBootStrapper(session);
>>> configuration.add("UserInitializer", bootStrapper);
>>> }
>>>
>>> which then did something like this:
>>>
>>> public DataBootStrapper(Session session) {
>>> this.session = session;
>>> }
>>>
>>> public void initializeApplication(Context context,
>>> ApplicationInitializer applicationInitializer) {
>>> Country ca = new Country("Canada", true);
>>> session.save(ca);
>>> applicationInitializer.initializeApplication(context);
>>> }
>>>
>>> This all worked fine until today's snapshot. Now no data is committed
>>> to the database, and no errors are thrown. Even if you wrap with your
>>> own txn, nothing happens:
>>>
>>> public void initializeApplication(Context context,
>>> ApplicationInitializer applicationInitializer) {
>>> session.beginTransaction();
>>> Country ca = new Country("Canada", true);
>>> session.save(ca);
>>> session.getTransaction().commit();
>>> applicationInitializer.initializeApplication(context);
>>> }
>>>
>>> Reverting back to a previous tapestry snapshot or 5.0.11 (for ioc,
>>> core, and hibernate) fixes the problem. Anyone know what happened? Do
>>> I need a new approach or is this a regression bug?
>>>
>>> Thanks,
>>>
>>> J
>>>
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/tapestry-hibernate-breakage-in-Apr-6-5.0.12-SNAPSHOT-tp16531440p16533312.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/tapestry-hibernate-breakage-in-Apr-6-5.0.12-SNAPSHOT-tp16531440p16557811.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



T5 : Strange exception ...

2008-04-08 Thread Stephane Decleire

Has anybody already get such a strange exception ?

org.apache.tapestry.ioc.internal.util.TapestryException :
com.mycompany.components.accounts.ManagerStates cannot be cast to 
com.mycompany.components.accounts.ManagerStates


???

My ManagerStates class is an enum and here is the stack trace :

   * 
com.mycompany.components.accounts.Manager.containingPageDidAttach(Manager.java)
   * 
org.apache.tapestry.internal.structure.ComponentPageElementImpl$2.run(ComponentPageElementImpl.java:71)
   * 
org.apache.tapestry.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:874)
   * 
org.apache.tapestry.internal.structure.ComponentPageElementImpl.containingPageDidAttach(ComponentPageElementImpl.java:706)
   * 
org.apache.tapestry.internal.structure.PageImpl.attached(PageImpl.java:146)
   * 
org.apache.tapestry.internal.services.RequestPageCacheImpl.get(RequestPageCacheImpl.java:45)
   * 
org.apache.tapestry.internal.services.ComponentSourceImpl.getPage(ComponentSourceImpl.java:51)
   * 
com.mycompany.accounts.services.impl.AccessController.checkAccess(AccessController.java:88)
   * 
com.mycompany.accounts.services.impl.AccessController.dispatch(AccessController.java:77)
   * 
org.apache.tapestry.services.TapestryModule$13.service(TapestryModule.java:955)
   * com.mycompany.services.AppModule$1.service(AppModule.java:96)
   * 
org.apache.tapestry.internal.services.LocalizationFilter.service(LocalizationFilter.java:42)
   * 
org.apache.tapestry.services.TapestryModule$3.service(TapestryModule.java:564)
   * 
org.apache.tapestry.services.TapestryModule$2.service(TapestryModule.java:515)
   * 
org.apache.tapestry.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:79)
   * 
org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:93)
   * 
org.apache.tapestry.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:84)
   * 
org.apache.tapestry.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:77)
   * 
org.apache.tapestry.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:106)
   * 
org.apache.tapestry.services.TapestryModule$12.service(TapestryModule.java:935)
   * 
org.apache.tapestry.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
   * org.apache.tapestry.TapestryFilter.doFilter(TapestryFilter.java:168)
   * 
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
   * 
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
   * 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
   * 
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
   * 
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471)
   * 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
   * org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
   * 
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
   * org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
   * org.mortbay.http.HttpServer.service(HttpServer.java:909)
   * org.mortbay.http.HttpConnection.service(HttpConnection.java:820)
   * org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:986)
   * org.mortbay.http.HttpConnection.handle(HttpConnection.java:837)
   * 
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:245)
   * org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
   * org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)

Thanks in advance

Stephane


T5: Using expression language in If component

2008-04-08 Thread Joshua Jackson
Dear all,

Is it possible to use expression language with If component as in JSP?

Thanks in advance

-- 
Let's show the world what we've got.

Blog: http://joshuajava.wordpress.com/

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



Re: T5 Tapestry.onDOMLoaded internet explorer 7

2008-04-08 Thread Riccardo Ruffilli

It seems to be a well known problem:

http://dean.edwards.name/weblog/2006/06/again/

cheers

-Rick




Riccardo Ruffilli wrote:
> 
> 
> Hi Josh, thanks again for your answer.
> Unfortunatly I don't see any kind of js error.
> I've noticed this strange things that may be you can clarify to me,
> if I save the page in a static way, and then I reload it the 
> js should be loaded correctly.
> The same things seems to be if I load the page from my local jetty server,
> (with no js correct loading (no alert popup comes out))
> and then from the browser address line I refresh the page simply pressing
> enter button...
> If I use the browser refresh page button nothing happen :(
> 
> I've finally made all the code changes to pass to the newest lib 5.0.11,
> ff
> and safari works
> fine ie not. :((
> 
> Thanks again.
> 
> -Rick
> 
> 
> 
> 
> 
> joshcanfield wrote:
>> 
>> You don't mention seeing javascript errors in IE, are there any when
>> you load the page and nothing displays?
>> 
>> If there is a syntax error in your javascript (so that IE can't parse
>> it) then the whole script block is ignored.
>> 
>> One debugging technique that I use is to view the source of the
>> misbehaving page and copy it to a static file on your machine. Then
>> you can view the local page and edit out parts of the page until you
>> find the culprit, without modifying your source in unwanted ways. I'd
>> start by removing everything from the  block except
>> 
>>