Re: [S2] autocompleter, predefining initial value

2007-07-13 Thread Toni Lyytikäinen
No, so far I have been programming with the YUI api directly using Javascript, as I need all kinds of widgets, not just the autocompleter and calendar. I may take a look at the YUI plugin and possibly try to add new widgets to it, if I manage to find the time. On 7/13/07, Pedro Herrera <[EMAIL PR

Re: [S2] autocompleter, predefining initial value

2007-07-13 Thread Pedro Herrera
I agree , autocompleter is too slow... Are you using the http://cwiki.apache.org/confluence/display/S2PLUGINS/YUI+Plugin ? Herrera Toni Lyytikäinen wrote: > > I used a JSON action which outputs an array of arrays like this: > > [ > ["VALUE", "KEY"], > ["VALUE2", "KEY2"], > ... > ] > >

Re: [S2] autocompleter, predefining initial value

2007-07-13 Thread Toni Lyytikäinen
I used a JSON action which outputs an array of arrays like this: [ ["VALUE", "KEY"], ["VALUE2", "KEY2"], ... ] I build the list beforehand in the Action with an iterator over a List. I don't know about ftl since I've never used it. And now I'm in the process of migrating the app to use YUI, sinc

Re: [S2] autocompleter, predefining initial value

2007-07-13 Thread Pedro Herrera
Hi Toni. How do you assemble your list ? In my case I´m using a jsp result that is made from AjaxUtil . Is it possible to use flt for this case ?. In the showcase example, uses a option.flt(value only), but I need two, key and value instead. Thanks Herrera Toni Lyytikäinen wrote: > > Who

Re: [S2] autocompleter, predefining initial value

2007-07-12 Thread Pedro Herrera
It´s not a good solution, but it works(to set both the initial value and the initial key). Thanks Toni Lyytikäinen wrote: > > Take a look at the html generated by the tag, is there an initialKey > -attribute and what is it's value? If it is "29" then it's working for the > key part at leas

Re: [S2] autocompleter, predefining initial value

2007-07-12 Thread Toni Lyytikäinen
Take a look at the html generated by the tag, is there an initialKey -attribute and what is it's value? If it is "29" then it's working for the key part at least. Of course I forgot to say that you need to set both the initial value and the initial key. You can set the value with the value attrib

Re: [S2] autocompleter, predefining initial value

2007-07-12 Thread Pedro Herrera
It´s not working to me I´ve setted the in the action countryIdKey = "29" and the combo comes blank... help me Herrera Toni Lyytikäinen wrote: > > Whoops, sorry I should probably think before I post. So you want to set > the > key, not the value of the input element. I did this by ha

Re: [S2] autocompleter, predefining initial value

2007-07-12 Thread Toni Lyytikäinen
Whoops, sorry I should probably think before I post. So you want to set the key, not the value of the input element. I did this by having a getElementKey-method in the Action class which returns the key you want as the default. Element is the name of the input element. On 7/12/07, Toni Lyytikäine

Re: [S2] autocompleter, predefining initial value

2007-07-12 Thread Toni Lyytikäinen
The value attribute sets the preset value of the input element, if that is what youre looking for. On 7/12/07, Pedro Herrera <[EMAIL PROTECTED]> wrote: I´m using autocompleter tag with Struts 2.0.8 and I need to show a default value to the user. For example, in the JSON list : [ ["Alabama",

[S2] autocompleter, predefining initial value

2007-07-12 Thread Pedro Herrera
I´m using autocompleter tag with Struts 2.0.8 and I need to show a default value to the user. For example, in the JSON list : [ ["Alabama","AL"], ["Alaska","AK"], ["American Samoa","AS"], ... I need to show by default 'AS(id) - American Samoa' . How I do this ? Herrera --

Re: [S2] autocompleter, predefining initial value

2007-01-01 Thread Musachy Barroso
I logged WW-1589 (https://issues.apache.org/struts/browse/WW-1589) with a patch for the resubmit problem. regards musachy Dariusz Wojtas wrote: Hey! Your fix works as you said. Under both IE and Opera. There are still the issues described in my previous mail (resubmit of stacked autocompleter

Re: [S2] autocompleter, predefining initial value

2006-12-31 Thread Dariusz Wojtas
Hey! Your fix works as you said. Under both IE and Opera. There are still the issues described in my previous mail (resubmit of stacked autocompleters on all browsers, dropdown problem on Opera), but the things that you just fixed - do work as expected. I just had to refresh/clear cache in IE and

Re: [S2] autocompleter, predefining initial value

2006-12-31 Thread Musachy Barroso
With the "Object error" and the encoding problem out of the way I will start looking at other problems next year :) regards musachy Dariusz Wojtas wrote: Hi Musachy, I have just built new S2 (after tag 2.0.2), made sure that the old JAR files are replaced and restarted it. If something is fix

Re: [S2] autocompleter, predefining initial value

2006-12-31 Thread Musachy Barroso
That was quick! The change is on head already. musachy Musachy Barroso wrote: Sorry for the false news :). The issue was closed but it seems like it hasn't been committed yet. https://issues.apache.org/struts/browse/WW-1583 regards musachy Dariusz Wojtas wrote: Hi Musachy, I have just bui

Re: [S2] autocompleter, predefining initial value

2006-12-31 Thread Musachy Barroso
Sorry for the false news :). The issue was closed but it seems like it hasn't been committed yet. https://issues.apache.org/struts/browse/WW-1583 regards musachy Dariusz Wojtas wrote: Hi Musachy, I have just built new S2 (after tag 2.0.2), made sure that the old JAR files are replaced and res

Re: [S2] autocompleter, predefining initial value

2006-12-31 Thread Dariusz Wojtas
Hi Musachy, I have just built new S2 (after tag 2.0.2), made sure that the old JAR files are replaced and restarted it. If something is fixed - great, but it still misbehaves under IE and Opera. There is also some issue common to all browsers (including FF): *) If I have 3 stacked autocompleters

Re: [S2] autocompleter, predefining initial value

2006-12-31 Thread Musachy Barroso
Both problems should now be fixed on IE 6. regards musachy Musachy Barroso wrote: I will fix it so it ignores that null value. UTF-8 works. regards musachy Dariusz Wojtas wrote: I am not really sure if it worked before, both autcompleter and my code do evolve ;) I was always using JSP with U

Re: [S2] autocompleter, predefining initial value

2006-12-28 Thread Musachy Barroso
I will fix it so it ignores that null value. UTF-8 works. regards musachy Dariusz Wojtas wrote: I am not really sure if it worked before, both autcompleter and my code do evolve ;) I was always using JSP with UTF-8 encoding to generate my options. Is UTF-8 a problem here? You mean [ ["A", "

Re: [S2] autocompleter, predefining initial value

2006-12-28 Thread Dariusz Wojtas
I am not really sure if it worked before, both autcompleter and my code do evolve ;) I was always using JSP with UTF-8 encoding to generate my options. Is UTF-8 a problem here? You mean [ ["A", "B"] , ] is problematical for IE, but [ ["A", "B"] ] will work? Should I change something in the

Re: [S2] autocompleter, predefining initial value

2006-12-28 Thread Musachy Barroso
This is what I found so far, there are 2 problems, one is that when there is a json array like: [ ["A", "B"] , ] IE puts a null object in the array. That one is easy to fix. The other problem is that using freemaker, like in showcase to render the json array, the charset of the response is se

Re: [S2] autocompleter, predefining initial value

2006-12-28 Thread Dariusz Wojtas
showcase, just built ans started on tomcat 5.5.17 1) Firefox Everything seems to work. About the preloaded aurocompletes at the bottom: Yes, the value is preloaded but entering and leaving the "Autocompleter 1" makes it clear on blur. But filtering of "Autocompleter 2" works as expected, even whe

Re: [S2] autocompleter, predefining initial value

2006-12-28 Thread Musachy Barroso
Is showcase working for you? On IE I'm getting a "Error: System error: -1072896658". Some people have had the same problem due to encoding issues. The error message is really explicit :) musachy Dariusz Wojtas wrote: On 12/28/06, Martin Gainty <[EMAIL PROTECTED]> wrote: can we see the autoCo

Re: [S2] autocompleter, predefining initial value

2006-12-28 Thread Dariusz Wojtas
On 12/28/06, Martin Gainty <[EMAIL PROTECTED]> wrote: can we see the autoCompleter code any relevant JS (setBeforeLoading,setAfterLoading) ok, the last question made me check the code again. I found an error in my code - an artefact from the yesterdays autocompleter usage. formId="kalku

Re: [S2] autocompleter, predefining initial value

2006-12-28 Thread Martin Gainty
nous vous signalons qu'il est strictement interdit de le diffuser, de le distribuer ou de le reproduire. - Original Message - From: "Dariusz Wojtas" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Thursday, December 28, 2006 10:26 AM Subject: Re: [S2]

Re: [S2] autocompleter, predefining initial value

2006-12-28 Thread Dariusz Wojtas
Hi, These are excerpts from my JSP page: And the direct dependent autocompleter: Values "AUDI" and 354 are axactly the same as one of the pairs returned by the JSON list. The 'disappear' behaviour happens on Firefox 2. I have 3 autocompleters in chain

Re: [S2] autocompleter, predefining initial value

2006-12-28 Thread Musachy Barroso
Dariusz Wojtas wrote: But If I open such page [the same values preloaded] and just click somewhere in that autocompleter [no changes] and leave the field - the value is lost. Some event is generated that causes fresh reload of the field. Submitted form shows both properties empty. Are you usi

Re: [S2] autocompleter, predefining initial value

2006-12-28 Thread Dariusz Wojtas
Hi Musachy, I tried as you advised. Works, no more exceptions and the values are set as expected. But there is still some little problem with preloading. Now I have properties private String carMaker = "AUDI"; private Integer carMakerKey = 354; with hardcoded initial value, just for test. I

Re: [S2] autocompleter, predefining initial value

2006-12-28 Thread Musachy Barroso
I forgot to mention the postfix was "_selected" before, from the Dojo widget, I changed it to "Key" to make it less cryptic, and it won't change anymore. musachy Musachy Barroso wrote: Hi Dariusz I need to update the documentation with this info, the thing is that for each autocompleter, st

Re: [S2] autocompleter, predefining initial value

2006-12-28 Thread Musachy Barroso
Hi Dariusz I need to update the documentation with this info, the thing is that for each autocompleter, struts will create 2 fields, one for the text entered, with the name "${name}" and another for the key, with the name "${name}Key", we need both to "remember" the values if there is a valid

Re: [S2] autocompleter, predefining initial value

2006-12-28 Thread Dariusz Wojtas
Hello, I am very happy with the changes being made. They really seem to help - on Firefox 2 :) I can see much better propagation of events in cascaded autocompleters, predefining seems to work on the simple test case that I made. But there are still problems, some of them seem to be very new. I

Re: [S2] autocompleter, predefining initial value

2006-12-27 Thread Musachy Barroso
I attached a patch to WW-1562 to fix some of the things you requested. regards musachy Dariusz Wojtas wrote: I would leave the current behaviour as the default. When there is small amount of data (up to hundreds of entries) it may give the end user feeling of a faster response. If there is more

Re: [S2] autocompleter, predefining initial value

2006-12-17 Thread Dariusz Wojtas
I would leave the current behaviour as the default. When there is small amount of data (up to hundreds of entries) it may give the end user feeling of a faster response. If there is more data then the developer should make use the the new feature. The info about reloading is a great news :) Thank

Re: [S2] autocompleter, predefining initial value

2006-12-17 Thread Musachy Barroso
Making the autocompleter reload its content while typing was easier than expected :). Do you think it would be better to have that behavior , or the current one, by default? musachy Dariusz Wojtas wrote: Hi, I am using Struts 2.0.2, trunk. I have an action (/listy/kodyPocztowe) that returns

Re: [S2] autocompleter, predefining initial value

2006-12-15 Thread Musachy Barroso
The initial value can be set with "value" if you are setting the options with "list". If the values are loaded dynamically, then the initial value cannot be set, this is something that could be done, but I wasn't sure that it was a good idea, cause maybe the value was not one of the possible op

[S2] autocompleter, predefining initial value

2006-12-15 Thread Dariusz Wojtas
Hi, I am using Struts 2.0.2, trunk. I have an action (/listy/kodyPocztowe) that returns postal codes [id, name] and another action that server a form (form points to the same action back). How to define the initial value in the autocompleter field? Even if I submit the form and it reloads with