Good Morning David-
I would start with looking at the ajax examples from struts2-showcase-2.0.6
and find the example which mostly closely exemplifies your task
for example example7 illustrates population of a div tag in your form and if
you run struts from localhost on port 8080 you can view results at
http://localhost:8080/struts2-showcase-2.0.6/viewSource.action?page=/ajax/remotediv/example7.jsp
Note that In your WEB-INF/classes/struts-ajax.xml note the specification onf
testjs.jsp which will store the results /ajax/testjs.jsp
<action name="Test3">
<result>/ajax/testjs.jsp</result>
</action>
HTH
Martin
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed. If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy. Thank you.
----- Original Message -----
From: "David Harland" <[EMAIL PROTECTED]>
To: "struts" <[EMAIL PROTECTED]>
Sent: Thursday, April 12, 2007 2:14 AM
Subject: ajax and struts 2
I am new to ajax and have just written my first ajax function. In my
function I am passing a user id into the function and are being returned a
List of Contacts to populate a select. Presently I am putting the id in a
hidden field in the jsp and then passing it from there. What I would prefer
to do is have the javascript function call an action so that the Java code
can access the user id from the session.
How do I do this please?
Don't be flakey. Get Yahoo! Mail for Mobile and always stay
connected to friends. http://mobile.yahoo.com/mail
---------------------------------------------------------------------
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]