Announcement

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

    SmartGWT.mobile - Additional/missing FormItems

    I am really missing two FormItems in order to cover most common situations I would like to implement:

    1) NumberItem (right align) with setable Formatter/Parser
    2) StaticTextItem (item not linked to the .ds) to add some headings, text content, inside the form

    Is there any plan to include this or something equivalent soon ? I am ready to send some chocolate from Belgium as a motivation if required ;-).

    Thanks, Ben.

    #2
    Made my own implementation for "label" item in a form but not sure this is the right way:

    Code:
    package com.nside.moon.client_mobile.widgets;
    
    import com.google.gwt.dom.client.Document;
    import com.google.gwt.dom.client.LabelElement;
    import com.google.gwt.user.client.Event;
    import com.smartgwt.mobile.client.widgets.form.fields.FormItem;
    
    
    public class StaticTextItem extends FormItem {
    
    	public StaticTextItem(String name,String text) {
            super(name);
    
            LabelElement labelElement = Document.get().createLabelElement();
            labelElement.setInnerText(text);
            setElement(labelElement);
            getElement().setId(name);
            sinkEvents(Event.ONCLICK | Event.ONMOUSEDOWN | Event.ONMOUSEMOVE | Event.ONMOUSEUP | Event.TOUCHEVENTS | Event.ONFOCUS | Event.ONBLUR);
    		
    	}
    	
        @Override
        public boolean validate() {
            return true;
        }
    }
    Still need help for NumberItem ;-)
    Last edited by bda@n-side.com; 27 Dec 2012, 08:38.

    Comment


      #3
      I am so missing a NumberItem ... pleasssse

      Comment


        #4
        We've added StaticTextItem plus formatter/parser API to allow custom number formatting. The native keyboard can be influenced by setting the html5 type of the FormItem.

        Comment


          #5
          setBrowsetInputType() has been added as a means of easily setting the inputType attribute that controls the software keyboard.

          Comment


            #6
            Thanks a lot!

            Comment

            Working...
            X