ASO Interceptor
Hi all! How I can receive tapestry state object (e.g. visit object) in hivemind interceptor? Thanks! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
NullPointerException in cleanupAfterRender()
Hi, I've been struggling for some hours now with a weird problem that I don't at all understand where it comes from. I'm using Tapestry 4.0.2, and the stacktrace of the exception, which happens when i try to display the page, is: # org.apache.tapestry.bean.BeanProvider.init(BeanProvider.java:104) # org.apache.tapestry.AbstractComponent.getBeans(AbstractComponent.java:580) # org.apache.tapestry.binding.BeanBinding.getObject(BeanBinding.java:64) # org.apache.tapestry.binding.AbstractBinding.getObject(AbstractBinding.java:8 7) # $Form_10.getDelegate($Form_10.java) # org.apache.tapestry.form.Form.cleanupAfterRender(Form.java:210) # $Form_10.cleanupAfterRender($Form_10.java) # org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:623) # org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:434) Line 104 in BeanProvider is: Infrastructure infrastructure = component.getPage().getRequestCycle().getInfrastructure(); I guess that that could cause an NPE if there was something wrong in the page/component setup. But I can't figure out what it is, despite lots of trial and error with all kinds of alternatives. A small setup that gives me the error is: -- EditItem.html - html head /head body span jwcid=$content$ span jwcid=@Border Edit... form jwcid=[EMAIL PROTECTED] success=listener:doSubmit !-- irrelevant whether i put actual form components here or not -- input type=submit value=Save/ /form p/ a jwcid=@PageLink page=ListAll href=#List All/a /span /span /body /html -- - EditItem.page --- ?xml version=1.0 encoding=UTF-8? !DOCTYPE page-specification PUBLIC -//Apache Software Foundation//Tapestry Specification 4.0//EN http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd; page-specification class=se.jadestone.spirits.wrs.EditItemPage descriptionedits something old/description /page-specification - EditItemPage.java - package se.jadestone.spirits.wrs; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.tapestry.html.BasePage; public class EditItemPage extends BasePage { private static final Log log = LogFactory.getLog(EditItemPage.class); public void doSubmit() { log.debug(doSubmit()); } } - I'm running the application through Eclipse/JettyLauncher/Jetty. Can anybody give me a hint as to what could be going wrong here? There's another form in the application that works, and I can't see what the problem could be. I'm sure it's something stupid that I'm missing. Thanks, Petter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Theoretical question: Differences and similarities between page and hivemind service.
Hi Aleksej, See http://wiki.apache.org/tapestry/Tapestry5Roadmap - this is coming in Tapestry 5, although that is definitely a ways off. Cheers Richard Aleksej wrote: Thats not only about services auto-wiring. Having page as a service allows to get rid of BasePage ( BaseComponent ) hierarchy. I am sure that there are lots of people ( including tapestry developers ) who wanted to see pages as a POJO's . - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Theoretical question: Differences and similarities between page and hivemind service.
I understood your request. I just thought I'd offer up that project to help some of your service wiring woes while we await Tap5. Hope it helps. It works quite well on our project at work. Thats not only about services auto-wiring. Having page as a service allows to get rid of BasePage ( BaseComponent ) hierarchy. I am sure that there are lots of people ( including tapestry developers ) who wanted to see pages as a POJO's . - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] James Carman, President Carman Consulting, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Wizard...
All, I am trying to develop a wizard for a page I'm working on. Basically, the user needs to select something to be a property of the object they're editing on the current page. The object they need to select is a child in a parent/child relationship and there are *way* too many parents to just show in a drop-down list (like 250K of them). Anyway, the idea is that they'll type in some text and choose the parent. Then they're taken to another screen which shows the children for that parent (at most about 10 or so). They then choose which child they want to use. Here's the tricky part (at least for me). I want to invoke this wizard while they're filling out the form, but I don't want them to lose what they've typed in any of the other fields and I don't want to stop them from going through the wizard if any of the form fields don't pass validation. So, in order to bind the form field values into the object they're editing before going through the wizard, I have to submit the form (can't use a DirectLink, because that doesn't trigger a form rewind). But, the form will not submit if there are errors in any of the required/constrained fields. How would you guys go about this? Am I missing something? There's got to be a standard way to do such a thing. Right now, I'm using Tacos to display the wizard as a floating pane above my form, but that's proven to be buggy at best in IE (Firefox works great of course). The form is somewhat long and the floating pane shows up at the top of my form so the user doesn't see it unless they scroll up. Also, if I put two of these wizards on the screen at the same time (editing multiple fields of the same type), then they don't submit properly for some reason. Anyway, any help would be greatly appreciated. Thanks, James - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
base href=http://localhost:8080/rms//
Hello, Does anybody know why in my application in the html the following tag appears: base href=http://localhost:8080/myapp// I can remove it by adding the renderBaseTag=false to the shell component, but that is not how it should be. Regards Diego
RE: base href=http://localhost:8080/rms//
The @Shell component will automatically add a base tag to your HTML output. In order to keep it from doing it, you have two choices: 1. Don't use a @Shell component. 2. Tell it not to by using the renderBaseTag=ognl:false directive as you stated. -Original Message- From: Diego [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 05, 2006 9:17 AM To: users@tapestry.apache.org Subject: base href=http://localhost:8080/rms// Hello, Does anybody know why in my application in the html the following tag appears: base href=http://localhost:8080/myapp// I can remove it by adding the renderBaseTag=false to the shell component, but that is not how it should be. Regards Diego - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RadioGroup validation
Hi, As of Tapestry 4.0, RadioGroup components can be validated, but delegate decorations are not rendered. Is this expected behavior? If I can make a suggestion, prefix and suffix could be easily rendered, and attributes could be rendered through an enclosing span tag (since RadioGroup does not generate any tag) Thx Ch. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Wizard...
James, A simple option would be to turn off client-side validation. I have an application in which multiple people (buyer, seller, realtors) must be associated with a single estimate. I use a pop-up window that has its own workflow for searching for and choosing, or adding a new person (and even associated agencies). In the simple case, when you find the person and click on a [Choose] link, javascript pushes a key back down into a hidden field on the original form in the opener window and then closes the popup. I could push down additional text for display but I hate javascript so I just trigger a form submit and handle display in the usual Tapestry way. Jonathan -Original Message- From: James Carman [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 05, 2006 9:11 AM To: 'Tapestry users' Subject: Wizard... All, I am trying to develop a wizard for a page I'm working on. Basically, the user needs to select something to be a property of the object they're editing on the current page. The object they need to select is a child in a parent/child relationship and there are *way* too many parents to just show in a drop-down list (like 250K of them). Anyway, the idea is that they'll type in some text and choose the parent. Then they're taken to another screen which shows the children for that parent (at most about 10 or so). They then choose which child they want to use. Here's the tricky part (at least for me). I want to invoke this wizard while they're filling out the form, but I don't want them to lose what they've typed in any of the other fields and I don't want to stop them from going through the wizard if any of the form fields don't pass validation. So, in order to bind the form field values into the object they're editing before going through the wizard, I have to submit the form (can't use a DirectLink, because that doesn't trigger a form rewind). But, the form will not submit if there are errors in any of the required/constrained fields. How would you guys go about this? Am I missing something? There's got to be a standard way to do such a thing. Right now, I'm using Tacos to display the wizard as a floating pane above my form, but that's proven to be buggy at best in IE (Firefox works great of course). The form is somewhat long and the floating pane shows up at the top of my form so the user doesn't see it unless they scroll up. Also, if I put two of these wizards on the screen at the same time (editing multiple fields of the same type), then they don't submit properly for some reason. Anyway, any help would be greatly appreciated. Thanks, James - 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: NullPointerException in cleanupAfterRender()
Hi again, It struck me that maybe the problem was related to how the page was invoked, and it turned out to be right: public IPage doEdit(int id) { System.out.println(doEdit( + id + )); Entity entity = getEntityLister().getEntity(id); EditItemPage page = editPageMap.get(entity.getClass()); page.setEntity(entity); return page; } The editPageMap was initialised during pageBeginRender(): @InjectPage(EditItem) public abstract EditItemPage getEditItemPage(); public void pageBeginRender(PageEvent event) { editPageMap = new HashMapClass, EditItemPage(); editPageMap.put(Item.class, getEditItemPage()); } Apparently, at that time, the page returned by getEditItemPage() is invalid, or so I would assume. If I do the call to getEditItemPage() in the doSubmit() method, things work as they should. What I was hoping to achieve was a nice way of sending the user to different edit pages depending on which entity type he was trying to edit. If it is in fact the case that methods like getEditItemPage() above do not return valid IPage instances at the time that pageBeginRender() executes, would it be possible for them to identify that and throw an exception instead? Best, Petter -Original Message- From: Petter Måhlén [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 05, 2006 1:37 PM To: 'users@tapestry.apache.org' Subject: NullPointerException in cleanupAfterRender() Hi, I've been struggling for some hours now with a weird problem that I don't at all understand where it comes from. I'm using Tapestry 4.0.2, and the stacktrace of the exception, which happens when i try to display the page, is: # org.apache.tapestry.bean.BeanProvider.init(BeanProvider.java:104) # org.apache.tapestry.AbstractComponent.getBeans(AbstractCompone nt.java:580) # org.apache.tapestry.binding.BeanBinding.getObject(BeanBinding.java:64) # org.apache.tapestry.binding.AbstractBinding.getObject(Abstract Binding.java:87) # $Form_10.getDelegate($Form_10.java) # org.apache.tapestry.form.Form.cleanupAfterRender(Form.java:210) # $Form_10.cleanupAfterRender($Form_10.java) # org.apache.tapestry.AbstractComponent.render(AbstractComponent .java:623) # org.apache.tapestry.AbstractComponent.renderBody(AbstractCompo nent.java:434) Line 104 in BeanProvider is: Infrastructure infrastructure = component.getPage().getRequestCycle().getInfrastructure(); I guess that that could cause an NPE if there was something wrong in the page/component setup. But I can't figure out what it is, despite lots of trial and error with all kinds of alternatives. A small setup that gives me the error is: -- EditItem.html - html head /head body span jwcid=$content$ span jwcid=@Border Edit... form jwcid=[EMAIL PROTECTED] success=listener:doSubmit !-- irrelevant whether i put actual form components here or not -- input type=submit value=Save/ /form p/ a jwcid=@PageLink page=ListAll href=#List All/a /span /span /body /html -- - EditItem.page --- ?xml version=1.0 encoding=UTF-8? !DOCTYPE page-specification PUBLIC -//Apache Software Foundation//Tapestry Specification 4.0//EN http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd; page-specification class=se.jadestone.spirits.wrs.EditItemPage descriptionedits something old/description /page-specification - EditItemPage.java - package se.jadestone.spirits.wrs; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.tapestry.html.BasePage; public class EditItemPage extends BasePage { private static final Log log = LogFactory.getLog(EditItemPage.class); public void doSubmit() { log.debug(doSubmit()); } } - I'm running the application through Eclipse/JettyLauncher/Jetty. Can anybody give me a hint as to what could be going wrong here? There's another form in the application that works, and I can't see what the problem could be. I'm sure it's something stupid that I'm missing. Thanks, Petter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: CMS Integration
What are the basic requirements? CMS is a many-faceted beast. Has anyone integrated any sort of CMS tool with Tapestry? I've looked into Magnolia and several others, but all seem to require an uphill battle if they are to be tied into Tapestry and I was wondering if someone else has already done this. Thanks! Michael Grundvig - 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: RadioGroup validation
I don't know if this is related, but if you try to do any client-side validation with a radiogroup, the presence of a radio group will break all client-side validation. Sorry if this doesn't help you, but thought I would share what could be more symptoms of the problem. Hi, As of Tapestry 4.0, RadioGroup components can be validated, but delegate decorations are not rendered. Is this expected behavior? If I can make a suggestion, prefix and suffix could be easily rendered, and attributes could be rendered through an enclosing span tag (since RadioGroup does not generate any tag) Thx Ch. - 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]
access global from tapestry service?
I am writing an EmailVerificationService (user clicks on link in email and it hits my tapestry service). Inside my service, I need to have access to the application Global object (defined in my tapestry app spec file). I didn't see the application global object as an available option in the infrastructure objects. Any advice? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Easier Form Manipulation, how do i...?
I don't think it would be easyToo bad you're on tap3 only. I'd have all kinds of suggestions otherwise.. On 7/5/06, Brian Duchek [EMAIL PROTECTED] wrote: Question: If I have a ListEdit (in Tapestry 3) wrapped in a custom component for displaying some name/value textfield pairs, and want to give the user the ability to quickly add more pairs of fields, can I fake out the rewind phase by naming the fields smartly and updating the hidden field used to track staleness in the form? It seems that if I'm only going to be looping thru the fields in this subcomponent anyway, then why should Tapestry care too much about how many fields there are? My objective is to be able to use Javascript to instantly add more fields, without having to unwind-increment-re/render the entire page. It's really a poor user experience to force that trip to the server. Plus, it's a real pain to try and sync up Tapestry's validation JS and other client-side state mechanisms and display widgets for my particular design. This seems a great case for easy DOM manipulation, but is not so easy to handle on the server side with Tapestry. What's the best way to approach this? Is there any examples extant? /bd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jesse Kuhnert Tacos/Tapestry, team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind.
help please, problem with image map using Tapestry 4 !!!
Hi, everyone, I'm a beginner with tapestry 4 and got stuck with a problem for 3 weeks already... my task is: 1. create a dynamic image based on some data provided from user's input 2. create a buffered image and display that image on the page 3. use image map to make some regions of that image clickable now I've done the first 2 steps and part of the 3rd step. In step 3, I used @DirectArea custom component(explained in Tapestry in Action as well as used in the Pet Shop example) to create the image map, but I cannot dynamically specify the coords attribute in area tag which is inside map tag. @DirectArea component statically pre-defines the coords attribute in .html file(e.g. area [EMAIL PROTECTED] listeners=ognl:listeners.selectPage1 coords=50,50 50,50 / ), because as for Pet Shop example the image already exists whereas in my case that buffered image will be created dynamically and sends to OutputStream to display it. What I want is to take the coords attribute's value from user input at the same time in step 1 and specify the coords attribute(for example: pass 50, 50 50,50 as a string) for image map after creating the buffered image. should I modify the DirectArea.java? does anyone have any idea how to make it...? many thanks in advance. -- View this message in context: http://www.nabble.com/help-please%2C-problem-with-image-map-using-Tapestry-4-%21%21%21-tf1897938.html#a5192038 Sent from the Tapestry - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: help please, problem with image map using Tapestry 4 !!!
The easiest option (imho) would be to use the java 2d api (should be perfectly safe in server mode) to find the image size on the server and use those values to write to your DirectArea. On 7/5/06, Alex Tian [EMAIL PROTECTED] wrote: Hi, everyone, I'm a beginner with tapestry 4 and got stuck with a problem for 3 weeks already... my task is: 1. create a dynamic image based on some data provided from user's input 2. create a buffered image and display that image on the page 3. use image map to make some regions of that image clickable now I've done the first 2 steps and part of the 3rd step. In step 3, I used @DirectArea custom component(explained in Tapestry in Action as well as used in the Pet Shop example) to create the image map, but I cannot dynamically specify the coords attribute in area tag which is inside map tag. @DirectArea component statically pre-defines the coords attribute in .html file(e.g. area [EMAIL PROTECTED] listeners=ognl:listeners.selectPage1 coords=50,50 50,50 / ), because as for Pet Shop example the image already exists whereas in my case that buffered image will be created dynamically and sends to OutputStream to display it. What I want is to take the coords attribute's value from user input at the same time in step 1 and specify the coords attribute(for example: pass 50, 50 50,50 as a string) for image map after creating the buffered image. should I modify the DirectArea.java? does anyone have any idea how to make it...? many thanks in advance. -- View this message in context: http://www.nabble.com/help-please%2C-problem-with-image-map-using-Tapestry-4-%21%21%21-tf1897938.html#a5192038 Sent from the Tapestry - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jesse Kuhnert Tacos/Tapestry, team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind.
Re: Tacos issues
Did something not work when you tried the snapshot build of 4.1? I think jwebunit uses httpunit which uses Rhino (ie mozilla ) to handle the javascript testing. Tapestry uses Rhino to test javascript now as well, but we code directly against the rhino api. HttpUnit and others have tried (unsuccessfully ) to mimick the behaviour of the containing window / browser that the js interpreter runs in but none have done a good job of it so far. (Except for the browsers themselves of course ;) ) If you had any issues with something running in a real browser I'd be very interested in hearing them asap. For unit testing I think we've decided to have a sub/seperate special maven distro/project site hosting all of the tapestry testing goodies publicly for people to use as well. (With some sort of caveat stating that we can/will change any portion of the testing stuff as much as we want, but will try to give fair warning..Ie not a public facing API sort of thing, just being nice to the community.) This should give you the ability to test all of your java code with java code (ie TestNG / junit ) and test your javascript code in javascript (via our rhino unit test infrastructure, which I've yet to port to a maven plugin) On 7/5/06, Aslak Grønflaten [EMAIL PROTECTED] wrote: Thanks for a good answer. Obviously, my experience with tacos and tapestry 4.1 are extremely limited, so it's good to hear more of what's going on. My concern arose from trying out a snapshot of 4.1, and seing that standard components such as LinkSubmit use Dojo, thus seeming to depend on it. Also, it's not just browser compatibility I'm worried about. I'm also using jwebunit to test my applications, and it's javascript interpreter (Neko I think it's called?) also needs to be compatible, if I'm to continue doing this. Aynway, I'm sure I've just been too eager to try out the very latest, and that by the time of a release my worries will be needless. A On Jul 5, 2006, at 11:47 AM, Jesse Kuhnert wrote: That's an understandable viewpoint. Safari hasn't traditionally had very good support/implentation of some of the core JS api . (that is required to be ecma compliant at least). They have fixed this in more recent versions of safari but it's something the dojo dev's are still trying to support as much as possible. The good news is that no one has to use the new JS features if they don't want to, and the ones that are used by default in some sections are all cross browser compliant. As for standardizations, I know a few companies/projects that might not agree with you; - IBM - Sun Microsystems - AOL - Every web based framework hosted on apache. (if I've missed knowing any then apologies, I'm speaking more to the core JSF/struts/webwork type frameworks) - Many other big wigs that would take too much time to hunt down and list.. The official list of supported browsers can be found here: http://dojo.jot.com/FAQ#Supported%20Browsers. I should also note that the dojo foundation/devs are in direct contact with the mozilla/IE teams to try and ensure more industry wide browser compatibility/improvements in general. That being said, I definitely don't want to ignore browser compatibility issues when they come up and will definitely react quickly to any bugs that are found. (as long as they are humanly reasonable, expecting = ie 5.0support or any of the earlier safari versions probably isn't going to happen.) People really don't have too much to worry about as any of the more dynamic functionality is something people can choose to opt in for. Of course, since tapestry uses hivemind this is all a moot point. If you ~do~ want the dynamic features but would rather use something other than dojo then you have the choice of specifying your own ResponseBuilder configuration point. I've re-factored all of this logic and any of the existing javascript handling so that people can plug in their own handles and manage as much of this process as they would like. Choice is always a good thing :) As much as I love dojo I don't want to code myself (or the community) into a hole we can't get out of easily if it's decided to move to a different toolkit someday. Hope that helps :) If anyone would like more answers I can probably pull one of the dojo devs or the sun servlet spec lead people in to answer to things I can't. -- Jesse Kuhnert Tacos/Tapestry, team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind.