Re: component parameter binding question

2009-03-04 Thread dhning
; 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? > > > Delete > > > > > - Original Message - > From: "dhning" > To: "Tapestry us

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.go

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" To: "Tapestry users" Sent: Tuesday, March 03, 2009 1:05 PM Subject: Action Link In Parent Component > Hi! > > I want to set action link in chil

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

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" To: "Tapestry users" Sent: Tuesd

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" To: Sent: Tuesday, February 17, 2009 5:02 PM Subject:

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

2009-02-16 Thread dhning
r: 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. > > Re

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

2009-02-16 Thread dhning
nk you. > > Regards, > Tan > > On Tue, Feb 17, 2009 at 12:12 PM, dhning wrote: > >> well, what's your t5component version? I am using 0.5.18 Window, no issue >> on IE6&7, firefox2, but have issue on firefox 3.0 which is caused by >> stylesheet inse

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 IE6&7, 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" To: "Tapestry users" Sent: Tuesday, February 17

Re: About the value of the parameters

2008-12-23 Thread dhning
it might affect all my operation. > any solution? > Thank you. > > REgards, > Tan > > 2008/12/24 dhning > >> Hi, >> >> Maybe because of the zone, why not have a try by removing it? >> >> >> DH >> >> >> > hi, >&g

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 stateme

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 >Create > New Issue > > CreateIssue.tml > submitLabel="message:submitCreateIssueText" exclude="id" add="project"> > >

Re: How to work with other page's actionlink?

2008-11-27 Thread dhning
yes, both. Thanks, DH > > onActivate(..) triggers on POST and GET, right? > > > > dhning-2 wrote: >> >> Sure you can, use page link. >> >> Like deleting a user: >> or even >> context="user" if you have defined coercier o

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: Sent: Friday, November 28, 2008 2:02 PM S

Re: How to work with other page's actionlink?

2008-11-27 Thread dhning
Sure you can, use page link. Like deleting a user: 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

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;

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( MappedConfiguration configuration) { configuration.add("tapestry.compress-whitespace", "false"); // turn off it } Thanks! DH -

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 t

Re: T5 - new clien side validator, again

2008-11-02 Thread dhning
hamsi" <[EMAIL PROTECTED]> To: "Tapestry users" 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 o

Re: T5 - new clien side validator, again

2008-11-02 Thread dhning
ubject: 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 aft

Re: T5 - new clien side validator, again

2008-11-02 Thread dhning
n(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

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" Sent: Saturday, October 25, 2008 2:23 AM Subject: Re: T5 -

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,

Re: [T5] Page naigation using submit

2008-10-17 Thread dhning
#x27;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

Re: [T5] Page naigation using submit

2008-10-17 Thread dhning
#x27;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

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: Sent: Friday, October 17, 2008 7:01 PM Subject: [T5] Page naigation using submit

Re: The chinese characters can not be saved correctly

2008-06-30 Thread dhning
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年

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'" Sent: Tuesday, July 01

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; }

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

Re: Chinese can not display correctly

2008-06-24 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 C

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" Cc: "Igor Drobiazko" <[EMAIL PROTECTED]> Sent: Monday, May 12, 2008 2:58 AM Subject: [ANN] New article about Tapestry 5 > Hello All, > My self an

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

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 sessi

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 sessi

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 sessi

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" Sent: Tuesday, April 22, 2008 6:48 PM Subject:

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

2008-04-20 Thread dhning
t; Now you have to define a Translator for Tapestry (I use a template for >> all >> >> classes which implement toString()): >> >> >> >> --- >> >> public class ModelTranslator implements >> Translator &

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

2008-04-18 Thread dhning
add location_city, location_street etc > and implement 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 { &g

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 Gr

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 subm

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 LinkA&LinkB, 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

[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 onA

Re: select Component or iframe?

2008-04-03 Thread dhning
put 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 provid

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

2008-04-03 Thread dhning
/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

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'" Sent: Thur

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

2008-04-02 Thread dhning
return event.result; Thanks! DH - Original Message - From: "dhning" <[EMAIL PROTECTED]> To: "Tapestry users" Sent: Wednesday, April 02, 2008 7:37 PM Subject: T5: Beaneditform Validation differences between IE6 and firefox2.0? > Hi, > > I ju

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 { priv