On Feb 10, 2004, at 2:37 AM, I wrote:
I need to put a couple of forms on a page. The WoodyTemplateTransformer wiki page says the way to do this is to use the special @location attribute on wt:form-template>, to tell the transformer where to pick up the form instance.
..snip..>
Poofo, it works! There's my page, with both forms, all styled like I want.
Oops, no it doesn't. When I click the submit button, I get this:
Description: org.apache.cocoon.ProcessingException: Failed to execute pipeline.: org.xml.sax.SAXException: No form found at location getAttribute($request, 'form1').
I played with this some more, and here's an update:
I commented out the other forms on the page, so now I just have the one. And I removed the location attribute from wt:form-template>. When I do that, the form works fine when I hit 'submit', the continuation request works and I get the page again.
So then, I added the location attribute back in. It looks like this:
location=getAttribute($request, 'form1')
...and I added this back in to the flowscript:
cocoon.request.setAttribute ('form1', form1.form);
With that, the page displays the first time, but I get the error shown above when I submit (No form found at...).
So apparently, there's just something real basic that I'm getting wrong, and it has nothing to do with the multiple forms on a page thing. One form works fine with the default form location, and then it breaks when I try to use the location attribute.
Again I tried changing the location attribute to this
location=getAttribute($session, 'form1')
and the flowscript to this
cocoon.session.setAttribute ('form1', form1.form);
When I do this, the form breaks right away it won't even display the first time. But I was mistaken in the error I reported in my mail last night... it is not the same error. Storing the form in the session gives me 'The object found at location getAttribute ($session, 'form1') is not a form.
If anyone can spot what I might be doing wrong, I'd sure appreciate it!
Thanks a lot,
Mark