website logo
👥 Community🎯 Samples on GitHub🚦System Status
💡 Guides
🚀 Examples
🍕 Developer Reference
⚡️ Changelog
🎥 Video Library
Navigate through spaces
⌘K
Examples Overview
Setting up your solution
Jig Types
Components
Datasource
Actions
Preview
Widgets
Expressions
Aggregation
Boolean
Comparison Operators
Date & Time
Path Operators
Functional Programming
Jigx Variables
Predicate Queries
String
Docs powered by
Archbee
Actions

go-to

7min

This action is used to redirect the user to another page/component. go-to can be used in a list of actions, such as swipeable and rightElement, or used together with another action, where it is called after the main action and redirects the user to the specified page.

Configuration option

A go-to action can be set up in various ways:

  1. As a separate action or in the action list
  2. As a swipeable action in the left or right direction
  3. As rightElement in the list
  4. As an associated action in the action list

Examples and code snippets 

go-to as an action

Document image


The simplest example of using a go-to action is to use it as a separate action. When configured, a button will appear at the bottom, redirecting us to the details page when pressed.

Examples: See the full example using static data in GitHub. See the full example using dynamic data in GitHub.

go-to
|
actions:
  - children:
      - type: action.go-to
        options:
          title: Go to
          linkTo: default-employee-detail


go-to swipeable left/right

Document image


This example uses the go-to action as a swipeable property. We can choose the swipe direction left or right. After pressing the button, it will redirect to the details of the person.

Examples left: See the full example using static data in GitHub. See the full example using dynamic data in GitHub.

Examples right: See the full example using static data in GitHub. See the full example using dynamic data in GitHub.

left
right
|
item:
  type: component.list-item
  options:
    title: =@ctx.current.item.lastname
    subtitle: =@ctx.current.item.firstname
    leftElement: 
      element: avatar
      text: " "
      uri: =@ctx.current.item.img
    swipeable:
      right:
        - label: Go to
          color: primary
          onPress:
            type: action.go-to
            options:
              linkTo: default-employee-detail


go-to rightElement

Document image


In this example, we use the go-to action as the rightElement in the list-item component. There is a button for each item.

Examples: See the full example using static data in GitHub. See the full example using dynamic data in GitHub.

go-to-rightElement.jigx
|
item:
  type: component.list-item
  options:
    title: =@ctx.current.item.lastname
    subtitle: =@ctx.current.item.firstname
    leftElement: 
      element: avatar
      text: " "
      uri: =@ctx.current.item.img
    rightElement: 
      element: button
      title: Go to
      onPress:
        type: action.go-to
        options:
          linkTo: default-employee-detail


go-to onSuccess

Document image


In this example, the go-back action is associated with the submit-form action. After we enter the signature and press the "Sign" button, the submit-form action is performed and then the go-to action redirects us to the next page.

Examples See the full example using dynamic data in GitHub.

go-to-onSuccess.jigx
|
actions:
  - children:
      - type: action.submit-form
        instanceId: send-signature
        options:
          provider: DATA_PROVIDER_DYNAMIC
          method: save
          entity: default/confirms
          formId: send-signature
          icon: add
          title: Sign
          goBack: stay
          onSuccess: 
            title: Succesfully signed
            actions:
              - type: action.go-to
                options:
                  title: ''
                  linkTo: default-employee-detail
        


See also

  • Developer reference
  • Related examples (Github)





Updated 19 Sep 2023
Did this page help you?
PREVIOUS
go-back
NEXT
open-scanner
Docs powered by
Archbee
TABLE OF CONTENTS
Configuration option
Examples and code snippets
go-to as an action
go-to swipeable left/right
go-to rightElement
go-to onSuccess
See also
Docs powered by
Archbee
Copyright © 2023 Jigx, Inc. All rights reserved. Terms of Service