pivot-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brendan (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PIVOT-844) SuggestionPopup Allow replacing selected text to the beginning index until current cursor of TextInput or TextArea Component
Date Sun, 22 Apr 2012 16:59:38 GMT

    [ https://issues.apache.org/jira/browse/PIVOT-844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13259181#comment-13259181
] 

Brendan commented on PIVOT-844:
-------------------------------

Sandro, sorry for the late reply.  I was on business trip.

I tested your patch and I think there is a slight improvement can be done.

I like to add a parameter to 

void org.apache.pivot.wtk.SuggestionPopup.open(TextInput textInput, int Index, SuggestionPopupCloseListener
suggestionPopupCloseListener)

so that, the replacement is done at the index of the textInput and if it is zero, then act
like before replace the whole content with selected choice, or for positive index value, replace
from the index of content.

This way, we can easily implement something like email address where ";" is separator which
we detect it before passing to suggestionPopup.open.  so we don't need to set the "setAppendMode"
since it works for both cases.

What do you think? 
                
> SuggestionPopup Allow replacing selected text to the beginning index until current cursor
of TextInput or TextArea Component 
> -----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: PIVOT-844
>                 URL: https://issues.apache.org/jira/browse/PIVOT-844
>             Project: Pivot
>          Issue Type: Improvement
>          Components: wtk, wtk-terra
>            Reporter: Brendan
>            Assignee: Sandro Martini
>            Priority: Minor
>             Fix For: 2.1
>
>         Attachments: PIVOT-844_second_rough_version.patch
>
>   Original Estimate: 96h
>  Remaining Estimate: 96h
>
> SuggestionPopup used to replacing whole content of TextInput once user make a selection.
 This creates difficulties in implementing, for example, a list of comma separated email addresses
in recipients column. 
>  I suggest to modify the replacing methodology to allow additional parameter of Index
of the beginning word to input so that the SuggestionPopup will replace from the beginning
index to the current caret (text cursor) with user selection.  Additionally, allow not only
TextInput but also TextArea to be served with, which we can build a typing assistant like
function.
> The finding the beginning index is user code responsibility which opens up the choice
of usages, like email address assistant where ";" is the separator and space as separator
when general typing assistant.  The user code just need to use Java String Split to locate
the closet word to the caret for SuggestionPopup. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message