modify Palette values in js.
Hi all, I am using Tapestry 5.3. I have a page with a pallette and a custom component. I need to modify the palette available values when the custom component values changes by a user action. If i do this by javascript then when i submit the form, tapestry pallete complains because it has different values in its model. 1) Is there a known solution to this case in order to avoid calling the server everytime my custom component values change and updating the pallete model and its zone? Cheers and thanks in advance!
Re: tapestry+jboss live class reloading problem
Hi Thiago, Thanks for your answer. I understand perfectly what you say. Now i am looking for someone that has the same enviroment as me (tapestry+maven+jboss+jboss tools) with some tapestry lib included in the main project in order to know if there is some configuration i am missing. Is there anyone with that scenario? Thanks in advance! 2014-05-12 9:45 GMT-03:00 Thiago H de Paula Figueiredo thiag...@gmail.com: On Fri, 09 May 2014 11:19:52 -0300, leandroaisp...@gmail.com wrote: Hi, all Hi! I know that live class reloading do not reload tapestry files that are inside jar files like tapestry documentation says, but perhaps someone have faced the same problem and can tell me if there is any special configuration to apply in order to use live class reloading like i was. That's not possible. Tapestry class reloading works by checking individual .class files directly on the folder included in the classpath. The JVM itself probably doesn't support what you're asking, as it considers JAR files as immutable while the JVM is running. -- Thiago H. de Paula Figueiredo Tapestry, Java and Hibernate consultant and developer http://machina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
tapestry+jboss live class reloading problem
Hi, all I am facing the following problem with Tapestry live class reloading and jboss application server. Up to last month i was using maven+jetty+tapestry with eclipse IDE to develop and debug my web applications. I have two tapestry projects , the first one is the Webapp with custom styles and some tml files, and have a dependency to the second one that is a WebLib where i have tapestry components and pages that are reusable and generic for that webapp and some others. Live class reloading was working fine in both projects because my maven jetty plugin configuration did not have to create a jar of the weblib and uses files in target directory. This month we have decided to migrate our projects to Wildfly server (Jboss) because of some transactional web service requirements. We are using Jboss Tools eclipse plugin to deploy projects to application server using configuration found in jboss forum: https://community.jboss.org/en/tools/blog/2011/02/21/getting-started-with-jboss-tools-jboss-maven-integration-and-weld All is working fine except from weblib project that is now deploying to the jboss server as a jar file. I know that live class reloading do not reload tapestry files that are inside jar files like tapestry documentation says, but perhaps someone have faced the same problem and can tell me if there is any special configuration to apply in order to use live class reloading like i was. Cheers and thanks in advance! Leandro.
Re: VS: tapestry + maven + jboss tools + hot deploying ?
Thanks for your answers. I found the solution in jboss forum. In case someone faces the same problem here is the link with the correct answer by Snjezana Peco: https://community.jboss.org/en/tools/blog/2011/02/21/getting-started-with-jboss-tools-jboss-maven-integration-and-weld?et=blogs.comment.created#comment-13436 I was missing some jboss configuration. 2014-03-14 8:39 GMT-03:00 Thiago H de Paula Figueiredo thiag...@gmail.com: On Fri, 14 Mar 2014 04:06:04 -0300, Ville Virtanen ville.virta...@orientimport.fi wrote: on the fly that it manages, but not the others. I've seen that Tapestry's offering is enough for most setups, but I've always struggled a bit with large multiproject setups, as only the main project is easy to get refreshed on the fly. If someone knows a way to do it, please let me know. Never had a problem with that using Eclipse (I haven't tried the other IDEs for a long time) and RunJettyRun or an embedded Jetty instance (one created programatically, very easy to do). Maven's jetty:run sucks incredibly hard for debugging and multiproject setups. Just make sure the main project has the other as dependencies, manually in Eclipse or automatically through the Maven plugin. -- Thiago H. de Paula Figueiredo Tapestry, Java and Hibernate consultant and developer http://machina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
tapestry + maven + jboss tools + hot deploying ?
Hi all, I got the following scenario, - A Tapestry 5.3 web application called project A (contains tml files, java pages files, and common web files) - A Business logic project called B (Business services) - A Model project called C (pojos with hibernate annotations and daos) - I manage project dependencies with Maven 2. - I deploy project from eclipse(Juno) using Jboss Tools(1.4.0) and Jboss Tools Maven Integration(1.4.0) to a Wildfly 8.0.1 server . In order to deploy web application i have created a new server (jboss server type). I run my A project into the mentioned server. All is working fine except i want tml files changes to be taken on the fly without the automatically re deploying of the application. Questions: 1) Is there a way to change tml and java files on project A without the need of redeploying the whole app?? The server configuration has an option to publish the project (re-deploy) when a resource has changed. But it redeploys the whole application also when i change tml files from project A. The worst part is that session data get lost and i have to re login to application and complete forms again. If i chose Never publish automatically none of my changes are seen by server. 2) If answer to question 1 is positive now i want to know if is there a way to change and compile project B and C classes and see the changes without redeployng web application? 3) I know Tapestry's Jumpstart application works on JBoss/Wildfly does anyone knows if T5's class reloading works in JBoss? At least it's not working for me, Geoff do you have any thoughts on this topic? cheers and thanks in advance! Leandro.
Re: how to refresh page zone inside a component
Thank you Lance. I will try your solution as soon as possible. Then i will write to you again telling about the results obtained. 2012/9/11 Lance Java lance.j...@googlemail.com Lets assume you are writing a LinkTree component which accepts a LinkTreeModel parameter. LinkTreeModel has a visitAll method which takes a LinkNodeVisitor. You could do something like this (not tested) LinkTree.tml --- t:block id=linkBlock t:eventlink event=linkEvent${linkLabel}/t:eventlink /t:block LinkTree.java - public class LinkTree { @InjectComponent private RenderCommand linkBlock; @Property private String linkEvent; @Property private String linkLabel; @Parameter private LinkTreeModel model; public RenderCommand onBeginRender() { return new RenderCommand() { public void render(MarkupWriter writer, final RenderQueue queue) { model.visitAll(new LinkNodeVisitor() { public void visit(final LinkTreeNode node) { queue.push(new RenderCommand() { public void render(MarkupWriter writer, RenderQueue queue2) { LinkTree.this.linkEvent = node.getEvent(); LinkTree.this.linkLabel = node.getLabel(); queue2.push(linkBlock); } }); } }); } }; } } -- View this message in context: http://tapestry.1045711.n5.nabble.com/how-to-refresh-page-zone-inside-a-component-tp5716201p5716214.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
how to refresh page zone inside a component
Hi! I am facing some problems with an own component. This component renders some eventLinks with the use of componentResources and markupWriter. I have included this component in a page with a zone near it that must show some info based on the eventLink of the component clicked. I want only the zone to be updated in order that the component do not render again. Does anybody knows how to update a zone in a page when any eventlink of the component is clicked? The eventLink created with markupWriter does not fire an ajax request, so it refresh the hole page instead of only de zone. Comments: I have used markupWriter because i had to make recursive methods in order to obtains eventLinks in diferent labels (like a Tree) I am using Tapestry 5.1 and i cannot update this project to the latest one. Here is some code: Part of Page.tml: div class=test h1test Page/h1 ems:EmsElementTree zoneToUpdate=elementBrowserZone/ t:zone t:id=elementBrowserZone id=elementBrowserZone div class=elementBrowser information here based on the eventlink clicked /div /t:zone /div Part of Component.java: markupWriter.element(div, class,row); markupWriter.element(a, class, showElementBrowserLink, href, componentResources.createEventLink(testLink,myData)); markupWriter.write(baseElement.getRootName()); markupWriter.end(); markupWriter.end(); public Object onTestLink(String element){ System.out.println(*ES AJAX: +request.isXHR()); return this.zoneToupdate.getBody(); } Thanks in advance. Leandro.
Re: how to refresh page zone inside a component
The line System.out.println(*ES AJAX: +request.isXHR()); is always printing false. Because the event link rendered with markupWriter does not add the Tapestry.init linkzone to javascript code. 2012/9/11 leandroaisp...@gmail.com Hi! I am facing some problems with an own component. This component renders some eventLinks with the use of componentResources and markupWriter. I have included this component in a page with a zone near it that must show some info based on the eventLink of the component clicked. I want only the zone to be updated in order that the component do not render again. Does anybody knows how to update a zone in a page when any eventlink of the component is clicked? The eventLink created with markupWriter does not fire an ajax request, so it refresh the hole page instead of only de zone. Comments: I have used markupWriter because i had to make recursive methods in order to obtains eventLinks in diferent labels (like a Tree) I am using Tapestry 5.1 and i cannot update this project to the latest one. Here is some code: Part of Page.tml: div class=test h1test Page/h1 ems:EmsElementTree zoneToUpdate=elementBrowserZone/ t:zone t:id=elementBrowserZone id=elementBrowserZone div class=elementBrowser information here based on the eventlink clicked /div /t:zone /div Part of Component.java: markupWriter.element(div, class,row); markupWriter.element(a, class, showElementBrowserLink, href, componentResources.createEventLink(testLink,myData)); markupWriter.write(baseElement.getRootName()); markupWriter.end(); markupWriter.end(); public Object onTestLink(String element){ System.out.println(*ES AJAX: +request.isXHR()); return this.zoneToupdate.getBody(); } Thanks in advance. Leandro.
Re: how to refresh page zone inside a component
Sorry, but i do not understand how the RenderCommand can help me creating eventLinks that generates ajax requests to update a zone. Can you give me an example or more info? Thank you again, Leandro 2012/9/11 Lance Java lance.j...@googlemail.com You don't need to use the markup writer to generate recursive content. You can return a RenderCommand from any render phase method. Note also that injected Blocks (or Block parameters) can be type coerced to a RenderCommand. -- View this message in context: http://tapestry.1045711.n5.nabble.com/how-to-refresh-page-zone-inside-a-component-tp5716201p5716204.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
last page visited
Hi all! I want to know what is the best way to obtain the last visited page ? For example... I am navigating page A and when I click in a link I go to a page B. When I am in B I want to know that before being here I was in page A. My tapestry version is 5.1.0.5 and i can't migrate the project to a new one because of some dependencies. Thanks in advance! Leandro.
Re: last page visited
Hi again, I think that I have to describe the whole scenario so you can understan why i have written the question of the first email. Here is my situation: * I have two pages p1 and p2, each page belongs to layout A. This layout contains two tabs, one is p1 and the other is p2. * If I go to p1 page from two special pages I want to see just this two pages p1 and p2, but if I came from any other page I want to see that two pages plus three others, so I need other layout that contains the five pages. What is the best solution to resolve this problem? Thanks ! 2011/6/23 Thiago H. de Paula Figueiredo thiag...@gmail.com On Thu, 23 Jun 2011 12:34:22 -0300, Muhammad Mohsen m.gelb...@gmail.com wrote: May be a primitive solution like, when a page is attached, it sets a session variable unique to the page ? I don't think that would work well. You'd need to add this code to all pages or at least add this code to a mixin to be added to all pages. I'd just write a ComponentRequestFilter that would set a session state object. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br --**--**- To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.orgusers-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Select component and Ajax (Tapestry version 5.2.0)
Hi again Luciano. I used a zoneupdater mixin in order to update an specific zone. Here is the page where you can see a zone being updated when you enter text to a textfield. The same can be used by you to update the zone when you select some option. http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/onevent If you have any problem you can write to me again and i can pass you the source code. Good Luck! 2011/6/20 Thiago H. de Paula Figueiredo thiag...@gmail.com On Sun, 19 Jun 2011 18:05:19 -0300, Luciano bg...@hotmail.com wrote: Hi everyone, Hi! my case is quite simple : somewhere on the website I'm working on, I need to trigger an Ajax request each time the internaut selects a new option manipulating a regular HTML Select component. I'm thinking about this : - is it possible to patch the concerned files in order to add this new zone parameter for the Tapestry select component ? It is, but I wouldn't recommend that. I'd copy the Tapestry 5.2.5 Select component and call it AjaxSelect and something like this and add it to your project. What do you think ? Does anyone here faced this particular situation ? I implemented something like that (updating a select based on the selection in another select)in an unreleased but used package. Sources here: http://ars-machina.svn.**sourceforge.net/viewvc/ars-** machina/brasil-tapestry/trunk/http://ars-machina.svn.sourceforge.net/viewvc/ars-machina/brasil-tapestry/trunk/ -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br --**--**- To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.orgusers-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Select component and Ajax (Tapestry version 5.2.0)
Hi Luciano! Some time ago i had the same problem. Here is a link with a simple solution . The idea is to add some extra javascript and java code in order to enable ajax to the select component of tapestry 5.1. Look and then tell me if it solves your problem: http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/select1 The best way is to use Tapestry 5.2 that has incorporated a new parameter called zone where you say the zone to refresh when the selected element changes. But i understand you because when i faced this problem it wasn 't possible to me to migrate to the newest version because of some dependencies like spring, hibernate and others. Good Luck! 2011/6/19 Luciano bg...@hotmail.com Hi everyone, my case is quite simple : somewhere on the website I'm working on, I need to trigger an Ajax request each time the internaut selects a new option manipulating a regular HTML Select component. I read the doc and I found exactly what I needed : http://tapestry.apache.org/current/tapestry-core/ref/org/apache/tapestry5/corelib/components/Select.html My problem is that this zone parameter is not available for me : I'm working on an Tapestry 5.1.0.5 application. Can you just help me to find a solution ? I'm thinking about this : - is it possible to patch the concerned files in order to add this new zone parameter for the Tapestry select component ? - easier : given that a Tapestry select component is always included in a t:form component, I could use some JS to intercept the event : the user is clicking on a option markup and then trigger at this time the t:form (ajax way) with $(idForm).fire(Tapestry.FORM_PROCESS_SUBMIT_EVENT); What do you think ? Does anyone here faced this particular situation ? Thank you for the feedback. Best regards everyone! http://twitter.com/lboix -- View this message in context: http://tapestry.1045711.n5.nabble.com/Select-component-and-Ajax-Tapestry-version-5-2-0-tp4504415p4504415.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Select component and Ajax (Tapestry version 5.2.0)
Sorry .. the link i've passed to you is incorrect. I can't found the correct one because i haven't here the source code. I will give the right solution on tuesday morning or tomorrow if i find it on internet ok? Sorry again... 2011/6/19 leandroaisp...@gmail.com Hi Luciano! Some time ago i had the same problem. Here is a link with a simple solution . The idea is to add some extra javascript and java code in order to enable ajax to the select component of tapestry 5.1. Look and then tell me if it solves your problem: http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/select1 The best way is to use Tapestry 5.2 that has incorporated a new parameter called zone where you say the zone to refresh when the selected element changes. But i understand you because when i faced this problem it wasn 't possible to me to migrate to the newest version because of some dependencies like spring, hibernate and others. Good Luck! 2011/6/19 Luciano bg...@hotmail.com Hi everyone, my case is quite simple : somewhere on the website I'm working on, I need to trigger an Ajax request each time the internaut selects a new option manipulating a regular HTML Select component. I read the doc and I found exactly what I needed : http://tapestry.apache.org/current/tapestry-core/ref/org/apache/tapestry5/corelib/components/Select.html My problem is that this zone parameter is not available for me : I'm working on an Tapestry 5.1.0.5 application. Can you just help me to find a solution ? I'm thinking about this : - is it possible to patch the concerned files in order to add this new zone parameter for the Tapestry select component ? - easier : given that a Tapestry select component is always included in a t:form component, I could use some JS to intercept the event : the user is clicking on a option markup and then trigger at this time the t:form (ajax way) with $(idForm).fire(Tapestry.FORM_PROCESS_SUBMIT_EVENT); What do you think ? Does anyone here faced this particular situation ? Thank you for the feedback. Best regards everyone! http://twitter.com/lboix -- View this message in context: http://tapestry.1045711.n5.nabble.com/Select-component-and-Ajax-Tapestry-version-5-2-0-tp4504415p4504415.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Select component and Ajax (Tapestry version 5.2.0)
While i look for the solution i have used , here is an article that can help you. http://tapestry.1045711.n5.nabble.com/Select-does-not-submit-form-on-change-td2418954.html Good Luck! 2011/6/19 leandroaisp...@gmail.com Sorry .. the link i've passed to you is incorrect. I can't found the correct one because i haven't here the source code. I will give the right solution on tuesday morning or tomorrow if i find it on internet ok? Sorry again... 2011/6/19 leandroaisp...@gmail.com Hi Luciano! Some time ago i had the same problem. Here is a link with a simple solution . The idea is to add some extra javascript and java code in order to enable ajax to the select component of tapestry 5.1. Look and then tell me if it solves your problem: http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/select1 The best way is to use Tapestry 5.2 that has incorporated a new parameter called zone where you say the zone to refresh when the selected element changes. But i understand you because when i faced this problem it wasn 't possible to me to migrate to the newest version because of some dependencies like spring, hibernate and others. Good Luck! 2011/6/19 Luciano bg...@hotmail.com Hi everyone, my case is quite simple : somewhere on the website I'm working on, I need to trigger an Ajax request each time the internaut selects a new option manipulating a regular HTML Select component. I read the doc and I found exactly what I needed : http://tapestry.apache.org/current/tapestry-core/ref/org/apache/tapestry5/corelib/components/Select.html My problem is that this zone parameter is not available for me : I'm working on an Tapestry 5.1.0.5 application. Can you just help me to find a solution ? I'm thinking about this : - is it possible to patch the concerned files in order to add this new zone parameter for the Tapestry select component ? - easier : given that a Tapestry select component is always included in a t:form component, I could use some JS to intercept the event : the user is clicking on a option markup and then trigger at this time the t:form (ajax way) with $(idForm).fire(Tapestry.FORM_PROCESS_SUBMIT_EVENT); What do you think ? Does anyone here faced this particular situation ? Thank you for the feedback. Best regards everyone! http://twitter.com/lboix -- View this message in context: http://tapestry.1045711.n5.nabble.com/Select-component-and-Ajax-Tapestry-version-5-2-0-tp4504415p4504415.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Swf asset in jar root directory
Hi, I'm having a problem including an asset from the root dir of a jar. I have two projects. projectA -- a web application (war) . projectB -- a jar project with pages (An own Tapestry lib). ProjectA has projectB.jar in its libs directory. ProjectB contains a .swf file that is injected in a page of the same project. The problem is that if i use @Path(/miSwf.swf) tapestry tryes to find the asset in the folder of the class that is injecting the file. Is there any way to inject an asset that is in the classpath root directory without relative path?? I can't use relative path because it is too long and it gives me an error. And i think that using relative path is not the best option because if tomorrow the class is refactorized and moved to another package it won't work. Thans in advance. Leandro.
Re: Swf asset in jar root directory
Sorry... a friend tells me about the classpath prefix. Now i have it working. I can't find that in Tapestry Asset Documentation. I think it must be in some place where i didn't search. Thanks again. 2011/6/9 leandroaisp...@gmail.com Hi, I'm having a problem including an asset from the root dir of a jar. I have two projects. projectA -- a web application (war) . projectB -- a jar project with pages (An own Tapestry lib). ProjectA has projectB.jar in its libs directory. ProjectB contains a .swf file that is injected in a page of the same project. The problem is that if i use @Path(/miSwf.swf) tapestry tryes to find the asset in the folder of the class that is injecting the file. Is there any way to inject an asset that is in the classpath root directory without relative path?? I can't use relative path because it is too long and it gives me an error. And i think that using relative path is not the best option because if tomorrow the class is refactorized and moved to another package it won't work. Thans in advance. Leandro.
Re: Swf asset in jar root directory
Thank you for your reply Christian. 2011/6/9 Christian Riedel cr.ml...@googlemail.com It's right there: http://tapestry.apache.org/assets.html Assets in Templates Assets can also be referenced directly in templates. Two binding prefixes[1] exist for this: asset: and context:. The asset: prefix can obtain assets from the classpath (the default) or from the web context (by specifying the context: domain explicitly): [1] http://tapestry.apache.org/component-parameters.html#ComponentParameters-bindingexpressions Cheers Christian :-) Am 09.06.2011 um 17:41 schrieb leandroaisp...@gmail.com: Sorry... a friend tells me about the classpath prefix. Now i have it working. I can't find that in Tapestry Asset Documentation. I think it must be in some place where i didn't search. Thanks again. 2011/6/9 leandroaisp...@gmail.com Hi, I'm having a problem including an asset from the root dir of a jar. I have two projects. projectA -- a web application (war) . projectB -- a jar project with pages (An own Tapestry lib). ProjectA has projectB.jar in its libs directory. ProjectB contains a .swf file that is injected in a page of the same project. The problem is that if i use @Path(/miSwf.swf) tapestry tryes to find the asset in the folder of the class that is injecting the file. Is there any way to inject an asset that is in the classpath root directory without relative path?? I can't use relative path because it is too long and it gives me an error. And i think that using relative path is not the best option because if tomorrow the class is refactorized and moved to another package it won't work. Thans in advance. Leandro. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Radio Button Event ??
First of all , thank you for your answers. I thought that taking an action over other components when the radio is clicked was a so common problem that a mixin or a similar component had been already deveolped. Well, i will do it using pure javascript. If anyone has another idea, please write to me! Good Luck! Leandro 2011/2/23 Josh Canfield joshcanfi...@gmail.com I do not find an event dispatched by the Radio allowing me to update the disabled property of the select and textInput from my java code. Why do you need an event? Use the value bound to the radio button as the value of the disabled parameter. If you want to dynamically change the form the you need to fall back to good ol' javascript. Try observing onchange on the radio button. Josh On Wed, Feb 23, 2011 at 9:52 AM, leandroaisp...@gmail.com wrote: Hi everyone, I am having a problem with a page that has two Radio buttons, a Select and a TextInput. I need the Select or the TextInput to be disabled depending on the Radio that has been clicked. What is the best way to do it? I do not find an event dispatched by the Radio allowing me to update the disabled property of the select and textInput from my java code. Thanks in advance! Leandro - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Radio Button Event ??
Hi everyone, I am having a problem with a page that has two Radio buttons, a Select and a TextInput. I need the Select or the TextInput to be disabled depending on the Radio that has been clicked. What is the best way to do it? I do not find an event dispatched by the Radio allowing me to update the disabled property of the select and textInput from my java code. Thanks in advance! Leandro
Re: help with bug TAP5-587
Thanks Jim! Now it works fine! I have used the question mark with the solution of the bug that i have passed in the first email! thank you so much again! Bye! 2010/12/22 Jim O'Callaghan jc1000...@yahoo.co.uk When you say at the end of your email that Tapestry rendered the loop even if the condition is false, how are you checking the condition? Have you tried using the question mark operator in your output loop / condition to stop output if an item is null? Ex.: t:formatnull value=${contract?.manager?.address?.city?.name} / ... where if any of the hierarchy is null is will stop trying to evaluate methods / properties on subordinates, avoiding a NPE. Is it possible that where you are referencing a condition in a loop that the actual reference is invisibly instantiating something? Regards, Jim. -Original Message- From: leandroaisp...@gmail.com [mailto:leandroaisp...@gmail.com] Sent: 22 December 2010 12:03 To: users@tapestry.apache.org Subject: help with bug TAP5-587 -Hi, Is there any solution for bug TAP5-587? I have searched in the releases notes, but a solution did not appear . My page needs to show an input text for each element of a variable size collection, that's the reason why I can't use blocks, the quantity needs to be variable. For that reason i have used the loop component but i get the exception that you can look at TAP5-587 . The cause of the bug is that when a volatile Loop in a form gets updated through Ajax and results in having less source items than on initial page render, a java.util.NoSuchElementException because the Loop seems to think there are more source items then there are. The report bug gives a solution, rewrite the Loop's advanceVolatile() method, but it doesn't work, that solves the NoSuchElementException but the form fails. The form wants to render some input, and read a null property of an object from the collection. I tried to use an if sentence in the .tml, but it doesn't work. Tapestry rendered the loop even if the condition is false, and throws the same exception. Any ideas? - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: help with bug TAP5-587
Sorry, we have solved the problem with jim's solution. But i tried what you have said and it did not work. Thank you Robert for answer to me so quickly. 2010/12/22 leandroaisp...@gmail.com Thanks Jim! Now it works fine! I have used the question mark with the solution of the bug that i have passed in the first email! thank you so much again! Bye! 2010/12/22 Jim O'Callaghan jc1000...@yahoo.co.uk When you say at the end of your email that Tapestry rendered the loop even if the condition is false, how are you checking the condition? Have you tried using the question mark operator in your output loop / condition to stop output if an item is null? Ex.: t:formatnull value=${contract?.manager?.address?.city?.name} / ... where if any of the hierarchy is null is will stop trying to evaluate methods / properties on subordinates, avoiding a NPE. Is it possible that where you are referencing a condition in a loop that the actual reference is invisibly instantiating something? Regards, Jim. -Original Message- From: leandroaisp...@gmail.com [mailto:leandroaisp...@gmail.com] Sent: 22 December 2010 12:03 To: users@tapestry.apache.org Subject: help with bug TAP5-587 -Hi, Is there any solution for bug TAP5-587? I have searched in the releases notes, but a solution did not appear . My page needs to show an input text for each element of a variable size collection, that's the reason why I can't use blocks, the quantity needs to be variable. For that reason i have used the loop component but i get the exception that you can look at TAP5-587 . The cause of the bug is that when a volatile Loop in a form gets updated through Ajax and results in having less source items than on initial page render, a java.util.NoSuchElementException because the Loop seems to think there are more source items then there are. The report bug gives a solution, rewrite the Loop's advanceVolatile() method, but it doesn't work, that solves the NoSuchElementException but the form fails. The form wants to render some input, and read a null property of an object from the collection. I tried to use an if sentence in the .tml, but it doesn't work. Tapestry rendered the loop even if the condition is false, and throws the same exception. Any ideas? - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org