Re: about select model

2011-05-19 Thread ningdh
Hi, use SelectModelFactory. DH - Original Message - From: "libaoming" <18788509...@139.com> To: "users" Sent: Thursday, May 19, 2011 1:31 PM Subject: about select model > hello! > i'am using tapesty5.2.0,when render select options must be enum or string > list?some times options sto

Re: select component, how to implement

2011-05-01 Thread ningdh
Hi, Just set the 'value' parameter to your expected value, then Tapestry will do it for you. Thanks DH - Original Message - From: "Andreas Kerpe" To: "Tapestry users" Sent: Monday, May 02, 2011 1:04 AM Subject: select component, how to implement Hi there, > > i'm trying to implemen

Re: T5 Customize Returned List.

2010-10-19 Thread ningdh
Hi, Don't quiet understand your problem. Do you mean object type casting? - Original Message - From: "ael" To: Sent: Tuesday, October 19, 2010 5:01 PM Subject: Re: T5 Customize Returned List. > > Hello > > Hmm it is returned as a List. > > > @Property > private TableSource sou

Re: T5 Customize Returned List.

2010-10-18 Thread ningdh
Hi, Why not do it in Java? public String getLabel() { if (==1) { return "OK"; } if (==2) { return "Cancel"; } } .tml ${label} - Original Message - From: "ael" To: Sent: Tuesday, October 19, 2010 12:09 PM Subject: T5 Customize Returned List. > > Hello everyone i h

Re: T5: Zone Update Part of Form?

2010-09-28 Thread ningdh
Are you using T5.2? I remember T5.2 has supported partial form update. DH - Original Message - From: "Norman Franke" To: "Tapestry users" Sent: Wednesday, September 29, 2010 6:33 AM Subject: Re: T5: Zone Update Part of Form? > Well, I'm not sure FormInjector will work without a lot o

Re: Tapestry5 Form submit Encoding (Chinese)!!

2010-09-10 Thread ningdh
You should try removing your utf8 filter because it is unnecessary in T5. In my project, all the files are utf-8 and no problem at all. DH - Original Message - From: "Fanzhen" To: "Tapestry users" Sent: Friday, September 10, 2010 3:21 PM Subject: Re: Tapestry5 Form submit Encoding (Chi

Re: Friendly message headache!!!

2010-09-06 Thread ningdh
Just persist flash. @Persist("flash") - Original Message - From: "Fanzhen" To: Sent: Tuesday, September 07, 2010 12:33 PM Subject: Friendly message headache!!! > hey friends get a stupid question here: > > want to return a friendly message to the current page after a event > l

Re: Display Objects of BeanClass in Grid

2010-09-05 Thread ningdh
In my understanding, String, int,boolean.. Enum etc. are visible. For you own "Address", should try "add" instead of "include" and provide relevant block yourself. - Original Message - From: "cobse" To: Sent: Monday, September 06, 2010 4:17 AM Subject: Display Objects of BeanClass in

Re: Use pagelink with multiple context parameters

2010-08-02 Thread ningdh
Like this: context="[batchs.id.idBatch,batchs.id.idAo]" - Original Message - From: "mcfly37" To: Sent: Monday, August 02, 2010 5:43 PM Subject: Use pagelink with multiple context parameters > > Hello!! > > Currently I'm trying to use a pagelink component with multiple context > par

Re: [Announce] Wooki - Collaborative Writing

2010-01-19 Thread ningdh
Cool, very nice. Can't wait to try. DH - Original Message - From: "Robin Komiwes" To: "Tapestry users" Cc: "Verachten Bruno" ; "Christophe Cordenier" Sent: Tuesday, January 19, 2010 11:24 PM Subject: [Announce] Wooki - Collaborative Writing What would you need if you had to publis

Re: t5 handling events by components, event handling sequence

2009-12-09 Thread ningdh
I don't understand what's your problem. Page activation context would always be kept between any requests of the same page, if you add the context that given to the tab component tot he page activation conetext, and provide the correct onActivate and onPassivate handler, there would be no proble

Re: Best practice for initializing page to default context

2009-12-08 Thread ningdh
Hi, Thiago - Original Message - From: "Thiago H. de Paula Figueiredo" To: "Tapestry users" Sent: Wednesday, December 09, 2009 2:09 AM Subject: Re: Best practice for initializing page to default context > Em Tue, 08 Dec 2009 15:49:15 -0200, Kalle Korhonen > escreveu: > >> DH's app

Re: Best practice for initializing page to default context

2009-12-08 Thread ningdh
I can't think of a better way not to involve the field name encoded. And if you don't like the field name exposed, you can also customize the param name by setting the annotation value, such as @PageActivationUnit("cat") private Category category; Then the url is like /searchpage/cat-VALUE I

Re: Best practice for initializing page to default context

2009-12-08 Thread NingDH
Of course, but since I am not very good at javassit, my implementation may be ugly and a bit long. Anyone please consummate it. Like PageActivationContext, I introduce an PageActivationUnitWorker. The key part is to collect the param fields and add the param map to page class in runtime. onActiva

Re: [T5] IE 8+Stack Overflow At Line:0

2009-12-03 Thread ningdh
I can confirm that my page has 25 zones works fine in IE8, so I don't think it is a frameword problem. Maybe please show key code of your page, then others can help. DH - Original Message - From: "wesleywj2" To: Sent: Thursday, December 03, 2009 11:21 PM Subject: [T5] IE 8+Stack Over

Re: T5 returns garbage !?

2009-12-03 Thread ningdh
I got this issue in tomcat6+enable gzip option. But in tomcat5.5, even gzip was enabled, it worked fine. I suggest you disable the gzip option. DH - Original Message - From: "Gunnar Eketrapp" To: "Tapestry users" Sent: Thursday, December 03, 2009 8:42 PM Subject: T5 returns garbage !?

Re: Passing GMarkers Array to Tapestry

2009-11-29 Thread ningdh
Hi, I think you need append all the marker to the form action before form is submitted. var url = form.action; var markers = your marker string, format like 'a/b/c/d' var index= url.indexOf("?"); if (index< 0) { url = url + "/" + markers ; } else { url = url.substring(0,index) + "/" + marke

Re: beaneditform question

2009-11-09 Thread ningdh
I am sorry that "Object onValidate" should be "Object onValidateForm". DH - Original Message - From: "João Pereira" To: "Tapestry users" Sent: Monday, November 09, 2009 11:53 PM Subject: Re: beaneditform question Thank you. On Mon, Nov 9, 2009 at 1:50 AM, DH wrote: > Hi > > Simpl

Re: A survey about redeployment time in the Java EE world

2009-09-24 Thread ningdh
I love mvnDebug with jetty:run, so not only the web tier, all the class changes are reloaded perfectly, except new a method and new a class. DH - Original Message - From: "Thiago H. de Paula Figueiredo" To: "Tapestry users" Sent: Thursday, September 24, 2009 10:37 PM Subject: Re: A su

Re: ck/tabset block label?

2009-09-21 Thread ningdh
Use 'lable-' prefix in the message properties. Like label-stuff1=Word1 Word2. DH - Original Message - From: "Mario Udina" To: "Tapestry users" Sent: Monday, September 21, 2009 7:29 PM Subject: ck/tabset block label? > Hello! > > using tapestry 5.1.0.5 and ChenilleKit 1.1.0. TabSet co

Re: multiple onActivate methods in page handler

2009-09-17 Thread ningdh
Return true in the onActivate handler that will prevent multiple call. DH http://www.gaonline.com.cn - Original Message - From: "Ilya Obshadko" To: Sent: Thursday, September 17, 2009 9:42 PM Subject: multiple onActivate methods in page handler >I have a situation here: one application

Re: Accessing page context from a component

2009-09-13 Thread ningdh
What about injecting ComponentEventLinkEncoder and Request to the component and call #decodePageRenderRequest(request) to get PageRenderRequestParameters. It contains the activationContext. DH http://www.gaonline.com.cn - Original Message - From: "chakra" To: Sent: Sunday, September 1

Re: form that create an object

2009-09-13 Thread ningdh
Isn't the textfield bound to user.lastName by setting t:value="user.lastName"? Why there is another 'name'? And remember to initialize an user instance in the prepareForSubmit event handler, then T5 set value of the textfield to its property 'lastName'. void onPrepareForSubmit() { this.user

Re: form that create an object

2009-09-12 Thread ningdh
Hi, t:id should be a valid Java identifier, you should use like t:id="lastName"。 textfield component will map the bean property(lastName) to the form field, so you can just think that after form submit, the bean's property is properly set. DH - Original Message - From: "limonn" To:

Re: Create actionlinks in components with page context

2009-08-25 Thread ningdh
My action handler is inside a component, for example, the layout component. If there is context, url for the action link is like /app/pagename.layout.english?t:ac=1 (1 is context), after link is clicked, the redirect url is like /app/pagename/1 Thanks, DH - Original Message - From: "E

Re: T5: Enabling disabled datefield

2009-07-02 Thread ningdh
Hi, Because you set t:disabled="true" to the datefield statically, so in the form submit process, its value would not be updated always. You can dynamically set the 'disabled' like t:disabled="!dateEnabled", then you will get the value. DH http://www.gaonline.com.cn - Original Message --

Re: AJAX Loading Spinner

2009-06-28 Thread ningdh
I think what you need is prototype's global ajax responser register. Ajax.Responders.register( { onCreate: function() { // ajax request is sent } }, onComplete: function() { // ajax response is back. } }) DH - Original Message - From: "Daniel Jones" To: Sent: Sunday, June

Re: Tapestry 5 and Event component.

2009-06-27 Thread ningdh
It seems that Button is not designed for ajax. I wonder why you don't try block/zone? DH http://www.gaonline.com.cn/ - Original Message - From: "b...@umd" To: Sent: Friday, June 26, 2009 2:48 AM Subject: Re: Tapestry 5 and Event component. > > Ok, it seems to come from the paramete

Re: Tapestry 5 and Event component.

2009-06-25 Thread ningdh
I just tried t5commons component's Button component, it works. I think the Button in t5commons should be the same as CK lib because CK originates from T5commons. void onClicked() { System.out.println("I can get it."); } I don't use annotation here, but they should be the same. DH

Re: Tapestry 5 and Event component.

2009-06-25 Thread ningdh
I don't have source of ck lib. What about removing the parameter 'value' of the method? BTW what does the parameter mean? DH - Original Message - From: "b...@umd" To: Sent: Thursday, June 25, 2009 11:11 PM Subject: Re: Tapestry 5 and Event component. > > Actually I did. I first tri

Re: Web framework evaluation - What is beautiful in Tapestry?

2009-04-24 Thread ningdh
For me, Tapestry IoC, TypeCoercer, Component based and Event Bubbling, Easy to add new component - Original Message - From: "Howard Lewis Ship" To: "Tapestry users" Sent: Friday, April 24, 2009 11:36 PM Subject: Re: Web framework evaluation - What is beautiful in Tapestry? >I have a

Re: Tapestry-Spring-Security and Tapestry 5.1.0.x

2009-03-26 Thread ningdh
What I do is add the SetupRender phase in my ComponentClassTransformWorker. For I don't used T-S-S and don't know its source code at all, I am not sure whether it is like my solution. My complete transform worker is below: public class SecurityWorker implements ComponentClassTransformWorker{

Re: referring to prototype.js in html

2009-03-17 Thread ningdh
Hi, I think it should be ${asset:context:scriptaculous/prototype.js}" without the leading /. DH - Original Message - From: "Angelo Chen" To: Sent: Tuesday, March 17, 2009 8:51 PM Subject: t5: referring to prototype.js in html > > Hi, > > I need to refer to prototype.js in a html,

Re: IF component in tapestry 5 ?

2009-03-14 Thread ningdh
Hi, Refer here: http://tapestry.formos.com/nightly/tapestry5/guide/persist.html Flash field would live in the session not a long time, and will be removed from session after next request (the one after post). DH - Original Message - From: "dwi ardi irawan" To: "Tapestry users" Sent:

Re: t5 How to use renderInformals together with t:body

2009-03-14 Thread ningdh
(MarkupWriter writer){resouces.renderInformalParameters(writer);…… tempalte: when i use the component,informal parameters a rendered to the "html" element. ningdh wrote: > > Hi, > > I don't think ComponentResources.renderInformals would affect . > In my project I can use them togethe

Re: IF component in tapestry 5 ?

2009-03-14 Thread ningdh
This is not an issueof If component, but due to redirect after post. In your case, because private String dailyChart, monthlyChart, yearlyChart are not persisted and not in the activation context, they will be set to default value null. Solution: add flash persistent strategy like following and

Re: t5 How to use renderInformals together with t:body

2009-03-13 Thread ningdh
Hi, I don't think ComponentResources.renderInformals would affect . In my project I can use them together: In beginRender to renderInformals and put in template. Thanks, DH - Original Message - From: "luna_guo" To: Sent: Saturday, March 14, 2009 9:31 AM Subject: t5 How to use render

Re: Tapestry JSONObject : no 'function' type, any workaround ?

2009-03-09 Thread ningdh
String.replaceAll("TO_BE_REPLACE\"", ""); return jsonString; } Well, a bit stupid, but works. DH - Original Message - From: "Francois Armand" To: "Tapestry users" Sent: Monday, March 09, 2009 9:51 PM Subject: Re: Tapes

Re: Tapestry JSONObject : no 'function' type, any workaround ?

2009-03-09 Thread ningdh
toString method of JsonObject would double quote our value. One way is to create some data type extends jsonobject to encapsule your data and override the toString method. I haven't tried it yet. public String toString() { return "Element.show"; } Thanks, DH - Original Message - From

Re: [T5.1.0.0] Loop in Form problem introduced in T5.1.0.0

2009-03-09 Thread ningdh
Set volatile="true" at the loop component to let the form not to restore the state. Thanks, DH - Original Message - From: "Joost Schouten (mailing lists)" To: "Tapestry users" Sent: Monday, March 09, 2009 6:14 PM Subject: [T5.1.0.0] Loop in Form problem introduced in T5.1.0.0 Hi, I

Re: how to let actionlink to open another page like target="_blank"?

2009-03-08 Thread ningdh
Just add target="_blank" to actionlink. XX. DH Sent: Sunday, March 08, 2009 8:24 PM Subject: how to let actionlink to open another page like target="_blank"? > Hi, > > I have a question about actionlink, is there any possible to make it to open > another new page instead of change in current

Re: Page navigation passed value not displayed (@InjectPage style)

2009-03-07 Thread ningdh
General speaking when with Hibernate, only convert entity to primary key id, and then get back to entity, much like HibernateEntityValueEncoder class. DH - Original Message - From: "manuel aldana" To: "Tapestry users" Sent: Saturday, March 07, 2009 5:13 PM Subject: Re: Page navigation

Re: Tapestry 5.1: Wait for Page

2009-03-05 Thread ningdh
I just updated to latest 5.1.0.1-snapshot and got 2 issues: 1. Form is rendered as method="get" and have issue "Forms require that the request method be POST and that the t:formdata query parameter have values. ". 2. [test] is rendered as [test], but the expected should be [[test]. Why it happe

Re: Zone within a Zone

2009-02-17 Thread ningdh
Try , I faced same problem last week and fixed like this. DH - Original Message - From: "superslip103" To: Sent: Tuesday, February 17, 2009 7:42 PM Subject: Zone within a Zone > > I'm trying to display a zone within a component (i.e not a page), which is > itself being displayed in

Re: About the value of the parameters

2008-12-23 Thread ningdh
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 > >> &

Re: About the value of the parameters

2008-12-23 Thread ningdh
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

Re: Form with errors

2008-05-19 Thread ningdh
Hi 1. For error message: My practice is to clean the form in page's cleanupRender phase. Page.java @Component private Form form; void cleanupRender() { form.clearErrors();// clear error message } After then, if you reenter the page, error message would be gone. 2. For form value

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

2008-04-20 Thread ningdh
Thank you, Tobias and Jonathan, especially for Tobias's detailed work. I find include and add can't use together, because properties of 'add' will be flushed and cleared by 'include' later, and this can be traced from source code of BeanModelUtils. For example, I want to show 'username' and 'cit