Announcement

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

    characterCasing and TextAreaItem

    When we use characterCasing:"upper" in a textItem, it works perfectly, however when the field is a textAreaItem type, characterCasing does not apply any effect.
    For example our code:
    Code:
    		{
    			name:"MOTIVO",
    			title: terminalesSacarTradicionalUIDS.getField("terminalesSacarTradicional.motivo").title,
    			characterCasing: "upper",
    			_constructor:"TextAreaItem",
    			height: 100,
    			width: 400,
    			colSpan: 3
    		},
    This works, when we miss out constructor, but we want both features, textArea and uppercase...

    Thanks in advance.

    We are working under:
    v9.1p_2014-05-04/PowerEdition Development SC and IExplrorer 10.0.9200 navigator, Eclipse Helios and Tomcat 7.0.28

    #2
    Ok, I just see although the TextAreaItem and TextItem both inherits from FormItem, the property characterCasing only belongs to TextItem.
    This means that I must to code that uppercase functionality for the TextAreaItem, doesn't it?
    If this is so, what's the best way to do such function?
    Maybe through keypress?
    Keypress will not overload typing, will it?

    Thanks in advance.

    We are working under:
    v9.1p_2014-05-04/PowerEdition Development SC and IExplrorer 10.0.9200 navigator, Eclipse Helios and Tomcat 7.0.28

    Comment


      #3
      Well I think I have found the best solution for the question about uppercase in TextAreaItems:

      Code:
      {
      			name:"MOTIVO",
      			title: terminalesSacarTradicionalUIDS.getField("terminalesSacarTradicional.motivo").title,
      			characterCasing: "upper",
      			_constructor:"TextAreaItem",
      			height: 100,
      			width: 400,
      			colSpan: 3,
      [b]
      			transformInput: function (formulario, item, value, oldvalue) {
      					return value.toUpperCase();
      			}
      [/b]
      		},
      If there is any solution better than this, please comment it.
      Thanks.

      Comment


        #4
        For completeness, yes, if you want an all-uppercase TextArea, this is a good approach.

        Comment

        Working...
        X