Re: [T5] Got a wrong uri from createActionLink!
AFAIK, there's nothing wrong with using a colon within the path of a URI. Do you know of any problems with this? Its been working so far... Perhaps i'm missing the point? On 10/12/07, Donyee [EMAIL PROTECTED] wrote: The colon (:) /index:updatemsg is not a uri, how could i get a /index.updatemsg? 2007/10/12, lasitha [EMAIL PROTECTED]: Umm, looks fine to me... According to the createActionLink javadoc[1], it creates ... a component action request link as a callback for this component. So in this case, your component is the Index page, and your action is 'updateMsg'. Tapestry uses a colon (:) to indicate an action as opposed to a nested component (designated by the period (.)). What problems are you having with the generated link? Cheers, lasitha. [1] http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/apache/tapestry/ComponentResourcesCommon.html#createActionLink(java.lang.String,%20boolean,%20java.lang.Object...) On 10/12/07, Donyee [EMAIL PROTECTED] wrote: I use T5.06 snapshot ! 2007/10/12, Donyee [EMAIL PROTECTED]: Here is my code: Index.java @Inject private ComponentResources resource; public String getUpdateLink() { Link link = resource.createActionLink(updateMsg, true); return link.toURI(); } and in Index.tml: ${updateLink}... It displays /index:updateMsg, it should be /index.updateMsg! Is this a bug? or I made wrong? 徐 依伟 -- 徐 依伟 -- 徐 依伟
Re: [T5] Got a wrong uri from createActionLink!
I request the /index.updatemsg and get a json data, the onActionFromUpdateMsg() method works fine! but i request the /index:updatemsg, it response as /index! Is this new in t5.06? How can i get a url like /index.updatemsg?? Thanks! 2007/10/12, lasitha [EMAIL PROTECTED]: AFAIK, there's nothing wrong with using a colon within the path of a URI. Do you know of any problems with this? Its been working so far... Perhaps i'm missing the point? On 10/12/07, Donyee [EMAIL PROTECTED] wrote: The colon (:) /index:updatemsg is not a uri, how could i get a /index.updatemsg? 2007/10/12, lasitha [EMAIL PROTECTED]: Umm, looks fine to me... According to the createActionLink javadoc[1], it creates ... a component action request link as a callback for this component. So in this case, your component is the Index page, and your action is 'updateMsg'. Tapestry uses a colon (:) to indicate an action as opposed to a nested component (designated by the period (.)). What problems are you having with the generated link? Cheers, lasitha. [1] http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/apache/tapestry/ComponentResourcesCommon.html#createActionLink(java.lang.String,%20boolean,%20java.lang.Object...) On 10/12/07, Donyee [EMAIL PROTECTED] wrote: I use T5.06 snapshot ! 2007/10/12, Donyee [EMAIL PROTECTED]: Here is my code: Index.java @Inject private ComponentResources resource; public String getUpdateLink() { Link link = resource.createActionLink(updateMsg, true); return link.toURI(); } and in Index.tml: ${updateLink}... It displays /index:updateMsg, it should be /index.updateMsg! Is this a bug? or I made wrong? 徐 依伟 -- 徐 依伟 -- 徐 依伟 -- 徐 依伟
how to translate input into double/float value
Hello, Please guide me how i can translate input value into double or float. Thanks -Imran Amjad -- View this message in context: http://www.nabble.com/how-to-translate-input-into-double-float-value-tf4611891.html#a13170402 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] Got a wrong uri from createActionLink!
I might still not be getting it, but i'll try again :) Preamble... (see below for a possible solution): Tapestry uses the following convention for an action link: /page.component:action Periods represent nested components and colons prefix a named action. So, '/index.updatemsg' points to an 'updatemsg' component on the 'index' page. That link doesn't specify an action, but i'm guessing it'll invoke your 'onActionFromUpdateMsg' handler (the 'onAction' convention means it will fire on any action for this component), as long as Index contains such a component. '/index:updatemsg' signifies an action named 'updatemsg' directly on the 'index' page. Again, if you don't have a handler for this action on the index page, then it'll probably behave similiar to a simple page render request - hence you're return just '/index'. Solution (perhaps): If i understand what you're trying to do, i think you can just change: onActionFromUpdateMsg() to onUpdateMsg() in Index.java. If you do this and keep the createActionLink() code the same, the URI will be '/index:updatemsg' and clicking it will invoke onUpdateMsg(). Is that what you're looking for? Cheers, lasitha. On 10/12/07, Donyee [EMAIL PROTECTED] wrote: I request the /index.updatemsg and get a json data, the onActionFromUpdateMsg() method works fine! but i request the /index:updatemsg, it response as /index! Is this new in t5.06? How can i get a url like /index.updatemsg?? Thanks! 2007/10/12, lasitha [EMAIL PROTECTED]: AFAIK, there's nothing wrong with using a colon within the path of a URI. Do you know of any problems with this? Its been working so far... Perhaps i'm missing the point? On 10/12/07, Donyee [EMAIL PROTECTED] wrote: The colon (:) /index:updatemsg is not a uri, how could i get a /index.updatemsg? 2007/10/12, lasitha [EMAIL PROTECTED]: Umm, looks fine to me... According to the createActionLink javadoc[1], it creates ... a component action request link as a callback for this component. So in this case, your component is the Index page, and your action is 'updateMsg'. Tapestry uses a colon (:) to indicate an action as opposed to a nested component (designated by the period (.)). What problems are you having with the generated link? Cheers, lasitha. [1] http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/apache/tapestry/ComponentResourcesCommon.html#createActionLink(java.lang.String,%20boolean,%20java.lang.Object...) On 10/12/07, Donyee [EMAIL PROTECTED] wrote: I use T5.06 snapshot ! 2007/10/12, Donyee [EMAIL PROTECTED]: Here is my code: Index.java @Inject private ComponentResources resource; public String getUpdateLink() { Link link = resource.createActionLink(updateMsg, true); return link.toURI(); } and in Index.tml: ${updateLink}... It displays /index:updateMsg, it should be /index.updateMsg! Is this a bug? or I made wrong? 徐 依伟 -- 徐 依伟 -- 徐 依伟 -- 徐 依伟
Re: [T5] Got a wrong uri from createActionLink!
Thanks, I changed to onUpdateMsg()! works fine! 2007/10/12, lasitha [EMAIL PROTECTED]: I might still not be getting it, but i'll try again :) Preamble... (see below for a possible solution): Tapestry uses the following convention for an action link: /page.component:action Periods represent nested components and colons prefix a named action. So, '/index.updatemsg' points to an 'updatemsg' component on the 'index' page. That link doesn't specify an action, but i'm guessing it'll invoke your 'onActionFromUpdateMsg' handler (the 'onAction' convention means it will fire on any action for this component), as long as Index contains such a component. '/index:updatemsg' signifies an action named 'updatemsg' directly on the 'index' page. Again, if you don't have a handler for this action on the index page, then it'll probably behave similiar to a simple page render request - hence you're return just '/index'. Solution (perhaps): If i understand what you're trying to do, i think you can just change: onActionFromUpdateMsg() to onUpdateMsg() in Index.java. If you do this and keep the createActionLink() code the same, the URI will be '/index:updatemsg' and clicking it will invoke onUpdateMsg(). Is that what you're looking for? Cheers, lasitha. On 10/12/07, Donyee [EMAIL PROTECTED] wrote: I request the /index.updatemsg and get a json data, the onActionFromUpdateMsg() method works fine! but i request the /index:updatemsg, it response as /index! Is this new in t5.06? How can i get a url like /index.updatemsg?? Thanks! 2007/10/12, lasitha [EMAIL PROTECTED]: AFAIK, there's nothing wrong with using a colon within the path of a URI. Do you know of any problems with this? Its been working so far... Perhaps i'm missing the point? On 10/12/07, Donyee [EMAIL PROTECTED] wrote: The colon (:) /index:updatemsg is not a uri, how could i get a /index.updatemsg? 2007/10/12, lasitha [EMAIL PROTECTED]: Umm, looks fine to me... According to the createActionLink javadoc[1], it creates ... a component action request link as a callback for this component. So in this case, your component is the Index page, and your action is 'updateMsg'. Tapestry uses a colon (:) to indicate an action as opposed to a nested component (designated by the period (.)). What problems are you having with the generated link? Cheers, lasitha. [1] http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/apache/tapestry/ComponentResourcesCommon.html#createActionLink(java.lang.String,%20boolean,%20java.lang.Object...) On 10/12/07, Donyee [EMAIL PROTECTED] wrote: I use T5.06 snapshot ! 2007/10/12, Donyee [EMAIL PROTECTED]: Here is my code: Index.java @Inject private ComponentResources resource; public String getUpdateLink() { Link link = resource.createActionLink(updateMsg, true); return link.toURI(); } and in Index.tml: ${updateLink}... It displays /index:updateMsg, it should be /index.updateMsg! Is this a bug? or I made wrong? 徐 依伟 -- 徐 依伟 -- 徐 依伟 -- 徐 依伟 -- 徐 依伟
Re: T4 Custom Component Questions
I did see them, but didn't see how to include non-JavaScript parts without overriding @Shell. I'd like to be able to find the parent Shell and instruct it to add the extras. The issue with @Script is I can't seem to figure out how to read files that are NOT in the class path. If I move my file into the class path, then I get /WEB-INF/myscript.js as the script src which the browser can't read, since WEB-INF is protected. Seems like Tapestry should make that into an Asset or something, but doesn't. -Norman On Oct 9, 2007, at 7:01 PM, andyhot wrote: Well, you can always hack around Shell, e.t.c., but ... I guess you haven't noticed those: http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/ html/Shell.html#includeAdditionalContent(java.lang.String) and http://tapestry.apache.org/tapestry4.1/components/general/style.html and even http://tapestry.apache.org/tapestry4.1/components/general/ shell.html (the delegate parameter) Ken nashua wrote: Here's what you'll see in the markup... !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; script type=text/javascriptdjConfig = {baseRelativePath:/ assets/static/ dojo-0.4.3/,preventBackButtonFix:false,parseWidgets:false,local e:en} /script script type=text/javascript src=/assets/static/dojo-0.4.3/ dojo.js/scriptscript type=text/javascript src=/assets/ static/dojo-0.4.3/dojo2.js/script script type=text/javascript dojo.registerModulePath(tapestry, /assets/static/tapestry); /script script type=text/javascript src=/assets/static/tapestry/ core.js/script script type=text/javascript dojo.require(tapestry.namespace); tapestry.requestEncoding='UTF-8'; /script !-- Application: trails -- !-- Page: Home -- !-- Generated: Tue Oct 09 18:38:01 EDT 2007 -- html head meta name=generator content=Tapestry Application Framework, version 4.1.3 / titleBest WEB Application on the planet!/title link rel=stylesheet type=text/css title=don't select href=/ styles/tapestryskin/theme.css / style type=text/css !-- Checkout these Custom HEAD widget...Style Overrides -- body { padding: 5; margin: 5; background: #fff url( /BlobService.svc? class=org.trails.demo.AdminLayoutcontentType=image/ giffileName=backgd-original.gifid=1property=background ) top left repeat; } div#main { } div#splash { background: #fff url( /BlobService.svc? class=org.trails.demo.AdminLayoutcontentType=image/ jpegfileName=bae.parts.splash.jpgid=1property=splash ) top left no-repeat; } div#page { } /style /head body id=Body script type=text/javascript!-- dojo.require(tapestry.widget.Widget); dojo.require(dojo.widget.*); dojo.require(dojo.html); // --/script div id=page !-- header segment #1 -- a id=PageLink href=/Home.page div id=header Best regards Ken in nashua From: [EMAIL PROTECTED] To: users@tapestry.apache.org Subject: Re: T4 Custom Component Questions Date: Tue, 9 Oct 2007 18:15:03 -0400 Hi Norm, Below is text from a CustomHead I wrote. It does header/splash/ icon images for appfuse css-framework. Integrated to trails features I developed of course. It will give you some insights for the shell derivative. I am a trails developer. So anything trails you might want to tailor. Can't help you with the menu. Best regards Ken in nashua Customhead.java - package org.trails.demo.components; import java.util.Date; import java.util.Iterator; import org.apache.hivemind.HiveMind; import org.apache.tapestry.IAsset; import org.apache.tapestry.IMarkupWriter; import org.apache.tapestry.IPage; import org.apache.tapestry.IRender; import org.apache.tapestry.IRequestCycle; import org.apache.tapestry.IScript; import org.apache.tapestry.Tapestry; import org.apache.tapestry.annotations.Asset; import org.apache.tapestry.annotations.ComponentClass; import org.apache.tapestry.annotations.InjectObject; import org.apache.tapestry.annotations.InjectScript; import org.apache.tapestry.annotations.InjectState; import org.apache.tapestry.annotations.Parameter; import org.apache.tapestry.coerce.ObjectArrayToIteratorConverter; import org.apache.tapestry.engine.ILink; import org.apache.tapestry.html.Shell; import org.apache.tapestry.json.IJSONWriter; import org.apache.tapestry.spec.IApplicationSpecification; import org.trails.component.blob.BlobDownloadService; import org.trails.component.blob.TrailsBlobAsset; import org.trails.demo.AdminLayout; /** * Background Usage... * * html jwcid=@Shell title=Trails stylesheet=ognl:assets.stylesheet * * The html tag is basically the shell to a page. It encompasses headbody * * @Shell is a tapestry component that intercepts html parameters and renders *according to it's semantics. We can do whatever we like
Re: T5 : Pb with Spring integration with xml file from another JAR
Hi, Have you looked at http://tapestry.apache.org/tapestry5/tapestry-spring/index.html? It doesn't look like you have the TapestrySpringFilter configured in your web.xml Josh On 10/11/07, TNO [EMAIL PROTECTED] wrote: Hi, I can't find my beans !!! I try to get them from another jar. I found the config files, the Spring logs seems OK, but when I inject my DAO, exception ! here's my pb : * java.lang.ClassNotFoundException caught an exception while obtaining a class file for org.atlog.mjweb.pages.Start exception org.apache.tapestry.internal.services.TransformationException: Error obtaining injected value for field org.atlog.mjweb.pages.Start.infoDAO: No service implements the interface arc.db.auto.dao.InfoDAO. Can you help me please... here my web.xml web-app id=WebApp_ID version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; display-nameMj Web/display-name context-param param-namecontextConfigLocation/param-name param-value classpath:/arc/db/config/application-context-arcdb.xml classpath:/arc/db/config/application-context-arcdb-config.xml /param-value /context-param context-param param-nametapestry.app-package/param-name param-valueorg.atlog.mjweb/param-value /context-param filter filter-nameapp/filter-name filter-classorg.apache.tapestry.TapestryFilter/filter-class /filter filter-mapping filter-nameapp/filter-name url-pattern/*/url-pattern /filter-mapping listener listener-classorg.springframework.web.context.ContextLoaderListener /listener-class /listener welcome-file-list welcome-fileStart/welcome-file /welcome-file-list /web-app And my java class : public class Start extends BasePage { private Info infoTitre; public Start() { super(); } public ListInfo getListInfo() { return infoDAO.getList(); } @Inject private InfoDAO infoDAO; } Thanks... --- Antivirus avast! : message Sortant sain. Base de donnees virale (VPS) : 000780-1, 10/10/2007 Analyse le : 11/10/2007 17:58:43 avast! - copyright (c) 1988-2007 ALWIL Software. http://www.avast.com -- -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox.
Re: T5: CDATA in head gives a not implemented error
I tried that and it didn't work. Josh Canfield wrote: You can use inline javascript in your templates, you just need to use the old trick that used to be used to hide js from the browser http://www.javascripter.net/faq/hidingjs.htm script !-- // tapestry will move this up in the output // -- /script Josh On 5/8/07, Alexandru Dragomir [EMAIL PROTECTED] wrote: As you mentioned , the workaround is to put the javascript (or at least the one that contains the and ) in a separate file. This should be fine for majority of cases. Alex On 5/8/07, Mike_R [EMAIL PROTECTED] wrote: Hi, I was copying some google maps javascript (http://www.google.com/uds/samples/places.html) inside of the head of my Border component. Since the javascript code uses and , it's protected with //![CDATA[ When I try to use the Border component with this CDATA block I get a message stating 'not implemented yet: CDATA'. Is this a known limitation, should I file a bug and how can I solve this? When I put the javascript in a separate file the error seemed gone, haven't tested any further though. thanks for the help Mike -- View this message in context: http://www.nabble.com/T5%3A-CDATA-in-head-gives-a-not-implemented-error-tf3708984.html#a10373906 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: CDATA in head gives a not implemented error
Ok, i figure out what i was doing wrong. The trick is the starting tag. You have: // !-- // which works fine. I was just using !-- Like http://www.javascripter.net/faq/hidingjs.htm and other sites give as an example. Thanks... Josh Canfield wrote: Define didn't work. Didn't work on a particular browser? I have this code in production and it seems to work fine in Firefox/IE/Safari. script //noinspection JSUnresolvedFunction Event.observe(window, 'load', function() { var orderField = '${sortOrderField}'; var rowsId = 'vpl_rows${id}'; var rowIdPrefix = 'vpl_row_${id}_'; var sourceLister = '${sourceLister}'; // !-- // var props = { dropOnEmpty: true, containment: [rowsId], tag: div, 'only': [ 'vpl_row' ], onUpdate: function() { var orderList = ''; var rows = document.getElementById(rowsId); var orderedNodes = rows.getElementsByClassName('vpl_row'); for (var i=0;i ** orderedNodes.length;i++) { var id = orderedNodes[i].id; id = id.substring(id.lastIndexOf('_')+1); orderList += id + ','; } document.getElementById(orderField).value = orderList; } }; if ( sourceLister ) { props.containment[1] = 'vpl_rows' + sourceLister; props.constraint = false; } //noinspection JSUnresolvedFunction Sortable.create(rowsId, props); } ); // -- /script Josh On 10/12/07, Hugo Palma [EMAIL PROTECTED] wrote: I tried that and it didn't work. Josh Canfield wrote: You can use inline javascript in your templates, you just need to use the old trick that used to be used to hide js from the browser http://www.javascripter.net/faq/hidingjs.htm script !-- // tapestry will move this up in the output // -- /script Josh On 5/8/07, Alexandru Dragomir [EMAIL PROTECTED] wrote: As you mentioned , the workaround is to put the javascript (or at least the one that contains the and ) in a separate file. This should be fine for majority of cases. Alex On 5/8/07, Mike_R [EMAIL PROTECTED] wrote: Hi, I was copying some google maps javascript (http://www.google.com/uds/samples/places.html) inside of the head of my Border component. Since the javascript code uses and , it's protected with //![CDATA[ When I try to use the Border component with this CDATA block I get a message stating 'not implemented yet: CDATA'. Is this a known limitation, should I file a bug and how can I solve this? When I put the javascript in a separate file the error seemed gone, haven't tested any further though. thanks for the help Mike -- View this message in context: http://www.nabble.com/T5%3A-CDATA-in-head-gives-a-not-implemented-error-tf3708984.html#a10373906 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] injecting embedded components
Sorry, should have waited 5 minutes before complaining. It was a side-effect of the extension changing from html to tml (combined with not having lunch yet). On Fri, 2007-10-12 at 09:54 -0700, Josh Canfield wrote: You can use the @Component annotation to get a reference to a component in your template. http://tapestry.apache.org/tapestry5/tapestry-core/guide/component-classes.html @Component(parameters = { start=5, end=1, value=countValue }) private Count _count; Josh On 10/12/07, Dan Adams [EMAIL PROTECTED] wrote: So I know you can get an embedded component using ComponentResources.getEmbeddedComponent() but is there no way to inject one using something like this: @Inject private MyComponent componentName; -- Dan Adams Senior Software Engineer Interactive Factory 617.235.5857 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Dan Adams Senior Software Engineer Interactive Factory 617.235.5857 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5] injecting embedded components
You can use the @Component annotation to get a reference to a component in your template. http://tapestry.apache.org/tapestry5/tapestry-core/guide/component-classes.html @Component(parameters = { start=5, end=1, value=countValue }) private Count _count; Josh On 10/12/07, Dan Adams [EMAIL PROTECTED] wrote: So I know you can get an embedded component using ComponentResources.getEmbeddedComponent() but is there no way to inject one using something like this: @Inject private MyComponent componentName; -- Dan Adams Senior Software Engineer Interactive Factory 617.235.5857 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox.
Re: T5: Tapestry, Hibernate and Underscores.
You can explicitly tell hibernate the names of your columns using hibernate annotations or your hibernate mapping files. You'll need to check with the hibernate docs/lists for more details. Josh On 10/12/07, Olivier [EMAIL PROTECTED] wrote: Hi, I followed the small tutorial on using hibernate with T5 here http://wiki.apache.org/tapestry/Tapestry5HowToUseTapestryHibernate and it worked like a charm. Thank you to whoever wrote this! The example uses underscores for some private fields and sometimes not. Now I want to use this in my entities but then Hibernate generates incorrect column names. Isn't there a way for tuning this in the configuration file or something? If someone has that info, please share it with me! Thank you in advance, Olivier - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox.
Re: T5: CDATA in head gives a not implemented error
You can use inline javascript in your templates, you just need to use the old trick that used to be used to hide js from the browser http://www.javascripter.net/faq/hidingjs.htm script !-- // tapestry will move this up in the output // -- /script Josh On 5/8/07, Alexandru Dragomir [EMAIL PROTECTED] wrote: As you mentioned , the workaround is to put the javascript (or at least the one that contains the and ) in a separate file. This should be fine for majority of cases. Alex On 5/8/07, Mike_R [EMAIL PROTECTED] wrote: Hi, I was copying some google maps javascript (http://www.google.com/uds/samples/places.html) inside of the head of my Border component. Since the javascript code uses and , it's protected with //![CDATA[ When I try to use the Border component with this CDATA block I get a message stating 'not implemented yet: CDATA'. Is this a known limitation, should I file a bug and how can I solve this? When I put the javascript in a separate file the error seemed gone, haven't tested any further though. thanks for the help Mike -- View this message in context: http://www.nabble.com/T5%3A-CDATA-in-head-gives-a-not-implemented-error-tf3708984.html#a10373906 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox.
T5: Tapestry, Hibernate and Underscores.
Hi, I followed the small tutorial on using hibernate with T5 here http://wiki.apache.org/tapestry/Tapestry5HowToUseTapestryHibernate and it worked like a charm. Thank you to whoever wrote this! The example uses underscores for some private fields and sometimes not. Now I want to use this in my entities but then Hibernate generates incorrect column names. Isn't there a way for tuning this in the configuration file or something? If someone has that info, please share it with me! Thank you in advance, Olivier - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: parameter binding broken in T-4.1.* - PROPERTYSELECTION
Do you guys think you could bring this off list? This thread needs to be put out of its misery... On 10/12/07, Ken nashua [EMAIL PROTECTED] wrote: Thanks josh... couple more ques... Since I already have tapestry imported to my workspace... I am questioning the need to tell my project where the sources are. They are already imported to the workspace. Also your manner in which to tell eclipse where the sources is unclear... do I configure a jar (from where, repo or svn folder)? or just point it to some folder? Thanks Best regards Ken in nashua snipped -- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T4.1.2 and 3: Mysterious stack trace ??
It's a bug in the ognl expression compiler, would you mind filing a ticket with the specifics for me? (expression, object types and values of the types involved) It reverts back to normal OGNL reflection when it hits these but still logs them so that it's hopefully annoying enough that people report them. On 10/12/07, Malin Ljungh [EMAIL PROTECTED] wrote: Thanks Ken! As you say, the issue must be in my code. Sadly the message does not give me any clue about what or where. So - it's in the ognl somewhere - that's a start! I guess I'll just have to try blockwise comment out code do trace the error. 'Nice weekend to you all! Malin On 10/12/07, Ken nashua [EMAIL PROTECTED] wrote: Dude, The issue is in your code trust me (now I wish I could say the same about my code). Your referencing an OGNL variable with wrong case or something like that or semantically it is not constructed properly in order to follow thru with the processing. What is happening is the OGNL expression compiler is attempting to compile your ognl expression. Now Thats as flat as it gets. Why is it failing? Look at my first statement. Examine your expressions. Some expressions are blocked from being compiled due to @If conditions and so forth so the app will run and look fine but as you begin to open up these case blocks, then the fun starts... Best regards Ken in nashua _ Boo!Scare away worms, viruses and so much more! Try Windows Live OneCare! http://onecare.live.com/standard/en-us/purchase/trial.aspx?s_cid=wl_hotmailnews -- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: parameter binding broken in T-4.1.* - PROPERTYSELECTION
Thanks josh... couple more ques... Do I point eclipse to the sources from my local repo (zipped) or to SVN folder? Also, there is this -Djavassist-write-dir=target/classes Where do I set this up... and is the above configuration valid ? I put it in my window/preferences/java/installedjre's dialogue for my JRE but the above configuration will hit all projects and not sure if that's valid. Thanks Best regards Ken in nashua From: [EMAIL PROTECTED] To: users@tapestry.apache.org Subject: RE: parameter binding broken in T-4.1.* - PROPERTYSELECTION Date: Thu, 11 Oct 2007 19:07:35 -0400 Josh, I checked out 4.1.3 and built/deployed/installed it to my local repo. Then I re-generated all the eclipse projects for this 4.1.3 tapestry and imported them into my workspace. How do you integrate tapestry source step/debugging into eclipse? When I set a breakpoint on a source module, nothing happens. I am launching jetty under eclipse's external tools dialog. I am finding alot of things that do not work surrounding the propertyselect including the invocation of listener methods with the do prefix. persistent properties, parameters... not fun stuff. I can go it alone in the debugger and provide feedback on this release. Thanks for any tips... BTW: irc is banned where I work Best regards Ken in nashua From: [EMAIL PROTECTED] To: users@tapestry.apache.org Subject: RE: parameter binding broken in T-4.1.* - PROPERTYSELECTION Date: Thu, 11 Oct 2007 14:05:55 -0400 Attempts to model the solution below using @Persist in the JAVA defaulting to session never worked. Best regards Ken in nashua From: [EMAIL PROTECTED] To: users@tapestry.apache.org Subject: RE: parameter binding broken in T-4.1.* - PROPERTYSELECTION Date: Thu, 11 Oct 2007 12:40:18 -0400 Well I finally got something to stick... property name=tableSize persist=session/ property name=pagingSpan persist=session/ I eliminated all references from Home.html since these parameters are self contained inside Gallery widget... why pollute the upper level container component and violate separation of concerns anyway. But this solution is flakey. I change the selection and the PropertySelect updates whacky... sometimes it changes other times it doesn't then other times it never changes. I am using a @Block to model the thing... and using multiple instances of that block div jwcid=@RenderBlock block=ognl:components.autoPagingContent/ div jwcid=@RenderBlock block=ognl:components.collectionContent/ div jwcid=@RenderBlock block=ognl:components.autoPagingContent/ autoPagingContent is the guy... I am going to set the ID's on the following explicitly... td width=25% align=left NOWRAP span jwcid=@Insert value=Table Size/ select jwcid=tableSizeSelect/ span jwcid=@Insert value=Paging Span/ select jwcid=pagingSpanSelect/ /td Best regards Ken in nashua From: [EMAIL PROTECTED] To: users@tapestry.apache.org Subject: RE: parameter binding broken in T-4.1.* - PROPERTYSELECTION Date: Thu, 11 Oct 2007 12:15:11 -0400 An exception has occurred. You may continue by restarting the session. [ +/- ] Exception: A binding for parameter 'value' of component Home/galleryWidget.tableSizeSelect in the template for Home/galleryWidget conflicts with an existing binding in the specification. org.apache.hivemind.ApplicationRuntimeException A binding for parameter 'value' of component Home/galleryWidget.tableSizeSelect in the template for Home/galleryWidget conflicts with an existing binding in the specification. component: [EMAIL PROTECTED]/galleryWidget.tableSizeSelect] location: classpath:/org/trails/demo/components/Gallery.html, line 8 3 span jwcid=[EMAIL PROTECTED] 4 table width=100% border=1 5 tr 6 td width=25% align=left NOWRAP 7 span jwcid=@Insert value=Table Size/ 8 select jwcid=tableSizeSelect value=ognl:tableSize onchange=tapestry.form.refresh(this.form)/ 9 span jwcid=@Insert value=Paging Span/ 10 select jwcid=pagingSpanSelect value=ognl:pagingSpan onchange=tapestry.form.refresh(this.form)/ 11 /td 12 td align=left NOWRAP 13 a jwcid=@DirectLink listener=listener:onBegin style=fontSize:15px; span jwcid=@Insert value=/ /a Stack Trace:
Re: T4.1.2 and 3: Mysterious stack trace ??
Thanks Ken! As you say, the issue must be in my code. Sadly the message does not give me any clue about what or where. So - it's in the ognl somewhere - that's a start! I guess I'll just have to try blockwise comment out code do trace the error. 'Nice weekend to you all! Malin On 10/12/07, Ken nashua [EMAIL PROTECTED] wrote: Dude, The issue is in your code trust me (now I wish I could say the same about my code). Your referencing an OGNL variable with wrong case or something like that or semantically it is not constructed properly in order to follow thru with the processing. What is happening is the OGNL expression compiler is attempting to compile your ognl expression. Now Thats as flat as it gets. Why is it failing? Look at my first statement. Examine your expressions. Some expressions are blocked from being compiled due to @If conditions and so forth so the app will run and look fine but as you begin to open up these case blocks, then the fun starts... Best regards Ken in nashua _ Boo!Scare away worms, viruses and so much more! Try Windows Live OneCare! http://onecare.live.com/standard/en-us/purchase/trial.aspx?s_cid=wl_hotmailnews
Re: how to translate input into double/float value
Nick, For a PropertySelection component housing strings... am I free to perform OGNL arithmetic on those elements if they happen to be numeric strings? I am wondering if I need a translator or if it is illegal to perform ognl arithmetic on PropertySelection strings that happen to be 1, or 2.. Best regards Ken in nashua _ Boo! Scare away worms, viruses and so much more! Try Windows Live OneCare! http://onecare.live.com/standard/en-us/purchase/trial.aspx?s_cid=wl_hotmailnews
Re: T4.1.2 and 3: Mysterious stack trace ??
Dude, The issue is in your code trust me (now I wish I could say the same about my code). Your referencing an OGNL variable with wrong case or something like that or semantically it is not constructed properly in order to follow thru with the processing. What is happening is the OGNL expression compiler is attempting to compile your ognl expression. Now Thats as flat as it gets. Why is it failing? Look at my first statement. Examine your expressions. Some expressions are blocked from being compiled due to @If conditions and so forth so the app will run and look fine but as you begin to open up these case blocks, then the fun starts... Best regards Ken in nashua _ Boo! Scare away worms, viruses and so much more! Try Windows Live OneCare! http://onecare.live.com/standard/en-us/purchase/trial.aspx?s_cid=wl_hotmailnews
[T5] Recommended naming of configurations
Let's say you have a service that allows multiple contributions. One of the contributions is simply a list of other objects (say an ordered configuration). What is the naming convention for the configuration point for that list of objects? For instance, lets say you want to have a list of FooBars contributed. Which of the following is recommended: contributeFooBars() contributeFooBarManager() contributeMasterFooBar() or would you recommend something else entirely? I think I like the first one simply because it more readable in the modules that are contributing. -- Dan Adams Senior Software Engineer Interactive Factory 617.235.5857 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Persistent properties may only be changed prior to the rendering of the response page
What is the solution for initializing a persistent property in T-4.1.3 Can someone elaborate on this? Seems to go back to 2005 and remains an issue... http://mail-archives.apache.org/mod_mbox/tapestry-users/200509.mbox/[EMAIL PROTECTED] Thanks in advance... Best regards Ken in nashua _ Windows Live Hotmail and Microsoft Office Outlook – together at last. Get it now. http://office.microsoft.com/en-us/outlook/HA102225181033.aspx?pid=CL100626971033
T4.1.2 and 3: Mysterious stack trace ??
Hi, I have an exception stack trace which appears on both 4.1.2 and 4.1.3. The weird thing is that the app works fine, everything looks fine from the users perspective. Anyone has an idea what it is? Cheers, Malin sorry for the long stack trace now...: org.apache.hivemind.ApplicationRuntimeException: Unable to create class $ASTProperty_11593f59446: by java.lang.ClassFormatError: Method init in class $ASTProperty_11593f59446 has illegal signature )V at org.apache.tapestry.enhance.CtClassSource.createClass( CtClassSource.java:89) at org.apache.tapestry.enhance.AbstractFab.createClass( AbstractFab.java:96) at org.apache.tapestry.services.impl.HiveMindExpressionCompiler.compileExpression (HiveMindExpressionCompiler.java:218) at ognl.OgnlRuntime.compileExpression(OgnlRuntime.java:498) at ognl.Ognl.compileExpression(Ognl.java:141) at org.apache.tapestry.services.impl.ExpressionCacheImpl.parse( ExpressionCacheImpl.java:152) at org.apache.tapestry.services.impl.ExpressionCacheImpl.getCompiledExpression( ExpressionCacheImpl.java:115) at $ExpressionCache_11593f593ca.getCompiledExpression($ExpressionCache_11593f593ca.java) at org.apache.tapestry.binding.ExpressionBinding.resolveExpression( ExpressionBinding.java:134) at org.apache.tapestry.binding.ExpressionBinding.getObject( ExpressionBinding.java:125) at org.apache.tapestry.binding.AbstractBinding.getObject( AbstractBinding.java:84) at org.apache.tapestry.enhance.EnhanceUtils.toBoolean( EnhanceUtils.java:173) at $IfBean_5.getCondition($IfBean_5.java) at org.apache.tapestry.components.IfBean.evaluateCondition( IfBean.java:128) at org.apache.tapestry.components.IfBean.renderComponent(IfBean.java :66) at org.apache.tapestry.AbstractComponent.render( AbstractComponent.java:725) at org.apache.tapestry.services.impl.DefaultResponseBuilder.render( DefaultResponseBuilder.java:180) at org.apache.tapestry.AbstractComponent.renderBody( AbstractComponent.java:539) at org.apache.tapestry.components.Any.renderComponent(Any.java:44) at org.apache.tapestry.AbstractComponent.render( AbstractComponent.java:725) at org.apache.tapestry.services.impl.DefaultResponseBuilder.render( DefaultResponseBuilder.java:180) at org.apache.tapestry.AbstractComponent.renderBody( AbstractComponent.java:539) at org.apache.tapestry.components.IfBean.renderComponent(IfBean.java :94) at org.apache.tapestry.AbstractComponent.render( AbstractComponent.java:725) at org.apache.tapestry.services.impl.DefaultResponseBuilder.render( DefaultResponseBuilder.java:180) at org.apache.tapestry.BaseComponent.renderComponent( BaseComponent.java:107) at org.apache.tapestry.AbstractComponent.render( AbstractComponent.java:725) at org.apache.tapestry.services.impl.DefaultResponseBuilder.render( DefaultResponseBuilder.java:180) at org.apache.tapestry.AbstractComponent.renderBody( AbstractComponent.java:539) at org.apache.tapestry.components.RenderBody.renderComponent( RenderBody.java:39) at org.apache.tapestry.AbstractComponent.render( AbstractComponent.java:725) at org.apache.tapestry.services.impl.DefaultResponseBuilder.render( DefaultResponseBuilder.java:180) at org.apache.tapestry.AbstractComponent.renderBody( AbstractComponent.java:539) at org.apache.tapestry.html.Body.renderComponent(Body.java:38) at org.apache.tapestry.AbstractComponent.render( AbstractComponent.java:725) at org.apache.tapestry.services.impl.DefaultResponseBuilder.render( DefaultResponseBuilder.java:180) at org.apache.tapestry.AbstractComponent.renderBody( AbstractComponent.java:539) at org.apache.tapestry.html.Shell.renderComponent(Shell.java:124) at org.apache.tapestry.AbstractComponent.render( AbstractComponent.java:725) at org.apache.tapestry.services.impl.DefaultResponseBuilder.render( DefaultResponseBuilder.java:180) at org.apache.tapestry.BaseComponent.renderComponent( BaseComponent.java:107) at org.apache.tapestry.AbstractComponent.render( AbstractComponent.java:725) at org.apache.tapestry.services.impl.DefaultResponseBuilder.render( DefaultResponseBuilder.java:180) at org.apache.tapestry.BaseComponent.renderComponent( BaseComponent.java:107) at org.apache.tapestry.AbstractComponent.render( AbstractComponent.java:725) at org.apache.tapestry.services.impl.DefaultResponseBuilder.render( DefaultResponseBuilder.java:178) at org.apache.tapestry.AbstractPage.renderPage(AbstractPage.java :249) at org.apache.tapestry.engine.RequestCycle.renderPage( RequestCycle.java:397) at org.apache.tapestry.services.impl.DefaultResponseBuilder.renderResponse( DefaultResponseBuilder.java:152) at org.apache.tapestry.services.impl.ResponseRendererImpl.renderResponse(
Re: T5: How to set persisted variable to null
Getters/setters are only required for JavaBean conformity, e.g. to use prop. I've just tested this on 5.0.5 (maybe 5.0.6 later if I get time) ... There is a bug - setting the property to null doesn't work. If someone can verify this on 5.0.6 before I do, please log a JIRA. Cheers, Nick. Josh Canfield wrote: if I have an attribute, I should use a setter to assign it? like this: Hmm... looking at javassist, it looks like there is the ability to modify field level access within a method. Perhaps, if changing to the setter worked then this should be filed as a defect, if it isn't already. Josh On 10/11/07, Angelo Chen [EMAIL PROTECTED] wrote: Hi, You are correct. this does bring up a question: if I have an attribute, I should use a setter to assign it? like this: private String id; void onActivate() { id = myid; // wrong setId(myid); // correct ? if (id == myid); // wrong if (getId() == myid); // correct? } ? Josh Canfield-2 wrote: even i set uid to null, it is still not null next time when the page is activated, why? what's the correct way of setting a persisted variable null? I would guess that the right way to do it would be to use the setter method for the attribute. I haven't looked, but I would guess that Tapestry is catching assignments to that attribute via the setter, and when you set it directly you are bypassing that code. Josh On 10/11/07, Angelo Chen [EMAIL PROTECTED] wrote: Hi, I have this class: public class Confirmation { @Persist private String uid; public Class onActivate(String id) { if (uid == null) { uid = id; } return null; } public String onPassivate() { return uid;} String onActionFromAutoLogin() { uid = null; return MyPage; } } even i set uid to null, it is still not null next time when the page is activated, why? what's the correct way of setting a persisted variable null? Thanks. A.C. -- View this message in context: http://www.nabble.com/T5%3A-How-to-set-persisted-variable-to-null-tf4605726.html#a13151324 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox. -- View this message in context: http://www.nabble.com/T5%3A-How-to-set-persisted-variable-to-null-tf4605726.html#a13166676 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T4.1.3: Why is id suffixed with _0 ?
OK, thanks! Works fine with the Any wrapping :) On 10/8/07, Martino Piccinato [EMAIL PROTECTED] wrote: Unfortunately for some reason some components cannot be used with updateComponents: most notably Insert and If. The solution is to wrap you if with an Any component that can be updated. Id of components are suffixed with indexex _0, _1 ecc. usually when inside a For to ensure each one has a different id (that is usually the component name + the index). On 10/8/07, Malin Ljungh [EMAIL PROTECTED] wrote: Hi all, I have a problem with the async and updateComponents. I have an If component with id ifNotLoggedIn with renderTag true. Inside this I have som DirectLinks to switch the content of my If using async and updateComponents=ifNotLoggedIn. I get the following exception: org.apache.hivemind.ApplicationRuntimeException: Parameter id can't be null must not be null. [context:/WEB-INF/Home.page, line 5, column 54] at org.apache.tapestry.engine.RequestCycle.renderPage( RequestCycle.java :411) at org.apache.tapestry.services.impl.DojoAjaxResponseBuilder.renderResponse ( DojoAjaxResponseBuilder.java:241) at org.apache.tapestry.services.impl.ResponseRendererImpl.renderResponse (ResponseRendererImpl.java:33) at $ResponseRenderer_11580f03168.renderResponse($ResponseRenderer_11580f03168.java) at org.apache.tapestry.engine.DirectService.service( DirectService.java :147) and this is because the If component gets the id ifNotLoggedIn_0 when rendered. Why? Where did I go wrong? Cheers, Malin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to use ioc of t5 ?
you must not put your dao objects into pages or components packages... http://wiki.apache.org/tapestry/Tapestry5HowToNotMakeCustomComponent last section move your DAO into another package, yourApp.entities or sth.. Davor Hrg On 10/12/07, MavenMan [EMAIL PROTECTED] wrote: I just code: binder.bind(CompanyDAO.class,CompanyDaoImpl.class); @Inject private CompanyDAO dao then call dao.method ,but org.apache.tapestry.internal.services.TransformationException: Error obtaining injected value for field com.myspacce.pages.Start.dao: No service implements the interface com.myspacce.pages.CompanyDAO. need I add annotation to CompanyDaoImpl or CompanyDAO ? Best Regards ! Josh Canfield-2 wrote: @Inject @Service(CompanyDAO) private CompanyDAO dao; This should just be: @Inject private CompanyDAO dao; Josh On 10/11/07, MavenMan [EMAIL PROTECTED] wrote: now I want to know how to inject service to page class . after I add this in AppModule : binder.bind(CompanyDAO.class,CompanyDaoImpl.class) and add @Inject @Service(CompanyDAO) private CompanyDAO dao; in page class. but it seem to be wrong ! can you help me ? thanks kristian.marinkovic wrote: do you have the hibernate libraries in your classpath? lasitha [EMAIL PROTECTED] 11.10.2007 09:14 Bitte antworten an Tapestry users users@tapestry.apache.org An Tapestry users users@tapestry.apache.org Kopie Thema Re: how to use ioc of t5 ? In my setup i've got all my hibernated classes in the 'entities' package - which is automatically picked up tapestry-hibernate - so i've not had to make a contribution like this. I'm afraid i don't have time to play with it right now either..., sorry. As an experiment, you might try moving (some of) your hibernated classes from 'domain' into 'entities' and commenting out the contribution code, just so we know whether your exception is related to contributing a package or something else. Also, is there more to that exception stack? It doesn't seem to mention a cause... Lastly, i have a vague recollection of a past thread in this list about contributing packages to tapestry-hibernate... did you happen to run across anything in the archives? Cheers, lasitha. On 10/11/07, MavenMan [EMAIL PROTECTED] wrote: thanks. I hava add this to AppModule: public static void contributeHibernateSessionSource(ConfigurationString configuration) { configuration.add(com.myspacce.domain); } Company.java is in com/myspacce/domain: import javax.persistence.*; @Entity @Table(name=company) public class Company { @Id @GeneratedValue private int id; private String name; public Company() { } public int getId() { return id; } public void setId(int id) { this.id=id; } public String getName() { return name; } public void setName(String name) { this.name=name; } I have the tapestry-hibernate module in my classpath. error is : Error invoking service builder method org.apache.tapestry.hibernate.HibernateModule.build (HibernateSessionSource, ThreadCleanupHub) (at HibernateModule.java:62) (for service 'HibernateSessionManager'): Exception constructing service 'HibernateSessionSource': Error invoking constructor org.apache.tapestry.internal.hibernate.HibernateSessionSourceImpl (Log, Collection, ClassNameLocator) (at HibernateSessionSourceImpl.java :35) (for service 'HibernateSessionSource'): org/hibernate/cfg/annotations/ResultsetMappingSecondPass thanks lasitha wrote: It looks like you don't have the tapestry-hibernate module in your classpath. There are a couple of starters you should checkout: http://tapestry.apache.org/tapestry5/tapestry-hibernate/ http://wiki.apache.org/tapestry/Tapestry5HowToUseTapestryHibernate And don't forget to search the mailing list archives: http://wiki.apache.org/tapestry/Tapestry5HowToSearchTheMailingLists Let us know if those don't help, Cheers, lasitha. On 10/11/07, MavenMan [EMAIL PROTECTED] wrote: hello all : I write a page class : package com.myspacce.pages; import java.util.*; import org.apache.tapestry.annotations.*; import org.hibernate.*; public class Start { public String _name; @Inject private Session _session; public List getList()
Re: T4.1.2 and 3: Mysterious stack trace ??
I finally found it! I would say the issue is not in my code - I consider this a bug (?) This was the problem: I have an If component bound to the showLoginForm property - thus I have getter and setters boolean getShowLoginForm and setShowLoginForm(boolean). Also, I have (in the same component) a DirectLink with listener bound to method showLoginForm (in the same component class as the getters and setters mentioned above). Seems like it's some kind of name collision here. If I rename the listener to for example showLoginFormAction I get rid of the stack trace. Should I file the ticket in the OGNL Jesse? I'm not sure where this belongs... /Malin On 10/12/07, Jesse Kuhnert [EMAIL PROTECTED] wrote: I meant to say a ticket here: http://jira.opensymphony.com/browse/OGNL On 10/12/07, Jesse Kuhnert [EMAIL PROTECTED] wrote: It's a bug in the ognl expression compiler, would you mind filing a ticket with the specifics for me? (expression, object types and values of the types involved) It reverts back to normal OGNL reflection when it hits these but still logs them so that it's hopefully annoying enough that people report them. On 10/12/07, Malin Ljungh [EMAIL PROTECTED] wrote: Thanks Ken! As you say, the issue must be in my code. Sadly the message does not give me any clue about what or where. So - it's in the ognl somewhere - that's a start! I guess I'll just have to try blockwise comment out code do trace the error. 'Nice weekend to you all! Malin On 10/12/07, Ken nashua [EMAIL PROTECTED] wrote: Dude, The issue is in your code trust me (now I wish I could say the same about my code). Your referencing an OGNL variable with wrong case or something like that or semantically it is not constructed properly in order to follow thru with the processing. What is happening is the OGNL expression compiler is attempting to compile your ognl expression. Now Thats as flat as it gets. Why is it failing? Look at my first statement. Examine your expressions. Some expressions are blocked from being compiled due to @If conditions and so forth so the app will run and look fine but as you begin to open up these case blocks, then the fun starts... Best regards Ken in nashua _ Boo!Scare away worms, viruses and so much more! Try Windows Live OneCare! http://onecare.live.com/standard/en-us/purchase/trial.aspx?s_cid=wl_hotmailnews -- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com -- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: CDATA in head gives a not implemented error
I've created an issue for this. You can follow or vote for it here https://issues.apache.org/jira/browse/TAPESTRY-1818 Alexandru Dragomir wrote: As you mentioned , the workaround is to put the javascript (or at least the one that contains the and ) in a separate file. This should be fine for majority of cases. Alex On 5/8/07, Mike_R [EMAIL PROTECTED] wrote: Hi, I was copying some google maps javascript (http://www.google.com/uds/samples/places.html) inside of the head of my Border component. Since the javascript code uses and , it's protected with //![CDATA[ When I try to use the Border component with this CDATA block I get a message stating 'not implemented yet: CDATA'. Is this a known limitation, should I file a bug and how can I solve this? When I put the javascript in a separate file the error seemed gone, haven't tested any further though. thanks for the help Mike -- View this message in context: http://www.nabble.com/T5%3A-CDATA-in-head-gives-a-not-implemented-error-tf3708984.html#a10373906 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 translate input into double/float value
You provide a translator. The framework provides one for Double etc: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/translator/ You can add more in your AppModule.java, like this ... (I know this seems like overkill, but will likely be improved later.) // add a Float translator public static void contributeTranslatorDefaultSource( MappedConfigurationClass?, Translator? configuration) { configuration.add(Float.class, new TranslatorFloat() { /** * Parses blank values to null, otherwise parses the client value to a float * * @throws ValidationException if the clientValue can not be parsed */ public Float parseClient(String clientValue, Messages messages) throws ValidationException { if (InternalUtils.isBlank(clientValue)) return null; try { Float result = new Float(clientValue.trim()); if (result.isInfinite()) { throw new ValidationException(messages.format(number-range-exception, clientValue)); } return result; } catch (NumberFormatException ex) { throw new ValidationException(messages.format(number-format-exception, clientValue)); } } /** * Converts null to the blank string, non-null to a string representation. */ public String toClient(Float value) { return value == null ? : value.toString(); } }); } Cheers, Nick. Imran Amajd wrote: Hello, Please guide me how i can translate input value into double or float. Thanks -Imran Amjad - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: the relation of pojo
lasitha is right, you are asking the question in the wrong place, these are really basic hibernate questions and do not belong to this list. try googling first.. before you continue calling anyone else impatient please read this page carefully http://www.catb.org/~esr/faqs/smart-questions.html Davor Hrg On 10/12/07, MavenMan [EMAIL PROTECTED] wrote: I have find the docmentent about hibernate . but I still think you are a impatient guy . lasitha wrote: MavenMan, Please do your own homework - most folks here will gladly give of their time to help, but we do ask that you _at least_ go over the basic documentation first :). Moreover, your question is really not relevant to T5. Hibernate/JPA Annotations documentation can be found here: http://hibernate.org/5.html#A7 It assumes a working knowledge of hibernate: http://hibernate.org/5.html#A3 Cheers, lasitha. On 10/12/07, MavenMan [EMAIL PROTECTED] wrote: but how to specify the relation of the pojo using relationships ? can you give me examples of one to many and one to one ? thank you ! Angelo Chen wrote: you can specify the relationships in the pojp's annotation MavenMan wrote: you know that there is no need to have a hibernate map file(.hbm.xml) in project. but how to represent the relation of the pojo ? -- View this message in context: http://www.nabble.com/T5%3A-the-relation-of--pojo-tf4606036.html#a13167277 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/T5%3A-the-relation-of--pojo-tf4606036.html#a13168555 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: parameter binding broken in T-4.1.* - PROPERTYSELECTION
Thanks josh... couple more ques... Since I already have tapestry imported to my workspace... I am questioning the need to tell my project where the sources are. They are already imported to the workspace. Also your manner in which to tell eclipse where the sources is unclear... do I configure a jar (from where, repo or svn folder)? or just point it to some folder? Thanks Best regards Ken in nashua From: [EMAIL PROTECTED] To: users@tapestry.apache.org Subject: RE: parameter binding broken in T-4.1.* - PROPERTYSELECTION Date: Thu, 11 Oct 2007 19:07:35 -0400 Josh, I checked out 4.1.3 and built/deployed/installed it to my local repo. Then I re-generated all the eclipse projects for this 4.1.3 tapestry and imported them into my workspace. How do you integrate tapestry source step/debugging into eclipse? When I set a breakpoint on a source module, nothing happens. I am launching jetty under eclipse's external tools dialog. I am finding alot of things that do not work surrounding the propertyselect including the invocation of listener methods with the do prefix. persistent properties, parameters... not fun stuff. I can go it alone in the debugger and provide feedback on this release. Thanks for any tips... BTW: irc is banned where I work Best regards Ken in nashua From: [EMAIL PROTECTED] To: users@tapestry.apache.org Subject: RE: parameter binding broken in T-4.1.* - PROPERTYSELECTION Date: Thu, 11 Oct 2007 14:05:55 -0400 Attempts to model the solution below using @Persist in the JAVA defaulting to session never worked. Best regards Ken in nashua From: [EMAIL PROTECTED] To: users@tapestry.apache.org Subject: RE: parameter binding broken in T-4.1.* - PROPERTYSELECTION Date: Thu, 11 Oct 2007 12:40:18 -0400 Well I finally got something to stick... property name=tableSize persist=session/ property name=pagingSpan persist=session/ I eliminated all references from Home.html since these parameters are self contained inside Gallery widget... why pollute the upper level container component and violate separation of concerns anyway. But this solution is flakey. I change the selection and the PropertySelect updates whacky... sometimes it changes other times it doesn't then other times it never changes. I am using a @Block to model the thing... and using multiple instances of that block div jwcid=@RenderBlock block=ognl:components.autoPagingContent/ div jwcid=@RenderBlock block=ognl:components.collectionContent/ div jwcid=@RenderBlock block=ognl:components.autoPagingContent/ autoPagingContent is the guy... I am going to set the ID's on the following explicitly... td width=25% align=left NOWRAP span jwcid=@Insert value=Table Size/ select jwcid=tableSizeSelect/ span jwcid=@Insert value=Paging Span/ select jwcid=pagingSpanSelect/ /td Best regards Ken in nashua From: [EMAIL PROTECTED] To: users@tapestry.apache.org Subject: RE: parameter binding broken in T-4.1.* - PROPERTYSELECTION Date: Thu, 11 Oct 2007 12:15:11 -0400 An exception has occurred. You may continue by restarting the session. [ +/- ] Exception: A binding for parameter 'value' of component Home/galleryWidget.tableSizeSelect in the template for Home/galleryWidget conflicts with an existing binding in the specification. org.apache.hivemind.ApplicationRuntimeException A binding for parameter 'value' of component Home/galleryWidget.tableSizeSelect in the template for Home/galleryWidget conflicts with an existing binding in the specification. component: [EMAIL PROTECTED]/galleryWidget.tableSizeSelect] location: classpath:/org/trails/demo/components/Gallery.html, line 8 3 span jwcid=[EMAIL PROTECTED] 4 table width=100% border=1 5 tr 6 td width=25% align=left NOWRAP 7 span jwcid=@Insert value=Table Size/ 8 select jwcid=tableSizeSelect value=ognl:tableSize onchange=tapestry.form.refresh(this.form)/ 9 span jwcid=@Insert value=Paging Span/ 10 select jwcid=pagingSpanSelect value=ognl:pagingSpan onchange=tapestry.form.refresh(this.form)/ 11 /td 12 td align=left NOWRAP 13 a jwcid=@DirectLink listener=listener:onBegin style=fontSize:15px; span jwcid=@Insert value=/ /a Stack Trace:
Re: T5: User validation
On 10/12/07, lasitha [EMAIL PROTECTED] wrote: Hello Michael, you may find this thread useful: http://www.nabble.com/-T5--Restricting-Page-Access-tf4325658.html tapestry5-acegi uses a combination of annotations and contributions to the RequestHandler pipeline[1]. You may actually only need the latter. Cheers, lasitha. [1] http://tapestry.apache.org/tapestry5/tapestry-core/guide/request.html Right, and it's preferrable if you don't want to throw in Spring deps. -- Massimo http://meridio.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Does tapestry need an IntegerPropertySelectionModel ?
I am trying to operate a PropertySelection that uses an array of strings but their content are numbers. private static final String[] tableSizeOptions = new String[] { 1, 2, 3 }; I am assuming OGNL is smart enough to coerce these during render cycle on IF conditions that attempt to perform arithmetic. NOT the case... see stack trace below. Do I need to implement an IntegerPropertySelectionModel for this to operate properly? Best regards Ken in nashua 2007-10-12 15:01:00,575 [btpool0-2] ERROR org.apache.tapestry.services.impl.HiveMindExpressionCompiler - Error generating OGNL getter for expression (index % tableSize) == 0 with root [EMAIL PROTECTED]/galleryWidget] and body: { return ($w) ((ognl.OgnlOps.equal( ($w) ((($Gallery_17)$2).getIndex() % (($Gallery_17)$2).getTableSize() ), ($w) 0)));} org.apache.hivemind.ApplicationRuntimeException: Unable to add method java.lang.Object get(ognl.OgnlContext, java.lang.Object) to class $ASTEq_1159596f3b2: [source error] invalid types for % at org.apache.tapestry.enhance.ClassFabImpl.addMethod(ClassFabImpl.java:278) at org.apache.tapestry.services.impl.HiveMindExpressionCompiler.compileExpression(HiveMindExpressionCompiler.java:176) at ognl.OgnlRuntime.compileExpression(OgnlRuntime.java:523) _ Windows Live Hotmail and Microsoft Office Outlook – together at last. Get it now. http://office.microsoft.com/en-us/outlook/HA102225181033.aspx?pid=CL100626971033
Re: T5: How to set persisted variable to null
I'm having a similar problem and modifying the setter doesn't work for me. In my use case, i have a Double property in a page. This property is bound to the value of a TextField. If i submit with the textfield an empty a 0.0 value shows up, instead of the submitted value that was null. I've tracked the problem down to the TypeCoercer implementation. The given implementation coerces null values into the default value of a type. So if you want to coerce a null to a Double if return 0.0d instead of just null. I'm not sure if this is actually intended behavior and there's probably an easy way through configuration or something to solve my use case or if it's a bug. Anyone ? Angelo Chen wrote: Hi Nick, Using a setter does work, right? Nick Westgate wrote: Getters/setters are only required for JavaBean conformity, e.g. to use prop. I've just tested this on 5.0.5 (maybe 5.0.6 later if I get time) ... There is a bug - setting the property to null doesn't work. If someone can verify this on 5.0.6 before I do, please log a JIRA. Cheers, Nick. Josh Canfield wrote: if I have an attribute, I should use a setter to assign it? like this: Hmm... looking at javassist, it looks like there is the ability to modify field level access within a method. Perhaps, if changing to the setter worked then this should be filed as a defect, if it isn't already. Josh On 10/11/07, Angelo Chen [EMAIL PROTECTED] wrote: Hi, You are correct. this does bring up a question: if I have an attribute, I should use a setter to assign it? like this: private String id; void onActivate() { id = myid; // wrong setId(myid); // correct ? if (id == myid); // wrong if (getId() == myid); // correct? } ? Josh Canfield-2 wrote: even i set uid to null, it is still not null next time when the page is activated, why? what's the correct way of setting a persisted variable null? I would guess that the right way to do it would be to use the setter method for the attribute. I haven't looked, but I would guess that Tapestry is catching assignments to that attribute via the setter, and when you set it directly you are bypassing that code. Josh On 10/11/07, Angelo Chen [EMAIL PROTECTED] wrote: Hi, I have this class: public class Confirmation { @Persist private String uid; public Class onActivate(String id) { if (uid == null) { uid = id; } return null; } public String onPassivate() { return uid;} String onActionFromAutoLogin() { uid = null; return MyPage; } } even i set uid to null, it is still not null next time when the page is activated, why? what's the correct way of setting a persisted variable null? Thanks. A.C. -- View this message in context: http://www.nabble.com/T5%3A-How-to-set-persisted-variable-to-null-tf4605726.html#a13151324 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox. -- View this message in context: http://www.nabble.com/T5%3A-How-to-set-persisted-variable-to-null-tf4605726.html#a13166676 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: How to set persisted variable to null
Hi Nick, Using a setter does work, right? Nick Westgate wrote: Getters/setters are only required for JavaBean conformity, e.g. to use prop. I've just tested this on 5.0.5 (maybe 5.0.6 later if I get time) ... There is a bug - setting the property to null doesn't work. If someone can verify this on 5.0.6 before I do, please log a JIRA. Cheers, Nick. Josh Canfield wrote: if I have an attribute, I should use a setter to assign it? like this: Hmm... looking at javassist, it looks like there is the ability to modify field level access within a method. Perhaps, if changing to the setter worked then this should be filed as a defect, if it isn't already. Josh On 10/11/07, Angelo Chen [EMAIL PROTECTED] wrote: Hi, You are correct. this does bring up a question: if I have an attribute, I should use a setter to assign it? like this: private String id; void onActivate() { id = myid; // wrong setId(myid); // correct ? if (id == myid); // wrong if (getId() == myid); // correct? } ? Josh Canfield-2 wrote: even i set uid to null, it is still not null next time when the page is activated, why? what's the correct way of setting a persisted variable null? I would guess that the right way to do it would be to use the setter method for the attribute. I haven't looked, but I would guess that Tapestry is catching assignments to that attribute via the setter, and when you set it directly you are bypassing that code. Josh On 10/11/07, Angelo Chen [EMAIL PROTECTED] wrote: Hi, I have this class: public class Confirmation { @Persist private String uid; public Class onActivate(String id) { if (uid == null) { uid = id; } return null; } public String onPassivate() { return uid;} String onActionFromAutoLogin() { uid = null; return MyPage; } } even i set uid to null, it is still not null next time when the page is activated, why? what's the correct way of setting a persisted variable null? Thanks. A.C. -- View this message in context: http://www.nabble.com/T5%3A-How-to-set-persisted-variable-to-null-tf4605726.html#a13151324 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox. -- View this message in context: http://www.nabble.com/T5%3A-How-to-set-persisted-variable-to-null-tf4605726.html#a13166676 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/T5%3A-How-to-set-persisted-variable-to-null-tf4605726.html#a13174208 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: Does tapestry need an IntegerPropertySelectionModel ?
Thanks Jesse... I will give your stuff a shot... but am already building/trying an IntegerPropertySelectionModel right now to see if it induces the proper coercian. I am happy to try any new builds/patches you submit. It would be nice to know when it happens. Thanks for your patience. Best regards Ken in nashua package org.trails.util; import org.apache.tapestry.form.IPropertySelectionModel; public class IntegerPropertySelectionModel implements IPropertySelectionModel { private Integer[] _set; public IntegerPropertySelectionModel(Integer[] set) { _set = set; } public String getLabel(int index) { return _set[index].toString(); } public Object getOption(int index) { return _set[index]; } public int getOptionCount() { return _set.length; } public String getValue(int index) { return _set[index].toString(); } public boolean isDisabled(int index) { return false; } public Object translateValue(String value) { for (Integer e : _set) { if (e.toString().equals(value)) return e; } return null; } } From: [EMAIL PROTECTED] To: users@tapestry.apache.org Subject: Does tapestry need an IntegerPropertySelectionModel ? Date: Fri, 12 Oct 2007 15:12:14 -0400 I am trying to operate a PropertySelection that uses an array of strings but their content are numbers. private static final String[] tableSizeOptions = new String[] { 1, 2, 3 }; I am assuming OGNL is smart enough to coerce these during render cycle on IF conditions that attempt to perform arithmetic. NOT the case... see stack trace below. Do I need to implement an IntegerPropertySelectionModel for this to operate properly? Best regards Ken in nashua 2007-10-12 15:01:00,575 [btpool0-2] ERROR org.apache.tapestry.services.impl.HiveMindExpressionCompiler - Error generating OGNL getter for expression (index % tableSize) == 0 with root [EMAIL PROTECTED]/galleryWidget] and body: { return ($w) ((ognl.OgnlOps.equal( ($w) ((($Gallery_17)$2).getIndex() % (($Gallery_17)$2).getTableSize() ), ($w) 0)));} org.apache.hivemind.ApplicationRuntimeException: Unable to add method java.lang.Object get(ognl.OgnlContext, java.lang.Object) to class $ASTEq_1159596f3b2: [source error] invalid types for % at org.apache.tapestry.enhance.ClassFabImpl.addMethod(ClassFabImpl.java:278) at org.apache.tapestry.services.impl.HiveMindExpressionCompiler.compileExpression(HiveMindExpressionCompiler.java:176) at ognl.OgnlRuntime.compileExpression(OgnlRuntime.java:523) Windows Live Hotmail and Microsoft Office Outlook – together at last. Get it now! _ Windows Live Hotmail and Microsoft Office Outlook – together at last. Get it now. http://office.microsoft.com/en-us/outlook/HA102225181033.aspx?pid=CL100626971033
Re: T4.1.2 and 3: Mysterious stack trace ??
I meant to say a ticket here: http://jira.opensymphony.com/browse/OGNL On 10/12/07, Jesse Kuhnert [EMAIL PROTECTED] wrote: It's a bug in the ognl expression compiler, would you mind filing a ticket with the specifics for me? (expression, object types and values of the types involved) It reverts back to normal OGNL reflection when it hits these but still logs them so that it's hopefully annoying enough that people report them. On 10/12/07, Malin Ljungh [EMAIL PROTECTED] wrote: Thanks Ken! As you say, the issue must be in my code. Sadly the message does not give me any clue about what or where. So - it's in the ognl somewhere - that's a start! I guess I'll just have to try blockwise comment out code do trace the error. 'Nice weekend to you all! Malin On 10/12/07, Ken nashua [EMAIL PROTECTED] wrote: Dude, The issue is in your code trust me (now I wish I could say the same about my code). Your referencing an OGNL variable with wrong case or something like that or semantically it is not constructed properly in order to follow thru with the processing. What is happening is the OGNL expression compiler is attempting to compile your ognl expression. Now Thats as flat as it gets. Why is it failing? Look at my first statement. Examine your expressions. Some expressions are blocked from being compiled due to @If conditions and so forth so the app will run and look fine but as you begin to open up these case blocks, then the fun starts... Best regards Ken in nashua _ Boo!Scare away worms, viruses and so much more! Try Windows Live OneCare! http://onecare.live.com/standard/en-us/purchase/trial.aspx?s_cid=wl_hotmailnews -- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com -- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T5: Looping list of objects
Hi all, I have a page that has a loop to iterate over some objects in a list and display them as I need. I don't want to use a grid component because it doesn't match the needs I need. I am not creating a table, I am creating a selection box for a form. So my template looks like this: School: select name=schoolId t:loop source=schools value=currentSchool option value=currentSchool.id${currentSchool.name} - ${currentSchool.location}/option /t:loop /select where my getSchools function returns a List of School objects. These School objects I have used successfully in grid components and other various parts of my application. When I try and run this page I get the following error: Error serializing component action for component Classrooms/Modify:loop: School So I take it that I need to serialize the component but if so why does the grid component work with the same list of objects? Is there another way I can accomplish this without serializing the class? Jean-Philippe Steinmetz
Re: Does tapestry need an IntegerPropertySelectionModel ?
I've added a jira issue for OGNL I think - but am not sure - that this should be properly evaluated normally...So, it could be a bug. You can probably do one of the following: -) Create a simple inner class def of your IPropertySelectionModel using an int[] . -) Wait for me to fix it in OGNL. -) Replace your (index % tableSize) == 0 with a method equivalent that you implement on your page / component so that it turns in to ognl:odd (as in public boolean isOdd(){ return getIndex() % getTableSize() == 0; } I'd go for the third option if it were me. Thanks for shortening down your question for me, I usually have an unofficial automatic email content limit that makes me skip over them if they are too long to read easily in a few seconds. On 10/12/07, Ken nashua [EMAIL PROTECTED] wrote: I am trying to operate a PropertySelection that uses an array of strings but their content are numbers. private static final String[] tableSizeOptions = new String[] { 1, 2, 3 }; I am assuming OGNL is smart enough to coerce these during render cycle on IF conditions that attempt to perform arithmetic. NOT the case... see stack trace below. Do I need to implement an IntegerPropertySelectionModel for this to operate properly? Best regards Ken in nashua 2007-10-12 15:01:00,575 [btpool0-2] ERROR org.apache.tapestry.services.impl.HiveMindExpressionCompiler - Error generating OGNL getter for expression (index % tableSize) == 0 with root [EMAIL PROTECTED]/galleryWidget] and body: { return ($w) ((ognl.OgnlOps.equal( ($w) ((($Gallery_17)$2).getIndex() % (($Gallery_17)$2).getTableSize() ), ($w) 0)));} org.apache.hivemind.ApplicationRuntimeException: Unable to add method java.lang.Object get(ognl.OgnlContext, java.lang.Object) to class $ASTEq_1159596f3b2: [source error] invalid types for % at org.apache.tapestry.enhance.ClassFabImpl.addMethod(ClassFabImpl.java:278) at org.apache.tapestry.services.impl.HiveMindExpressionCompiler.compileExpression(HiveMindExpressionCompiler.java:176) at ognl.OgnlRuntime.compileExpression(OgnlRuntime.java:523) _ Windows Live Hotmail and Microsoft Office Outlook – together at last. Get it now. http://office.microsoft.com/en-us/outlook/HA102225181033.aspx?pid=CL100626971033 -- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: T5: Looping list of objects
Thanks, that fixed it. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Josh Canfield Sent: Friday, October 12, 2007 1:02 PM To: Tapestry users Subject: Re: T5: Looping list of objects I believe adding volatile=true to your loop will cause the loop to not serialize your object. http://tapestry.apache.org/tapestry5/tapestry-core/component-p arameters.html#orgapachetapestrycorelibcomponentsloop Josh On 10/12/07, Jean-Philippe Steinmetz [EMAIL PROTECTED] wrote: Hi all, I have a page that has a loop to iterate over some objects in a list and display them as I need. I don't want to use a grid component because it doesn't match the needs I need. I am not creating a table, I am creating a selection box for a form. So my template looks like this: School: select name=schoolId t:loop source=schools value=currentSchool option value=currentSchool.id${currentSchool.name} - ${currentSchool.location}/option /t:loop /select where my getSchools function returns a List of School objects. These School objects I have used successfully in grid components and other various parts of my application. When I try and run this page I get the following error: Error serializing component action for component Classrooms/Modify:loop: School So I take it that I need to serialize the component but if so why does the grid component work with the same list of objects? Is there another way I can accomplish this without serializing the class? Jean-Philippe Steinmetz -- -- 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: T5: Looping list of objects
I believe adding volatile=true to your loop will cause the loop to not serialize your object. http://tapestry.apache.org/tapestry5/tapestry-core/component-parameters.html#orgapachetapestrycorelibcomponentsloop Josh On 10/12/07, Jean-Philippe Steinmetz [EMAIL PROTECTED] wrote: Hi all, I have a page that has a loop to iterate over some objects in a list and display them as I need. I don't want to use a grid component because it doesn't match the needs I need. I am not creating a table, I am creating a selection box for a form. So my template looks like this: School: select name=schoolId t:loop source=schools value=currentSchool option value=currentSchool.id${currentSchool.name} - ${currentSchool.location}/option /t:loop /select where my getSchools function returns a List of School objects. These School objects I have used successfully in grid components and other various parts of my application. When I try and run this page I get the following error: Error serializing component action for component Classrooms/Modify:loop: School So I take it that I need to serialize the component but if so why does the grid component work with the same list of objects? Is there another way I can accomplish this without serializing the class? Jean-Philippe Steinmetz -- -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox.
T5: Form not saving all elements
Hi all, So I have a form that has several elements. A few of the elements are not done using the tapestry components and use regular HTML because the required steps to make things work as needed with the components is simply not a suitable solution. So how do I get these regular form elements to save properly? Jean-Philippe
Validate regexp error
The documentation shows a validation of a zip code but an Unknown Validator error is produced. What do I need to do differently than what is written in the documentation? -- View this message in context: http://www.nabble.com/Validate-regexp-error-tf4616208.html#a13183605 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OT: Different type of MVC
Hi all, this is not Tapestry related, but since people here keep up with the cutting edge frameworks, I'm wondering if you've ever heard of something like this: I've been invited to work on an internal company application (that we resell) that is totally database driven. As in, the _entire_ web application is generated with only PL/SQL! I don't know whether to be scared or amazed. I talked to the creator, and he said they implemented an entire Struts-like MVC with session handling. The application is not to the point where it builds itself, like a CMS (Joomla, etc)-- things like Javascript are written and then packed into the db. Just curious if there is anything else out there like that (or used to be like that!) Daniel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: Form not saving all elements
You can grab the the parameters directly from the request @Inject Request _request; _request.getParameter(fieldName); You'll have to deal with the potential for strange values, null, etc. Although, if this is for your selection list problem from earlier I believe a better solution might be to create a map and use that as the model for your the t:select component. Create a property: private HashMapString, String _schoolModel; private String _schoolId; in setup render: for ( School school : getSchools() ) { String value = school.getName() + - + school.getLocation(); String key = school.getId().toString(); _schoolModel.put(key, value); } in your template: School: t:select t:id=schoolId t:model=schoolModel/ I haven't compiled this code, so there might be typos/bugs, but that's the gist. Josh On 10/12/07, Jean-Philippe Steinmetz [EMAIL PROTECTED] wrote: Hi all, So I have a form that has several elements. A few of the elements are not done using the tapestry components and use regular HTML because the required steps to make things work as needed with the components is simply not a suitable solution. So how do I get these regular form elements to save properly? Jean-Philippe -- -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox.
RE: T5: Form not saving all elements
Yes it's the same form but I have other elements of the form as well that do not use the components. I will look into using this setup however. When I originally was looking for something similar it didn't appear to be that simple so I'll give this a try. Thanks again. Jean-Philippe -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Josh Canfield Sent: Friday, October 12, 2007 3:37 PM To: Tapestry users Subject: Re: T5: Form not saving all elements You can grab the the parameters directly from the request @Inject Request _request; _request.getParameter(fieldName); You'll have to deal with the potential for strange values, null, etc. Although, if this is for your selection list problem from earlier I believe a better solution might be to create a map and use that as the model for your the t:select component. Create a property: private HashMapString, String _schoolModel; private String _schoolId; in setup render: for ( School school : getSchools() ) { String value = school.getName() + - + school.getLocation(); String key = school.getId().toString(); _schoolModel.put(key, value); } in your template: School: t:select t:id=schoolId t:model=schoolModel/ I haven't compiled this code, so there might be typos/bugs, but that's the gist. Josh On 10/12/07, Jean-Philippe Steinmetz [EMAIL PROTECTED] wrote: Hi all, So I have a form that has several elements. A few of the elements are not done using the tapestry components and use regular HTML because the required steps to make things work as needed with the components is simply not a suitable solution. So how do I get these regular form elements to save properly? Jean-Philippe -- -- 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: Validate regexp error
Can you provide us some code and error message? It should look something like this... input t:id=runningTime t:type=textfield t:size=6 t:value= video.runningTime t:validate=required,regexp=\d+:\d{2} type=text / Josh On 10/12/07, mogulwraith [EMAIL PROTECTED] wrote: The documentation shows a validation of a zip code but an Unknown Validator error is produced. What do I need to do differently than what is written in the documentation? -- View this message in context: http://www.nabble.com/Validate-regexp-error-tf4616208.html#a13183605 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox.
RE: T5: Form not saving all elements
Thanks again. I went with the second suggestion and it works beautifully. Jean-Philippe -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Josh Canfield Sent: Friday, October 12, 2007 3:37 PM To: Tapestry users Subject: Re: T5: Form not saving all elements You can grab the the parameters directly from the request @Inject Request _request; _request.getParameter(fieldName); You'll have to deal with the potential for strange values, null, etc. Although, if this is for your selection list problem from earlier I believe a better solution might be to create a map and use that as the model for your the t:select component. Create a property: private HashMapString, String _schoolModel; private String _schoolId; in setup render: for ( School school : getSchools() ) { String value = school.getName() + - + school.getLocation(); String key = school.getId().toString(); _schoolModel.put(key, value); } in your template: School: t:select t:id=schoolId t:model=schoolModel/ I haven't compiled this code, so there might be typos/bugs, but that's the gist. Josh On 10/12/07, Jean-Philippe Steinmetz [EMAIL PROTECTED] wrote: Hi all, So I have a form that has several elements. A few of the elements are not done using the tapestry components and use regular HTML because the required steps to make things work as needed with the components is simply not a suitable solution. So how do I get these regular form elements to save properly? Jean-Philippe -- -- 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: Validate regexp error
I was using the Validate annotation. it gave me this: Failure reading parameter validate of component core/PropertyEditBlocks:textfield: Unknown validator type 'regexp'. Configured validators are max, maxlength, min, minlength, required. Josh Canfield-2 wrote: Can you provide us some code and error message? It should look something like this... input t:id=runningTime t:type=textfield t:size=6 t:value= video.runningTime t:validate=required,regexp=\d+:\d{2} type=text / Josh On 10/12/07, mogulwraith [EMAIL PROTECTED] wrote: The documentation shows a validation of a zip code but an Unknown Validator error is produced. What do I need to do differently than what is written in the documentation? -- View this message in context: http://www.nabble.com/Validate-regexp-error-tf4616208.html#a13183605 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox. -- View this message in context: http://www.nabble.com/Validate-regexp-error-tf4616208.html#a13185264 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: Form not saving all elements
The only thing to be aware of is to not collide your manually created text fields' names with those selected by Tapestry for the form elements. I.e., if you have a component with id userName don't create a manual text field with name=userName. They'll collide and confuse things. On 10/12/07, Jean-Philippe Steinmetz [EMAIL PROTECTED] wrote: Thanks again. I went with the second suggestion and it works beautifully. Jean-Philippe -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Josh Canfield Sent: Friday, October 12, 2007 3:37 PM To: Tapestry users Subject: Re: T5: Form not saving all elements You can grab the the parameters directly from the request @Inject Request _request; _request.getParameter(fieldName); You'll have to deal with the potential for strange values, null, etc. Although, if this is for your selection list problem from earlier I believe a better solution might be to create a map and use that as the model for your the t:select component. Create a property: private HashMapString, String _schoolModel; private String _schoolId; in setup render: for ( School school : getSchools() ) { String value = school.getName() + - + school.getLocation(); String key = school.getId().toString(); _schoolModel.put(key, value); } in your template: School: t:select t:id=schoolId t:model=schoolModel/ I haven't compiled this code, so there might be typos/bugs, but that's the gist. Josh On 10/12/07, Jean-Philippe Steinmetz [EMAIL PROTECTED] wrote: Hi all, So I have a form that has several elements. A few of the elements are not done using the tapestry components and use regular HTML because the required steps to make things work as needed with the components is simply not a suitable solution. So how do I get these regular form elements to save properly? Jean-Philippe -- -- 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] -- Howard M. Lewis Ship Partner and Senior Architect at Feature50 Creator Apache Tapestry and Apache HiveMind
T5: styling the error messages
Hi, t:errors / shows list errors in a red box, any way to style this? thanks. A.C. -- View this message in context: http://www.nabble.com/T5%3A-styling-the-error-messages-tf4616944.html#a13185696 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T5: Escaping espansions
Hi, I'd like to show a static text containing ${something} on a page. Is there a way to escape the ${? Thanks, Hans Joerg Hessmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: Looping list of objects
Just out of curiosity, any reason you're not using the select component ? Cheers, lasitha. On 10/13/07, Jean-Philippe Steinmetz [EMAIL PROTECTED] wrote: Thanks, that fixed it. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Josh Canfield Sent: Friday, October 12, 2007 1:02 PM To: Tapestry users Subject: Re: T5: Looping list of objects I believe adding volatile=true to your loop will cause the loop to not serialize your object. http://tapestry.apache.org/tapestry5/tapestry-core/component-p arameters.html#orgapachetapestrycorelibcomponentsloop Josh On 10/12/07, Jean-Philippe Steinmetz [EMAIL PROTECTED] wrote: Hi all, I have a page that has a loop to iterate over some objects in a list and display them as I need. I don't want to use a grid component because it doesn't match the needs I need. I am not creating a table, I am creating a selection box for a form. So my template looks like this: School: select name=schoolId t:loop source=schools value=currentSchool option value=currentSchool.id${currentSchool.name} - ${currentSchool.location}/option /t:loop /select where my getSchools function returns a List of School objects. These School objects I have used successfully in grid components and other various parts of my application. When I try and run this page I get the following error: Error serializing component action for component Classrooms/Modify:loop: School So I take it that I need to serialize the component but if so why does the grid component work with the same list of objects? Is there another way I can accomplish this without serializing the class? Jean-Philippe Steinmetz -- -- 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: Looping list of objects
Oops, please ignore my last entry - i see this has already been covered in a subsequent thread. Apologies for the noise, lasitha. On 10/13/07, lasitha [EMAIL PROTECTED] wrote: Just out of curiosity, any reason you're not using the select component ? Cheers, lasitha. On 10/13/07, Jean-Philippe Steinmetz [EMAIL PROTECTED] wrote: Thanks, that fixed it. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Josh Canfield Sent: Friday, October 12, 2007 1:02 PM To: Tapestry users Subject: Re: T5: Looping list of objects I believe adding volatile=true to your loop will cause the loop to not serialize your object. http://tapestry.apache.org/tapestry5/tapestry-core/component-p arameters.html#orgapachetapestrycorelibcomponentsloop Josh On 10/12/07, Jean-Philippe Steinmetz [EMAIL PROTECTED] wrote: Hi all, I have a page that has a loop to iterate over some objects in a list and display them as I need. I don't want to use a grid component because it doesn't match the needs I need. I am not creating a table, I am creating a selection box for a form. So my template looks like this: School: select name=schoolId t:loop source=schools value=currentSchool option value=currentSchool.id${currentSchool.name} - ${currentSchool.location}/option /t:loop /select where my getSchools function returns a List of School objects. These School objects I have used successfully in grid components and other various parts of my application. When I try and run this page I get the following error: Error serializing component action for component Classrooms/Modify:loop: School So I take it that I need to serialize the component but if so why does the grid component work with the same list of objects? Is there another way I can accomplish this without serializing the class? Jean-Philippe Steinmetz -- -- 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]