1. #1
    Ext User
    Join Date
    Feb 2009
    Posts
    8
    Vote Rating
    0
    vishesh is on a distinguished road

      0  

    Default [Solved] Suggest box on Window.

    [Solved] Suggest box on Window.


    I'm facing this really wierd problem with suggest box using extjs library.
    What I'm trying to do is add a suggest box which have callback to search the database and return possible matches. Now when I add this suggest box on a window with mask tp the background the suggestions to the suggestbox goes behind the window and can not be seen below the suggestbox.
    I can not use combobox because the call to the server needs to go only when user enters string in the box and the complete list it too big to be loaded in the combo box at the start.

    Can someone please suggest me how this can be resolved?
    Thanks in advance.
    Vish.
    Last edited by vishesh; 21 Feb 2009 at 5:48 PM. Reason: Problem solved.

  2. #2
    Ext User
    Join Date
    Jul 2007
    Location
    Florida
    Posts
    9,996
    Vote Rating
    6
    mjlecomte will become famous soon enough mjlecomte will become famous soon enough

      0  

    Default


    suggest you post your current code, I can't follow what you're doing.

  3. #3
    Ext User
    Join Date
    Feb 2009
    Posts
    8
    Vote Rating
    0
    vishesh is on a distinguished road

      0  

    Default


    Well hope this explains what i'm trying to explain.
    I have a suggest box:

    MultiWordSuggestOracle oracle = new MultiWordSuggestOracle();
    oracle.add("Cat");
    oracle.add("Dog");
    oracle.add("Horse");
    oracle.add("Canary");

    SuggestBox box = new SuggestBox(oracle);

    I need to add it to a window:
    Window wd = new Window();
    wd.setModal(true);
    wd.setSize(200, 100);
    wd.add(box);
    wd.show();

    Now when it is run the suggestbox shows up but when you try to type and lookup the suggesstions the suggestions doesnot show up because the window property hides the suggestions. The suggestion are actually behind the window wd.

    Hope this explains what I'm facing and requesting.
    Thanks.

  4. #4
    Ext User soze's Avatar
    Join Date
    Mar 2008
    Location
    UK
    Posts
    108
    Vote Rating
    0
    soze is on a distinguished road

      0  

    Post


    Is your suggestion panel an item within the window? Otherwise, I could be overlooking this but your setModal to true could be preventing anything from displaying on top.

  5. #5
    Ext User
    Join Date
    Feb 2009
    Posts
    8
    Vote Rating
    0
    vishesh is on a distinguished road

      0  

    Default


    The suggestbox is added to the window as a widget. Kindly see the working code mentioned below. When you run it you will notice the suggestion for the word "c" gives the suggestions behind the window which is a problem if this suggestbox is a part of a form and is added with other elements in the window.
    Thanks


    package com.client;

    import com.google.gwt.core.client.EntryPoint;
    import com.google.gwt.user.client.ui.MultiWordSuggestOracle;
    import com.google.gwt.user.client.ui.SuggestBox;
    import com.gwtext.client.widgets.Window;


    public class TestApp2 implements EntryPoint {
    public void onModuleLoad() {

    MultiWordSuggestOracle oracle = new MultiWordSuggestOracle();
    oracle.add("Cat");
    oracle.add("Dog");
    oracle.add("Horse");
    oracle.add("Canary");

    SuggestBox box = new SuggestBox(oracle);

    Window wd = new Window();
    wd.setModal(true);
    wd.setSize(200, 10);
    wd.add(box);
    wd.show();
    }
    }

  6. #6
    Ext User
    Join Date
    Feb 2009
    Posts
    8
    Vote Rating
    0
    vishesh is on a distinguished road

      0  

    Default


    Quote Originally Posted by soze View Post
    Is your suggestion panel an item within the window? Otherwise, I could be overlooking this but your setModal to true could be preventing anything from displaying on top.
    Even the setModal(false) does not allow to show the suggestions above the window.

  7. #7
    Ext User
    Join Date
    Jul 2007
    Location
    Florida
    Posts
    9,996
    Vote Rating
    6
    mjlecomte will become famous soon enough mjlecomte will become famous soon enough

      0  

    Default


    should you be posting in the GWT forum?

  8. #8
    Ext User r2k's Avatar
    Join Date
    Aug 2007
    Posts
    67
    Vote Rating
    0
    r2k is on a distinguished road

      0  

    Default


    ... and post your code in appropite tags ???
    [extjs 2.2]
    [Browsers: IE(6/7/8), FF (3.0.8), chrome 2.0]

  9. #9
    Ext User
    Join Date
    Feb 2009
    Posts
    8
    Vote Rating
    0
    vishesh is on a distinguished road

      0  

    Default


    Since Window I'm using is Extjs's object so posted in this forum.

  10. #10
    Ext User
    Join Date
    Jul 2007
    Location
    Florida
    Posts
    9,996
    Vote Rating
    6
    mjlecomte will become famous soon enough mjlecomte will become famous soon enough

      0  

    Default


    Well, you're not posting code for ExtJS.

Thread Participants: 3