Without the benefit of knowing what your component code is doing I am going to guess that you are attempting to render your dialog component during a Form "rewind" cycle.
The best thing to do in your case is check for cycle.isRewinding() and skip over all blocks except for renderBody() . On 10/18/06, Peter Beshai <[EMAIL PROTECTED]> wrote:
Sorry if this idea seems silly, but this is the first custom component/dojo widget wrapper I have made, so it basically just does the same thing as calling dojo.widget.byId("yourDlgId").show(). My dialog takes a 'shower' and a 'closer' (IComponents) as required parameters -- I wasn't sure the best way to do this... but I thought it would allow more flexibility by doing it this way. My script looks like this: (Dialog.script) <?xml version="1.0"?> <!DOCTYPE script PUBLIC "-//Apache Software Foundation//Tapestry Script Specification 3.0//EN" "http://jakarta.apache.org/tapestry/dtd/Script_3_0.dtd"> <script> <input-symbol key="id" required="yes" /> <input-symbol key="props" required="yes" /> <input-symbol key="closer" required="yes" /> <input-symbol key="shower" required="yes" /> <body> <unique> dojo.require("dojo.widget.Dialog"); dojo.require("tapestry.widget.Widget"); </unique> </body> <initialization> tapestry.widget.synchronizeWidgetState("${id}", "dialog", ${props}); dojo.widget.byId("${id}").setCloseControl(dojo.byId("${closer}")); dojo.widget.byId("${id}").setShowControl(dojo.byId("${shower}")); </initialization> </script> So when I click on my shower (my form submit button) it pops up the dialog that has the closer (cancel button) and then instantaneously throws the exception. It took me a lot longer than 10 minutes to make this (a couple of hours!!) but after it was done it all seems very simple. I just couldn't find any documentation anywhere about it, so I just read through some source and tried putting things together. When you say "I'm assuming it's not just a simple dojo.widget.byId("yourDlgId").show()" are you implying that if it is just doing that, I ought to just use dojo directly in my template? Thanks, Peter Beshai >From: "Jesse Kuhnert" <[EMAIL PROTECTED]> >Reply-To: "Tapestry users" <users@tapestry.apache.org> >To: "Tapestry users" <users@tapestry.apache.org> >Subject: Re: PageRenderSupport problem (Body component is in template) >Date: Tue, 17 Oct 2006 22:54:39 -0400 > >So what does it do after loading up? I'm assuming it's not just a simple >dojo.widget.byId("yourDlgId").show() ? > >I created the same component in 4.1.1 yesterday btw. (Took me all of ten >minutes!, of course that is expected..) > >On 10/17/06, Peter Beshai <[EMAIL PROTECTED]> wrote: >> >>Hi, >> >>I have created a wrapper for the dojo component Dialog and it works fine >>(in >>general!), but I have a problem when I use it with my form. I want to have >>the dialog appear when I submit the form (ie, the form submit button is >>the >>show controller) and the dialog will basically have a cancel button (close >>controller and Submit component with type cancel). >> >>The dialog loads fine, but soon after loading it throws an exception: >>Component FileUpload/uploadingDialog requires rendering support, but no >>PageRenderSupport object has been stored into the request cycle. This >>object >>is typically provided by a Body component. You should add a Body component >>to your template. >> >>I do have a body component defined : <body jwcid="[EMAIL PROTECTED]">. >> >>Any ideas how to fix this problem? >> >>FYI in my Dialog.java file I have in the renderComponent function: >>PageRenderSupport pageRenderSupport = >>TapestryUtils.getPageRenderSupport(cycle, this); >>getScript().execute(this, cycle, pageRenderSupport, scriptParms); >> >> >>Peter Beshai >> >>_________________________________________________________________ >>Essayez la nouvelle génération de recherche avec Live Search. >>http://www.live.com/?mkt=fr-ca >> >> >>--------------------------------------------------------------------- >>To unsubscribe, e-mail: [EMAIL PROTECTED] >>For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > >-- >Jesse Kuhnert >Tapestry/Dojo/(and a dash of TestNG), team member/developer > >Open source based consulting work centered around >dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com _________________________________________________________________ Découvrez Live Search de votre PC ou de votre appareil mobile dès aujourd'hui. http://www.live.com/?mkt=fr-ca --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Jesse Kuhnert Tapestry/Dojo/(and a dash of TestNG), team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com