You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Musachy Barroso (JIRA)" <ji...@apache.org> on 2006/12/16 05:46:57 UTC

[jira] Created: (WW-1562) Autcompleter bugs\improvements

Autcompleter bugs\improvements
------------------------------

                 Key: WW-1562
                 URL: http://issues.apache.org/struts/browse/WW-1562
             Project: Struts 2
          Issue Type: Bug
          Components: Views
    Affects Versions: 2.0.2
            Reporter: Musachy Barroso
            Priority: Minor


* Provide ability to reload options while text is typed
* Select previous value when page is reloaded

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (WW-1562) Autcompleter bugs\improvements

Posted by "Ted Husted (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/struts/browse/WW-1562?page=all ]

Ted Husted updated WW-1562:
---------------------------

    Fix Version/s: 2.0.3
                       (was: 2.0.2)

> Autcompleter bugs\improvements
> ------------------------------
>
>                 Key: WW-1562
>                 URL: http://issues.apache.org/struts/browse/WW-1562
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Views
>    Affects Versions: 2.0.2
>            Reporter: Musachy Barroso
>            Priority: Minor
>             Fix For: 2.0.3
>
>
> * Provide ability to reload options while text is typed
> * Select previous value when page is reloaded

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WW-1562) Autcompleter bugs\improvements

Posted by "Dariusz Wojtas (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/struts/browse/WW-1562?page=comments#action_39137 ] 
            
Dariusz Wojtas commented on WW-1562:
------------------------------------

I just found some possible issue with autocompleter.
I have 2 autocompleters: parent and child.
I select some value and child contents do reload nicely.

Problem:
I select something on the child, then change parent.
Child's options do change, but the selected one (visible) does not change and still represents value from the previous selection (should be cleared).

> Autcompleter bugs\improvements
> ------------------------------
>
>                 Key: WW-1562
>                 URL: http://issues.apache.org/struts/browse/WW-1562
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Views
>    Affects Versions: 2.0.2
>            Reporter: Musachy Barroso
>            Priority: Minor
>
> * Provide ability to reload options while text is typed
> * Select previous value when page is reloaded

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (WW-1562) Autcompleter bugs\improvements

Posted by "Don Brown (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-1562?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Don Brown resolved WW-1562.
---------------------------

    Resolution: Fixed

> Autcompleter bugs\improvements
> ------------------------------
>
>                 Key: WW-1562
>                 URL: https://issues.apache.org/struts/browse/WW-1562
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Views
>    Affects Versions: 2.0.2
>            Reporter: Musachy Barroso
>            Priority: Minor
>             Fix For: 2.0.3
>
>         Attachments: WW-1562.patch
>
>
> * Provide ability to reload options while text is typed
> * Select previous value when page is reloaded

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WW-1562) Autcompleter bugs\improvements

Posted by "Musachy Barroso (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-1562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_39676 ] 

Musachy Barroso commented on WW-1562:
-------------------------------------

We can close this one, the major issues are fixed, the others won't be fixed.

> Autcompleter bugs\improvements
> ------------------------------
>
>                 Key: WW-1562
>                 URL: https://issues.apache.org/struts/browse/WW-1562
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Views
>    Affects Versions: 2.0.2
>            Reporter: Musachy Barroso
>            Priority: Minor
>             Fix For: 2.0.3
>
>         Attachments: WW-1562.patch
>
>
> * Provide ability to reload options while text is typed
> * Select previous value when page is reloaded

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WW-1562) Autcompleter bugs\improvements

Posted by "Dariusz Wojtas (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/struts/browse/WW-1562?page=comments#action_39165 ] 
            
Dariusz Wojtas commented on WW-1562:
------------------------------------

I am trying to update the sources of struts2 every few days.
After recent changes in the autocompleter I can see that some file is probably incorrectly referenced.
I get error 404 in browser logs when trying to load autocompleter
      /<app-prefix>/struts/dojo/struts/ComboBox.css
Most likely some .js file references it in some old path.

> Autcompleter bugs\improvements
> ------------------------------
>
>                 Key: WW-1562
>                 URL: http://issues.apache.org/struts/browse/WW-1562
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Views
>    Affects Versions: 2.0.2
>            Reporter: Musachy Barroso
>            Priority: Minor
>             Fix For: 2.0.3
>
>
> * Provide ability to reload options while text is typed
> * Select previous value when page is reloaded

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WW-1562) Autcompleter bugs\improvements

Posted by "Musachy Barroso (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/struts/browse/WW-1562?page=comments#action_39117 ] 
            
Musachy Barroso commented on WW-1562:
-------------------------------------

About e). The autocompleter in the beginning (and Dojo's has it also) had a maxItem property, the problem is that to show the dropdown Dojo needs to set a size for it, to know the size it first needs to render it, so their solution was to show the autocompleter on the bottom of the screen, to get the size to match the maxItem quantity, then hide the dropdown and show it again under the textbox, that's why we are using fixed width and height, to avoid the flashing step.

> Autcompleter bugs\improvements
> ------------------------------
>
>                 Key: WW-1562
>                 URL: http://issues.apache.org/struts/browse/WW-1562
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Views
>    Affects Versions: 2.0.2
>            Reporter: Musachy Barroso
>            Priority: Minor
>
> * Provide ability to reload options while text is typed
> * Select previous value when page is reloaded

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WW-1562) Autcompleter bugs\improvements

Posted by "Dariusz Wojtas (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/struts/browse/WW-1562?page=comments#action_39116 ] 
            
Dariusz Wojtas commented on WW-1562:
------------------------------------

Here are my initial comments/wishes about the autocompleter:

a)
add tag attribute that will let the application control
when to load initial content.
For example
  loadAfterMinimum="3"
which could tell the tag to load the content after typing 
minimum 3 chars by the user.
Later, when somebody uses backspace - unload the content
if the number of entered chars is lower than 'loadAfterMinimum'.
Reason.
An example:
An application with 100 000 customers.
Operator needs to chose one of customets on his form.
Most obious choices for implementation are (there are others):
* provide extra window load/search/page and finally select customer
* the same done with modal dialog (paging/reloading may be tricky)
* use autocompleter in cases where the programmer knows it makes sense

For me the modal dialog would be the best option, but reloading/paging
makes it tricky to reload the modal panel and not the whole app.
therefore - autocompleter.
But with that amount of data (100 000 entries) it does not make sense to load it all immediately.

*** Some indicator could be given to the user why nothing is loaded ***
For example a 1 position combo saying "type minimum n characters"


b)
preselecting option using 'value' attribute.
This is definitely something needed also for dynamic data.
I think that this way usually we select 'parent' nodes in the database hierarchy. 
If the parent is selected somewhere, and is dropped by some reason long time later, 
then even all it's children will be deleted
[also the record using it with autocompleter]
In case of value representing a 'phantom' value - it may be prepared to
display a special option
  <no value in combo box>
(localizable)

In addition the options allowed static way (set with list) do not guarantee that
the content of this list do not change over time (add/remove). 
Applications are changing, the same way as options.


c) 
I am not 100% sure here (I had maven/eclipse caching issues 
in the past - now I believe these problems are gone) but my SVN trunk sources contain:
* generated TLD contains attribute 'delay', while the class contains 'searchDelay'
* TLD does not contain attribute  'searchType', while it is described in wiki 
 and defined in class


d)
the 'disabled' property (AutocompleterTag) overrides something defined 
in parent class (AbstractUITag). This may lead to issues, as setter
in autocompleter may leave the parent 'disabled' property unset.
To be dropped from autocompleter.
It is declared everywhere as protected - no problem with accessing it from parent class.

   
e)
is there any option to define the number of displayed options
if there are too many for display? Currently it seems to be hardcoded somewhere to
display only 30 of them (nice default).
It would be nice to make it configurable - which makes sense if the developer
changes the 'dropdownHeight'.
Add attribute: maxDisplayed, default 30


f)
add option to reload options while the text is typed and a property that controls 
the minimum delay before sending request for it to the server.
Maybe it could even be implemented by 1 property:
   reloadDelay="<millis>"
which means the delay before reloading AFTER A CHARACTER IS TYPED.
This delay count could be reset if another char is typed before it starts reload.



g)
add info somewhere (wiki) info if the options sent by the server to autocompleter 
may be compressed (if the browser says it is capable to handle gzip/deflate content).
I am pretty sure it is normal and allowed, but cannot be 100% sure as I do not know
how dojo interprets it. Most likely the browser decompresses it prior to giving it to dojo.

  

Improvements in javadoc/wiki:
-------------------
1)
The wiki page [http://cwiki.apache.org/confluence/display/S2WIKI/Ajax+Tags]
contains nice info that autocompleter accepts data in the JSON notation.
Can you add in bold to remember about escaping '\' and '"' characters?
The json main page nicely decribes the exact rules, but many developers
[I did it myself first] will not escape it - overlook.
It will work for them, but suddenly [depending on data from DB] it will stop displaying 
anything in the combo.

2)
Please add a short description of possibilities for defining autocompleter contents.
It is obvious that the property it represents is tied to a form property,
but the list of displayed values may be implemented both as:
 * a form member getter
 * a completely separate action (I prefer this one).
 *  ... ?
The problem in the 2nd case is that all properties of the parent form are appended
to the 'href' attribute as parameers and struts param interceptor complaints about unknown properties. 
I tried 'formId' and 'formFilter' settings
[sample for DIV in http://cwiki.apache.org/confluence/display/S2WIKI/Ajax+Tags]
but it did not work as expected for me.
More info in this topic would be helpful.
Example 'reusabe' lists across a tpical app: zip code, city

   
Other:
* 
[possible dojo issue]
I load a set of options [about 300] but the combo shows only 1st 30 of them.
I type some chars and the result is narrowed, then I press backspace but the shown
options do not seem to see that the preselect conditions were narrowed.
I used 
    forceValidOption="true"
if it helps. This does not seem to happen every time.
To reproduce it one needs to type enough characters to match 1 option only, 
and then start using backspace.

> Autcompleter bugs\improvements
> ------------------------------
>
>                 Key: WW-1562
>                 URL: http://issues.apache.org/struts/browse/WW-1562
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Views
>    Affects Versions: 2.0.2
>            Reporter: Musachy Barroso
>            Priority: Minor
>
> * Provide ability to reload options while text is typed
> * Select previous value when page is reloaded

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (WW-1562) Autcompleter bugs\improvements

Posted by "Musachy Barroso (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/struts/browse/WW-1562?page=all ]

Musachy Barroso updated WW-1562:
--------------------------------

    Attachment: WW-1562.patch

Fixed on this patch:

* Added "loadOnTextChange" 
* Added "loadMinimumCout"
* selected values are loaded if page is loaded again
* added "showDownArrow" 

> Autcompleter bugs\improvements
> ------------------------------
>
>                 Key: WW-1562
>                 URL: http://issues.apache.org/struts/browse/WW-1562
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Views
>    Affects Versions: 2.0.2
>            Reporter: Musachy Barroso
>            Priority: Minor
>             Fix For: 2.0.3
>
>         Attachments: WW-1562.patch
>
>
> * Provide ability to reload options while text is typed
> * Select previous value when page is reloaded

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (WW-1562) Autcompleter bugs\improvements

Posted by "Ted Husted (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/struts/browse/WW-1562?page=all ]

Ted Husted updated WW-1562:
---------------------------

    Fix Version/s: 2.0.2

> Autcompleter bugs\improvements
> ------------------------------
>
>                 Key: WW-1562
>                 URL: http://issues.apache.org/struts/browse/WW-1562
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Views
>    Affects Versions: 2.0.2
>            Reporter: Musachy Barroso
>            Priority: Minor
>             Fix For: 2.0.2
>
>
> * Provide ability to reload options while text is typed
> * Select previous value when page is reloaded

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira