From wiki.ginstr.com
Jump to: navigation, search

Text email

Widget is used for email input of data by user. Value will be stored as datatype EMAIL.

Widget id, ${gbamID}

textEmail

Back to GBAM widgets table

Datatypes

Value is stored from widget to database as email datatype.

Predefined user data

PreLoaded

Properties panel

User will configure this data in properties panels of selected widget:

GENERAL
VALIDATIONS
    <columnEmail required="true|false"></columnEmail>
  • "unique", check uniqueness when widget gets saved into db, having "is part of database" checked, add to configuration.xml:
    <columnEmail unique="true|false"></columnEmail>


internal validators

Validators not visible to user.

ACTION
  • -
ACTION MESSAGES
  • -
DATABASE
  • "is part of database", checkbox option by default is set as checked. When checked database column is created for this widget.
  • "additional ginstr web column settings":
  • "maxItems" maximum number of items, add to configuration.xml:
<columnEmail>
<maxItems></maxItems>
</columnEmail>
  • "presetEmail" default e-mail address, add to configuration.xml:
<columnEmail>
<presetEmail>test@gmail.com</presetEmail>
</columnEmail>
  • "related unique columns", add to configuration.xml:
<columnEmail>
</columnEmail>

Code snippets

GBAM Code Variables

Variables which are used in code snippet below but not defined in user modifiable inputs.

Common widget code

<com.ginstr.widgets.GnTextView
    android:id="@+id/${widgetID}_label"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:text="@string/${widgetID}"
    gn:style="@style/textEmail_label"/>

<com.ginstr.widgets.GnEditText
    android:id="@+id/${widgetID}_input"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    gn:s_hint="@string/${widgetID}Hint"
    gn:dataType="email"
    gn:s_sourceType="input"
    gn:autoAdjustHeight="true"
    gn:style="@style/textEmail_input"/>

strings.xml

Lines to be added for each language.

<string name="${widgetID}">${widgetLabel}</string>
<string name="${widgetID}Hint">${widgetHint}</string>