[CLOSED] How to use data from database in "Combo with Templates and Ajax" example

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] How to use data from database in "Combo with Templates and Ajax" example

    Hi,

    I am needing to use the component having the "autofill" functionality in this example: https://examples2.ext.net/#/Form/Com...Custom_Search/

    How can I do this filling the store of combobox with an database and using the text that user are writting in my query?

    I really need to use an handler like in example or can I use a method in server-side code of the page, that be called every time that user write one letter?

    I appreciate your attention.
    Last edited by Baidaly; Jan 17, 2013 at 6:16 PM. Reason: [CLOSED]
  2. #2
    Hello!

    You can use DirectMethod to send data from DB to Client. Everything should be the same you just have to replace store's Proxy. Example: https://examples2.ext.net/#/GridPane..._DirectMethod/
  3. #3
  4. #4
    Hello @avante,

    There are two problems.

    1. Referencing a DirectMethod within a user control.

    By default, it is
    App.direct.UserControlID.DirectMethodName
    So, this is wrong:
    DirectFn="App.direct.BindData"
    You can set up
    [DirectMethod(IDAlias="UC")]
    public object BindData() { ... }
    and use
    DirectFn="App.direct.UC.BindData"
    See also:
    https://examples2.ext.net/#/Events/D...thods/ID_Mode/

    We also investigate a possibility to get this working.
    DirectFn="#{DirectMethods}.BindData"
    2. Using a static DirectMethod within a user control.

    Unfortunately, it can be defined on the page level only. So, please remove "static".

    Here are some more details.
    http://forums.ext.net/showthread.php...ll=1#post51877
  5. #5
    Quote Originally Posted by Daniil View Post
    We also investigate a possibility to get this working.
    DirectFn="#{DirectMethods}.BindData"
    This should work after updating from SVN (trunk).
  6. #6

Similar Threads

  1. [CLOSED] How does "MaskCls" work for "AutoLoad" mask in panel control
    By leon_tang in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Jul 19, 2012, 12:09 PM
  2. Replies: 1
    Last Post: Jun 26, 2012, 11:29 AM
  3. Replies: 4
    Last Post: May 22, 2012, 10:40 AM
  4. Replies: 5
    Last Post: May 02, 2012, 5:37 PM
  5. Replies: 4
    Last Post: Oct 11, 2011, 2:42 AM

Tags for this Thread

Posting Permissions