Re: [T5] issue with coercion in loop (not in form)
do you have another loop in your page tml? or a component using a loop. formState="none" are also required!!! On 2010-10-6 21:19, Ben Dinnerville wrote: hi All, I am getting a coercion error when using 5.1.0.5 and a loop - not inside a form. The strange thing is, I have provided both a ValueEncoder and contributed a Coercion to no avail. Here is the start of the error: BeginRender[calltrack/Services:loop]: Failure writing parameter 'value' of component calltrack/Services:loop: Could not find a coercion from type au.com.voicelogic.teleblast.business.calltrack.model.CallTrackService to type au.com.voicelogic.teleblast.business.calltrack.model.CallTrackService. Available coercions: Double --> Float, Float --> Double, Long --> Boolean, Long --> Byte, Long --> Double, Long --> Integer, Long --> Short, Number --> Long, Object --> Object[], Object --> String, Object --> java.util.List, Object[] --> java.util.List, String --> Boolean, String --> Double, String --> Long, String --> java.io.File, String --> java.math.BigDecimal, String --> java.math.BigInteger, String --> java.text.DateFormat, String --> java.util.regex.Pattern, String --> org.apache.tapestry5.Renderable, String --> org.apache.tapestry5.SelectModel, String --> org.apache.tapestry5.corelib.LoopFormState, String --> org.apache.tapestry5.corelib.data.BlankOption, String --> org.apache.tapestry5.corelib.data.GridPagerPosition, String --> org.apache.tapestry5.corelib.data.InsertPosition, String --> org.apache.tapestry5.ioc.Resource, String --> org.apache.tapestry5.ioc.util.TimeInterval, au.com.voicelogic.teleblast.business.calltrack.model.CallTrackService --> au.com.voicelogic.teleblast.business.calltrack.model.CallTrackService, boolean[] --> java.util.List, byte[] --> java.util.List, char[] --> java.util.List, double[] --> java.util.List, float[] --> java.util.List, int[] --> java.util.List, java.math.BigDecimal --> Double, java.util.Collection --> Boolean, java.util.Collection --> Object[], java.util.Collection --> org.apache.tapestry5.grid.GridDataSource, java.util.List --> org.apache.tapestry5.SelectModel, java.util.Map --> Note how it is trying to coerce from and to the same class and that if you read down further, there is an explicit coercion covering that class (CallTrackService) I have tried this with a grid component as well with the same result. What gets me is why a coercion is even happening - there is no form here. The tml extract is: encoder="callTrackEncoder" volatile="true" formState="none"> t:page="calltrack/ServicesEdit">${currentService.id} ${currentService.aliasPhoneNumber} ${currentService.privatePhoneNumber} ${currentService.terminatingPhoneNumber} ${currentService.recordingEnabled} ${currentService.voicemailEnabled} ${currentService.provisionTime} t:Type="PageLink" t:page="calltrack/ServicesRemove" t:context="${currentService.id}">Remove Have tried everything on this one, as per other posts out there, this was working on 5.0.18 Any ideas anyone? Cheers, Ben - 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: how to handle the component in my page?
headache, it did not work well, could anyone give some suggestion? - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: how to handle the component in my page?
sorry everyone I got the method. set clientId for my component and handle it by ComponentSource.getComponent(completeId); - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
how to handle the component in my page?
well ,you know, there maybe two ways to import a component in page tml. first way, , I can put two same components which are using in two places in one page. and second way, , well this way I could handle the it in page class. the problem is if I do the first way, how to handle the component ??? - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5 component in page could not refresh when page refresh!
hey, friend, I want to know how to get a not cached version of my page On 2010-9-21 10:45, Thiago H. de Paula Figueiredo wrote: On Mon, 20 Sep 2010 23:23:21 -0300, Fanzhen wrote: Have a layout component which used by pages , and in layout component there are some data operation related to finding and showing some data from database. the problem is that , when some operation was done in my page (actually ,updating data in database),data in page refreshed, but data in layout component don't refresh. I mean , is there some way to make layout component refresh ? You don't need to do anything. When some page using your Layout component is requested, Tapestry renders your page again, including the components it uses. Just make sure you're not getting a cached version of your page and that your pages and components correctly pull data from the database. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5 component in page could not refresh when page refresh!
just as what you do in your page , 1, inject tapestry or spring service which will be used pull data from your database or something else; 2, define @property or getXXX() method which will be displayed in your component tml . 3, and at last just use what you have defined in your component . On 2010-9-21 11:09, Josh Canfield wrote: How are you getting the data the data in your layout? Can you provide some code as an example? -- Josh On Sep 20, 2010, at 7:23 PM, Fanzhen wrote: Have a layout component which used by pages , and in layout component there are some data operation related to finding and showing some data from database. the problem is that , when some operation was done in my page (actually ,updating data in database),data in page refreshed, but data in layout component don't refresh. I mean , is there some way to make layout component refresh ? - 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 - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
T5 component in page could not refresh when page refresh!
Have a layout component which used by pages , and in layout component there are some data operation related to finding and showing some data from database. the problem is that , when some operation was done in my page (actually ,updating data in database),data in page refreshed, but data in layout component don't refresh. I mean , is there some way to make layout component refresh ? - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5+hibernate - multiple session factories
well I am using spring + hibernate(JPA features) ,you can set up two more persist unit. On 2010-9-14 8:31, Paul Stanton wrote: I have an tapestry app that needs to connect to 2 different databases. Has anyone done this with tapestry-hibernate? thanks, p. - 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: what is wrong???
resolve it!! javassist-3.9.0.GA.jar not javassist-3.6.0.CR1.jar!!! On 2010-9-13 17:34, Fanzhen wrote: I use Tomcat6 , well I deploy it in tomcat of my pc. I get the same error. does it matter with tomcat?? oh , god!! get headache!! - 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: what is wrong???
I use Tomcat6 , well I deploy it in tomcat of my pc. I get the same error. does it matter with tomcat?? oh , god!! get headache!! - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
what is wrong???
well, it work well on my pc. but when I upload the whole project to the server, I got errors :: I am sure the LibraryCreate Class is in the right directory Caused by: java.lang.ClassNotFoundException: caught an exception while obtaining a class file for com.yuedong.pnews.pages.security.mms.LibraryCreate at javassist.Loader.findClass(Loader.java:359) at org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl$PackageAwareLoader.findClass(ComponentInstantiatorSourceImpl.java:94) at javassist.Loader.loadClass(Loader.java:311) at java.lang.ClassLoader.loadClass(Unknown Source) at org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl.findClass(ComponentInstantiatorSourceImpl.java:296) ... 63 more Caused by: org.apache.tapestry5.internal.services.TransformationException: javassist.CannotCompileException: broken method at org.apache.tapestry5.internal.services.ComponentClassTransformerImpl.transformComponentClass(ComponentClassTransformerImpl.java:176) at $ComponentClassTransformer_12b0a558c91.transformComponentClass($ComponentClassTransformer_12b0a558c91.java) at org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl.onLoad(ComponentInstantiatorSourceImpl.java:205) at javassist.Loader.findClass(Loader.java:340) ... 67 more Caused by: java.lang.RuntimeException: javassist.CannotCompileException: broken method at org.apache.tapestry5.internal.services.InternalClassTransformationImpl.replaceFieldAccess(InternalClassTransformationImpl.java:1767) at org.apache.tapestry5.internal.services.InternalClassTransformationImpl.performFieldTransformations(InternalClassTransformationImpl.java:1691) at org.apache.tapestry5.internal.services.InternalClassTransformationImpl.finish(InternalClassTransformationImpl.java:1336) at org.apache.tapestry5.internal.services.ComponentClassTransformerImpl.transformComponentClass(ComponentClassTransformerImpl.java:172) ... 70 more Caused by: javassist.CannotCompileException: broken method at javassist.expr.FieldAccess.replace(FieldAccess.java:218) at org.apache.tapestry5.internal.services.InternalClassTransformationImpl$3.edit(InternalClassTransformationImpl.java:1757) at javassist.expr.ExprEditor.loopBody(ExprEditor.java:197) at javassist.expr.ExprEditor.doit(ExprEditor.java:90) at javassist.CtClassType.instrument(CtClassType.java:1288) at org.apache.tapestry5.internal.services.InternalClassTransformationImpl.replaceFieldAccess(InternalClassTransformationImpl.java:1763) ... 73 more - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: want to setup a ${xxxx} in my input element!!!
yes, I really have read it carefully. On 2010-9-13 14:17, Igor Drobiazko wrote: You should have a look at Tapestry's form components. There is a Checkbox component. On Mon, Sep 13, 2010 at 8:14 AM, Fanzhen wrote: hey, friends want to code like this: aaa bbb ccc ddd actually, what is in my page class are: public String getAudit0(){ if() return "checked=\"checked\""; else return ""; } .. but the problem is T5 told me "Unexpected character '$' (code 36) (expected a name start character) at [row,col {unknown-source}]: [27,56]" could anyone told me how to do with my checkbox or maybe and radio elements ? I just want to remember what the user input when they do some searching. thank you in advance !! Fanzhen. - 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
want to setup a ${xxxx} in my input element!!!
hey, friends want to code like this: aaa bbb ccc ddd actually, what is in my page class are: public String getAudit0(){ if() return "checked=\"checked\""; else return ""; } .. but the problem is T5 told me "Unexpected character '$' (code 36) (expected a name start character) at [row,col {unknown-source}]: [27,56]" could anyone told me how to do with my checkbox or maybe and radio elements ? I just want to remember what the user input when they do some searching. thank you in advance !! Fanzhen. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tapestry5 Form submit Encoding (Chinese)!!
hey,cleverpig. have tried all you guys said . I think it is not the problem of the UTF-8 encoding,because it is ok in general form submit. It is a exception for this page which using Link and URLParameterHelper to handle parameters . On 2010-9-10 16:55, cleverpig wrote: sure,I'm agreed with ningdh.since your pages are all utf-8 encoding,so remove your utf-8 filter and going to try again. 2010/9/10 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 (Chinese)!! On 2010-9-10 13:59, Donyee wrote: T5, I don't use the UTF8 filter. and my tml page is GBK,eclipse project encoding is GBK, works fine! what is your page charset??? all files of my project are based in UTF8 encoding. you meant it does matter with my page encoding,I have tried to change the page to GBK encoding, but it didn't work . thank you ! - 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: Tapestry5 Form submit Encoding (Chinese)!!
On 2010-9-10 13:59, Donyee wrote: > T5, I don't use the UTF8 filter. and my tml page is GBK,eclipse project > encoding is GBK, > works fine! > what is your page charset??? all files of my project are based in UTF8 encoding. you meant it does matter with my page encoding,I have tried to change the page to GBK encoding, but it didn't work . thank you ! - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Tapestry5 Form submit Encoding (Chinese)!!
hey,friends what I code in T5 page class: Link onSuccess() { return putSearchCriteriaInALink(_searchFields); } Link putSearchCriteriaInALink(MmsLibrarySearchFields search) { Link link = _pageRenderLinkSource.createPageRenderLink(this.getClass()); link.addParameter("searchParam_title", search.getTitle(); return link; } and I have done UTF-8 filter in my AppModule: public RequestFilter buildUtf8Filter( @InjectService("RequestGlobals") final RequestGlobals requestGlobals) { return new RequestFilter() { public boolean service(Request request, Response response, RequestHandler handler) throws IOException { requestGlobals.getHTTPServletRequest().setCharacterEncoding("UTF-8"); return handler.service(request, response); } }; } public void contributeRequestHandler( OrderedConfiguration configuration, @InjectService("Utf8Filter") final RequestFilter utf8Filter) { configuration.add("Utf8Filter", utf8Filter); } the problem is when I input a Chinese title such as "您好" in textfield of search form , it does not encode well!! so, could anyone tell me where I am wrong?? thanks in advance!!! - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: override the default message!!
thank you for your reply. yes,I did. When I change org.apache.tapestry5.corelib.components.Errors_zh_cn.properties org.apache.tapestry5.internal.ValidationMessages_zh_cn.properties to org.apache.tapestry5.corelib.components.Errors.properties org.apache.tapestry5.internal.ValidationMessages.properties It is ok now. but I feel a little strange about this way. On 2010-9-9 19:33, Borut Bolčina wrote: Did you contribute to the ApplicationDefaults? public static void contributeApplicationDefaults(MappedConfiguration configuration) { configuration.add(SymbolConstants.SUPPORTED_LOCALES, "zh_cn,en"); ... -bob 2010/9/9 Fanzhen hey friends, tapestry5 return me "You must correct the following errors before you may continue.xx" are there some methods to override it with my own custom message? I have search it via Google . what I got is : should to create two files in my project with the same package as Tapestry. org.apache.tapestry5.corelib.components.Errors_zh_cn.properties org.apache.tapestry5.internal.ValidationMessages_zh_cn.properties but it seems it doesn't work well for me , and I thought it is not a good method well. this way make my project strange so , any help are welcome!!! - 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
override the default message!!
hey friends, tapestry5 return me "You must correct the following errors before you may continue.xx" are there some methods to override it with my own custom message? I have search it via Google . what I got is : should to create two files in my project with the same package as Tapestry. org.apache.tapestry5.corelib.components.Errors_zh_cn.properties org.apache.tapestry5.internal.ValidationMessages_zh_cn.properties but it seems it doesn't work well for me , and I thought it is not a good method well. this way make my project strange so , any help are welcome!!! - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tapestry5 friendly Message headache!!!
On 2010-9-7 12:38, Borut Bolčina wrote: Use FLASH persistence ( http://tapestry.apache.org/tapestry5.1/guide/persist.html). See also http://jumpstart.doublenegative.com.au/jumpstart/fr/examples/navigation/actionlinks. Search for FLASH in the page. -bob 2010/9/7 Fanzhen hey dear friends I got a stupid question: when a event link or a form submit finished some friendly message should return to the current page! but tapestry do a redirect return !! I couldn't get the message set in my page!! And when I mark a @persist on the _msg field,I really can get the message, but anther thing come out, the msg show when I refresh the page could anyone tell me a better way supplying friendly message to my client user!! maybe something like _form.record("xxx"); thanks in advance!!! Fanzhen - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org thank you friends , resolved it!! - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Friendly message headache!!!
hey friends get a stupid question here: want to return a friendly message to the current page after a event link or form submit !!! but tapestry do a redirect operation ,and couldn't get _msg field which I set in the end of event method!! I try set a @persist on the _msg field,this time _msg can really be got, but the stupid thing is it always show when refresh the page!!! could anyone tell me a good way to show friendly message to my users!! such as _form.record("xx"); thanks in advance. Fanzhen - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Tapestry5 friendly Message headache!!!
hey dear friends I got a stupid question: when a event link or a form submit finished some friendly message should return to the current page! but tapestry do a redirect return !! I couldn't get the message set in my page!! And when I mark a @persist on the _msg field,I really can get the message, but anther thing come out, the msg show when I refresh the page could anyone tell me a better way supplying friendly message to my client user!! maybe something like _form.record("xxx"); thanks in advance!!! Fanzhen - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org