ok, the Text in the index-result is working now, but i want to use the actions and when i use parameters like "/employee.do?task=update&ajax=getEmployee" then there comes an error message "The reference to entity "ajax" must end with the ';' delimiter."
Ingo Villnow schrieb: > Hello, > > now i am using the javawebparts.ajaxparts and when i put all the things > in a whole jsp-site, than the ajax is working: > > <%@ taglib prefix="ajax" uri="javawebparts/ajaxparts/taglib" %> > <?xml version="1.0" encoding="ISO-8859-1" ?> > <%@ page language="java" contentType="text/html; charset=ISO-8859-1" > pageEncoding="ISO-8859-1"%> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > <html xmlns="http://www.w3.org/1999/xhtml"> > <head> > <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> > <title>Insert title here</title> > </head> > <body> > <form action="#"> > <input id="btn" type="button" value="TESTBUTTON"/><ajax:event > ajaxRef="employee/update" attachTo="btn"/> > </form> > <div id="result-div"> > > </div> > <ajax:enable/> > </body> > </html> > > But when i am using it with struts-tiles than it doesn't work :-( - i > think that's because the target in the ajax-config is not found. I don't > now why. Without tiles, the target > will be found. The index-result.txt is in the same directory as the > jsp-site. > > <ajaxConfig> > <group ajaxRef="employee"> > <element ajaxRef="update"> > <event type="onclick"> > <requestHandler type="std:SimpleRequest" > target="index-result.txt"> > <parameter /> > </requestHandler> > <responseHandler type="std:InnerHTML"> > <parameter>result-div</parameter> > </responseHandler> > </event> > </element> > </group> > </ajaxConfig> > > When i use an action as a target, it doesn't work, too (e.g. > target="action.do?parameter=xxx¶m2=yyy). I use the DispatchAction, > so with the parameter I can delegate or specifiy the method, which will > be called in my action... > > Any ideas? > > Thank's a lot!! > > Greetings from Berlin > > > Frank W. Zammetti schrieb: > >> I should also point out the presentation Ted Husted did at The Ajax >> Experience last week which dealt largely with APT. The slides for that >> presentation are here: >> >> http://ajaxexperience.techtarget.com/images/Presentations/Husted_Ted_RetrofittingStruts.pdf >> >> I'm not quite sure how long they will stay posted there though, so get it >> while it's hot :) >> >> Frank >> >> On Wed, October 31, 2007 10:48 am, Frank W. Zammetti wrote: >> >> >>> On Wed, October 31, 2007 10:19 am, Ingo Villnow wrote: >>> >>> >>>> i want to call an action by javascript, when a value in a <html:select> >>>> field changes. I want to fill my <html:form> with the data provided by >>>> the action. Any ideas? I don't know a lot of javascript :-( >>>> >>>> >>> There's a couple if ways you could do that... one would be to call the >>> submit() method of the form object, which every form in HTML has, then >>> re-render the page with the updated data in the form. That's of course >>> going to refresh the entire page, which I suspect isn't what you want. >>> >>> So, AJAX is probably what you want. Now, how you go about doing that, >>> well, there's a few hundred options :) Because you don't know a lot of >>> Javascript, you might want to consider the AjaxParts Taglib (APT) from >>> Java Web Parts (JWP): >>> >>> http://javawebparts.sourceforge.net >>> >>> Direct to APT: >>> >>> http://javawebparts.sourceforge.net/javadocs/javawebparts/ajaxparts/taglib/package-summary.html >>> >>> If you go to the download page, the cookbook has some examples that are >>> very much along the lines of what you're asking for. If you go that >>> route, we'll be more than happy on the JWP mailing list, or forums. >>> >>> Otherwise, prototype (http://www.prototypejs.org) is a good, simple >>> option, but you will be writing some Javascript. >>> >>> >>> >>>> thanks & greetings from Berlin >>>> >>>> >>> hth, >>> Frank >>> >>> >>> --------------------------------------------------------------------- >>> 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] >> >> >> >>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]