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

open-url

6min

This action is used to open a web page depending on the provided url. open-url can be used in a list of actions, such as swipeable action and rightElement, or with another action, where after the main action is executed, open-url is called and opens the configured url.

Configuration options

An open-url 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 

open-url as an action

Document image


The simplest example of using an open-url action is to use it as a separate action. Thanks to this, a button will appear at the bottom, which, when pressed, will open the specific URL that we set up.

Example: See the full example in GitHub.

YAML
|
actions:
  - children:
      - type: action.open-url
        options:
          title: Jigx Documentation
          url: https://docs.jigx.com/examples/open-url


open-url swipeable left/right

Document image


This example uses the open-url action as a swipeable property. We can choose the swipe direction left or right. After pressing the button, it will open the specific url that we set up.

Example: See the full example in GitHub.

YAML
|
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:
      left:
        - label: Open Url 
          onPress:
            type: action.open-url
            options:
              url: https://docs.jigx.com/examples/open-url
      right:
        - label: Open Url 
          onPress: 
            type: action.open-url
            options:
              url: https://docs.jigx.com/examples/open-url


open-url rightElement

Document image




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

Example: See the full example in GitHub.

YAML
|
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: Open
      onPress:
        type: action.open-url
        options:
          url: https://docs.jigx.com/examples/open-url


open-url onSuccess

Document image


In this example, the open-url 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 the specific url will be opened.

Example: See the full example in GitHub.

YAML
|
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 and and open url
          goBack: stay
          onSuccess: 
            title: Succesfully signed
            actions:
              - type: action.open-url
                options:
                  title: Open documentation
                  url: https://docs.jigx.com/examples/open-url


See also

  • Developer reference
  • Related examples (Github)



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