On Tuesday 07 March 2006 03:48, Sam Gendler wrote: > I have data in another application which isn't built on Tapestry. I > need to put a form on a page which isn't delivered by Tapestry, and > have it submit into my tapestry app. Is this even possible with the > rewind mechanism that Tapestry uses?
What about using the URL encoding example in the vlib application in the examples apps. With this you can ... Write your own url encoder which turns a url into parameters which are then passed into an external page (see the IExternalPage interface). The Friendly URL's section of the UserGuide is enough to get you started. The only gotcha I found is that the example uses integer parameters which parse to themselves, where I was trying to use strings. This means you have to unsqueeze things. I posted my code for doing that to this list a few days ago > I sure hope so, because my spec > also requires a login and password box in the header of every page in > the static website, and I need that form to submit to the Tapestry app > as well. Have you looked at Form Authentication? I am doing something similar on my web site using basic authentication - I am using apache (on my real web site - authenticating via url <location> directives) or tomcat (in my test bed on my desktop) to validate the user via standard basic authentication looking up the user in a database. The browser then throws up a dialog box for login (which is why it wont work unmodified for you) and logs the user in. You can then get at the data inside tapestry to validate the user (with a PageValidateListener - which in the pageValidate method checks the user Here's an example of reading the user details and using it in the app. @InjectObject("infrastructure:request") public abstract WebRequest getRequest(); @InjectPage("ViewAccount") public abstract ViewAccount getViewPage(); public void pageValidate (PageEvent event) { String userName = getRequest().getRemoteUser(); if (!userName.equals(privUser)) { ViewAccount viewPage = getViewPage(); /* * Convert the username to have an uppercase first character */ char ch = Character.toUpperCase(userName.charAt(0)); userName = ch + userName.substring(1); viewPage.setAccountName(userName); throw new PageRedirectException(viewPage); } } > > In the first instance, it would be sufficient if I could just pass > parameters to Tapestry and then have tapestry serve up a form with the > supplied values already populating the form, requiring the user to > push a submit button to submit the form. In some instances, that is > actually the preferred mode. > > Any hints? > > --sam > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Alan Chandler http://www.chandlerfamily.org.uk Open Source. It's the difference between trust and antitrust. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]