From wiki.ginstr.com
Jump to: navigation, search
Line 8: Line 8:
 
Widget is hidden.
 
Widget is hidden.
  
Widget id, ${widgetID}:
+
Widget id, <code>${gbamID}</code>:
 
<pre>
 
<pre>
 
auditAddress
 
auditAddress
Line 18: Line 18:
  
 
==== PreLoaded ====
 
==== PreLoaded ====
AutoLoaded data which is known:
+
* [[GBAMRulesForIDGeneration#.24.7BscreenLabel.7D|<code>${screenLabel}</code>]]
 
 
* ${pageName} - name of the page to which widgets are added
 
  
 
==== Properties panel ====
 
==== Properties panel ====
 
User will configure this data in properties panels of selected widget:
 
User will configure this data in properties panels of selected widget:
  
GENERAL:
+
=====GENERAL=====
* ${widgetLabel} - name of the widget user added to the screen
+
* "label", [[GBAMRulesForIDGeneration#.24.7BwidgetLabel.7D|<code>${widgetLabel}</code>]]
 +
 
 +
=====VALIDATIONS=====
 +
* "required", [[RequiredValidator]]
 +
 
 +
=====ACTION=====
 +
* -
 +
 
 +
======ACTION MESSAGES======
 +
* -
  
 
== Code snippets ==
 
== Code snippets ==
 +
=== GBAM Code Variables ===
 +
 +
Variables which are used in code snippet below but not defined in user modifiable inputs.
 +
 +
* <code>[[GBAMRulesForIDGeneration#WIDGET_ID.27S_.24.7BwidgetID.7D|${widgetID}]]</code>
 +
 
=== Common widget code ===
 
=== Common widget code ===
  
<section begin=buttonQuery.Source />
+
<syntaxhighlight lang="xml">
<pre>
 
 
<com.ginstr.widgets.GnEditText
 
<com.ginstr.widgets.GnEditText
     android:id="@+id/${pageName}$_{widgetLabel}_input"  
+
     android:id="@+id/${widgetID}_input"  
 
     android:layout_width="match_parent"  
 
     android:layout_width="match_parent"  
 
     android:layout_height="wrap_content"
 
     android:layout_height="wrap_content"
Line 41: Line 53:
 
     gn:visible="false"
 
     gn:visible="false"
 
     gn:showAddress="true" />
 
     gn:showAddress="true" />
</pre>
+
</syntaxhighlight>
<section end=buttonQuery.Source />
 

Revision as of 15:58, 9 November 2016

Gps address (hidden)

Widget obtains gps coordinates from gps module. After location is retrieved nominatim server is contacted to fetch the address and address is stored into the widget. Widget is hidden.

Widget id, ${gbamID}:

auditAddress

Back to GBAM widgets table

Predefined user data

PreLoaded

Properties panel

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

GENERAL
VALIDATIONS
ACTION
  • -
ACTION MESSAGES
  • -

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.GnEditText
    android:id="@+id/${widgetID}_input" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content"
    gn:s_sourceType="gps"
    gn:dataType="text"
    gn:visible="false"
    gn:showAddress="true" />