Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    Nov 2008
    Location
    Vienna - Austria
    Posts
    867
    Vote Rating
    1
    micgala is on a distinguished road

      0  

    Default Help using custom TriggerField as Editor in Grid

    Help using custom TriggerField as Editor in Grid


    Hi.

    I have created a custom TriggerField that will display a window for editing "multiple" values for a field.

    If I use this TriggerField in a FormPanel, everything works ok, when I click the trigger, the new window is opened, and the field value is updated after I close this window (more or less what happens with the DatePicker, except I am using really a window).

    But when using my custom TriggerField as Editor in one grid, as soon as I click anywhere in the openned window, then the Editor cell in the grid stops editing (as it loses its focus).
    Then when closing the window, the value is not set in the editor...

    Does any one knows any work around for this?

    Thanks for helping!
    Michel.

  2. #2
    Ext User
    Join Date
    Sep 2008
    Location
    Germany
    Posts
    961
    Vote Rating
    0
    Arno.Nyhm is on a distinguished road

      0  

    Default


    i think for this we need a testcase with code.
    This forum needs your help: you got hints from the community and now you have fixed your code? dont just reply with "now its fixed" or "i found the error"! please take the time to post also an detailed answer with the working code.

    GreaseMonkey Script for a GXT-only Forum: it hides ExtJs here: New Posts • Search Results • Advanced Search form • Category overview http://www.extjs.com/forum/showthrea...041#post410041

  3. #3
    Sencha User
    Join Date
    Nov 2008
    Location
    Vienna - Austria
    Posts
    867
    Vote Rating
    1
    micgala is on a distinguished road

      0  

    Default


    Hi, tks for your reply.

    However, I figured out how to fix it.

    There is the property allowBlur in the Editor class.
    One have to set it to true to be able to use a Field that can lose its focus as a field in the grid.

    Code:
    /**
       * Sets whether editing should be cancelled when the field is blurred
       * (defaults to false).
       * 
       * @param allowBlur true to allow blur
       */
      public void setAllowBlur(boolean allowBlur) {
        this.allowBlur = allowBlur;
      }
    Regards,
    Michel.

  4. #4
    Sencha User
    Join Date
    Jan 2010
    Location
    Moscow
    Posts
    27
    Vote Rating
    0
    Atum is on a distinguished road

      0  

    Default


    Help ! may be bug ?

    TriggerField in EditorGrid.

    ver. GXT 2.1.1

    TriggerField<String> text = new TriggerField<String>();

    text.setReadOnly(true);
    // text.setEditable(true);


    final CellEditor textEditor = new CellEditor(text);
    textEditor.setAllowBlur(true);

    column.setEditor(textEditor);


    how to set readonly TriggerField and Listener Events.TriggerClick ?

    Code:
    text.addListener(Events.TriggerClick , new Listener<BaseEvent>() {
    
                public void handleEvent(BaseEvent be) {
                     final MessageBox box = MessageBox.prompt("Name", "Please enter your name:");
                      box.addCallback(new Listener<MessageBoxEvent>() {
                        public void handleEvent(MessageBoxEvent be) {
                           text.setValue(be.getValue());
                           textEditor.completeEdit();
                        }
                    });
                }
            });
    don't edit text in TriggerField , only edit over (by means of) TriggerClick

  5. #5
    Ext GWT Premium Member
    Join Date
    Jul 2009
    Posts
    80
    Vote Rating
    0
    terciofilho is on a distinguished road

      0  

    Default


    Why don't you show you window as a Modal?

    window.setModal(true);

  6. #6
    Ext GWT Premium Member
    Join Date
    Jul 2009
    Posts
    80
    Vote Rating
    0
    terciofilho is on a distinguished road

      0  

    Default


    By the way.

    I think that you need to setEditable(false). This will disable user input but will allow to click in the trigger button.

  7. #7
    Sencha User
    Join Date
    Jan 2010
    Location
    Moscow
    Posts
    27
    Vote Rating
    0
    Atum is on a distinguished road

      0  

    Default


    Quote Originally Posted by terciofilho View Post
    By the way.

    I think that you need to setEditable(false). This will disable user input but will allow to click in the trigger button.
    if I set setEditable(false)

    I cannot select the text in TriggerField.



    UPD:


    Code:
    public class TriggerField<D> extends TextField<D> 
    ....
    
      @Override
      protected void onClick(ComponentEvent ce) {
        if (!readOnly && !editable && getInputEl().dom.isOrHasChild(ce.getTarget())) {
          onTriggerClick(ce);
          return;
        }
        super.onClick(ce);
      }
    
      public void setEditable(boolean editable) {
        this.editable = editable;
        if (rendered) {
          El fromEl = getInputEl();
          if (!readOnly) {
            fromEl.dom.setPropertyBoolean("readOnly", !editable);
          }
          fromEl.setStyleName("x-triggerfield-noedit", !editable);
        }
      }
    
    


    logical error