You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Sam Barnum (JIRA)" <ji...@apache.org> on 2008/02/06 05:41:08 UTC

[jira] Created: (WICKET-1324) AutoCompleteTextField does not return the pojo which was selected by the user

AutoCompleteTextField does not return the pojo which was selected by the user
-----------------------------------------------------------------------------

                 Key: WICKET-1324
                 URL: https://issues.apache.org/jira/browse/WICKET-1324
             Project: Wicket
          Issue Type: Improvement
          Components: wicket-extensions
    Affects Versions: 1.3.0-final
         Environment: any
            Reporter: Sam Barnum


getModelObject() returns the selected
String, not the POJO object which the string is rendered from.  I've gotten around this by saving the last query string sent
via AJAX.  When the user makes a selection, I iterate over the
options for that query string one more time, and take the POJO whose
rendered string matches the user-selected text.

getModelObject() should probably return the java object.



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


[jira] Commented: (WICKET-1324) AutoCompleteTextField does not return the pojo which was selected by the user

Posted by "Sergey Kisel (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12596646#action_12596646 ] 

Sergey Kisel commented on WICKET-1324:
--------------------------------------

Does there any other way to give a user a possibility to autocomplete and so i could get back an object, not String object?

> AutoCompleteTextField does not return the pojo which was selected by the user
> -----------------------------------------------------------------------------
>
>                 Key: WICKET-1324
>                 URL: https://issues.apache.org/jira/browse/WICKET-1324
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-extensions
>    Affects Versions: 1.3.0-final
>         Environment: any
>            Reporter: Sam Barnum
>            Assignee: Igor Vaynberg
>
> getModelObject() returns the selected
> String, not the POJO object which the string is rendered from.  I've gotten around this by saving the last query string sent
> via AJAX.  When the user makes a selection, I iterate over the
> options for that query string one more time, and take the POJO whose
> rendered string matches the user-selected text.
> getModelObject() should probably return the java object.

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


[jira] Commented: (WICKET-1324) AutoCompleteTextField does not return the pojo which was selected by the user

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12596655#action_12596655 ] 

Igor Vaynberg commented on WICKET-1324:
---------------------------------------

like i said above, the problem here is that you cannot always resolve the text back to the object. you can always iterate over the choices yourself and do any kind of translation you want inside a model or some other way.

> AutoCompleteTextField does not return the pojo which was selected by the user
> -----------------------------------------------------------------------------
>
>                 Key: WICKET-1324
>                 URL: https://issues.apache.org/jira/browse/WICKET-1324
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-extensions
>    Affects Versions: 1.3.0-final
>         Environment: any
>            Reporter: Sam Barnum
>            Assignee: Igor Vaynberg
>
> getModelObject() returns the selected
> String, not the POJO object which the string is rendered from.  I've gotten around this by saving the last query string sent
> via AJAX.  When the user makes a selection, I iterate over the
> options for that query string one more time, and take the POJO whose
> rendered string matches the user-selected text.
> getModelObject() should probably return the java object.

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


[jira] Updated: (WICKET-1324) AutoCompleteTextField does not return the pojo which was selected by the user

Posted by "Frank Bille Jensen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1324?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Frank Bille Jensen updated WICKET-1324:
---------------------------------------

    Fix Version/s:     (was: 1.3.2)

> AutoCompleteTextField does not return the pojo which was selected by the user
> -----------------------------------------------------------------------------
>
>                 Key: WICKET-1324
>                 URL: https://issues.apache.org/jira/browse/WICKET-1324
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-extensions
>    Affects Versions: 1.3.0-final
>         Environment: any
>            Reporter: Sam Barnum
>            Assignee: Igor Vaynberg
>
> getModelObject() returns the selected
> String, not the POJO object which the string is rendered from.  I've gotten around this by saving the last query string sent
> via AJAX.  When the user makes a selection, I iterate over the
> options for that query string one more time, and take the POJO whose
> rendered string matches the user-selected text.
> getModelObject() should probably return the java object.

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


[jira] Commented: (WICKET-1324) AutoCompleteTextField does not return the pojo which was selected by the user

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12596771#action_12596771 ] 

Igor Vaynberg commented on WICKET-1324:
---------------------------------------

not that i am aware of presently, but you are more then welcome to create one and share it with us.

> AutoCompleteTextField does not return the pojo which was selected by the user
> -----------------------------------------------------------------------------
>
>                 Key: WICKET-1324
>                 URL: https://issues.apache.org/jira/browse/WICKET-1324
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-extensions
>    Affects Versions: 1.3.0-final
>         Environment: any
>            Reporter: Sam Barnum
>            Assignee: Igor Vaynberg
>
> getModelObject() returns the selected
> String, not the POJO object which the string is rendered from.  I've gotten around this by saving the last query string sent
> via AJAX.  When the user makes a selection, I iterate over the
> options for that query string one more time, and take the POJO whose
> rendered string matches the user-selected text.
> getModelObject() should probably return the java object.

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


[jira] Commented: (WICKET-1324) AutoCompleteTextField does not return the pojo which was selected by the user

Posted by "Sergey Kisel (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12596753#action_12596753 ] 

Sergey Kisel commented on WICKET-1324:
--------------------------------------

The problem is that i don't want to autocomplete this field, I would like to show some useful information for people who are writing something, so when you submit one choise from the options, so it can writing something different instead of text was written in the options.. may be there are some other classes or functionalities which can help me to do it?

> AutoCompleteTextField does not return the pojo which was selected by the user
> -----------------------------------------------------------------------------
>
>                 Key: WICKET-1324
>                 URL: https://issues.apache.org/jira/browse/WICKET-1324
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-extensions
>    Affects Versions: 1.3.0-final
>         Environment: any
>            Reporter: Sam Barnum
>            Assignee: Igor Vaynberg
>
> getModelObject() returns the selected
> String, not the POJO object which the string is rendered from.  I've gotten around this by saving the last query string sent
> via AJAX.  When the user makes a selection, I iterate over the
> options for that query string one more time, and take the POJO whose
> rendered string matches the user-selected text.
> getModelObject() should probably return the java object.

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


[jira] Commented: (WICKET-1324) AutoCompleteTextField does not return the pojo which was selected by the user

Posted by "Gerolf Seitz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12596900#action_12596900 ] 

Gerolf Seitz commented on WICKET-1324:
--------------------------------------

just saw an interesting (maybe annoying) feature of a jquery autocomplete.
http://jquery.bassistance.de/autocomplete/demo/
try the one with "Multiple Cities". if a string is entered where there is no match, the textbox is cleared.


> AutoCompleteTextField does not return the pojo which was selected by the user
> -----------------------------------------------------------------------------
>
>                 Key: WICKET-1324
>                 URL: https://issues.apache.org/jira/browse/WICKET-1324
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-extensions
>    Affects Versions: 1.3.0-final
>         Environment: any
>            Reporter: Sam Barnum
>            Assignee: Igor Vaynberg
>
> getModelObject() returns the selected
> String, not the POJO object which the string is rendered from.  I've gotten around this by saving the last query string sent
> via AJAX.  When the user makes a selection, I iterate over the
> options for that query string one more time, and take the POJO whose
> rendered string matches the user-selected text.
> getModelObject() should probably return the java object.

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


[jira] Resolved: (WICKET-1324) AutoCompleteTextField does not return the pojo which was selected by the user

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

Igor Vaynberg resolved WICKET-1324.
-----------------------------------

       Resolution: Won't Fix
    Fix Version/s: 1.3.2
         Assignee: Igor Vaynberg

autocomplete textfield cannot return the pojo because the user can enter text that is not one of the choices - that is why the text is returned instead of the pojo.

> AutoCompleteTextField does not return the pojo which was selected by the user
> -----------------------------------------------------------------------------
>
>                 Key: WICKET-1324
>                 URL: https://issues.apache.org/jira/browse/WICKET-1324
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-extensions
>    Affects Versions: 1.3.0-final
>         Environment: any
>            Reporter: Sam Barnum
>            Assignee: Igor Vaynberg
>             Fix For: 1.3.2
>
>
> getModelObject() returns the selected
> String, not the POJO object which the string is rendered from.  I've gotten around this by saving the last query string sent
> via AJAX.  When the user makes a selection, I iterate over the
> options for that query string one more time, and take the POJO whose
> rendered string matches the user-selected text.
> getModelObject() should probably return the java object.

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