Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
JSP - A mailing list about Java Server Pages specification and reference
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Subject: Servlet : Session invalidate
Oracle Connection Pooling in 3 2 2
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Subject: Running a Simple JMS Example
Tomcat and webapplication specific java library path
Mapping in workers2 properties
org apache jasper JasperException
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action
   MESSAGE
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
Value attribute of <html:checkbox
url string for connecting jboss to oracle
javax servlet ServletException: BeanUtils populate
5 0 18: Windows XP Pro vs Windows 2000
HTTP Status 404 The requested resource is not available
 
Subject: Re: struts 1.2: calling an action by ajax (javawebparts)

Subject: Re: struts 1.2: calling an action by ajax (javawebparts)

2007-10-31       - By Frank W. Zammetti

 Back
I would suggest joining the JWP mailing list and re-posting this
question there... the form manipulator handler was written by a member
of the JWP team named Herman, and I know he'd be able to help you out
quickly.  I think though that there is an example of that handler in the
JWP sample application that comes with the distribution, if memory
serves, you may want to check that out first.  If it's no help, moving
to the JWP mailing list would probably be a good idea at this point
since this isn't so much Struts-related any more.

Frank

Ingo Villnow wrote:
> I referred to the manual and there it suggested to use "parameter"
> instead, like this:
>
> <requestHandler type="std:QueryString"
> target="/ajax.do">
> <parameter>value=name</parameter>
> </requestHandler>
>
> then you can use: String value = (String) request.getParameter("value");
>
> Now i have another problem :-)) I want to use the "std:FormManipulator"
> als ResponseHandler, but I have problems with the correct
> XML-Response-Format and i don't find any code example for that.
> I am generating the form by using the struts-tags <html:form>,<html:txt>
> and so on. And with the FormManipulator i think i can manipulate the
> generated form.
>
> The other way maybe is that i generate my form like <html type="text"
> value="<% ..... %>" after the <ajax:event> called my action and my
> action puts me a bean into the request.
>
> Greetings, Ingo
>
>
> Frank W. Zammetti schrieb:
>> Can you tell where that error is coming from?  I don't recognize it as
>> an APT error, so I'm guessing Struts, but I don't recall ever seeing
>> that before.
>>
>> You know what... what happens if you remove the <?xml> and <!DOCTYPE>
>> tags?  Does it work then?
>>
>> Frank
>>
>> Ingo Villnow wrote:
>>> 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 (See http://ISO-8859.ora-code.com)-1" ?>
>>>> <%@ page language="java" contentType="text/html; charset=ISO-8859 (See http://ISO-8859.ora-code.com)-1"
>>>>     pageEncoding="ISO-8859 (See http://ISO-8859.ora-code.com)-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 (See http://ISO-8859.ora-code.com)-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&param2=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: user-unsubscribe@(protected)
>>>>>> For additional commands, e-mail: user-help@(protected)
>>>>>>
>>>>>>
>>>>>>          
>>>>> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
>>>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>>>> For additional commands, e-mail: user-help@(protected)
>>>>>
>>>>>
>>>>>      
>>>
>>> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
>>>
>>> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>> For additional commands, e-mail: user-help@(protected)
>>>
>>>
>>> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
>>>
>>> No virus found in this incoming message.
>>> Checked by AVG Free Edition. Version: 7.5.503 / Virus Database:
>>> 269.15.14/1100 - Release Date: 10/30/2007 6:26 PM
>
>
> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
>
> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.503 / Virus Database: 269.15.14/1100 - Release Date: 10/30/2007
6:26 PM

--
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: fzammetti@(protected)
Author of "Practical Ajax Projects With Java Technology"
 (2006, Apress, ISBN 1-59059-695-1)
and "JavaScript, DOM Scripting and Ajax Projects"
 (2007, Apress, ISBN 1-59059-816-4)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)


©2008 junlu.com - Jax Systems, LLC, U.S.A.