Re: component parameter binding question

2009-03-04 Thread dhning
Are you using latest t5 snapshot or 5.0.X.X release?

If latest snapshot, just use like context=[user.id,user.name]
If not, there are 2 ways:
1. Do in java
public Object [] getContextValue() {
return new Object[2]{user.id, user.name};
}
2. Use list binding in t5commons library 
http://code.google.com/p/tapestry5-components/

Thanks

DH


- Original Message - 
From: 丁振波 zenberg.d...@gmail.com
To: Tapestry users users@tapestry.apache.org
Sent: Wednesday, March 04, 2009 3:34 PM
Subject: component parameter binding question


 Hello guys, below is my case code:
 
 t:parameter name=nameCell
   t:pagelink page=edit context=user.id${user.name}/t:pagelink
 /t:parameter
 
 my question is, how can I pass mutil param value in context , is there any 
 format like user.id; user.name? 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org
 


Re: component parameter binding question

2009-03-04 Thread dhning
welcome:)

Like t:actionlink t:id=delete context=contextValueDelete/t:actionlink
Since context is prop binding, it will map getContextValue() method in java.

Thanks,

DH


- Original Message - 
From: 丁振波 zenberg.d...@gmail.com
To: Tapestry users users@tapestry.apache.org
Sent: Wednesday, March 04, 2009 5:23 PM
Subject: Re: component parameter binding question


 Thanks for your reply :)
 
 I used 5.0.18 release version. What param should set in tml's context field 
 when I use the way do in java?
 
 t:parameter name=delete
   t:actionlink t:id=delete context=???Delete/t:actionlink
 /t:parameter
 
 
 
 - Original Message - 
 From: dhning ningd...@gmail.com
 To: Tapestry users users@tapestry.apache.org
 Sent: Wednesday, March 04, 2009 4:15 PM
 Subject: Re: component parameter binding question
 
 
 Are you using latest t5 snapshot or 5.0.X.X release?

 If latest snapshot, just use like context=[user.id,user.name]
 If not, there are 2 ways:
 1. Do in java
 public Object [] getContextValue() {
return new Object[2]{user.id, user.name};
 }
 2. Use list binding in t5commons library 
 http://code.google.com/p/tapestry5-components/

 Thanks

 DH


 - Original Message - 
 From: 丁振波 zenberg.d...@gmail.com
 To: Tapestry users users@tapestry.apache.org
 Sent: Wednesday, March 04, 2009 3:34 PM
 Subject: component parameter binding question


 Hello guys, below is my case code:

 t:parameter name=nameCell
   t:pagelink page=edit context=user.id${user.name}/t:pagelink
 /t:parameter

 my question is, how can I pass mutil param value in context , is there 
 any
 format like user.id; user.name?


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

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


Re: Action Link In Parent Component

2009-03-03 Thread dhning
I think what you need is
Class Parent {
 onChildEvent(int id){
// Do something 
}


Thanks,

DH


- Original Message - 
From: Davor Miku davorm...@gmail.com
To: Tapestry users users@tapestry.apache.org
Sent: Tuesday, March 03, 2009 1:05 PM
Subject: Action Link In Parent Component


 Hi!
 
 I want to set action link in child component, but action needs to be handled
 in parent component.
 
 I tried to hack like:
 
 t.parent 
 t.child /
 /t.parent
 
 
 Class Parent {
 
 onActionFromChildEvent(int id){
 // Do something 
}
 
 }
 In child.tml :
 a href=parent.childevent/${something.id} Action/a
 
 
 but I'm getting :
 
 Component parent does not contain an embedded component with id
 'childevent'.
 
 How can I achieve this?


Re: AppModule just won't work

2009-03-01 Thread dhning
It is not called when in appmodule initialization. Instead, it is called when 
initializing an applicationstatemanager.

Have test like this:
1. Add an ASO In one page, 
@ApplicationState(create=false)
 private User user;
2. Access the page.

Then your code will be called.

Thanks

DH


- Original Message - 
From: 孙立伟 dante@gmail.com
To: Tapestry users users@tapestry.apache.org
Sent: Monday, March 02, 2009 10:51 AM
Subject: AppModule just won't work


 I'm following the book Tapestry 5: Building Web Applications to
 start my first journey on Tapestrt,but it fails me. The way of inject
 a interface of IDataSource by adding
 contributeApplicationStateManager(MappedConfigurationclass,ApplicationStateContribution)
 to AppModule.java won't work. Where am I missing here? Is there a
 way to diagnose this problem? I
 traced into TapestryAppInitializer and found that AppModule.class was
 added to Registry successfully,but the breakpoints I set in AppModule
 won't break at all. I am stucking here
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org
 


Re: Providing service mocks for integration tests

2009-02-23 Thread dhning
What I do is, for test, to create a new application module almost the same as 
the one used in production, and then replace
with mock dao if necessary. So the mock dao can be put in the test sources. 

Thanks!

DH


- Original Message - 
From: Hugo Palma hugo.m.pa...@gmail.com
To: Tapestry users users@tapestry.apache.org
Sent: Tuesday, February 24, 2009 8:06 AM
Subject: Providing service mocks for integration tests


 I'm implementing my user interface tests using selenium and the provided
 AbstractIntegrationTestSuite class. Everything is working fine.
 
 Still, i'd like to replace my DAO services implementation with some mock
 ones when i run the tests. The problem is that the services are declared in
 the application module so how do i override those declarations for testing
 purposes ?
 One workaround i found was to pass a VM parameter when i run the test goal
 and then in the bind method implementation i check for the parameter and
 declare either the prodution implementation or the mock one. Although this
 works it forces me to implement the mock objects in the main sources and not
 on the test sources where they should be.
 
 I was wondering if anyone had a better way to do this.
 Thanks.


Re: onActivate called twice

2009-02-17 Thread dhning

You mean in rendering phase, onActivate is called twice? It is always called 
only one time in my experience.
I am interested in whether you called this page onActivate from other page?

DH


- Original Message - 
From: Angelo Chen angelochen...@yahoo.com.hk
To: users@tapestry.apache.org
Sent: Tuesday, February 17, 2009 5:02 PM
Subject: t5: onActivate called twice


 
 Hi,
 
 I have following code, onActivate was called correctly 1st time, but it will
 be called again during the rendering and obj[0] has 'images', obj[1]
 has 'loading.gif', I do provide a onPassivate, any idea? thanks
 
   private Object[] _objs;
 
   @CommitAfter
   public Object onActivate(Object[] obj) {
   _objs = obj;
 if (_objs.length  0) {
 String id1 = (String) _obj[0];
 String id2 = (String) _obj[1];
 ...
 return null
 } else return Other.class;
 }
 
 public Object[] onPassivate() {
return _objs;
}
 
 -- 
 View this message in context: 
 http://www.nabble.com/t5%3A-onActivate-called-twice-tp22053148p22053148.html
 Sent from the Tapestry - User mailing list archive at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org
 


Re: [T5.0.18] client exception processing response: syntaxError: missiong; before statement

2009-02-16 Thread dhning
well, what's your t5component version? I am using 0.5.18 Window, no issue on 
IE67, firefox2, but have issue on firefox 3.0 which is caused by stylesheet 
insertion in ajax response.

Thanks!

DH


- Original Message - 
From: Tan cyb...@n quesoft.cyber...@gmail.com
To: Tapestry users users@tapestry.apache.org
Sent: Tuesday, February 17, 2009 11:22 AM
Subject: Re: [T5.0.18] client exception processing response: syntaxError: 
missiong; before statement


 The error might come out from Window.java in T5Component.  Because when i
 remark the component. and stop using it.
 the error didn't come out anymore.  May I know how to solve? I need to use
 this component.
 
 On Tue, Feb 17, 2009 at 9:29 AM, Tan cyb...@n 
 quesoft.cyber...@gmail.comwrote:
 
 hi all,

 I'm new in tapestry.
 After the page is loaded completed. I click on the Add Button  it show me
 the error:

 client exception processing response: syntaxError: missing; before
 statement

 I didn't insert any Javascript.  but how am i going to debug or check which
 line are having this error?
 or is there any possibility to cause the error?
 even i open page source to check on the html code, i also can't find any
 possibility error.
 can any one help me on this :(

 Thank you.

 Tan






Re: [T5.0.18] client exception processing response: syntaxError: missiong; before statement

2009-02-16 Thread dhning
Mine: T5.0.18  T5Common 0.5.18.
When using Window, my problem happens only in firefox3.0 because of 
@IncludeStylesheet(value = {${commons.scripts}/window/themes/default.css}) 
and other stylesheet in AbstractWindow.
My error msg is 'Client exception processing response: TypeError: existing is 
null'.

But from what you described, it seems that you failed always in all browsers?

DH

- Original Message - 
From: Tan cyb...@n quesoft.cyber...@gmail.com
To: Tapestry users users@tapestry.apache.org
Sent: Tuesday, February 17, 2009 1:34 PM
Subject: Re: [T5.0.18] client exception processing response: syntaxError: 
missiong; before statement


 hi,
 
 I just upgraded from 5.0.13 to 5.0.18 T5Components also facing the same
 problem.  I have use zone and block when it returned/refreshed  it will come
 out this error.  is it crash with Block and window.java?
 Thank you.
 
 Regards,
 Tan
 
 On Tue, Feb 17, 2009 at 12:12 PM, dhning ningd...@gmail.com wrote:
 
 well, what's your t5component version? I am using 0.5.18 Window, no issue
 on IE67, firefox2, but have issue on firefox 3.0 which is caused by
 stylesheet insertion in ajax response.

 Thanks!

 DH


 - Original Message -
 From: Tan cyb...@n quesoft.cyber...@gmail.com
 To: Tapestry users users@tapestry.apache.org
 Sent: Tuesday, February 17, 2009 11:22 AM
 Subject: Re: [T5.0.18] client exception processing response: syntaxError:
 missiong; before statement


  The error might come out from Window.java in T5Component.  Because when i
  remark the component. and stop using it.
  the error didn't come out anymore.  May I know how to solve? I need to
 use
  this component.
 
  On Tue, Feb 17, 2009 at 9:29 AM, Tan cyb...@n 
 quesoft.cyber...@gmail.comwrote:
 
  hi all,
 
  I'm new in tapestry.
  After the page is loaded completed. I click on the Add Button  it show
 me
  the error:
 
  client exception processing response: syntaxError: missing; before
  statement
 
  I didn't insert any Javascript.  but how am i going to debug or check
 which
  line are having this error?
  or is there any possibility to cause the error?
  even i open page source to check on the html code, i also can't find any
  possibility error.
  can any one help me on this :(
 
  Thank you.
 
  Tan
 
 
 
 
 



Re: [T5.0.18] client exception processing response: syntaxError: missiong; before statement

2009-02-16 Thread dhning
What about downgrading prototype from 1.6.0.3 (tapestry5.0.18) to 1.6.0.1 and 
have a try.
Last week I also face some strange error message in prototype.js and I replace 
with 1.6.0.1 and everything is ok.

In my ajax case, I don't involve Block but only Zone with t:if, so I don't 
know whether it is caused by Block. Also you can drop Block first to have a 
test.

Thanks!

DH


- Original Message - 
From: Tan cyb...@n quesoft.cyber...@gmail.com
To: Tapestry users users@tapestry.apache.org
Sent: Tuesday, February 17, 2009 2:56 PM
Subject: Re: [T5.0.18] client exception processing response: syntaxError: 
missiong; before statement


 hi DH,
 
 Yes,  All browser having a some problem.  IE is come out Invalid Object.
 FF3 is come out missiong ; before statement
 I noticed a lot of ajax effect unable to work in zone and block even mixin.
 Thank you.
 
 Regards,
 Tan
 
 On Tue, Feb 17, 2009 at 1:57 PM, dhning ningd...@gmail.com wrote:
 
 Mine: T5.0.18  T5Common 0.5.18.
 When using Window, my problem happens only in firefox3.0 because of
 @IncludeStylesheet(value = {${commons.scripts}/window/themes/default.css})
 and other stylesheet in AbstractWindow.
 My error msg is 'Client exception processing response: TypeError: existing
 is null'.

 But from what you described, it seems that you failed always in all
 browsers?

 DH

 - Original Message -
 From: Tan cyb...@n quesoft.cyber...@gmail.com
 To: Tapestry users users@tapestry.apache.org
 Sent: Tuesday, February 17, 2009 1:34 PM
 Subject: Re: [T5.0.18] client exception processing response: syntaxError:
 missiong; before statement


  hi,
 
  I just upgraded from 5.0.13 to 5.0.18 T5Components also facing the same
  problem.  I have use zone and block when it returned/refreshed  it will
 come
  out this error.  is it crash with Block and window.java?
  Thank you.
 
  Regards,
  Tan
 
  On Tue, Feb 17, 2009 at 12:12 PM, dhning ningd...@gmail.com wrote:
 
  well, what's your t5component version? I am using 0.5.18 Window, no
 issue
  on IE67, firefox2, but have issue on firefox 3.0 which is caused by
  stylesheet insertion in ajax response.
 
  Thanks!
 
  DH
 
 
  - Original Message -
  From: Tan cyb...@n quesoft.cyber...@gmail.com
  To: Tapestry users users@tapestry.apache.org
  Sent: Tuesday, February 17, 2009 11:22 AM
  Subject: Re: [T5.0.18] client exception processing response:
 syntaxError:
  missiong; before statement
 
 
   The error might come out from Window.java in T5Component.  Because
 when i
   remark the component. and stop using it.
   the error didn't come out anymore.  May I know how to solve? I need to
  use
   this component.
  
   On Tue, Feb 17, 2009 at 9:29 AM, Tan cyb...@n 
  quesoft.cyber...@gmail.comwrote:
  
   hi all,
  
   I'm new in tapestry.
   After the page is loaded completed. I click on the Add Button  it
 show
  me
   the error:
  
   client exception processing response: syntaxError: missing; before
   statement
  
   I didn't insert any Javascript.  but how am i going to debug or check
  which
   line are having this error?
   or is there any possibility to cause the error?
   even i open page source to check on the html code, i also can't find
 any
   possibility error.
   can any one help me on this :(
  
   Thank you.
  
   Tan
  
  
  
  
  
 
 



Re: About the value of the parameters

2008-12-23 Thread dhning
Hi,

Maybe because of the zone, why not have a try by removing it?


DH


 hi,
 thanks for reply.  I have copy all the sample and deploy into my program
 using  t:mixins=confirm as well.
 if(! confirm(this.message))  e.stop();  is only i wanted to ask when the
 script is reached that statement. :)
 
 below are my statement in tml.
 
 
 t:actionlink t:mixins=confirm t:zone=zoneFormView t:id=toolbarDel
 t:context=${id}buttonimg src=images/deleteRecord24.png
 //button/t:actionlink
 
 is it because it contained t:zone and causing the return false after confirm
 button it will still call the javascript itself?
 
 Thank you.
 
 
 
 Tan
 
 
 2008/12/23 ningdh ningd...@gmail.com
 
 You are welcome:)
 I completely copied that code 2 weeks ago, create a mixin and it runs well
 for actionlink and submit.
 I think you didn't implement that mixin, but only add 'if(!
 confirm(this.message))   e.stop();' to submit button?

 DH
   hi,
 
  I have done that, but seems like useless. even i press cancel. it will
 still
  post is it applicable for actionLink( i mean this tutorial) also?
 
  if(! confirm(this.message))
   e.stop();
 
  THank you.
 
  Tan
 
 
 
 
 
  2008/12/23 ningdh ningd...@gmail.com
 
 
  I am afraid you must stop the event as
  http://wiki.apache.org/tapestry/Tapestry5AndJavaScriptExplained does,
 or
  else the request is still posted.
 
   hi 滕训华 ,
  
   do you might to share out your coding about
   @Component(parameters = {onClick=literal:return confirm(\do you want
 to
   delete this record?\);})  ?
  
   i have a problem on prompt a confirmation box before submit. but when
 i
  even
   press cancel. it also do  the submit post back.
  
   Thank you.
  
   Regards,
   Tan
  
  
   2008/6/27 滕训华 ten...@magic-sw.com.cn
  
   Hi,everyone
  
  
  
   @Component(parameters = {onClick=literal:return confirm(\do you
 want
  to
   delete this record?\);})
  
  
  
   The string do you want to delete this record? that I want to read
 it
   from the properties file,how to do it?
  
  
  
   I am using the t5
  
  
  
 
 



Re: About the value of the parameters

2008-12-23 Thread dhning
I've tested, cause is the zone because it attaches another 'click' event too.

I can't figure out a solution yet.
Refer here to see what the author of Confirm said.
http://markmail.org/message/um2pzavehm3ueoaw?q=link+confirm+zone+list:org%2Eapache%2Etapestry%2Euserspage=2

DH


- Original Message - 
From: Tan cyb...@n quesoft.cyber...@gmail.com
To: Tapestry users users@tapestry.apache.org
Sent: Wednesday, December 24, 2008 10:46 AM
Subject: Re: About the value of the parameters


 hi,
 
 I can't remove it because it is also playing a very important role.  because
 it might affect all my operation.
 any solution?
 Thank you.
 
 REgards,
 Tan
 
 2008/12/24 dhning ningd...@gmail.com
 
 Hi,

 Maybe because of the zone, why not have a try by removing it?


 DH


  hi,
  thanks for reply.  I have copy all the sample and deploy into my program
  using  t:mixins=confirm as well.
  if(! confirm(this.message))  e.stop();  is only i wanted to ask when the
  script is reached that statement. :)
 
  below are my statement in tml.
 
 
  t:actionlink t:mixins=confirm t:zone=zoneFormView t:id=toolbarDel
  t:context=${id}buttonimg src=images/deleteRecord24.png
  //button/t:actionlink
 
  is it because it contained t:zone and causing the return false after
 confirm
  button it will still call the javascript itself?
 
  Thank you.
 
 
 
  Tan
 
 
  2008/12/23 ningdh ningd...@gmail.com
 
  You are welcome:)
  I completely copied that code 2 weeks ago, create a mixin and it runs
 well
  for actionlink and submit.
  I think you didn't implement that mixin, but only add 'if(!
  confirm(this.message))   e.stop();' to submit button?
 
  DH
hi,
  
   I have done that, but seems like useless. even i press cancel. it will
  still
   post is it applicable for actionLink( i mean this tutorial) also?
  
   if(! confirm(this.message))
e.stop();
  
   THank you.
  
   Tan
  
  
  
  
  
   2008/12/23 ningdh ningd...@gmail.com
  
  
   I am afraid you must stop the event as
   http://wiki.apache.org/tapestry/Tapestry5AndJavaScriptExplaineddoes,
  or
   else the request is still posted.
  
hi 滕训华 ,
   
do you might to share out your coding about
@Component(parameters = {onClick=literal:return confirm(\do you
 want
  to
delete this record?\);})  ?
   
i have a problem on prompt a confirmation box before submit. but
 when
  i
   even
press cancel. it also do  the submit post back.
   
Thank you.
   
Regards,
Tan
   
   
2008/6/27 滕训华 ten...@magic-sw.com.cn
   
Hi,everyone
   
   
   
@Component(parameters = {onClick=literal:return confirm(\do you
  want
   to
delete this record?\);})
   
   
   
The string do you want to delete this record? that I want to
 read
  it
from the properties file,how to do it?
   
   
   
I am using the t5
   
   
   
  
  
 
 



Re: Additional parameter for beaneditform

2008-12-09 Thread dhning



 Scenario: I am creating Projects and Issues under those projects and have a
 question about passing the projectid around.
 
 Project.tml
t:PageLink page=issue/CreateIssue context=${project.id}Create
 New Issue/t:PageLink
 
 CreateIssue.tml
t:BeanEditForm t:id=issue object=newIssue
 submitLabel=message:submitCreateIssueText exclude=id add=project
t:Parameter name=project
input name=projectId value=${project.id}/
/t:Parameter
/t:BeanEditForm
 
 Q1: notice, I have to add the projectId parameter. Also, 'newIssue' does NOT
 have a projectId field. Submitting this form takes me to onSuccess where I'd
 like to to retrieve the Project, create the Issue, call
 issue.setProject(project) and then save the issue. But how do I retrieve the
 projectId field since it is not part of my Issue entity?
 
 Q2: after saving the new Issue, I'd like to return to the project screen. To
 do that, I'd like to forward to a page/handler by passing the 'projectId'
 again. How do I do that from onSuccess? I return a class - but how do I
 include a parameter?
 
 I think I am missing something. onActivate works when I am rendering a page
 - but I'm not sure what similar method gets called while Posting ... and
 before onSuccess where I can pull off the projectId.
 

Sure, onActivate is also called while posting, and pair of 
onActivate/onPassivate helps much here and you additional parameter can be 
removed from the beaneditform.

Code in CreateIssue.java:
private int projectId;
void onActivate(int projectId) {
this.projectId = projectId;
}
int onPassivate() {
return this.projectId;
}

Then this projectId will be rendered as a hidden value in the form like 
input.type='hidden' name='t:ac' value='your project id'. So you can directly 
use this.projectId inside onSuccess.
@InjectPage
private Project projectPage;
Project onSuccess() {
// other logic
projectPage.onActivate(projectId); // other set style methods are ok too.
return projectPage;
}

In Project.java, apply the same code:
private int projectId;
void onActivate(int projectId) {
this.projectId = projectId;
}
int onPassivate() {
return this.projectId;
}

 Furthermore, is there a lifecycle method I can implement that would attach
 projectId to the request so that the following page can get it? Maybe during
 onPassivate? Just not sure how to pass it.

Refer to Geoff's jumpstart 
http://jumpstart.doublenegative.com.au:8080/jumpstart/, there are some examples 
on how to pass value between pages.
Forget the request and always use onActivate/onPassivate/InjectPage and other 
javabean style to set values between pages as above.

 
 Thanks for any suggestions,
 
 -Luther


Re: How to share flash message across pages better?

2008-11-27 Thread dhning
Use flash persistence.
A simple sample, user CRUD.

EditUser.java

public class EditUser {
@InjectPage
private UserList list;

onSuccess() {
list.setMessage(Your record was created succesfully!);
}
}

public class UserList {
@Persist(flash)
private String message;
public void setMessage(String message) {
this.message = message;
}
public String getMessage() {
return this.message;
}
}

Next time when accessing user list, the message would be gone.

Thanks,

DH


- Original Message - 
From: inrila [EMAIL PROTECTED]
To: users@tapestry.apache.org
Sent: Friday, November 28, 2008 12:36 PM
Subject: How to share flash message across pages better?


 
 Hi,
 
 As I figured out @Persist will basically store the value in the
 session/flash for _this_ specific page. 
 
 Let's say I created simple CRUD, where on the List page I am showing all
 records.
 When adding new record after onSuccess() I want to put some flash message
 i.e. Your record was created succesfully! and return List.class so user
 will get to List page automatically. 
 
 And user should see this flash message. But how can I do do that? Is there
 some existing mechanism to use for that? As I mentioned above, @Persist will
 not work, as we are working with different pages. And @ApplicationState is
 an overkill, because I basically need only flash message.
 Any other options? 
 
 Thanks!
 -- 
 View this message in context: 
 http://www.nabble.com/How-to-share-%22flash%22-message-across-pages-better--tp20728892p20728892.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: How to work with other page's actionlink?

2008-11-27 Thread dhning
Sure you can, use page link.

Like deleting a user:
t:pagelink page=record/delete context=user.id/ or even context=user if 
you have defined coercier on user object.
Please remember that record/delete page should implmenet onActivate method.
Delete.java
void onActivate(int userid) { // or User user
// your deletion logic here.
}

Thanks,
DH


- Original Message - 
From: inrila [EMAIL PROTECTED]
To: users@tapestry.apache.org
Sent: Friday, November 28, 2008 1:57 PM
Subject: How to work with other page's actionlink?


 
 Question here :-)
 
 I have on the List page t:actionlink t:id=delete...
 
 So I need to process it in List page as onActionFromDelete(...)
 
 Is it possible to point it to some other page? Let's say special dedicated
 page -- i.e. record/delete, same as I have record/create or
 record/edit ?
 -- 
 View this message in context: 
 http://www.nabble.com/How-to-work-with-other-page%27s-actionlink--tp20729358p20729358.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: actionlink, pagelink -- how to do POST?

2008-11-27 Thread dhning
If in a form, use linksubmit introduced in latest release 5.0.17.
If not, you can refer to OnEvent in t5components project 
http://code.google.com/p/tapestry5-components/.


Thanks,

DH


- Original Message - 
From: inrila [EMAIL PROTECTED]
To: users@tapestry.apache.org
Sent: Friday, November 28, 2008 2:02 PM
Subject: actionlink, pagelink -- how to do POST?


 
 Hello again,
 
 Both actionlink, pagelink - they do GET which is not very smart for the
 let's say delete or some other state changing actions. Do we have an
 option how we can do some postbutton or postsomething? :-) Or do we have
 to do that manually? Like creating HTML form and then defining submit for
 the required action? And how do we check for the type of the request -- is
 it GET or POST? Any Tapestry-features we can use? Because onAction()
 onActionFrom...() they do not really care if it's GET or POST as I see...
 
 Thanks!
 -- 
 View this message in context: 
 http://www.nabble.com/actionlink%2C-pagelinkhow-to-do-POST--tp20729400p20729400.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: T 5.0.16 : HTML code layout / format of generated files seemes to be wrong

2008-11-24 Thread dhning
That's default, not an issue.

To turn off the behavior and make code clean,  in your appmodule,

public static void contributeApplicationDefaults(
MappedConfigurationString, String configuration)
{
configuration.add(tapestry.compress-whitespace, false); // turn off it
}


Thanks!

DH


- Original Message - 
From: Christian P. [EMAIL PROTECTED]
To: users@tapestry.apache.org
Sent: Monday, November 24, 2008 5:46 PM
Subject: T 5.0.16 : HTML code layout / format of generated files seemes to be 
wrong


 
 Hey,
 
 please excuse my bad English. I just started to try out Tapestry and have
 one big problem I haven't found an answer for. The source code available in
 the client's browsers seems to be really ugly.
 All code from the tml-files (Layout.tml, Index.tml) is squeezed in one
 single line. So the source code looks like:
 
 1: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Stri...head...
 /headbody... (EVERYTHING ;) )
 2: /divscript src=assets/5.0.16/scriptaculous/prototype.js
 type=text/javascript/scriptscript ... (All Java Scripts)
 3: !--
 4: Tapestry.DEBUG_ENABLED = true;
 5: Tapestry.onDOMLoaded(function() {
 6: $('firstNumber').activate();
 7: Tapestry.init(...
 8: });
 9: // --
 10: /script/body/html
 
 
 Is there something I missed to do / add or might it be an Eclipse problem?
 
 
 Thanks in advance,
 Christian
 -- 
 View this message in context: 
 http://www.nabble.com/T-5.0.16-%3A-HTML-code-layout---format-of-generated-files-seemes-to-be-wrong-tp20657660p20657660.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: T5: Simple Component Question?

2008-11-23 Thread dhning
Following solution posted before by others should help, but I am wondering the 
performance comparing to the internal support  like t4 $content$ in 5.1. BTW, 
what's the relationship of 5.0 and 5.1, are they developped parallelly now?
This is quite a pattern like Layout.

In your header, tml like this, note the component T4content

?xml version=1.0 encoding=utf-8?
html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
 xmlns=http://www.w3.org/1999/xhtml; t:type=T4content
head
 meta http-equiv=Content-Type content=text/html; charset=UTF-8 /
 link rel=stylesheet type=text/css href=global.css/

/head
body
 !-- you can write any html code for previewability --
 div id=container
  t:parameter name=body
   // your true code
  /t:parameter
 /div
/body
/html

And in your T4content.java, like:
public class T4content {

@Parameter
@Property
private Block body;

Object beginRender()
{
return body;
}

// I don't want template to be rendered.
@BeforeRenderTemplate
boolean renderTemplate() {
return false;   
}
}


Thanks!

DH




 This was possible in Tapestry 4, and something equivalent will be
 available in 5.1.  For the moment, you are out of luck.
 
 On Fri, Nov 21, 2008 at 4:26 PM, Ben Wong [EMAIL PROTECTED] wrote:
 Hi everyone,



 I have been picking up Tapestry 5 quickly in the last few weeks.  I got
 quite far but hit a brick wall.  This should be simple but I cannot find the
 solution.  Basically, I have a Layout page/component.  Inside the Layout
 page/component, it has a Header component.  The Header component will have a
 .tml template that will render the header portion of the page.  However, to
 make it viewable by designers etc, I want to also mark up the .tml file as a
 full HTML page.  I just want the component however to only render the
 necessary part.



 How can I do that?  I thought the wrapping what I want to render inside a
 t:container would do the trick but the whole markup got render.



 Thanks for any help in advance,

 Ben


 
 
 
 -- 
 Howard M. Lewis Ship
 
 Creator Apache Tapestry and Apache HiveMind
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


Re: T5 - new clien side validator, again

2008-11-02 Thread dhning
Why not new a js file to hold your js code and include it in your page class?:)

That will solve your problem. Our .js is always after tapestry.js.


Thanks,

DH


- Original Message - 
From: Mohammad Shamsi [EMAIL PROTECTED]
To: Tapestry users users@tapestry.apache.org
Sent: Thursday, October 30, 2008 4:29 PM
Subject: Re: T5 - new clien side validator, again


 Thanks DH,
 
 but the problem is still there.
 
 if you look at html code generated for a page in browser it will be
 something like this :
 
 html
   ...
 body
 .
 form
 *script  /  :: Tapestry add link to Tapestry.js  here.*
 
 
 /form
 *script type=text/javascript
  .   :: Tapestry registers validations to form inputs here
 /script*
 .
 /body
 /html
 
 
 if i add the code like in wiki pages on top of my page before form :
 
 Tapestry.Validator.int = function(field, message)
 
 i will get the javascript error that Tapestry object undefined because the
 link to Tapestry.js is after this code.
 
 if i add the code after form object.  i will get the error during Tapestry
 Validation Registration. because it is not able to find my new validation
 method yet. :(
 
 
 
 
 On Thu, Oct 30, 2008 at 11:35 AM, dhning [EMAIL PROTECTED] wrote:
 
 http://wiki.apache.org/tapestry/Tapestry5HowToAddValidators

 The js code segment is outdated, please refer to latest tapestry.js.

 Thanks!

 DH


 - Original Message -
 From: Mohammad Shamsi [EMAIL PROTECTED]
 To: Tapestry users users@tapestry.apache.org
 Sent: Saturday, October 25, 2008 2:23 AM
 Subject: Re: T5 - new clien side validator, again


  no idea ?
 
  i don't know how add my javascript validator in Tapestry validators list.
 
  any expeirence ?
 
  thanks all
 
  On Wed, Oct 22, 2008 at 11:27 PM, Mohammad Shamsi [EMAIL PROTECTED]
 wrote:
 
  hi,
 
  im trying to add new validator to my project. but i have problem to add
  javascript for clienside validation.
 
  any idea ?
 
  --
  sincerely yours
  M. H. Shamsi
 
 
 
 
  --
  sincerely yours
  M. H. Shamsi
 

 
 
 
 -- 
 sincerely yours
 M. H. Shamsi


Re: T5 - new clien side validator, again

2008-11-02 Thread dhning
Why places of tapestry.js are different between us? I am using 5.0.16-snapshot, 
and all js related code is before /body.


Thanks

DH


- Original Message - 
From: Mohammad Shamsi [EMAIL PROTECTED]
To: Tapestry users users@tapestry.apache.org
Sent: Monday, November 03, 2008 10:35 AM
Subject: Re: T5 - new clien side validator, again


 On Mon, Nov 3, 2008 at 10:30 AM, dhning [EMAIL PROTECTED] wrote:
 
 Why not new a js file to hold your js code and include it in your page
 class?:)

 That will solve your problem. Our .js is always after tapestry.js.
 
 
 the problem is right here, my .js file is not after Tapestry.js. its before
 it.
 
 Tapestry adds link to Tapestry.js during Form component rendering.
 if you look at the generated HTML code in your browser, you will see
 something like this :
 
 html
 
 *form*
 *script  /  :: Tapestry add link to Tapestry.js  here.*
 ..
 
 
 
 
 


 Thanks,

 DH


 - Original Message -
 From: Mohammad Shamsi [EMAIL PROTECTED]
 To: Tapestry users users@tapestry.apache.org
 Sent: Thursday, October 30, 2008 4:29 PM
 Subject: Re: T5 - new clien side validator, again


  Thanks DH,
 
  but the problem is still there.
 
  if you look at html code generated for a page in browser it will be
  something like this :
 
  html
...
  body
  .
  form
  *script  /  :: Tapestry add link to Tapestry.js  here.*
 
 
  /form
  *script type=text/javascript
   .   :: Tapestry registers validations to form inputs here
  /script*
  .
  /body
  /html
 
 
  if i add the code like in wiki pages on top of my page before form :
 
  Tapestry.Validator.int = function(field, message)
 
  i will get the javascript error that Tapestry object undefined because
 the
  link to Tapestry.js is after this code.
 
  if i add the code after form object.  i will get the error during
 Tapestry
  Validation Registration. because it is not able to find my new validation
  method yet. :(
 
 
 
 
  On Thu, Oct 30, 2008 at 11:35 AM, dhning [EMAIL PROTECTED] wrote:
 
  http://wiki.apache.org/tapestry/Tapestry5HowToAddValidators
 
  The js code segment is outdated, please refer to latest tapestry.js.
 
  Thanks!
 
  DH
 
 
  - Original Message -
  From: Mohammad Shamsi [EMAIL PROTECTED]
  To: Tapestry users users@tapestry.apache.org
  Sent: Saturday, October 25, 2008 2:23 AM
  Subject: Re: T5 - new clien side validator, again
 
 
   no idea ?
  
   i don't know how add my javascript validator in Tapestry validators
 list.
  
   any expeirence ?
  
   thanks all
  
   On Wed, Oct 22, 2008 at 11:27 PM, Mohammad Shamsi 
 [EMAIL PROTECTED]
  wrote:
  
   hi,
  
   im trying to add new validator to my project. but i have problem to
 add
   javascript for clienside validation.
  
   any idea ?
  
   --
   sincerely yours
   M. H. Shamsi
  
  
  
  
   --
   sincerely yours
   M. H. Shamsi
  
 
 
 
 
  --
  sincerely yours
  M. H. Shamsi
 

 
 
 
 -- 
 sincerely yours
 M. H. Shamsi


Re: T5 - new clien side validator, again

2008-11-02 Thread dhning
I believed that my customized validators work since 5.0.14 in that way. And I 
remembered that changing js link to end of the html document must be before 
5.0.15 or even earlier. 

Anyone else in this list can help on the issue?

Thanks

DH


- Original Message - 
From: Mohammad Shamsi [EMAIL PROTECTED]
To: Tapestry users users@tapestry.apache.org
Sent: Monday, November 03, 2008 10:51 AM
Subject: Re: T5 - new clien side validator, again


i am using 5.0.15.
 
 On Mon, Nov 3, 2008 at 10:49 AM, dhning [EMAIL PROTECTED] wrote:
 
 Why places of tapestry.js are different between us? I am using
 5.0.16-snapshot, and all js related code is before /body.


 Thanks

 DH


 - Original Message -
 From: Mohammad Shamsi [EMAIL PROTECTED]
 To: Tapestry users users@tapestry.apache.org
 Sent: Monday, November 03, 2008 10:35 AM
 Subject: Re: T5 - new clien side validator, again


  On Mon, Nov 3, 2008 at 10:30 AM, dhning [EMAIL PROTECTED] wrote:
 
  Why not new a js file to hold your js code and include it in your page
  class?:)
 
  That will solve your problem. Our .js is always after tapestry.js.
 
 
  the problem is right here, my .js file is not after Tapestry.js. its
 before
  it.
 
  Tapestry adds link to Tapestry.js during Form component rendering.
  if you look at the generated HTML code in your browser, you will see
  something like this :
 
  html
  
  *form*
  *script  /  :: Tapestry add link to Tapestry.js  here.*
  ..
 
 
 
 
 
 
 
  Thanks,
 
  DH
 
 
  - Original Message -
  From: Mohammad Shamsi [EMAIL PROTECTED]
  To: Tapestry users users@tapestry.apache.org
  Sent: Thursday, October 30, 2008 4:29 PM
  Subject: Re: T5 - new clien side validator, again
 
 
   Thanks DH,
  
   but the problem is still there.
  
   if you look at html code generated for a page in browser it will be
   something like this :
  
   html
 ...
   body
   .
   form
   *script  /  :: Tapestry add link to Tapestry.js  here.*
  
  
   /form
   *script type=text/javascript
.   :: Tapestry registers validations to form inputs here
   /script*
   .
   /body
   /html
  
  
   if i add the code like in wiki pages on top of my page before form :
  
   Tapestry.Validator.int = function(field, message)
  
   i will get the javascript error that Tapestry object undefined because
  the
   link to Tapestry.js is after this code.
  
   if i add the code after form object.  i will get the error during
  Tapestry
   Validation Registration. because it is not able to find my new
 validation
   method yet. :(
  
  
  
  
   On Thu, Oct 30, 2008 at 11:35 AM, dhning [EMAIL PROTECTED] wrote:
  
   http://wiki.apache.org/tapestry/Tapestry5HowToAddValidators
  
   The js code segment is outdated, please refer to latest tapestry.js.
  
   Thanks!
  
   DH
  
  
   - Original Message -
   From: Mohammad Shamsi [EMAIL PROTECTED]
   To: Tapestry users users@tapestry.apache.org
   Sent: Saturday, October 25, 2008 2:23 AM
   Subject: Re: T5 - new clien side validator, again
  
  
no idea ?
   
i don't know how add my javascript validator in Tapestry validators
  list.
   
any expeirence ?
   
thanks all
   
On Wed, Oct 22, 2008 at 11:27 PM, Mohammad Shamsi 
  [EMAIL PROTECTED]
   wrote:
   
hi,
   
im trying to add new validator to my project. but i have problem
 to
  add
javascript for clienside validation.
   
any idea ?
   
--
sincerely yours
M. H. Shamsi
   
   
   
   
--
sincerely yours
M. H. Shamsi
   
  
  
  
  
   --
   sincerely yours
   M. H. Shamsi
  
 
 
 
 
  --
  sincerely yours
  M. H. Shamsi
 

 
 
 
 -- 
 sincerely yours
 M. H. Shamsi


Re: T5 - new clien side validator, again

2008-10-29 Thread dhning
http://wiki.apache.org/tapestry/Tapestry5HowToAddValidators

The js code segment is outdated, please refer to latest tapestry.js.

Thanks!

DH


- Original Message - 
From: Mohammad Shamsi [EMAIL PROTECTED]
To: Tapestry users users@tapestry.apache.org
Sent: Saturday, October 25, 2008 2:23 AM
Subject: Re: T5 - new clien side validator, again


 no idea ?
 
 i don't know how add my javascript validator in Tapestry validators list.
 
 any expeirence ?
 
 thanks all
 
 On Wed, Oct 22, 2008 at 11:27 PM, Mohammad Shamsi [EMAIL PROTECTED]wrote:
 
 hi,

 im trying to add new validator to my project. but i have problem to add
 javascript for clienside validation.

 any idea ?

 --
 sincerely yours
 M. H. Shamsi

 
 
 
 -- 
 sincerely yours
 M. H. Shamsi


Re: T5 - Catching user leaving a page

2008-10-21 Thread dhning
Hi, 

Maybe T5 would not have any solution for such case, I think this is a client 
browser issue, for server doesn't know user has changed url(SessionListener may 
know closing browser).

Maybe you can handle window event 'window.onbeforeunload'(it will be fired if 
closing browser, changing url, click lick and so on happen -- leaving current 
page), in IE it works, but I am not sure about others.

Thanks!

DH


- Original Message - 
From: BarryDev [EMAIL PROTECTED]
To: users@tapestry.apache.org
Sent: Wednesday, October 22, 2008 12:16 AM
Subject: T5 - Catching user leaving a page


 
 Hi all,
 
 I've completed the hi/lo and address tutorial and I'm not trying to write a
 simple chatroom to learn some more about tapestry. 
 
 My basic chatroom currently has a login page which forwards to a chatroom
 which lists the usernames of all logged in users.  I'm currently using a
 singleton to store all the users who are logged in and fetch them when
 rendering the chatroom.
 
 What I would like to do next is catch a user leaving the chatroom no matter
 what they're do (closing broswer, typing in new url, clicking a link in the
 app, hitting back button in browser) so I can remove them from the list of
 logged in users.
 
 What's the best mechanism to do this with Tap5, is there a page detached
 event I can register to that will get thrown in all cases?  Is it better to
 have a bit of javascript on the page which polls another page doing an async
 I'm still alive? (I'll probably need to do something like this for polling
 for new messages from other users)
 
 Or is there a more elegant solution hidden within T5?  I've searched here
 and the docs but haven't been able to find anything.
 
 Regards
 Barry
 -- 
 View this message in context: 
 http://www.nabble.com/T5---Catching-user-leaving-a-page-tp20093965p20093965.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: [T5] Page naigation using submit

2008-10-17 Thread dhning
But your component must be enclosed by an outer form component, right? Or else, 
how can you put textfield in your component?

Thanks!

DH


- Original Message - 
From: Ville Virtanen [EMAIL PROTECTED]
To: users@tapestry.apache.org
Sent: Friday, October 17, 2008 7:01 PM
Subject: [T5] Page naigation using submit


 
 Hi,
 
 This must be discussed before, but I could not find anything using search
 and I seem to be having total brain freeze here so:
 
 I have a case where I have to let user enter rows to a view and there must
 be an Edit function at the end of each of these rows. The edit
 functionality MUST SUBMIT before redirecting to detail edit as every row in
 the view are editable, and user may edit the rows, after which she/he/it
 clicks the edit button to edit the details of a row.
 
 So, how can I use submit to redirect to the detail page. As this is a
 component, I cannot do the normal onSuccess redirect, as my component does
 not define form and hence it doesn't receive the on submit event.
 
 I think it is pretty standard to have a button to redirect to another page
 after submit. 
 
 Am I missing something totally obvious?
 
 - Ville
 -- 
 View this message in context: 
 http://www.nabble.com/-T5--Page-naigation-using-submit-tp20031177p20031177.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: [T5] Page naigation using submit

2008-10-17 Thread dhning
From your  former mail, my understanding on your case (correct me if I am 
wrong): your page has a form, and the form contains your component, and your 
component template has multiple submit buttons (it must be submit component if 
you want to handle select event).

I think there are two ways:
1. Inside the page java, handle the onAction/onSuccess event. (You can not see 
the onSelect event here)
2. Inside your component java, handle the onSelect event (I am not sure whether 
it is right, I haven't tried before)

Thanks!

DH


- Original Message - 
From: Ville Virtanen [EMAIL PROTECTED]
To: users@tapestry.apache.org
Sent: Friday, October 17, 2008 8:08 PM
Subject: Re: [T5] Page naigation using submit


 
 Yes it must be, otherwise it won't work. 
 
 The submit event that is triggered by the form in the page does not bubble
 to my component and I can't use the selected event triggered by the button
 in my component because that event does not support return type of page
 class.
 
 - Ville
 
 
 dhning-2 wrote:
 
 But your component must be enclosed by an outer form component, right? Or
 else, how can you put textfield in your component?
 
 Thanks!
 
 DH
 
 
 - Original Message - 
 From: Ville Virtanen [EMAIL PROTECTED]
 To: users@tapestry.apache.org
 Sent: Friday, October 17, 2008 7:01 PM
 Subject: [T5] Page naigation using submit
 
 
 
 Hi,
 
 This must be discussed before, but I could not find anything using search
 and I seem to be having total brain freeze here so:
 
 I have a case where I have to let user enter rows to a view and there
 must
 be an Edit function at the end of each of these rows. The edit
 functionality MUST SUBMIT before redirecting to detail edit as every row
 in
 the view are editable, and user may edit the rows, after which she/he/it
 clicks the edit button to edit the details of a row.
 
 So, how can I use submit to redirect to the detail page. As this is a
 component, I cannot do the normal onSuccess redirect, as my component
 does
 not define form and hence it doesn't receive the on submit event.
 
 I think it is pretty standard to have a button to redirect to another
 page
 after submit. 
 
 Am I missing something totally obvious?
 
 - Ville
 -- 
 View this message in context:
 http://www.nabble.com/-T5--Page-naigation-using-submit-tp20031177p20031177.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]
 

 
 
 -- 
 View this message in context: 
 http://www.nabble.com/-T5--Page-naigation-using-submit-tp20031177p20032020.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: [T5] Page naigation using submit

2008-10-17 Thread dhning
From your  former mail, my understanding on your case (correct me if I am 
wrong): your page has a form, and the form contains your component, and your 
component template has multiple submit buttons (it must be submit component if 
you want to handle select event).

I think there are two ways:
1. Inside the page java, handle the onAction/onSuccess event. (You can not see 
the onSelect event here)
2. Inside your component java, handle the onSelect event (I am not sure whether 
it is right, I haven't tried before)

Thanks!

DH
- Original Message - 
From: Ville Virtanen [EMAIL PROTECTED]
To: users@tapestry.apache.org
Sent: Friday, October 17, 2008 8:08 PM
Subject: Re: [T5] Page naigation using submit


 
 Yes it must be, otherwise it won't work. 
 
 The submit event that is triggered by the form in the page does not bubble
 to my component and I can't use the selected event triggered by the button
 in my component because that event does not support return type of page
 class.
 
 - Ville
 
 
 dhning-2 wrote:
 
 But your component must be enclosed by an outer form component, right? Or
 else, how can you put textfield in your component?
 
 Thanks!
 
 DH
 
 
 - Original Message - 
 From: Ville Virtanen [EMAIL PROTECTED]
 To: users@tapestry.apache.org
 Sent: Friday, October 17, 2008 7:01 PM
 Subject: [T5] Page naigation using submit
 
 
 
 Hi,
 
 This must be discussed before, but I could not find anything using search
 and I seem to be having total brain freeze here so:
 
 I have a case where I have to let user enter rows to a view and there
 must
 be an Edit function at the end of each of these rows. The edit
 functionality MUST SUBMIT before redirecting to detail edit as every row
 in
 the view are editable, and user may edit the rows, after which she/he/it
 clicks the edit button to edit the details of a row.
 
 So, how can I use submit to redirect to the detail page. As this is a
 component, I cannot do the normal onSuccess redirect, as my component
 does
 not define form and hence it doesn't receive the on submit event.
 
 I think it is pretty standard to have a button to redirect to another
 page
 after submit. 
 
 Am I missing something totally obvious?
 
 - Ville
 -- 
 View this message in context:
 http://www.nabble.com/-T5--Page-naigation-using-submit-tp20031177p20031177.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]
 

 
 
 -- 
 View this message in context: 
 http://www.nabble.com/-T5--Page-naigation-using-submit-tp20031177p20032020.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: The chinese characters can not be saved correctly

2008-06-30 Thread dhning
That should be not related to Tapestry. 

What's your DB? Google it with relevant charset problem. Make sure the 
connection encode and db table charset consistent and valid. 

Thanks!

DH


- Original Message - 
From: 滕训华 [EMAIL PROTECTED]
To: 'Tapestry users' users@tapestry.apache.org
Sent: Tuesday, July 01, 2008 8:45 AM
Subject: The chinese characters can not be saved correctly


 When I input the chinese characters in the textfileds or textAreas of the
 form and save into the database,it will be not saved correctly, what should
 I do?
 


Re: The chinese characters can not be saved correctly

2008-06-30 Thread dhning
But my environment works well in form.

Mysql DB: gbk
DB Table: gbk
connection url: jdbc:mysql://localhost/db-name

I can input Chinese and can view it correctly in page.

In your case, how you test with your develop tool (and what is it)?
Have you tested some sample text with direct jdbc connection? What's the result?

Thanks!

DH


- Original Message - 
From: 滕训华 [EMAIL PROTECTED]
To: 'Tapestry users' users@tapestry.apache.org
Sent: Tuesday, July 01, 2008 9:47 AM
Subject: 答复: The chinese characters can not be saved correctly


My database server is SQL SERVER 2000,and I can write or read it correctly
with other develop tool,and with T5,if I write the correct Chinese into
table directly,it can display in the page produced by t5,but can not write
into db correctly if I save it in one form.

-邮件原件-
发件人: dhning [mailto:[EMAIL PROTECTED] 
发送时间: 2008年7月1日 9:42
收件人: Tapestry users
主题: Re: The chinese characters can not be saved correctly

That should be not related to Tapestry. 

What's your DB? Google it with relevant charset problem. Make sure the
connection encode and db table charset consistent and valid. 

Thanks!

DH


- Original Message - 
From: 滕训华 [EMAIL PROTECTED]
To: 'Tapestry users' users@tapestry.apache.org
Sent: Tuesday, July 01, 2008 8:45 AM
Subject: The chinese characters can not be saved correctly


 When I input the chinese characters in the textfileds or textAreas of the
 form and save into the database,it will be not saved correctly, what
should
 I do?
 



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



Re: Action link and parameters

2008-06-29 Thread dhning
Use onActivate/onPassivate methods. You can get detail here: 
http://tapestry.apache.org/tapestry5/tapestry-core/guide/pagenav.html

Simple example:

Page A:

public class A {
@InjectPage
private B pageB;
B onAction() {
pageB.onActivate(your value);
return pageB;
}
}


public class B {
@Property
private String value;

void onActivate(String value) {
this.value = value;
}

String onPassivate() {
return this.value
}
}

Thanks!

DH


- Original Message - 
From: 滕训华 [EMAIL PROTECTED]
To: 'Tapestry users' users@tapestry.apache.org
Sent: Monday, June 30, 2008 8:50 AM
Subject: Action link and parameters


 Use the actionlink to navigate other page and want to pass a parameter
 excepting with the @Persist, is there other method?
 


Re: About the value of the parameters

2008-06-27 Thread dhning
1. @Component(parameters = {onClick=confirmMessage})

public String getConfirmMessage() {
return messsage.get(key-name);
}

Just refer that, I haven't tried for it yet.

2. Or you can define your own binding prefix.

Thanks!

DH


- Original Message - 
From: 滕训华 [EMAIL PROTECTED]
To: 'Tapestry users' users@tapestry.apache.org
Sent: Friday, June 27, 2008 2:52 PM
Subject: About the value of the parameters


Hi,everyone

 

@Component(parameters = {onClick=literal:return confirm(\do you want to
delete this record?\);})

 

The string “do you want to delete this record?” that I want to read it
from the properties file,how to do it?

 

I am using the t5



Re: Chinese can not display correctly

2008-06-25 Thread dhning
Hi,
  You should first utilize native2ascii(in jdk/bin) to convert the 
appname_zh_CN.properties to asc, then it should solve your probelem.
  I don't know why T5 deal with internationalization differently from T4. In 
T4, we developer don't have to convert the resource files, we just need input 
Chinese and it displays correctly.
  
  And if your IDE is eclipse, you can find some plugin to help you convert 
encoding automatically.

Thanks!

DH


- Original Message - 
From: 滕训华 [EMAIL PROTECTED]
To: 'Tapestry users' users@tapestry.apache.org
Sent: Wednesday, June 25, 2008 8:44 AM
Subject: Chinese can not display correctly


I use the ${message:labelKey} in the tml and define the labelKey in the
 properties with Chinese characters,but when the page display ,the Chinese
 can not display correctly. 
 
 
 
 By the way,my properties file is define with UTF-8
 


Re: [ANN] New article about Tapestry 5

2008-05-11 Thread dhning
Great article and help us newbie much.

Thank you!

DH


- Original Message - 
From: Renat Zubairov [EMAIL PROTECTED]
To: Tapestry users users@tapestry.apache.org
Cc: Igor Drobiazko [EMAIL PROTECTED]
Sent: Monday, May 12, 2008 2:58 AM
Subject: [ANN] New article about Tapestry 5


 Hello All,
 My self and Igor Drobiazko are proud to present our new article about
 Tapestry 5:
 
 Tapestry for Nonbelievers published on InfoQ
 http://www.infoq.com/articles/tapestry5-intro
 
 Special thanks to Howard in helping with the article and creating such a
 great tool :)
 
 -- 
 Best regards,
 Renat Zubairov and Igor Drobazko


Re: T5 Event bubling

2008-05-08 Thread dhning
I think it is easy to understand that Page A doesn't know what's wrapped in 
component B, like 'addToChart', so you can only deal with event froom B but not 
'addToChart'.
And I think ActionLink is a more general EventLink, with event name action.

For your case, you can use EventLink to specify special event name.

Or you can fire your customized event name in Component B like what Form 
component does.

Component B.java

@Inject
private ComponentResources _resource;
void onActionFromAddToChart() {
_resource.triggerEvent(addToChart, new Object[]{values}, null);
}

Then in Page A

void onAddToChart() {
// Do your logic.
}


Hope that helps.

Thanks!

DH


- Original Message - 
From: maxthesecond [EMAIL PROTECTED]
To: users@tapestry.apache.org
Sent: Thursday, May 08, 2008 6:01 PM
Subject: T5 Event bubling


 
 
 a page:  A
  a wraper component: B
   a component:  C inside wraper having an action link with
 id=addToChart
 
 
 At the page level by now I can only trap the events from C like
 
  @OnEvent(component=B)
   void whatevernamewilldothejob(String ID){
  }
 
 or
   void onActionFromB(String Id){
}
 
 
 Are those the only posiblities?
 I reviewed all posts related to events and see no clear statment about the
 isue.
 
 And of course the problem is: what shall I do to distinguish two different
 acction links in my component?
 After all If I look at the generated url from the action link it contains
 afaik all the needed information 
 
 /page.container.component.addToChart
 
 If the way to go is EventLink component Ok but then ActionLinks is much less
 useful.
 
 Thanks
 
 
 -- 
 View this message in context: 
 http://www.nabble.com/T5-Event-bubling-tp17124159p17124159.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]
 


Is it possible to prevent the render method in parent component from being invoked?

2008-04-23 Thread dhning
Hi, 

First I know it is a feature that parent method is prior to child's.

I need to extend GridPager component because the action link in GridPager 
doesn't have a context parameter, 
so the context info of the link is very limited(only the page No.). And I don't 
like to persist context in session. 

The case is that in a user list page with search function and Grid component, 
user input keyword username, 
role and so on, and then click 'search' button, the relevant result will be 
shown in a Grid's page 1, 
but when  user clicks page 2, the search keyword is missing, then the result is 
wrong which is not expected.

So I extend GridPager to provide context to actionlink, 
but because it (as parent) implements a method beginRender() which is always 
invoked by Tapestry5 ahead of my GridPager's beginRender(), 
so now there would be two pager generated in list page.

So is there a way to prevent the render method in parent from being invoked? 
And how?

And what's the best practice here dealing with search funcion with Grid? Anyone 
please share your experience.

Thanks in advance.

DH



Is it possible to prevent the render method in parent component from being invoked?

2008-04-23 Thread dhning
Hi, 

First I know it is a feature that parent method is prior to child's.

I need to extend GridPager component because the action link in GridPager 
doesn't have a context parameter, 
so the context info of the link is very limited(only the page No.). And I don't 
like to persist context in session. 

The case is that in a user list page with search function and Grid component, 
user input keyword username, 
role and so on, and then click 'search' button, the relevant result will be 
shown in a Grid's page 1, 
but when  user clicks page 2, the search keyword is missing, then the result is 
wrong which is not expected.

So I extend GridPager to provide context to actionlink, 
but because it (as parent) implements a method beginRender() which is always 
invoked by Tapestry5 ahead of my GridPager's beginRender(), 
so now there would be two pager generated in list page.

So is there a way to prevent the render method in parent from being invoked? 
And how?

And what's the best practice here dealing with search funcion with Grid? Anyone 
please share your experience.

Thanks in advance.

DH



Is it possible to prevent the render method in parent component from being invoked?

2008-04-23 Thread dhning
Hi, 

First I know it is a feature that parent method is prior to child's.

I need to extend GridPager component because the action link in GridPager 
doesn't have a context parameter, 
so the context info of the link is very limited(only the page No.). And I don't 
like to persist context in session. 

The case is that in a user list page with search function and Grid component, 
user input keyword username, 
role and so on, and then click 'search' button, the relevant result will be 
shown in a Grid's page 1, 
but when  user clicks page 2, the search keyword is missing, then the result is 
wrong which is not expected.

So I extend GridPager to provide context to actionlink, 
but because it (as parent) implements a method beginRender() which is always 
invoked by Tapestry5 ahead of my GridPager's beginRender(), 
so now there would be two pager generated in list page.

So is there a way to prevent the render method in parent from being invoked? 
And how?

And what's the best practice here dealing with search funcion with Grid? Anyone 
please share your experience.

Thanks in advance.

DH

Re: Problem with select and beanEditForm

2008-04-22 Thread dhning
Isn't there any stacktrack message in the exception report page or tomcat 
console?
Maybe Filip mean this.

If there is, copy and share here.

Thanks!

DH


- Original Message - 
From: Tomasz Dziurko [EMAIL PROTECTED]
To: Tapestry users users@tapestry.apache.org
Sent: Tuesday, April 22, 2008 6:48 PM
Subject: Re: Problem with select and beanEditForm


 hmm... no exception in Tomcat logs nor application log. Where should I
 put e.printStackTrace() method to get some more info?
 
 -- 
 Tomasz Dziurko
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


Re: T5: Is there a simple way to display property of embedded instance in Grid?

2008-04-20 Thread dhning
) {
  configuration.add(User.class, user);
  }
 
  @SuppressWarnings(unchecked) {
  configuration.add(user, new ModelTranslatorUser());
  }
  ---
 
  ...and after doing this, you have to do exactly *nothing* to add it to
  your grid - it will do so per default. :)
 
  Tobias
 
 
  dhning schrieb:
 
   Hi, Tobias
  
   Thanks for reply.
  
   I am newbie of customizing grid component.
   I guess what you mean like this?:
   table t:type=grid t:source=userSource include=location_city
   t:parameter name=location_cityheader
   /t:parameter
   t:parameter name=location_citycell
   /t:parameter
   /table
  
   But exception message still exists: Bean editor model for User does
 not
  contain a property named 'location_city'.
  
   Thanks!
  
   DH
  
  
   - Original Message -
   From: Tobias Wehrum [EMAIL PROTECTED]
   To: Tapestry users users@tapestry.apache.org
   Sent: Friday, April 18, 2008 4:20 PM
   Subject: Re: T5: Is there a simple way to display property of
 embedded
  instance in Grid?
  
  
  
   Hi DH,
  
   you can teach Location a standard way to be outputted by overwriting
  the
   toString() function of Location.
  
   Now you can output the String returned by toString() simply by
  including
   location.
  
   If you want to output different properties of Location and not in
 one
   cell, I think you will have to add location_city, location_street
 etc
   and implement t:parameter blocks for it.
  
   Hope that helps,
   Tobias
  
   dhning schrieb:
  
   Hi, All
  
   Case: A user own a location while the location is comprised of
 city,
  street...
   public class User {
 private Location location;
 // setter  getter
   }
   public class Location {
 private String city;
// setter  getter
   }
  
   In the user list page, I want to display the city as one column in
  Grid.
   But it doesn't work like this table t:type=grid
  t:source=userSource include=location.city/table.
   The exception message is User does not contain a property named
  'location.city'.
  
   Is there a simple way to implement such function?
  
   Thanks in advance.
   DH
  
   
 -
   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]
 


T5: Is there a simple way to display property of embedded instance in Grid?

2008-04-17 Thread dhning
Hi, All

Case: A user own a location while the location is comprised of city, street...
public class User {
  private Location location;
  // setter  getter
}
public class Location {
  private String city;
 // setter  getter
}

In the user list page, I want to display the city as one column in Grid.
But it doesn't work like this table t:type=grid t:source=userSource 
include=location.city/table.
The exception message is User does not contain a property named 
'location.city'.

Is there a simple way to implement such function?

Thanks in advance.
DH

Re: help in ${....} value binding

2008-04-14 Thread dhning
Sorry, I don't know much about extjs and I can't help.
Would you please show more complete code? Such as textfield segment in 
template. Then anyone here can help you even though they are not familiar with 
extjs.
And you can debug the TextField component in your IDE to check what's the value 
submitted from client side. But first you need to down 5.0.11 source code.
Hope that would help.

Thanks!

DH


- Original Message - 
From: 孟凡振 [EMAIL PROTECTED]
To: users@tapestry.apache.org
Sent: Tuesday, April 15, 2008 11:48 AM
Subject: help in ${} value binding


I am using t5 plus extjs(a javascript framwork)
 some code fragment in *.tml
 ..
 items: [{
fieldLabel: 'name',
name:'formValue',
value:'${formValue}'
}],
 
 .
 and some in page class
 ...
   private String _formValue;
 
public String getFormValue(){
return _formValue;
}
public void setFormValue(String formValue){
this._formValue = formValue;
}
 ..
 Now, my problem is that I can get value by ${formValue}.
 but when I change change the textField  I  can't get  the  changed value
 in  page  class.
 so ,anyone  with  warmheart  can  help  me  here  for  binding  value?
 thanks  in  advance..


How to know which sub component trigger an action and also be aware of the action parameters?

2008-04-10 Thread dhning
Hi, 

One case: The page start.tml contains component ParentComponent, and template 
of ParentComponent contains two action links LinkALinkB, context of LinkA is 
a while LinkB is b.

In start.java, I need to perform some special logic by which link is clicked. 
In T4, I knew listener binding meets this requirement, but how to handle it in 
T5. For event mechanism of T5, till now I can write method 
onActionFormParentComponent to handle all action events, but I don't know which 
link is clicked and can't get the context parameters.

Please help.

Thanks in advance.

Re: select Component or iframe?

2008-04-03 Thread dhning
I think they are different. Frame is used in frameset page, but layout 
component is to provide a common page structure.
Just like when you write html, you can't decide use frame or div.


Thanks!

DH


- Original Message - 
From: 滕训华 [EMAIL PROTECTED]
To: 'Tapestry users' users@tapestry.apache.org
Sent: Thursday, April 03, 2008 3:29 PM
Subject: select Component or iframe?


I am a new to tapestry and I learn the component of tapestry.But now I can
 not decide which should be used. The layout components or the frame
 page.Because I think if layout component is used in every page then when we
 switch the page,it must reload related components ,is it right?
 
 
 
 Any suggestion can give me,thanks a lots.
 


Re: T5: Beaneditform Validation differences between IE6 and firefox2.0?

2008-04-03 Thread dhning
Josh, thanks you for the response.
I mistake the validation via ajax in Firefox, the http requests are to download 
tapestry error images like field-error-marker.giferror-bever-right.png, sorry 
about that.

I have change onAction to onSuccess, but js error still exists in IE, 
debugger shows me at line 532 of tapestry.js.

if (! event.result)
 {
domevent.stop(); //  line 532 here
 }

Error is Object doesn't support this property or method. 

If I disable the debugger, then client validation logic seems run, and show the 
error bubble, but immediately the form is submitted, I really can't understand, 
maybe because of js error, the event is not prevented from being submitted.

My concern: 5.0.11 Client validation of beaneditform works in firefox, but why 
can not in IE, Opera has the same problem. I also test validation of Form 
component in these 3 browsers, result seems the same.

Please help.


Thanks!

DH


- Original Message - 
From: Josh Canfield [EMAIL PROTECTED]
To: Tapestry users users@tapestry.apache.org
Sent: Thursday, April 03, 2008 1:47 AM
Subject: Re: T5: Beaneditform Validation differences between IE6 and firefox2.0?


 Hi,
 
 Why do you think there is an ajax request sent? Last I checked client
 side validation is done with javascript that is added to the page when
 it is rendered. I don't use the beaneditform, so I can't be sure but I
 doubt it's doing validation via ajax.
 
 You're catching every action from Usereditor and saving the user. Is
 that really what you want? Perhaps you should be more selective and
 only save the user when the form submission is successful?
 check out
 http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry/corelib/components/Form.html
 for info on form events, specifically success
 
 As for the javascript error in IE... try stepping into it and tell us
 what object is having the problem.
 
 Josh
 
 On Wed, Apr 2, 2008 at 4:37 AM, dhning [EMAIL PROTECTED] wrote:
 Hi,

 I just begin to learn T5 and simply use component t:beaneditform to 
 create/edit a simple entity User. But I found that the validation behavior 
 are different in IE6 and firefox.
 Please help. My tapestry version is 5.0.11.

 My entity code:

 public class User implements Serializable {
private String username;
private String password;

@Validate(required) // for tapestry, add require validation.
public String getPassword() {
return password;
}
// other setter  getter
 }

 My page class code:

 public class CreateUser extends BasePage { // my base page to inject the 
 entity service

private User user; // not persistent

public User getUser() {
return this.user;
}

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

@InjectPage
private UserList listPage;

UserList onActionFromUsereditor() {
 getEntityService().save(user);

return this.listPage;
}
 }

 I don't write any validation in page class, such as onSuccess ...

 My template code:
 html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
head

titlet5first Start Page/title
/head
body
h1Create User/h1

   t:beaneditform t:id=usereditor t:object=user 
 t:submitLabel=message:button.save/

/body
 /html

 Case: I input nothing, and click submit button.
 In firefox everything works. A ajax request is sent, later a popup prompt 
 that password can't be null.
 But in IE6(I have installed VS2005 studio as debugger), when I click 
 submit button, a js error happens: Object doesn't support this property or 
 method and ask me whether to debug or not.
 I choose not, then the onActionFromUsereditor is invoked and page 
 navigates to the user list page. An user record has been added to DB!!!.

 Would you please help?

 BTW, T4's client validation is very good without sending ajax request, is 
 there a way for T5 to implement such feature?

 Thanks!
 DH
 
 
 
 -- 
 --
 TheDailyTube.com. Sign up and get the best new videos on the internet
 delivered fresh to your inbox.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


Re: select Component or iframe?

2008-04-03 Thread dhning
I am not good at UI design.
The websites I viewd rarely use frame page in their front pages, but it is 
common in admin backend pages.
Maybe frame set layout in front pages is not so flexible.

Above is my understanding, may be wrong^_^

Thanks!

DH


- Original Message - 
From: 滕训华 [EMAIL PROTECTED]
To: 'Tapestry users' users@tapestry.apache.org
Sent: Thursday, April 03, 2008 3:53 PM
Subject: 答复: select Component or iframe?


Thanks your reply.

Yes ,you are right,Actually I am considering this issue.Suppose,in an
application,every page has the copyrights and control header
information,I can make a layout component including the copyrights and
control header  or menu and my main body,then I use this component in every
page.Another solution,I think,I can make three pages:copyrights page and
control header and menu page and then input them into the frame page.

So I can not decide which solution is better.

 

-邮件原件-
发件人: dhning [mailto:[EMAIL PROTECTED] 
发送时间: 2008年4月3日 15:37
收件人: Tapestry users
主题: Re: select Component or iframe?

I think they are different. Frame is used in frameset page, but layout
component is to provide a common page structure.
Just like when you write html, you can't decide use frame or div.


Thanks!

DH


- Original Message - 
From: 滕训华 [EMAIL PROTECTED]
To: 'Tapestry users' users@tapestry.apache.org
Sent: Thursday, April 03, 2008 3:29 PM
Subject: select Component or iframe?


I am a new to tapestry and I learn the component of tapestry.But now I can
 not decide which should be used. The layout components or the frame
 page.Because I think if layout component is used in every page then when
we
 switch the page,it must reload related components ,is it right?
 
 
 
 Any suggestion can give me,thanks a lots.
 



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



[T5] Interesting bug of link render?

2008-04-03 Thread dhning
Hi,

I get a intersting problem:

Start.java:
public class Start
{
private int _result;
public int getResult() {
return this._result;
}

public void setResult(int result) {
_result = result;
}
int onPassivate() {
return _result;
}
void onActivate(int result) {
_result = result;
}
}

Start.tml
html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
head
titlet5first Start Page/title
/head
body
h1t5first Start Page/h1

a href=# t:type=actionlink t:id=viewView/a

/body
/html

Steps: 
When inputting url such as /t5start/start, no problem. But when I input url 
/t5start/start/ (pay attention to this redundant /), the href of actionlink 
component will be rendered as 
http://localhost:8080/t5first/start/start.view?t:ac=0;, then I click on view 
link, exception happens.
a.. org.apache.tapestry.runtime.ComponentEventException 
Exception in method com.yanziwang.pages.Start.onActivate(int) (at 
Start.java:34), parameter #1: Coercion of start.view to type java.lang.Integer 
(via String -- Long, Long -- Integer) failed: For input string: start.view
  context 
a.. start.view
  eventType 
  activate
a.. java.lang.NumberFormatException 
For input string: start.view

The correct url of view component should be 
http://localhost:8080/t5first/start.view?t:ac=0;

How to handle such problems, please help.

Thanks!
DH

T5: Beaneditform Validation differences between IE6 and firefox2.0?

2008-04-02 Thread dhning
Hi, 

I just begin to learn T5 and simply use component t:beaneditform to create/edit 
a simple entity User. But I found that the validation behavior are different in 
IE6 and firefox.
Please help. My tapestry version is 5.0.11.

My entity code:

public class User implements Serializable {
private String username;
private String password;

@Validate(required) // for tapestry, add require validation.
public String getPassword() {
return password;
}
// other setter  getter
}

My page class code:

public class CreateUser extends BasePage { // my base page to inject the entity 
service

private User user; // not persistent

public User getUser() {
return this.user;
}

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

@InjectPage
private UserList listPage;

UserList onActionFromUsereditor() {
 getEntityService().save(user);

return this.listPage;
}
}

I don't write any validation in page class, such as onSuccess ...

My template code:
html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
head

titlet5first Start Page/title
/head
body
h1Create User/h1
  
   t:beaneditform t:id=usereditor t:object=user 
t:submitLabel=message:button.save/
 
/body
/html

Case: I input nothing, and click submit button.
In firefox everything works. A ajax request is sent, later a popup prompt that 
password can't be null.
But in IE6(I have installed VS2005 studio as debugger), when I click submit 
button, a js error happens: Object doesn't support this property or method and 
ask me whether to debug or not.
I choose not, then the onActionFromUsereditor is invoked and page navigates 
to the user list page. An user record has been added to DB!!!.

Would you please help?

BTW, T4's client validation is very good without sending ajax request, is there 
a way for T5 to implement such feature?

Thanks!
DH