Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

Re: [S2] autocompleter, predefining initial value

Musachy Barroso

2006-12-28

Replies:

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 using "forceValidOption"="true" on that one?

> One little other issue is that if carMaker is preselected on load,
> then the dependent autocompleter (carModel) is not preloaded with
> options. I have to change carMaker to make carModel loaded with
> options.
>

humm...does it happen on FF and IE? Is it different from the example on
showcase?

> Best regards
> Dariusz Wojtas
>
> On 12/28/06, Musachy Barroso <mbarroso@(protected):
>> 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
>> validation error or you return INPUT from your page, so if you have:
>>
>> ["ACURA","351"]
>>
>> and
>>
>> <s:autocompleter name="car"....>
>>
>> when you click submit, it will submit:
>>
>>  car=ACURA&carKey=351
>>
>> you need to add the property "car" and "carKey" in your action. About
>> the opera problem, I haven't test it on opera, but I will check it out.
>>
>> regards
>> musachy
>
> ---------------------------------------------------------------------
> 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)

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