Re: Ajax and struts 1

2012-07-30 Thread Ing. Alvaro Gomez
in user servlet in ajax in single... call servlet in action is regenerate el code in html de selection On 30/07/2012 11:19 a.m., Adriana G wrote: I fill the select with a peersistent list than come from a method that returns a result from the DB. but i don't know how to update the select witho

Re: Ajax and struts 1

2012-07-30 Thread Dave Newton
Oh, so you're asking how to write JavaScript and update a select box? There should be plenty of tutorials on the internet; that you're using Struts 1 doesn't change any of the client-side stuff. Dave On Mon, Jul 30, 2012 at 1:19 PM, Adriana G wrote: > I fill the select with a peersistent list

Re: Ajax and struts 1

2012-07-30 Thread Adriana G
I fill the select with a peersistent list than come from a method that returns a result from the DB. but i don't know how to update the select without refresing the whole page, that's why i'm trying ajax with this function, but i don't know how to use it. On Mon, Jul 30, 2012 at 12:05 PM, Dave Ne

Re: Ajax and struts 1

2012-07-30 Thread Dave Newton
Define "doesn't work". What's in the response? JSON? How are you accessing the select element? I don't see anything where you set its ID or get it by its class name etc. What's in the JS console after your AJAX call returns? Anything? Dave On Mon, Jul 30, 2012 at 12:20 PM, Adriana G wrote: >

Re: ajax and struts 2

2007-04-13 Thread Lance
. -Original Message- From: Lance [mailto:[EMAIL PROTECTED] Sent: 13 April 2007 16:35 To: Struts Users Mailing List Subject: Re: ajax and struts 2 ew... that sounds icky! have you considered DWR, it marshalls calls from javascript to java then marshalls the result back into javascript

RE: ajax and struts 2

2007-04-13 Thread David Harland
Thanks Dave, I think that is exactly what I was looking for. -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: 13 April 2007 16:54 To: Struts Users Mailing List Subject: RE: ajax and struts 2 --- David Harland <[EMAIL PROTECTED]> wrote: > Im using DWR. The p

RE: ajax and struts 2

2007-04-13 Thread Dave Newton
--- David Harland <[EMAIL PROTECTED]> wrote: > Im using DWR. The problem is that the java class > that the javascript talks to does not have access to > the session. http://getahead.org/dwr-demo/javadoc/uk/ltd/getahead/dwr/WebContext.html But there are better ways to handle this in S2. d. ___

RE: ajax and struts 2

2007-04-13 Thread David Harland
Users Mailing List Subject: Re: ajax and struts 2 ew... that sounds icky! have you considered DWR, it marshalls calls from javascript to java then marshalls the result back into javascript objects for you. http://getahead.org/dwr/overview/dwr on the serverside you can use WebContextFactory.get

Re: ajax and struts 2

2007-04-13 Thread Lance
ew... that sounds icky! have you considered DWR, it marshalls calls from javascript to java then marshalls the result back into javascript objects for you. http://getahead.org/dwr/overview/dwr on the serverside you can use WebContextFactory.get().getSession() Mahesh Parab wrote: Hi David, u c

Re: ajax and struts 2

2007-04-13 Thread Mahesh Parab
Hi David, u can able to read the session variable in javascript, e.g var intId intId='<%=session.getValue("id")%>' ; try this , Thanks, mahesh. On 4/12/07, David Harland <[EMAIL PROTECTED]> wrote: I am new to ajax and have just written my first ajax function. In my function I am passing a use

Re: ajax and struts 2

2007-04-12 Thread Martin Gainty
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 re

Re: ajax and struts 2

2007-04-12 Thread Felipe Rodrigues
Did you realize about use struts tags? Inside an Action you can use ActionContext.getContext().getSession() to get a Map that represents the session. If you can't use Struts tags, then you can use DWR, but I don't know how to get session using DWR. Good Look. Felipe David Harland wrote: > >

Re: Ajax and Struts

2006-09-03 Thread Frank W. Zammetti
Wen-Jung Chen wrote: Hi, I have a scenario that user enters data in the text box in the browser and clicks Continue button. I send this value into Struts Action class which checks against database to return me the true or false value. Based on this true or false value, I will display or hide in

Re: ajax and struts-flow - how to refresh part of a page

2005-07-14 Thread Don Brown
I'm not sure I understand the question, but if you just want the ability to call Java methods from the client, I'd go with DWR. Struts Flow is a bit more experimental looking at rethinking web applications as continuations-based Javascript-glued apps where the view logic can be written in the same