TextField DirectEvent Blur Error

  1. #1

    [CLOSED] TextField DirectEvent Blur Error (Simulate search box)

    Hi,

    I've building an MVC application and using Ext Net controls.
    I have window with textfields, and one of these is simulate a text search box. This search field has a direct event linked to blur event of the textfield, and it runs correctly and doing the server side work, the problem being, or it seems, when it finishes (server-code) and load/render the window with the new model (new values).

    I receive this message error:
    The control 'Identificador' does not have an DirectEvent with the name 'Blur' or the handler is absent
    I attach my piece of code:
    <ext:Panel runat="server" Layout="Form" LabelWidth="110" Border="false" ColumnWidth="0.2">
       <Items>
          <ext:TextField ID="Identificador" runat="server" FieldLabel="Identificador" AnchorHorizontal="95%"
               ItemCls="required" Cls="search" MaxLength="10" AllowBlank="false" EnableKeyEvents="true">
                <DirectEvents>
                    <Blur Url='<%# Url.Action("Edit2") %>' AutoDataBind="true">
                       <ExtraParams>
                          <ext:Parameter Name="ci" Value="#{Identificador}.getValue()" Mode="Raw" />
                        </ExtraParams>
                   </Blur>
              </DirectEvents>
          </ext:TextField>
       </Items>
    </ext:Panel>
    The Edit2 Action returns me a view with the correct model. But I don't understand this error message because Blur Event doesn't have Handler property.

    I only have thsi error with the blur directevent in this textfield, I could link other events to the textfield.
    Last edited by David Pelaez; Dec 21, 2010 at 12:32 PM.
  2. #2
    Hi,

    Can you create simple test sample/project which reproduces the problem?
  3. #3
    I attach a sample project with the concept of my application.

    I suppress a folder dll which contains this files to compress the project and upload it to forum:
    • Ext.Net.dll
    • Ext.Net.Utilities.dll
    • Ext.Net.MVC.dll
    • Newtonsoft.Json.dll


    You have to add it to compile it and try it.

    After this you see two textfields with an object model loaded, in the first one you have to put 1,2 or 3 like value, and when the blur event fires, it reload the page with the correspondant object with it identifier.

    The model object (this.Model) is correct and load the correct model each time, but i obtain and Ext Net error.

    Thanks!
    Attached Files
  4. #4
    Hi,

    You have to use PartialView if you need to render view during ajax request (otherwise use classic form submit if you need to update the page)
    Please see mvc.ext.net (Examples -> Partial Views)
  5. #5
    I think we don't understand each.

    I don't have to render the a new view with ajax petition, only I have to update the model loaded in the view.

    For example; I have loaded the Model A which ID is 1, and when I type 2 in the search box and move the focus (blur event) it has to load the model B with ID 2, and load the data. I do all the things detailed but when it finishes and goes to load the new model, crashes with the mentioned error.
  6. #6
    CLOSED.

    All I wanna do is solved with RedirectToAction() method in my controller.

Similar Threads

  1. Replies: 4
    Last Post: Jul 01, 2012, 3:04 AM
  2. [CLOSED] TextField: Help with Remove SelectedText on Blur event
    By nhg_itd in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jan 31, 2012, 1:12 AM
  3. [CLOSED] TextField Blur event is throwing error in Editable Grid
    By rnachman in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Jan 05, 2012, 4:25 PM
  4. send extra parameters on blur event of textfield editor inside gridpanel
    By aditya.murthy88@gmail.com in forum 1.x Help
    Replies: 2
    Last Post: Dec 11, 2010, 12:04 PM
  5. [CLOSED] validate textfield on blur
    By idrissb in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Aug 29, 2009, 3:47 PM

Tags for this Thread

Posting Permissions