You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by "Todd Volkert (JIRA)" <ji...@apache.org> on 2009/10/19 19:09:59 UTC

[jira] Created: (PIVOT-330) Add suggestions:List to TextInput

Add suggestions:List<String> to TextInput
-----------------------------------------

                 Key: PIVOT-330
                 URL: https://issues.apache.org/jira/browse/PIVOT-330
             Project: Pivot
          Issue Type: New Feature
          Components: wtk
            Reporter: Todd Volkert
             Fix For: 1.5


Proposal to add the following API to TextInput:

public List<String> getSuggestions();
public void setSuggestions(List<String> suggestions);

When the suggestions list was non-null, the text input skin would be responsible for showing the suggestions to the user.  The default skin would display a popup underneath the text input, with a list view of the suggestions in the popup.  The user could then use the down arrow and tab or click to select a suggestion, thus populating the text of the text input.

It would always be left up to the application to manage the suggestions list (update it, set it, or clear it) based on application-level logic -- the skin would always present the suggestion list if it were there.

Applications could combine this feature with the Java preferences API to store historical form data and provide behavior akin to browser form behavior.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIVOT-330) Add suggestions:List to TextInput

Posted by "Greg Brown (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIVOT-330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12800195#action_12800195 ] 

Greg Brown commented on PIVOT-330:
----------------------------------

That's correct - the intent is to support auto-complete. We discussed using a "pull" interface such as you describe but felt that it would be more flexible (and consistent with Pivot design) to use the push (setter) approach. This way, the caller gets to decide when the suggestions are shown.

I'll actually probably start working on this ticket fairly soon - I have a need for it in a client app.



> Add suggestions:List<String> to TextInput
> -----------------------------------------
>
>                 Key: PIVOT-330
>                 URL: https://issues.apache.org/jira/browse/PIVOT-330
>             Project: Pivot
>          Issue Type: New Feature
>          Components: wtk
>            Reporter: Todd Volkert
>             Fix For: 1.4.1
>
>
> Proposal to add the following API to TextInput:
> public List<String> getSuggestions();
> public void setSuggestions(List<String> suggestions);
> When the suggestions list was non-null, the text input skin would be responsible for showing the suggestions to the user.  The default skin would display a popup underneath the text input, with a list view of the suggestions in the popup.  The user could then use the down arrow and tab or click to select a suggestion, thus populating the text of the text input.
> It would always be left up to the application to manage the suggestions list (update it, set it, or clear it) based on application-level logic -- the skin would always present the suggestion list if it were there.
> Applications could combine this feature with the Java preferences API to store historical form data and provide behavior akin to browser form behavior.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PIVOT-330) Add suggestions:List to TextInput

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

Greg Brown updated PIVOT-330:
-----------------------------

    Fix Version/s:     (was: 1.5)
                   1.4.1
         Assignee: Greg Brown

> Add suggestions:List<String> to TextInput
> -----------------------------------------
>
>                 Key: PIVOT-330
>                 URL: https://issues.apache.org/jira/browse/PIVOT-330
>             Project: Pivot
>          Issue Type: New Feature
>          Components: wtk
>            Reporter: Todd Volkert
>            Assignee: Greg Brown
>             Fix For: 1.4.1
>
>
> Proposal to add the following API to TextInput:
> public List<String> getSuggestions();
> public void setSuggestions(List<String> suggestions);
> When the suggestions list was non-null, the text input skin would be responsible for showing the suggestions to the user.  The default skin would display a popup underneath the text input, with a list view of the suggestions in the popup.  The user could then use the down arrow and tab or click to select a suggestion, thus populating the text of the text input.
> It would always be left up to the application to manage the suggestions list (update it, set it, or clear it) based on application-level logic -- the skin would always present the suggestion list if it were there.
> Applications could combine this feature with the Java preferences API to store historical form data and provide behavior akin to browser form behavior.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIVOT-330) Add suggestions:List to TextInput

Posted by "Dmitry Mamonov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIVOT-330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12800200#action_12800200 ] 

Dmitry Mamonov commented on PIVOT-330:
--------------------------------------

Yes, anyway I could implement List<String> inteface on my own, also referring to target text field like:

class MySuggestionsList implements List<String> {
  public MySuggestionsList(TextField field){
    ... preserver reference to text field, to get it's value later, when elements is requested from this list ...
  }
}


so functionality will be the same as I described above.

> Add suggestions:List<String> to TextInput
> -----------------------------------------
>
>                 Key: PIVOT-330
>                 URL: https://issues.apache.org/jira/browse/PIVOT-330
>             Project: Pivot
>          Issue Type: New Feature
>          Components: wtk
>            Reporter: Todd Volkert
>            Assignee: Greg Brown
>             Fix For: 1.4.1
>
>
> Proposal to add the following API to TextInput:
> public List<String> getSuggestions();
> public void setSuggestions(List<String> suggestions);
> When the suggestions list was non-null, the text input skin would be responsible for showing the suggestions to the user.  The default skin would display a popup underneath the text input, with a list view of the suggestions in the popup.  The user could then use the down arrow and tab or click to select a suggestion, thus populating the text of the text input.
> It would always be left up to the application to manage the suggestions list (update it, set it, or clear it) based on application-level logic -- the skin would always present the suggestion list if it were there.
> Applications could combine this feature with the Java preferences API to store historical form data and provide behavior akin to browser form behavior.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIVOT-330) Add suggestions:List to TextInput

Posted by "Dmitry Mamonov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIVOT-330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12800193#action_12800193 ] 

Dmitry Mamonov commented on PIVOT-330:
--------------------------------------

Hope I understand this issue correct, and it is some sort of autocomplete support for text fields.

Just as example, here is text fileld "AccountNo" which holds banking account number,
it might be a millions! of possible values in suggestion list.

It might be more usefull if it will be implemented within interface like:
interface SuggestionProvider {
  List<String> getSuggestions(String _curentText);
}
so I could refer to current entered text to provide reasonable amount of suggestions,
and if user entered "408170810"  then I will find "40817781012346543210"
(note - position 6th is different, and it was intentionally).

and methods for text field will be:

public SuggestionProvider  getSuggestionsProvider();
public void setSuggestionsProvider(SuggestionProvider suggestions); 

> Add suggestions:List<String> to TextInput
> -----------------------------------------
>
>                 Key: PIVOT-330
>                 URL: https://issues.apache.org/jira/browse/PIVOT-330
>             Project: Pivot
>          Issue Type: New Feature
>          Components: wtk
>            Reporter: Todd Volkert
>             Fix For: 1.5
>
>
> Proposal to add the following API to TextInput:
> public List<String> getSuggestions();
> public void setSuggestions(List<String> suggestions);
> When the suggestions list was non-null, the text input skin would be responsible for showing the suggestions to the user.  The default skin would display a popup underneath the text input, with a list view of the suggestions in the popup.  The user could then use the down arrow and tab or click to select a suggestion, thus populating the text of the text input.
> It would always be left up to the application to manage the suggestions list (update it, set it, or clear it) based on application-level logic -- the skin would always present the suggestion list if it were there.
> Applications could combine this feature with the Java preferences API to store historical form data and provide behavior akin to browser form behavior.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.