By "get the selected value", do you mean to use the value on your action? If that is the case, all you have to do is set name="myVar", and then have a "myVar" field and a public setMyVar(...) method on your action.
musachy On Wed, Mar 26, 2008 at 1:19 PM, sassien <[EMAIL PROTECTED]> wrote: > > Hi everyone, > > I'm new to struts 2, and I finally managed to link 2 autocompleters using a > few examples like this one: > > http://www.planetstruts.org/struts2-showcase/viewSource.action?page=/ajax/autocompleter/index.jsp > > or this one: > > http://struts.apache.org/2.x/docs/autocompleter.html > > As it is done in the example, the first list does not come from an action, > and we can get the value which is selected. The problem is: when the list is > made by an action, like this one: > > <sx:autocompleter href="%{jsonList}" formId="selectForm" > listenTopics="/changed"/> > > ok the list is made by the action and it works, but I really can't manage to > get the selected value from it. > I add name="anyVariableName", exactly the same way I do for the first > version, but the value is never taken, I can see it in the log file from my > application. > > I hope I managed to write a clear question, and I hope, too, that someone > will be able to help me with this problem. I am sure it is not complicated, > but up to now I have not been able to find it by myself... > > thanks, > sassien > -- > View this message in context: > http://www.nabble.com/Struts-2.1-autocompleter%2C-get-the-value-tp16307105p16307105.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "Hey you! Would you help me to carry the stone?" Pink Floyd --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]