Posts

Showing posts from June, 2011

Create Custom Dialog box smargwt

Create Custom Dialog box 1. replace the dialog class with window class, as the dialog class has no really advantage (as far as I have experienced) 2. use the addMember methode instead the addChild, with this one all layout methods are effectiv. Code: // first final Window purchaseDlg = new Window(); // second, with the vpanel and LayoutSpacer removed (I don't think, you need them any longer) HLayout hpanel = new HLayout(); hpanel.setLayout(Alignment.CENTER); hpanel.addMember(button); purchaseDlg.addItem(hpanel);

smart gwt allow only numbers in textfield

smart gwt allow only numbers in textfield Aceptar solo numeros en un textfield en gwt smartclient very simple MASK PROPERTY         TextItem phoneNumberField =  new  TextItem( "phoneNo" ,  "Phone No." );           phoneNumberField.setMask( "(###) ###-####" );           phoneNumberField.setHint( "<nobr>(###) ###-####</nobr>" );         final TextItem check4 = new TextItem();         check4.setName("4");         check4.setTitle("  Grupo");         check4.setTitleOrientation(TitleOrientation.TOP);         check4.setWidth(100);                check4.setValue(false);         check4.setMask("###"); smart gwt allow only numbers in textfield Aceptar solo numeros en un textfield en gwt smartclient   void com.smartgwt.client.widgets.form.fields.TextItem.setMask(String mask) Input mask used to filter text entry. Sample masks: Phone number: (###) ###-#### Social Security number: ###-##

SMARTGWT linked hash map comboboxitem SelectItem

SMARTGWT linked hash map comboboxitem SelectItem         final SelectItem check3 = new SelectItem();                check3.setName("3");         check3.setTitle("enviar msj");         check3.setWidth(40);         check3.setValueMap("Ninguno","Mensaje Directo","Mensaje Massivo"); SMARTGWT linked hash map comboboxitem SelectItem       ComboBoxItem cbItem =  new  ComboBoxItem () ;        cbItem.setTitle ( "Select" ) ;        cbItem.setHint ( "<nobr>A simple ComboBoxItem</nobr>" ) ;        cbItem.setType ( "comboBox" ) ;        cbItem.setValueMap ( "Cat" ,  "Dog" ,  "Giraffe" ,  "Goat" ,  "Marmoset" ,  "Mouse" ) ; Como agregar valores a un combobox en smartgwt, o tambien como agregar id valores a un map en java setValueMap

Grid with scrollbars

Grid with scrollbars en smartgwt Grid con scrollbars fijas en smartgwt         Grid_.setWidth100();         Grid_.setHeight100();         Grid__.setDataSource(Source);         Grid_.setAutoFetchData(false);         Grid_.setEmptyMessage(variables.str_empty_call);         Grid_.setLoadingMessage(variables.str_loading);         Grid_.setLoadingDataMessage(variables.str_loading_data);         Grid_.setCellHeight(24);