Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Issue with TextItem in a Dynamic form SmartGWT 2.4

    SmartGWT 2.4, GWT 2.04, Chrome (8.0.552.224) on Linux and Mac OS X (10.6.5) & Safari (iOS 4.2.1) on iPad

    Cannot get the developer console to open

    Issue 1: with smartGWT 2.4 my password fields show the typed password even with the type set to "password".

    Issue 2: on the iPad any time you tap on a textfield you get the popup keyboard, it then immediately goes away. This is reproducible on the showcase by going to the Forms->Form Layout_> Titles demo

    Thank you

    Issue 1 sample code:

    DynamicForm df = new DynamicForm();
    df.setWidth100();
    df.setAutoFocus(true);

    // Add some standard form options
    final TextItem userTF = new TextItem();
    userTF.setName("userName");
    userTF.setTitle("User Name");
    userTF.setKeyPressFilter(PamsTypes.allMixType);
    final TextItem passTF = new TextItem();
    passTF.addKeyPressHandler(new KeyPressHandler(){
    public void onKeyPress(KeyPressEvent event)
    {
    if(event.getCharacterValue() == 13)
    {
    handleStaffLogin(userTF.getDisplayValue(), passTF.getDisplayValue());
    userTF.setValue("");
    passTF.setValue("");
    }
    }
    });
    passTF.setName("password");
    passTF.setTitle("Password");
    passTF.setType("password");
    passTF.setKeyPressFilter(PamsTypes.allMixType);

    SectionItem section1 = new SectionItem();
    section1.setDefaultValue("Staff Login");
    section1.setSectionExpanded(true);
    section1.setItemIds("userName", "password");
    section1.setCanCollapse(false);
    section1.setShowTitle(false);

    df.setItems(new FormItem[]{section1, userTF, passTF});
    IButton loginB = new IButton("Login");
    loginB.addClickHandler(new ClickHandler() {

    public void onClick(ClickEvent event) {

    handleStaffLogin(userTF.getDisplayValue(), passTF.getDisplayValue());
    userTF.setValue("");
    passTF.setValue("");
    }
    });

    vLogin.addMember(df);
    vLogin.addMember(loginB);

    #2
    If I try to open the console in my entry point with

    Code:
    try{
         SC.showConsole();
    }catch(Exception e){
         SC.warn("OOps " + e.getMessage());
    }
    I get nothing. I also tried the code in the FAQ:

    Comment


      #3
      Hi edgear,
      Why don't you use PasswordItem directly instead of TextItem?
      And ultimately if you want to use TextItem, then try this:
      Code:
      textItem.setAttribute("editorType", "PasswordItem");

      Comment


        #4
        Ok, didn't know about the PasswordItem. Works great in 2.4 . Now how do I fix the keyboard pop-up issue on the iPad?

        Comment

        Working...
        X