Re: T5: redirect with parameters (was ActionLink with two parameter context)

2007-10-30 Thread Ted Steen
Yes, and then it is important that you implement onPassivate(Long id)
{ ... } in the EditPage

2007/10/30, Nick Westgate [EMAIL PROTECTED]:
 The subject for this thread was wrong.

 @Inject EditPage editPage;

 Object onActionFromEdit(Long id)
  {
 editPage.setId(id);
 return editPage;
  }

 Cheers,
 Nick.


 Angelo Chen wrote:
  Hi,
 
  I redirect to another page in my ActionLink using following code:
  Class onActionFromEdit(Long id)
  {
 return EditPage.class;
  }
 
  this works, now I'd like to pass the id as well to the EditPage so that its
  OnActivate(Long id) will be called, how to do this? thanks.
  A.C.

 -
 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: Mixing T5 and Guice --- best practices

2007-10-30 Thread Jan Vissers
On the why of Guice...
Not trying to offend anyone here, but maybe T5 already could have been
finished if instead of writing yet another IoC framework the choice was
made to adopt an elegant one.

https://www.blogger.com/comment.g?blogID=4110180postID=563902125495823741

Bob Lee:

If you want to know why Guice is so popular, the best advice I can give
is, try it. Who knows? You might decide to lobby for a couple new features
and adopt it, in which case you could spend more time on your web
framework.

Given the fact that Guice already had a major influence on T5, it is still
not quite clear to me why T5 IoC exists. But then again - I'm just a
simple developer waiting for the next great version of *the web
framework*.

-J.

 On Mon, 29 Oct 2007 16:28:33 -0200, Jan Vissers [EMAIL PROTECTED]
 wrote:

 Partially inspired by a question/some work by Leon Pennings (on this
 list), partially because of my interest in Guice -

 What exactly makes you interested in Guice? As far as I know (but I
 haven't taken a look in Guice for some time already, so I can be wrong),
 Tapestry-IoC does (almost) everything Guice does, but better. One of the
 reasons is that T-IoC needs no annotations in your beans. :)

 --
 Thiago H. de Paula Figueiredo
 Desenvolvedor, Instrutor e Consultor de Tecnologia
 Eteg Tecnologia da Informação Ltda.
 http://www.eteg.com.br

 -
 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] Problem with multiple forms in a loop

2007-10-30 Thread Nick Westgate

I didn't see Olof's original post, but this is what the PREPARE event is for.
Use it to set up the object that is being edited using the form context.

Also, note that there is a limitation with form validation. From the docs:
- tracker
- org.apache.tapestry.ValidationTracker
- defaultTracker
- prop
- The object which will record user input and validation errors. The object
must be persistent between requests (since the form submission and validation
occurs in an component event request and the subsequent render occurs in a
render request). The default is a persistent property of the Form component
and this is sufficient for nearly all purposes

__ (except when a Form is rendered inside a loop). __

Cheers,
Nick.


Angelo Chen wrote:

Hi,

oic,  maybe an ajax will do? I am thinking of providing a hidden form, when
user click a link in one record, it will insert the hidden form below the
selected row for user to edit, then submit it via an ajax call and close the
form, not yet tried.

A.C.


quot;Olof =?UTF-8?Q?N=C3=A6ss=C3=A9nquot; ?= wrote:

I'm afraid not. I ended up with enclosing all users in one big form. I
thought it wasn't worth solving when the one form approach worked just
fine in my case.

/Olof

On 29/10/2007, Angelo Chen [EMAIL PROTECTED] wrote:

Hi Olof,

Did you find a solution to this? I have similar need as yours this time.

A.C.


Olof =?UTF-8?Q?N=C3=A6ss=C3=A9n ?= wrote:

I have a problem with using forms in components where the data model
is passed to the components via parameter inside a T5 loop component.
When a form is submitted the data model seems to be lost.

What I'm trying to do is to iterate through a collection of users and
construct a form for each user where a user name can be edited. Each
form resides in a component that handles submission. The user model
data is passed to the component inside a page where a loop loops
through a collection of users. The idea is to have a form for each
user so when submitting a form, only the user edited will get updated.
However, when a form is submitted the user data model is lost and ends
up as a null pointer.

I wouldn't be surprised if I've missed something obvious or if the way
I try to achieve a form for each user isn't a valid usage of T5. Any
thoughts or suggestions? I've attached a simple example demonstrating
my approach in this email.

/Olof

// User.java Data Model
package org.example;

public class User
{
private String name;

public User(String name)
{
this.name = name;
}

public String getName()
{
return name;
}

public void setName(String name)
{
this.name = name;
}
}

//Users.java T5 Page
package org.example.testapp.pages;

import java.util.ArrayList;
import java.util.List;

import org.apache.tapestry.annotations.Persist;
import org.example.User;

public class Users
{
private User user;

@Persist(flash)
private ListUser users;

public void onActivate()
{
if (users == null)
{
users = new ArrayListUser();
users.add(new User(Ted));
users.add(new User(Olof));
}
}

public User getUser()
{
return user;
}

public void setUser(User user)
{
this.user = user;
}

public ListUser getUsers()
{
return users;
}
}

// Users.html T5 Template
html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
head
/head
body
  t:loop source=users value=user
  t:edituser user=user/
  /t:loop
/body
/html

//EditUser.java T5 Component
package org.example.testapp.components;

import org.apache.tapestry.annotations.Parameter;
import org.example.User;

public class EditUser
{
@Parameter(required = true)
private User user;

public void setUser(User user)
{
this.user = user;
}

public User getUser()
{
return user;
}

public void onSuccess()
{
// save user
}
}

//EditUser.html T5 Template
t:form xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
  t:textfield value=user.name/br/
  t:submit t:id=save value=save/
/t:form

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




--
View this message in context:
http://www.nabble.com/-T5--Problem-with-multiple-forms-in-a-loop-tf4533944.html#a13467431
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]







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

Re: Mixing T5 and Guice --- best practices

2007-10-30 Thread Nick Westgate

This is almost a FAQ. See the older post here:
http://tapestryjava.blogspot.com/search?q=guice

Also see the Why Not ... sections:
http://tapestry.apache.org/tapestry5/tapestry-ioc/

Cheers,
Nick.


Jan Vissers wrote:

On the why of Guice...
Not trying to offend anyone here, but maybe T5 already could have been
finished if instead of writing yet another IoC framework the choice was
made to adopt an elegant one.

https://www.blogger.com/comment.g?blogID=4110180postID=563902125495823741

Bob Lee:

If you want to know why Guice is so popular, the best advice I can give
is, try it. Who knows? You might decide to lobby for a couple new features
and adopt it, in which case you could spend more time on your web
framework.

Given the fact that Guice already had a major influence on T5, it is still
not quite clear to me why T5 IoC exists. But then again - I'm just a
simple developer waiting for the next great version of *the web
framework*.

-J.


On Mon, 29 Oct 2007 16:28:33 -0200, Jan Vissers [EMAIL PROTECTED]
wrote:


Partially inspired by a question/some work by Leon Pennings (on this
list), partially because of my interest in Guice -

What exactly makes you interested in Guice? As far as I know (but I
haven't taken a look in Guice for some time already, so I can be wrong),
Tapestry-IoC does (almost) everything Guice does, but better. One of the
reasons is that T-IoC needs no annotations in your beans. :)

--
Thiago H. de Paula Figueiredo
Desenvolvedor, Instrutor e Consultor de Tecnologia
Eteg Tecnologia da Informação Ltda.
http://www.eteg.com.br

-
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: Mixing T5 and Guice --- best practices

2007-10-30 Thread Nick Westgate

Jan, forgot to add I know you saw this last time around. ;-)

Cheers,
Nick.


Jan Vissers wrote:

On the why of Guice...


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



RE: T5 book: update

2007-10-30 Thread Kolesnikov, Alexander GNI
Well, I *wish* wholeheartedly to continue with them, but at the moment,
that's just not possible. Writing a whole new book in just about three
months while working full time isn't a piece of cake ;)

I used to think that as soon as I complete the book I will return to the
T4 tutorials, but now, looking ahead, I see yet another book on Tapestry
5 emerging at the horizon... So many important topics weren't covered in
the first book!

Does someone know a hack to increase the number of hours in a day? At
least to 72 please!

-Original Message-
From: Chris Chiappone [mailto:[EMAIL PROTECTED] 
Sent: 29 October 2007 19:02
To: Tapestry users
Subject: Re: T5 book: update


Are you finished with the devsheld articles for tap 4.1?

On 10/29/07, Kolesnikov, Alexander  GNI
[EMAIL PROTECTED] wrote:
 Sure! As soon as it is ready.

 -Original Message-
 From: Howard Lewis Ship [mailto:[EMAIL PROTECTED]
 Sent: 29 October 2007 15:00
 To: Tapestry users
 Subject: Re: T5 book: update


 My personal email address is [EMAIL PROTECTED]  Surely, you'd just 
 send me a PDF at this stage?

 On 10/29/07, Kolesnikov, Alexander GNI 
 [EMAIL PROTECTED]
 wrote:
 
  Thanks Ted! I am updating chapter 5 now, and it will have a section 
  on

  this component.
 
  -Original Message-
  From: Ted Steen [mailto:[EMAIL PROTECTED]
  Sent: 26 October 2007 18:33
  To: Tapestry users
  Subject: Re: T5 book: update
 
 
  ah, i`ll have a look at that in the weekend. it is an easy thing to 
  add.
 
  2007/10/26, Kolesnikov, Alexander  GNI
  [EMAIL PROTECTED]:
   Thanks Ted, I know that. By the way, did you have a chance to add 
   another toolbar configuration to FCKEditor component?
  
   -Original Message-
   From: Ted Steen [mailto:[EMAIL PROTECTED]
   Sent: 26 October 2007 11:00
   To: Tapestry users
   Subject: Re: T5 book: update
  
  
   Very nice!
   Dont forget to update the part about the DatePicker. It is now 
   obsolete. T5.0.6 now includes a DateField as a part of the core.
  
  
   2007/10/26, Kolesnikov, Alexander  GNI
   [EMAIL PROTECTED]:
Just to let you know: the first draft of the book is completed, 
the external revewing is almost completed, I am currently 
upgrading the chapters to 5.0.6 with the deadline of 15 
November. If everything goes
  
well, the book should hit the shelves in December.
   
Cheers,
   
Alexander
   

--
--
--

CONFIDENTIALITY NOTICE: If you have received this email in
error,
   please immediately notify the sender by e-mail at the address 
   shown.

   This email transmission may contain confidential information.  
   This information is intended only for the use of the individual(s)

   or entity to whom it is intended even if addressed incorrectly.  
   Please

   delete it from your files if you are not the intended recipient. 
   Thank you for your compliance.  Copyright 2007 CIGNA
   
   ==
   ==
   ==
   ==
   ==
   
  
  
   --
   /ted
  
   --
   --
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
   --
   --
   --
   
   CONFIDENTIALITY NOTICE: If you have received this email in error,
  please immediately notify the sender by e-mail at the address shown.

  This email transmission may contain confidential information.  This 
  information is intended only for the use of the individual(s) or 
  entity to whom it is intended even if addressed incorrectly.  Please

  delete it from your files if you are not the intended recipient. 
  Thank you for your compliance.  Copyright 2007 CIGNA
  
  
  ==
  ==
  ==
  
  
   --
   --
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
  --
  /ted
 
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
  
  --
  
  CONFIDENTIALITY NOTICE: If you have received this email in error,
 please
  immediately notify the sender by e-mail at the address shown.  This
 email
  transmission may contain confidential information.  This information
 is
  intended only for the use of the individual(s) or entity to whom it 
  is intended even if addressed incorrectly.  Please delete it from 
  your
 files if
  you are not the intended recipient.  Thank you for your compliance.

  Copyright 2007 CIGNA
 
  

RE: T5: FCKEditor Component (fix for 5.0.6, medium toolbar set added)

2007-10-30 Thread Kolesnikov, Alexander GNI
Great, thanks Ted!

-Original Message-
From: Ted Steen [mailto:[EMAIL PROTECTED] 
Sent: 29 October 2007 21:53
To: Tapestry users
Subject: T5: FCKEditor Component (fix for 5.0.6, medium toolbar set
added)


Small update for tapestry5-fckeditor ahead,

http://code.google.com/p/tapestry5-fckeditor/downloads/list

* Now works with T5.0.6
* Added medium toolbar set

Have fun!

-- 
/Ted

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



--
CONFIDENTIALITY NOTICE: If you have received this email in error, please 
immediately notify the sender by e-mail at the address shown.  This email 
transmission may contain confidential information.  This information is 
intended only for the use of the individual(s) or entity to whom it is intended 
even if addressed incorrectly.  Please delete it from your files if you are not 
the intended recipient.  Thank you for your compliance.  Copyright 2007 CIGNA
==


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



tapestry and workflow engines, suggestions?

2007-10-30 Thread Martino Piccinato
Hi,

just wanted to know your experiences, is there any integration stuff
already done with any existing workflow engince? I'd prefer a
lightwait webflow engine at the moment jbpm and even spring webflow
could be too much for me but I'm open for suggestions.

We are using tapestry4.1.2.

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



T5: Enum localization no longer working in 5.0.6 and BeanEditForm?

2007-10-30 Thread Maximilian Weißböck
I'm just starting with T5 and did my first experiments with 5.0.5 and now 
upgraded to 5.0.6. 
I used Howards tutorial, and as far as I can remember, the localization of 
Enums inside BeanEditForm just worked.
 
But now with version 5.0.6 it seems no longer to work. Anything changed in 
configuration of localization of Enums?
I also have a Grid component that displays the data from the BeanEditForm, 
inside the Grid the localization of
Enums works just great (so it is not a problem with my .properties file I think)
 
Thanks, Max
 


Re: T5: Issues contributing a coercion?

2007-10-30 Thread Andy Huhn
Thanks again, Howard!

On Mon, 2007-10-29 at 19:32 -0700, Howard Lewis Ship wrote:
 Create an interface for your page, make sure the interface is not in
 the .pages. package, have the page implement the interface, do the
 coversion in terms of the interface.
 
 It's tricky class loader issues, the EditPgaeModelImpl class known to
 your services layer is literally not the same class as the one
 Tapestry uses to instantiate your page (once it gets down rewriting it
 to fit in with Tapestry's runtime model).
 
 On 10/29/07, Andy Huhn [EMAIL PROTECTED] wrote:
  Hello,
 
  I'm attempting to contribute a coercion.  This is the first time I've
  attempted to , so I could be missing something obvious...but the error
  message I receive makes me think there's something else going on.
 
  As you can see below, I'm attempting to coerce from
  com.homeed.pages.EditPageModelImpl to com.homeed.pages.PageModel.  It
  says that coercion isn't available...however, look halfway through the
  available list...this very coercion is listed!
 
  Am I missing something obvious?
 
  Thanks,
  Andy
 
  Failure reading parameter pageModel of component account/Edit:layout:
  Could not find a coercion from type com.homeed.pages.EditPageModelImpl
  to type com.homeed.pages.PageModel. Available coercions: Double --
  Float, Float -- Double, Long -- Boolean, Long -- Byte, Long --
  Double, Long -- Integer, Long -- Short, Number -- Long, Object --
  String, Object -- java.util.List, Object[] -- java.util.List, String
  -- Boolean, String -- Double, String -- Long, String --
  java.io.File, String -- java.math.BigDecimal, String --
  java.math.BigInteger, String -- java.util.regex.Pattern, String --
  org.apache.tapestry.SelectModel, String --
  org.apache.tapestry.corelib.data.GridPagerPosition, boolean[] --
  java.util.List, byte[] -- java.util.List, char[] -- java.util.List,
  com.homeed.pages.EditPageModelImpl -- com.homeed.pages.PageModel,
  double[] -- java.util.List, float[] -- java.util.List, int[] --
  java.util.List, java.math.BigDecimal -- Double, java.util.Collection
  -- Boolean, java.util.List -- org.apache.tapestry.SelectModel,
  java.util.List -- org.apache.tapestry.grid.GridDataSource,
  java.util.Map -- org.apache.tapestry.SelectModel, long[] --
  java.util.List, null -- Boolean, null -- Double, null -- Long, null
  -- String, null -- java.math.BigDecimal, null --
  java.math.BigInteger, null -- java.util.List, null --
  org.apache.tapestry.grid.GridDataSource,
  org.apache.tapestry.runtime.ComponentResourcesAware --
  org.apache.tapestry.ComponentResources, short[] -- java.util.List.
 
 
  -
  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: non-Session Object for From Submission

2007-10-30 Thread zaxeer

Hi devs,
thanks for your replies
i am already doing some thing like this in pageBeginRender

 
public void pageBeginRender(PageEvent event) {
 
if (event.getRequestCycle().isRewinding()) {
return;
}

if(getUSERINFO () == null){
setUSERINFO (new USERINFO(1,ABC,XYZ));
}
}

but error:

target is null for setProperty(null, zip, null)

remians  there if i persist USERINFO in session its OK, but i think in
normal JSP application we need not to persist Whole form content in session,
session just need to use for some long retainable info.

any idea from you will be helpfull for me.


-- 
View this message in context: 
http://www.nabble.com/non-Session-Object-for-From-Submission-tf4712531.html#a13487603
Sent from the Tapestry - User mailing list archive at Nabble.com.


Re: non-Session Object for From Submission

2007-10-30 Thread Ulrich Stärk

zaxeer schrieb:

Hi devs,
thanks for your replies
i am already doing some thing like this in pageBeginRender

 
public void pageBeginRender(PageEvent event) {
 
	if (event.getRequestCycle().isRewinding()) {

return;
}

if(getUSERINFO () == null){
setUSERINFO (new USERINFO(1,ABC,XYZ));
}
}

but error:

target is null for setProperty(null, zip, null)

remians  there if i persist USERINFO in session its OK, but i think in
normal JSP application we need not to persist Whole form content in session,
session just need to use for some long retainable info.

any idea from you will be helpfull for me.




I don't know exactly how AjaxForm works but it might be that it rewinds 
the form on submission so with that code your USERINFO object won't be 
set to a non-null value.
Also have a look at the client:page persistence scope. That way you can 
persist the object on the client side as long as the user stays on the 
same page.


Uli

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



Re: Help out Matt Raible: Looking for Web Framework Stories

2007-10-30 Thread Francois Armand

Howard Lewis Ship wrote:

Matt Raible is looking for stories of how people chose a JVM Web
Framework and how it worked out for them.  I'd encourage all Tapestry
users to drop in with a story or two.

http://raibledesigns.com/rd/entry/choosing_a_jvm_web_framework1
  
I reply to this old post to signal that the presentation of Matt Raible 
is available, and there is some good reference to Tapestr on it :

http://raibledesigns.com/rd/entry/choosing_a_jvm_web_framework2
Direct link to the presentation PDF : 
http://static.raibledesigns.com/repository/presentations/ChoosingAJVMWebFramework-CSS2007.pdf


En,joy !

--
Francois Armand
Etudes  Développements J2EE
Groupe Linagora - http://www.linagora.com
Tél.: +33 (0)1 58 18 68 28
---
InterLDAP - http://interldap.org 
FederID - http://www.federid.org/

Open Source identities management and federation


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



T5: Tapestry-Hibernate, do we have to save()?

2007-10-30 Thread Angelo Chen

Hi,

I have a class like this:

Long id;
Photo photo;

@Inject
 private Session _session;

public void setId(Long id) {
this.id = id;
 }

public Class onActivate() {
 photo = (Photo) _session.get(Photo.class, id);
 return null;
}

public String getCaption() {
return photo.getCaption();
}

public void setCaption(String caption) {
this.photo.setCaption(caption);
 }

when I click submit from the form, changes are saved to the database. I used
to do

onSuccess()
{
_session.save(myrecord); 
}

is this really needed? I got confused, why the changes are saved without
calling _session.save()?

Thanks,

A.C.
-- 
View this message in context: 
http://www.nabble.com/T5%3A-Tapestry-Hibernate%2C-do-we-have-to-save%28%29--tf4718363.html#a13488286
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: Help out Matt Raible: Looking for Web Framework Stories

2007-10-30 Thread Massimo Lusetti
On Oct 30, 2007 2:09 PM, Francois Armand [EMAIL PROTECTED] wrote:

 I reply to this old post to signal that the presentation of Matt Raible
 is available, and there is some good reference to Tapestr on it :

Some quotes and emphasis are a little somewhat misleading by my point
of view, but it's a fair presentation and a good reference. It really
gives the idea of what the process of building apps, web apps, in the
java world is.

Bookmarked, thanks for posting .
-- 
Massimo
http://meridio.blogspot.com

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



T5: Persist or not? help me understand this

2007-10-30 Thread Angelo Chen

Hi,

I got a little confused with need to @Persist, example as follow, the usrID
as not persisted, but when user Submit a form, that value is still
accessible inside OnSuccess, my understanding is, after rendering the page,
the variable is gone, when form submitted, only persisted variable retains
their value, any help on clarifying this question? Thanks,

A.C.

public class EditPhoto {

Long usrID;
 
public Long getUsrID() {
return usrID;
}

public void setUsrID(Long usrID) {
this.usrID = usrID;
}

   Object onSuccess() {
System.out.println(getUsrID());
return resources.createPageLink(... );
}


above page is invoked by the following code

 @InjectPage
  private EditPhoto editPhoto;

  Object onActionFromEdit(Long id)
editPhoto.setUsrID(currentUser.getId());
return editPhoto;
}


-- 
View this message in context: 
http://www.nabble.com/T5%3A-Persist-or-not--help-me-understand-this-tf4718768.html#a13489653
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: T5: Tapestry-Hibernate, do we have to save()?

2007-10-30 Thread lasitha
On 10/30/07, Angelo Chen [EMAIL PROTECTED] wrote:

 is this really needed? I got confused, why the changes are saved without
 calling _session.save()?

Angelo, this is default hibernate behaviour.  See:
http://www.hibernate.org/hib_docs/v3/reference/en/html/objectstate.html#objectstate-modifying

However, your post brings up an interesting question:  will the
object's state be persisted even after validation fails?  My first
guess is might actually be a problem.
Consider:
1. Object is retrieved in onAttached() and associated with a new session,
2. Fields are updated with values from the form submission (lets
assume they are valid),
3. Some cross-validation fails in onValidate() - so onSuccess() is
never called, but...
4. As the thread cleans up, the HibernateSessionManager commits the
transaction anyway and the invalid values are persisted!

I'd like to test this and look around the lists a bit but am throwing
this out in case others have thoughts.

Cheers, lasitha.

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



Re: T5 book: update

2007-10-30 Thread Igor Drobiazko
Shut-eye is a waste of time :)

On 10/30/07, Kolesnikov, Alexander GNI [EMAIL PROTECTED]
wrote:

Does someone know a hack to increase the number of hours in a day? At
 least to 72 please!




AW: T5: Tapestry-Hibernate, do we have to save()?

2007-10-30 Thread Maximilian Weißböck
Oh yes, this is really a problem we actually had in a Tapestry 4
Application. We had to use (ugly) DTO Objects to avoid this problem.

As far as I can remember, this problem is addressed in JSF with its complex
render cycle. Values are stored in intermediate objects until
validation is completed and only then are copied to the bean data object.

Would be interesting if there could be a similar soultion for T5?

Max


 -Ursprüngliche Nachricht-
 Von: lasitha [mailto:[EMAIL PROTECTED] 
 Gesendet: Dienstag, 30. Oktober 2007 15:29
 An: Tapestry users
 Betreff: Re: T5: Tapestry-Hibernate, do we have to save()?
 
 On 10/30/07, Angelo Chen [EMAIL PROTECTED] wrote:
 
  is this really needed? I got confused, why the changes are 
 saved without
  calling _session.save()?
 
 Angelo, this is default hibernate behaviour.  See:
 http://www.hibernate.org/hib_docs/v3/reference/en/html/objects
 tate.html#objectstate-modifying
 
 However, your post brings up an interesting question:  will the
 object's state be persisted even after validation fails?  My first
 guess is might actually be a problem.
 Consider:
 1. Object is retrieved in onAttached() and associated with a 
 new session,
 2. Fields are updated with values from the form submission (lets
 assume they are valid),
 3. Some cross-validation fails in onValidate() - so onSuccess() is
 never called, but...
 4. As the thread cleans up, the HibernateSessionManager commits the
 transaction anyway and the invalid values are persisted!
 
 I'd like to test this and look around the lists a bit but am throwing
 this out in case others have thoughts.
 
 Cheers, lasitha.
 
 -
 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: Tapestry-Hibernate, do we have to save()?

2007-10-30 Thread Angelo Chen

Hi Lasitha,

Your thoughts do require some thinking, I'm doing a site now that is not so
critical in the consistency of the data, as it's merely a simple membership
database, but if this is to replace a c/s biz application, this will be a 
issue, is the current Tapestry - hibernate ready for that? what we need to
do in that kind of situation? I asked last time but it was considered a
hibernate issue, I like to hear from others too how they manage situations
like this? thanks.

A.C.


lasitha wrote:
 
 On 10/30/07, Angelo Chen [EMAIL PROTECTED] wrote:

 is this really needed? I got confused, why the changes are saved without
 calling _session.save()?
 
 Angelo, this is default hibernate behaviour.  See:
 http://www.hibernate.org/hib_docs/v3/reference/en/html/objectstate.html#objectstate-modifying
 
 However, your post brings up an interesting question:  will the
 object's state be persisted even after validation fails?  My first
 guess is might actually be a problem.
 Consider:
 1. Object is retrieved in onAttached() and associated with a new session,
 2. Fields are updated with values from the form submission (lets
 assume they are valid),
 3. Some cross-validation fails in onValidate() - so onSuccess() is
 never called, but...
 4. As the thread cleans up, the HibernateSessionManager commits the
 transaction anyway and the invalid values are persisted!
 
 I'd like to test this and look around the lists a bit but am throwing
 this out in case others have thoughts.
 
 Cheers, lasitha.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/T5%3A-Tapestry-Hibernate%2C-do-we-have-to-save%28%29--tf4718363.html#a13490149
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: T5: Tapestry-Hibernate, do we have to save()?

2007-10-30 Thread Jonathan Barker

My more complicated work has been with T4, but this should still apply.

I use Spring and Hibernate, with all of the Spring transaction management
and the Open Session In View interceptor.  When I find() an object, I do it
declared READONLY.  As all of the properties are updated from the form, it
*looks* like everything is changing, but after the cycle completes, all
changes are rolled back.  

If everything works, then I invoke a persist() that will commit to the
database. 



 -Original Message-
 From: Angelo Chen [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, October 30, 2007 10:58 AM
 To: users@tapestry.apache.org
 Subject: Re: T5: Tapestry-Hibernate, do we have to save()?
 
 
 Hi Lasitha,
 
 Your thoughts do require some thinking, I'm doing a site now that is not
 so
 critical in the consistency of the data, as it's merely a simple
 membership
 database, but if this is to replace a c/s biz application, this will be a
 issue, is the current Tapestry - hibernate ready for that? what we need to
 do in that kind of situation? I asked last time but it was considered a
 hibernate issue, I like to hear from others too how they manage situations
 like this? thanks.
 
 A.C.
 
 
 lasitha wrote:
 
  On 10/30/07, Angelo Chen [EMAIL PROTECTED] wrote:
 
  is this really needed? I got confused, why the changes are saved
 without
  calling _session.save()?
 
  Angelo, this is default hibernate behaviour.  See:
 
 http://www.hibernate.org/hib_docs/v3/reference/en/html/objectstate.html#ob
 jectstate-modifying
 
  However, your post brings up an interesting question:  will the
  object's state be persisted even after validation fails?  My first
  guess is might actually be a problem.
  Consider:
  1. Object is retrieved in onAttached() and associated with a new
 session,
  2. Fields are updated with values from the form submission (lets
  assume they are valid),
  3. Some cross-validation fails in onValidate() - so onSuccess() is
  never called, but...
  4. As the thread cleans up, the HibernateSessionManager commits the
  transaction anyway and the invalid values are persisted!
 
  I'd like to test this and look around the lists a bit but am throwing
  this out in case others have thoughts.
 
  Cheers, lasitha.
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 --
 View this message in context: http://www.nabble.com/T5%3A-Tapestry-
 Hibernate%2C-do-we-have-to-save%28%29--tf4718363.html#a13490149
 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: Mixing T5 and Guice --- best practices

2007-10-30 Thread Thiago H de Paula Figueiredo
On Mon, 29 Oct 2007 18:52:42 -0200, Jan Vissers [EMAIL PROTECTED]  
wrote:



Exactly - and to me T5 IoC looks/is very closely related to T5 the web
application framework, whereas Guice seems more general purpose.


I beg to differ. :) T5-IoC was made to be the Tapestry 5 IoC container,  
but it is as general purpose as any other. ;)
The only differences is that Tapestry 5-IoC is used natively by Tapestry  
5.


--
Thiago H. de Paula Figueiredo
Desenvolvedor, Instrutor e Consultor de Tecnologia
Eteg Tecnologia da Informação Ltda.
http://www.eteg.com.br

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



Re: Mixing T5 and Guice --- best practices

2007-10-30 Thread Thiago H de Paula Figueiredo
On Mon, 29 Oct 2007 23:08:20 -0200, Jan Vissers [EMAIL PROTECTED]  
wrote:

A different question. If I would chose to use Guice as IoC and T5 IoC
simply as a bridge into Guice - which part(s) of T5 as a web app  
framework would I be unable to use?


AFAIK, none. Of course, Howard can answer this question better than me. :)

--
Thiago H. de Paula Figueiredo
Desenvolvedor, Instrutor e Consultor de Tecnologia
Eteg Tecnologia da Informação Ltda.
http://www.eteg.com.br

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



Re: T5: ActionLink with two parameter context

2007-10-30 Thread Josh Canfield
You can return a Link instead of the Class with the context containing your
id. Use the ComponentResources to create the link.


On 10/29/07, Angelo Chen [EMAIL PROTECTED] wrote:


 Hi,

 I redirect to another page in my ActionLink using following code:
 Class onActionFromEdit(Long id)
{
   return EditPage.class;
}

 this works, now I'd like to pass the id as well to the EditPage so that
 its
 OnActivate(Long id) will be called, how to do this? thanks.
 A.C.
 --
 View this message in context:
 http://www.nabble.com/T5%3A-ActionLink-with-two-parameter-context-tf4716250.html#a13482053
 Sent from the Tapestry - User mailing list archive at Nabble.com.


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




-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.


Ajax loop problem

2007-10-30 Thread Jesse Merriman
Hi,

I'm having a problem updating a single item within a For loop.

Home.html:
  div jwcid=@For source=ognl:testList value=ognl:testListItem
table jwcid=[EMAIL PROTECTED]
  tr
tha jwcid=@DirectLink
listener=listener:updateTestListItem parameters=ognl:testListItem
updateComponents=wrapper href=#Click!/a/th
  /tr

  trtdspan jwcid=@Insert
value=ognl:testListItemTEST/span/td/tr
/table
  /div

Home.java:
  public abstract String[] getTestList();
  public abstract void setTestList(String[] list);
  public abstract String getTestListItem();
  public abstract void setTestListItem(String item);
  public void updateTestListItem(String item) {
  setTestListItem(item +  CHANGED!);
  }
  public void pageBeginRender(PageEvent event) {
  setTestList(new String[] { a, b, c, d });
  }

When the page first loads, everything looks fine (4 tables, with ids
wrapper, wrapper_0, wrapper_1, and wrapper_2, containing a, b, c, and
d). When I click one of the links, I get an ajax-response back like:

?xml version=1.0 encoding=UTF-8?!DOCTYPE html PUBLIC
-//W3C//DTD XHTML 1.0 Transitional//EN
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; [
!ENTITY nbsp '#160;'
]
ajax-responseresponse id=wrapper type=elementtable id=wrapper
tr
  tha id=DirectLink
href=/j2ee/TestTapApp/app?component=%24DirectLinkamp;page=Home
amp;service=directamp;sp=Saamp;updateParts=wrapper onclick=return
tapestry.linkOnClick(this.href
,'DirectLink', false)Click!/a/th
/tr
trtda/td/tr
  /table/response/ajax-response

The text has not been updated to a CHANGED!. What am I doing wrong?
I'm using Tapestry 4.1.3.

Thanks,
Jesse Merriman

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



Re: Mixing T5 and Guice --- best practices

2007-10-30 Thread Jan Vissers
Please, please don't 'shoot' me - but if this is the case what would be 
a reason for me to use T5 IoC, other that for injecting stuff into page 
classes?


Thiago H de Paula Figueiredo wrote:
On Mon, 29 Oct 2007 23:08:20 -0200, Jan Vissers 
[EMAIL PROTECTED] wrote:

A different question. If I would chose to use Guice as IoC and T5 IoC
simply as a bridge into Guice - which part(s) of T5 as a web app 
framework would I be unable to use?


AFAIK, none. Of course, Howard can answer this question better than 
me. :)





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



Re: Mixing T5 and Guice --- best practices

2007-10-30 Thread Thiago H de Paula Figueiredo
On Tue, 30 Oct 2007 14:45:26 -0200, Jan Vissers [EMAIL PROTECTED]  
wrote:


Please, please don't 'shoot' me - but if this is the case what would be  
a reason for me to use T5 IoC, other that for injecting stuff into page  
classes?


Don't forget Tapestry IoC is a general purpose IoC container. ;)

We won't shoot you or anybody else if you come with good arguments. :)

I couldn't figure out yet what are the features you want from the IoC  
container. If I did, I could help you more than just saying T5 IoC  
rules!. :) And don't forget to read the Why not X sections in  
http://tapestry.apache.org/tapestry5/tapestry-ioc/.


--
Thiago H. de Paula Figueiredo
Desenvolvedor, Instrutor e Consultor de Tecnologia
Eteg Tecnologia da Informação Ltda.
http://www.eteg.com.br

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



Honeycomb project

2007-10-30 Thread Istvan Szucs
Hi,

The Honeycomb project is closed?
I can't access to http://honeycomb.javaforge.com/ website.
Any info from this project? It is moved somewhere?

Best regards,
Stef

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



T5: Multiple onActivate?

2007-10-30 Thread Kevin Menard
Hi all,

It appears that onActivate() cannot be overloaded in a single page class.
I'm hoping I just missed something and that conclusion is wrong.  If not,
how are others handling URLs like:

news/43  (43 = DB ID)
new/breaking-story  (breaking-story=slug)

I'd like to avoid a single onActivate() that takes an Object.  So, any help
would be much appreciated.

Thanks,
Kevin



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



Re: T5 page without a class (only a template)

2007-10-30 Thread Kevin Menard
That's unfortunate.  In T4 you could map multiple templates to a single
class or have no class at all.  It was quite nice and I'm unaware of any
projects that suffered as a result.

To me, being a Web application framework, the class should complement the
page, providing the server side logic as necessary.  If not necessary, you
shouldn't need to have empty artifacts kicking around.

C'est la vie, I suppose.

-- 
Kevin


On 10/27/07 11:36 AM, in article [EMAIL PROTECTED], Nick
Westgate [EMAIL PROTECTED] wrote:

 No. The class defines the page. This is implicit in the design.
 The alternatives are a slippery slope to configuration complexity.
 
 Cheers,
 Nick.



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



RE: T5: Multiple onActivate?

2007-10-30 Thread Jonathan Barker


For this use-case, I would suggest taking a string.  If it matches a regex
(like a number pattern), then cast and do a db-lookup.  Otherwise, do
whatever else you want to do.

Or you can use something like news/lookup/43 and
news/breaking/breaking-story to be more explicit.



 -Original Message-
 From: news [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Menard
 Sent: Tuesday, October 30, 2007 3:26 PM
 To: users@tapestry.apache.org
 Subject: T5: Multiple onActivate?
 
 Hi all,
 
 It appears that onActivate() cannot be overloaded in a single page class.
 I'm hoping I just missed something and that conclusion is wrong.  If not,
 how are others handling URLs like:
 
 news/43  (43 = DB ID)
 new/breaking-story  (breaking-story=slug)
 
 I'd like to avoid a single onActivate() that takes an Object.  So, any
 help
 would be much appreciated.
 
 Thanks,
 Kevin
 
 
 
 -
 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: Multiple onActivate?

2007-10-30 Thread Kevin Menard
Hmm . . . Okay, that's what I was afraid of.  Unfortunately, it's a port of
an existing app, so I'd like to preserve URL structure if possible.  I
supposed URLRewrite could do the trick.

As a follow-up question, is there anyway to do the following:

orders/43 (DB ID, caught through onActivate())
orders/latest (specified in com.example.www.pages.orders.Latest)

It looks like Tapestry will still try to pass latest through to
com.example.www.pages.Orders.  I also couldn't figure out how to have a
Start class for each package, so that the first URL would actually map to
com.example.www.pages.orders.Start.

Is that doable, or do I have to work around it as well?

Thanks,
Kevin


On 10/30/07 3:54 PM, in article [EMAIL PROTECTED],
Jonathan Barker [EMAIL PROTECTED] wrote:

 
 
 For this use-case, I would suggest taking a string.  If it matches a regex
 (like a number pattern), then cast and do a db-lookup.  Otherwise, do
 whatever else you want to do.
 
 Or you can use something like news/lookup/43 and
 news/breaking/breaking-story to be more explicit.
 
 
 
 -Original Message-
 From: news [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Menard
 Sent: Tuesday, October 30, 2007 3:26 PM
 To: users@tapestry.apache.org
 Subject: T5: Multiple onActivate?
 
 Hi all,
 
 It appears that onActivate() cannot be overloaded in a single page class.
 I'm hoping I just missed something and that conclusion is wrong.  If not,
 how are others handling URLs like:
 
 news/43  (43 = DB ID)
 new/breaking-story  (breaking-story=slug)
 
 I'd like to avoid a single onActivate() that takes an Object.  So, any
 help
 would be much appreciated.
 
 Thanks,
 Kevin
 
 
 
 -
 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: T5 page without a class (only a template)

2007-10-30 Thread Marcus
Hi Kevin,

It's not implemented yet.
But your java class could be very simple.

Marcus


Re: T5: Multiple onActivate?

2007-10-30 Thread Marcus
Hi Kevin,

Maybe this help

http://tapestryjava.blogspot.com/2007/08/handling-direct-urls-in-tapestry-5.html

Marcus


Re: T5: Multiple onActivate?

2007-10-30 Thread Kevin Menard
That did help a bit.  At least I know how multiple onActivate can work if I
need a variable number of context values.  Unfortunately, it doesn't address
when you have the same number, but different type.

Likewise, I still haven't seen how to render to index pages inside
subpackages.

-- 
Kevin


On 10/30/07 4:12 PM, in article
[EMAIL PROTECTED], Marcus
[EMAIL PROTECTED] wrote:

 Hi Kevin,
 
 Maybe this help
 
 http://tapestryjava.blogspot.com/2007/08/handling-direct-urls-in-tapestry-5.ht
 ml
 
 Marcus



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



T5: how to pass a component as a parameter? -- getting unbound errors

2007-10-30 Thread Britske

a quick background first: I'm creating a component which can display a 'list
of lists'. For flexibility I want to implement this as a composite-pattern
in which a CompositeFlexList-component can render one or more
FlexList-components as it's childs. (CompositeFlexList extends FlexList). 

This works well when I define the list-component as  @Component in the
CompositeFlexList-component. 

However for flexibility I need to extract the FlexList-component-definition
from the CompositeFlexList-component and define it in an enclosing page.
So want i want is this: 

page
|[EMAIL PROTECTED](..some config here.,childlist=childlist) 
CompositeFlexList
list; 
|[EMAIL PROTECTED](some config here) FlexList childlist;

Now CompositeFlexList has the following definition: 

@Parameter
private FlexList childlist; 
public FlexList getChildlist()  {return childlist;}


My problem/question: 
although component childlist is entirely defined in the enclosing page, and
this component is bound (???) to field childlist in the CompositeFlexList I
keep getting an unbound error, see below. 

Am I missing something, or is it impossible to pass a defined
component-instance as a parameter to another component? 

Thanks in advance,
Geert-Jan


/

Parameter(s) results are required for
com.wrappt.test.tap5springstry.components.FlexList, but have not been bound.

location
classpath:path_removed/CompositeFlexList.html, line 4, column 43
1   div class=${rowClass}
xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
2   t:body/
3   t:block t:id=childblock
4   div t:type=flexlist t:id=childlist
5   /div
6   /t:block
7   /div


-- 
View this message in context: 
http://www.nabble.com/T5%3A-how-to-pass-a-component-as-a-parameter%3E-getting-unbound-errors-tf4721073.html#a13497068
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: T5: How to upgrade from 5.0.5 to 5.0.6

2007-10-30 Thread Marc A. Donis

Hi,

Still having major problems upgrading to 5.0.6.  I was hoping this would be 
a little less painful than having to create a whole new project...


I have:

- changed the tapestry version to 5.0.6 in pom.xml
- changed the log4j version to 1.2.14 in pom.xml
- renamed all *.html files to *.tml
- moved *.tml (and *.properties ?) from src/main/resources/org/app/pages to 
src/main/webapp/WEB-INF  (is this the right place??)
- fixed compilation problems by importing 
org.apache.tapestry.ioc.annotations.Inject

- changed the method signature in AppModule.java to:
public RequestFilter buildTimingFilter(final Logger log)
- also in AppModule.java: import org.slf4j.Logger

Now I get:

HTTP ERROR: 500

org.apache.log4j.Logger.isTraceEnabled()Z

RequestURI=/app/

Powered by Jetty://


and in the console, I see a lot of:

Caused by: org.apache.tapestry.ioc.internal.util.TapestryException: 
Component Start does not contain an embedded component with id 'login'.


... which is odd, because my Start.tml file has a:

 t:form t:id=login

in it, which implies to me that maybe it isn't finding the Start.tml file at 
all?


Any hints?

Thanks again,
Marc


- Original Message - 
From: Nick Westgate [EMAIL PROTECTED]

To: Tapestry users users@tapestry.apache.org
Sent: Monday, October 29, 2007 03:52
Subject: Re: upgrading 5.0.5 to 5.0.6 breaks the app


Please look for the recent thread T5: How to upgrade from 5.0.5 to 
5.0.6.


Cheers,
Nick.


Marc A. Donis wrote:

Hi again,

First off, I am having an issue (with 5.0.5) concerning returning null 
from my ValueEncoder's toValue method.  I expect the value to be simply 
set to null, but instead I get the message:


   Coercion of null to type java.lang.Integer (via null -- String, 
String -- Long, Long -- Integer) failed: null


when I select --- (i.e., null) in my select component.  Here is the 
ValueEncoder code I am using:


private static final ValueEncoderInteger integerValueEncoder = new 
ValueEncoderInteger() {

   @Override
   public String toClient(Integer i) {
   if (i == null)
   return null;
   return String.valueOf(i);
}

@Override
public Integer toValue(String str) {
   if (str == null || str.length() == 0 || str.equals(---))
   return null;// *** crashes after doing this ***
   return Integer.parseInt(str);
}
};

My SelectModel uses the string --- to represent no selection.

I read something ( https://issues.apache.org/jira/browse/TAPESTRY-1648 ) 
which led me to believe that this problem was fixed in 5.0.6, so I 
upgraded my vesion


After changing my imports of Inject to 
org.apache.tapestry.annotations.ioc.Inject (instead of 
org.apache.tapestry.annotations.Inject), 5.0.6 now causes this error 
immediately on load of Start:


HTTP ERROR: 500
Internal Server Error
RequestURI=/app/
Powered by Jetty://

and all I see in the console is:

0:0:0:0:0:0:0:1 - - [28/Oct/2007:17:06:02 +0100] GET /app/ HTTP/1.1 500 
1245 http://localhost:8080/; Mozilla/5.0 (Windows; U; Windows NT 6.0; 
en-US; rv:1.8.1.8) Gecko/20071008 Firefox/2.0.0.8 -


which is not terribly helpful.

I'm at a bit of a loss here.  Why is 5.0.6 failing so dramatically?  And 
am I doing something wrong with my encoder, or is this really the bug I 
think it is?


tia,
Marc


-
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: T5: How to upgrade from 5.0.5 to 5.0.6

2007-10-30 Thread Lindsay Steele



Marc A. Donis wrote:


- moved *.tml (and *.properties ?) from 
src/main/resources/org/app/pages to src/main/webapp/WEB-INF  (is this 
the right place??)




You pages should be in src/main/webapp

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



Re: T5: How to upgrade from 5.0.5 to 5.0.6

2007-10-30 Thread Marc A. Donis

Yep, I just figured that out... thanks!

Also, it is necessary (as mentioned in the [5.0.6-SNAPSHOT] Bug? 
isTraceEnabled missing when I switch to slf4j  thread) to replace 
log4j-1.2.8.jar with log4j-1.2.14.jar in the jetty/ext dir.


Now things seem to be working again.  Thanks again for the help.

Marc

- Original Message - 
From: Lindsay Steele [EMAIL PROTECTED]

To: Tapestry users users@tapestry.apache.org
Sent: Tuesday, October 30, 2007 22:37
Subject: Re: T5: How to upgrade from 5.0.5 to 5.0.6





Marc A. Donis wrote:


- moved *.tml (and *.properties ?) from src/main/resources/org/app/pages 
to src/main/webapp/WEB-INF  (is this the right place??)




You pages should be in src/main/webapp

-
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 page without a class (only a template)

2007-10-30 Thread Robert Zeigler

There was a project which suffered, and that was spindle.
One of the big reasons Geoff gave up trying to add support for T4 to  
spindle was due to the template/class mismatch.


Robert

On Oct 30, 2007, at 10/302:31 PM , Kevin Menard wrote:

That's unfortunate.  In T4 you could map multiple templates to a  
single
class or have no class at all.  It was quite nice and I'm unaware  
of any

projects that suffered as a result.

To me, being a Web application framework, the class should  
complement the
page, providing the server side logic as necessary.  If not  
necessary, you

shouldn't need to have empty artifacts kicking around.

C'est la vie, I suppose.

--
Kevin


On 10/27/07 11:36 AM, in article [EMAIL PROTECTED] 
planning.co.jp, Nick

Westgate [EMAIL PROTECTED] wrote:


No. The class defines the page. This is implicit in the design.
The alternatives are a slippery slope to configuration complexity.

Cheers,
Nick.




-
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 page without a class (only a template)

2007-10-30 Thread Kevin Menard
Heh, I conveniently ignored that.  I should have stated that I'm unaware of
any Web project that suffered.  While unfortunate that Spindle died, as it
turned out, it wasn't as necessary for T4 as it was for T3.  Likewise, other
apps, like HandyTapestry demonstrated that with a different scope, a good
plugin could still be accomplished.

The net of it is that I'd rather not see it simpler for tools at the price
of making it harder to do by hand.  That leads to the requirement of tools
that don't exist yet.

-- 
Kevin

On 10/30/07 5:48 PM, in article
[EMAIL PROTECTED], Robert Zeigler
[EMAIL PROTECTED] wrote:

 There was a project which suffered, and that was spindle.
 One of the big reasons Geoff gave up trying to add support for T4 to
 spindle was due to the template/class mismatch.
 
 Robert



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



Re: T5: How to upgrade from 5.0.5 to 5.0.6

2007-10-30 Thread Josh Canfield
I've kept my .tml and .properties files in the resources folder which get
put into the jar file along side the classes. Is there any value to moving
them to the webapp folder?

Josh

On 10/30/07, Marc A. Donis [EMAIL PROTECTED] wrote:

 Yep, I just figured that out... thanks!

 Also, it is necessary (as mentioned in the [5.0.6-SNAPSHOT] Bug?
 isTraceEnabled missing when I switch to slf4j  thread) to replace
 log4j-1.2.8.jar with log4j-1.2.14.jar in the jetty/ext dir.

 Now things seem to be working again.  Thanks again for the help.

 Marc

 - Original Message -
 From: Lindsay Steele [EMAIL PROTECTED]
 To: Tapestry users users@tapestry.apache.org
 Sent: Tuesday, October 30, 2007 22:37
 Subject: Re: T5: How to upgrade from 5.0.5 to 5.0.6


 
 
  Marc A. Donis wrote:
 
  - moved *.tml (and *.properties ?) from
 src/main/resources/org/app/pages
  to src/main/webapp/WEB-INF  (is this the right place??)
 
 
  You pages should be in src/main/webapp
 
  -
  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]




-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.


Re: url-rewriting in Tapestry 5

2007-10-30 Thread jeffrey ai

You could use urlrewritefilter to rewrite both inbound and outbound URLs.
But for outbound URLs rewriting, urlrewritefilter could only rewrite URLs
encoded by HttpServletResponse.encodeURL() method. I believe most URLs
generated by Tapestry components(so far only confirmed BeanEditForm) are
using this method.

Cheers,
Jeffrey Ai


Britske wrote:
 
 Thanks these all seem valid approaches.  
 What i'm looking for is a stretching the possibilities i guess but here it
 goes anyway: I want a way in which I can plug a 'rewrite strategy'. This
 means that not only I have to translate urls from 'nice' to 'tapestry5'
 -internal but also the other way around, so that tapestry-pages reference
 other pages automatically by their 'nice' -url. 
 
 I would like to keep the code in 1 place for making this
 bidirectional-translation. 
 
 Doing this with mode_rewrite does't give me control in code I think. 
 I wonder if this is possible using some form of rewrite-filter, that is
 able to translate both ways. 
 any ideas on this?
 
 regards,
 Geert-Jan
 
 
 
 Robin Helgelin wrote:
 
 On 9/21/07, Daniel Leffel [EMAIL PROTECTED] wrote:
 I went down this path and decided that mod_rewrite is a much cleaner way
 to
 achieve something like this.
 
 Or maybe an urlfilter bundled with your war, there are a few usable ones.
 
 -- 
 regards,
 Robin
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/url-rewriting-in-Tapestry-5-tf4496726.html#a13500030
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: T5: Multiple onActivate?

2007-10-30 Thread Jonathan Barker
I don't know.

There have been some threads and I think JIRA issues over the months on
similar topics.  They revolve around making Tapestry URL's friendly, and the
logic involved in having something like Order/EditOrder reduced down to
order/edit, and dealing with cases when the package name is the same as the
page name, or even worse, if a parameter looks like a page name.

A search for those threads and issues might give you some ideas.

Are you just trying to preserve bookmarks?  Is this something where you
really need to code the logic to cope with the old URL's while migrating to
a new URL scheme?

Jon


 -Original Message-
 From: news [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Menard
 Sent: Tuesday, October 30, 2007 3:58 PM
 To: users@tapestry.apache.org
 Subject: Re: T5: Multiple onActivate?
 
 Hmm . . . Okay, that's what I was afraid of.  Unfortunately, it's a port
 of
 an existing app, so I'd like to preserve URL structure if possible.  I
 supposed URLRewrite could do the trick.
 
 As a follow-up question, is there anyway to do the following:
 
 orders/43 (DB ID, caught through onActivate())
 orders/latest (specified in com.example.www.pages.orders.Latest)
 
 It looks like Tapestry will still try to pass latest through to
 com.example.www.pages.Orders.  I also couldn't figure out how to have a
 Start class for each package, so that the first URL would actually map
 to
 com.example.www.pages.orders.Start.
 
 Is that doable, or do I have to work around it as well?
 
 Thanks,
 Kevin
 
 
 On 10/30/07 3:54 PM, in article [EMAIL PROTECTED],
 Jonathan Barker [EMAIL PROTECTED] wrote:
 
 
 
  For this use-case, I would suggest taking a string.  If it matches a
 regex
  (like a number pattern), then cast and do a db-lookup.  Otherwise, do
  whatever else you want to do.
 
  Or you can use something like news/lookup/43 and
  news/breaking/breaking-story to be more explicit.
 
 
 
  -Original Message-
  From: news [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Menard
  Sent: Tuesday, October 30, 2007 3:26 PM
  To: users@tapestry.apache.org
  Subject: T5: Multiple onActivate?
 
  Hi all,
 
  It appears that onActivate() cannot be overloaded in a single page
 class.
  I'm hoping I just missed something and that conclusion is wrong.  If
 not,
  how are others handling URLs like:
 
  news/43  (43 = DB ID)
  new/breaking-story  (breaking-story=slug)
 
  I'd like to avoid a single onActivate() that takes an Object.  So, any
  help
  would be much appreciated.
 
  Thanks,
  Kevin
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


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



Re: T5: Multiple onActivate?

2007-10-30 Thread Kevin Menard
On the surface, I'd like to preserve the bookmarks.  Like I said though, I
could do that with URLRewrite -- not ideal, but guaranteed to work.

Digging further, I'm trying to wrap my head around how Tapestry resolves
page names in T5, having been a T3 then a T4 user.  The problems I'm running
into seem like they really shouldn't be problems and should be a common case
that Tapestry should make easy to handle.  So, I'm willing to give the
framework the benefit of the doubt and correct my understanding.  If not,
that's fine, too.  I'll make a mental note not to try to do these things or
reevaluate if it's to be my new framework of choice.

For what it's worth, I'm working on migrating an application from django to
T5.  There are a variety of reasons for this, both technical and political.
Ultimately, I'd like to see Java and Tapestry be a suitable replacement for
the flexibility of Python and Django.

-- 
Kevin 


On 10/30/07 7:51 PM, in article [EMAIL PROTECTED],
Jonathan Barker [EMAIL PROTECTED] wrote:

 I don't know.
 
 There have been some threads and I think JIRA issues over the months on
 similar topics.  They revolve around making Tapestry URL's friendly, and the
 logic involved in having something like Order/EditOrder reduced down to
 order/edit, and dealing with cases when the package name is the same as the
 page name, or even worse, if a parameter looks like a page name.
 
 A search for those threads and issues might give you some ideas.
 
 Are you just trying to preserve bookmarks?  Is this something where you
 really need to code the logic to cope with the old URL's while migrating to
 a new URL scheme?
 



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



Re: T5: How to upgrade from 5.0.5 to 5.0.6

2007-10-30 Thread Marcus
Some related links:

http://tapestryjava.blogspot.com/2007/10/tapestry-506-is-available.html

http://tapestryjava.blogspot.com/2007/10/big-improvement-to-quickstart-archetype.html


Re: T5: Multiple onActivate?

2007-10-30 Thread Marcus
Kevin,

On this process, T3 -T4 -T5, just keep in mind that Tapestry 5 is much
more simple.

Marcus


Re: Honeycomb project

2007-10-30 Thread Marcus Schulte
Seems to be due to the recent javaforge sw-upgrade. I'll try to recover it.
Marcus

2007/10/30, Istvan Szucs [EMAIL PROTECTED]:
 Hi,

 The Honeycomb project is closed?
 I can't access to http://honeycomb.javaforge.com/ website.
 Any info from this project? It is moved somewhere?

 Best regards,
 Stef

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




-- 
Marcus Schulte
http://marcus-schulte.blogspot.com

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