<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Get Other Widgets in ArcGIS Experience Builder setting UI in ArcGIS Experience Builder Questions</title>
    <link>https://community.esri.com/t5/arcgis-experience-builder-questions/get-other-widgets-in-arcgis-experience-builder/m-p/1367702#M10177</link>
    <description>&lt;P&gt;I didn't know that, but it makes sense in a way, though I still don't understand how the instance for the build mode is getting the information about specifically the map widgets added.&lt;BR /&gt;&lt;BR /&gt;What I want to create is a logger widget which will allow setting logs for actions for multiple widgets.&lt;BR /&gt;The idea being you could set an address for an API, set a call method (ie. GET/POST), and allow users to log specific events which will be preset for every widget or map tool.&lt;BR /&gt;I know that I can let users set everything for it through the config.json, but I wanted to allow selection of widgets through the widget settings UI.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 09 Jan 2024 05:07:38 GMT</pubDate>
    <dc:creator>bogind</dc:creator>
    <dc:date>2024-01-09T05:07:38Z</dc:date>
    <item>
      <title>Get Other Widgets in ArcGIS Experience Builder setting UI</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/get-other-widgets-in-arcgis-experience-builder/m-p/1364442#M10017</link>
      <description>&lt;P&gt;I am creating a custom widget in ArcGIS experience builder and am trying to get a list of all the widgets currently defined for a page or for the entire app inside the setting UI.&lt;/P&gt;&lt;P&gt;I tried using the widget state to transfer the list, as well as create it in a similar way to the one used in the Control the Widget State example, but when I use the same code in &lt;U&gt;&lt;STRONG&gt;setting.tsx&lt;/STRONG&gt; &lt;/U&gt;I get the widgets that are used to create the settings UI sidebar, and not the current app/page widgets.&lt;/P&gt;&lt;P&gt;For example, when I run:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;import { React, getAppStore } from 'jimu-core';
const { useState, useEffect } = React
let state = getAppStore().getState();

const [appWidgets, setAppWidgets] = useState({} as unknown)
const [widgetsArray, setWidgetsArray] = useState([] as any[])

// Update the appWidgets property once, on page load
useEffect(() =&amp;gt; {
  const widgets = state.appConfig.widgets
  setAppWidgets(widgets)
}, [state])

// Update the widgetsArray and sidebarWidgetsArray properties every time appWidgets changes
useEffect(() =&amp;gt; {
  if(appWidgets) {
	const widgetsArray = Object.values(appWidgets)
	
	setWidgetsArray(widgetsArray)
  }
}, [appWidgets])&lt;/LI-CODE&gt;&lt;P&gt;Then widgetsArray is supposed to contain all of the widgets in the app, which works if run inside &lt;U&gt;&lt;STRONG&gt;widget.tsx&lt;/STRONG&gt;&lt;/U&gt;, but in &lt;STRONG&gt;&lt;U&gt;setting.tsx&lt;/U&gt;&lt;/STRONG&gt; I get a list of the setting UI components.&lt;/P&gt;&lt;P&gt;I know the process should be possible, because the &lt;STRONG&gt;&lt;U&gt;MapWidgetSelector&lt;/U&gt; &lt;/STRONG&gt;component from &lt;EM&gt;&lt;U&gt;'jimu-ui/advanced/setting-components'&lt;/U&gt;&lt;/EM&gt; uses it to grab just the map components, but its code isn't open and I can't find how it's taking the widgets defined for a page.&lt;/P&gt;&lt;P&gt;Is there an efficient way to get all of the widgets in a specific app/page into the settings UI?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Dec 2023 08:40:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/get-other-widgets-in-arcgis-experience-builder/m-p/1364442#M10017</guid>
      <dc:creator>bogind</dc:creator>
      <dc:date>2023-12-27T08:40:10Z</dc:date>
    </item>
    <item>
      <title>Re: Get Other Widgets in ArcGIS Experience Builder setting UI</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/get-other-widgets-in-arcgis-experience-builder/m-p/1365321#M10047</link>
      <description>&lt;P&gt;Did you know that Experience Builder actually uses two simultaneous React applications, one for the build mode and one for the page you are building? I think this is the core of your problem. What are you trying to accomplish?&lt;/P&gt;&lt;P&gt;If you want to see how a widget is configured, it's possible to open up the config.json file in your text editor and read the information directly.&amp;nbsp; Go to /server/public/apps/yourAppNumber/config.json to see the published version and /server/temp/yourAppNumber/cdn/yourVersionNumber/config.json to see the current working version.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jan 2024 14:47:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/get-other-widgets-in-arcgis-experience-builder/m-p/1365321#M10047</guid>
      <dc:creator>JeffreyThompson2</dc:creator>
      <dc:date>2024-01-02T14:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: Get Other Widgets in ArcGIS Experience Builder setting UI</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/get-other-widgets-in-arcgis-experience-builder/m-p/1367702#M10177</link>
      <description>&lt;P&gt;I didn't know that, but it makes sense in a way, though I still don't understand how the instance for the build mode is getting the information about specifically the map widgets added.&lt;BR /&gt;&lt;BR /&gt;What I want to create is a logger widget which will allow setting logs for actions for multiple widgets.&lt;BR /&gt;The idea being you could set an address for an API, set a call method (ie. GET/POST), and allow users to log specific events which will be preset for every widget or map tool.&lt;BR /&gt;I know that I can let users set everything for it through the config.json, but I wanted to allow selection of widgets through the widget settings UI.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2024 05:07:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/get-other-widgets-in-arcgis-experience-builder/m-p/1367702#M10177</guid>
      <dc:creator>bogind</dc:creator>
      <dc:date>2024-01-09T05:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: Get Other Widgets in ArcGIS Experience Builder setting UI</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/get-other-widgets-in-arcgis-experience-builder/m-p/1367830#M10187</link>
      <description>&lt;P&gt;&lt;A href="https://community.esri.com/t5/experience-builder-custom-widgets/feature-panel-widget-1-7-1-9-8-22/ta-p/1147687" target="_blank"&gt;https://community.esri.com/t5/experience-builder-custom-widgets/feature-panel-widget-1-7-1-9-8-22/ta-p/1147687&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;You might be able to get some inspiration from looking at Robert Scheitlin's Feature Panel. Much of the code is dedicated to auto-detecting a sidebar widget.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2024 14:04:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/get-other-widgets-in-arcgis-experience-builder/m-p/1367830#M10187</guid>
      <dc:creator>JeffreyThompson2</dc:creator>
      <dc:date>2024-01-09T14:04:41Z</dc:date>
    </item>
    <item>
      <title>Re: Get Other Widgets in ArcGIS Experience Builder setting UI</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/get-other-widgets-in-arcgis-experience-builder/m-p/1368252#M10218</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/677423"&gt;@JeffreyThompson2&lt;/a&gt;&amp;nbsp;, you mentioned EXB uses 2 simultaneous React Apps. It seems I know almost nothing on how EXB (Developer Edition) works... I worked much on WAB and now I am preparing to start develop custom widgets for EXB. It will help me to "understand" how EXB code works...&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please elaborate, and also direct me to proper documentation?&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 08:49:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/get-other-widgets-in-arcgis-experience-builder/m-p/1368252#M10218</guid>
      <dc:creator>MichaelLev</dc:creator>
      <dc:date>2024-01-10T08:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: Get Other Widgets in ArcGIS Experience Builder setting UI</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/get-other-widgets-in-arcgis-experience-builder/m-p/1370406#M10328</link>
      <description>&lt;P&gt;I fount the solution by chance, in the &lt;A href="https://github.com/Esri/arcgis-experience-builder-sdk-resources/blob/master/widgets/message-subscriber/src/actions/query-action-setting.tsx#L65C9-L65C9" target="_self"&gt;message subscriber example&lt;/A&gt;.&lt;BR /&gt;It is possible to get the state and config of the internal app through:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;import { getAppStore } from 'jimu-core';

// The app state
getAppStore().getState().appStateInBuilder
// The app config
getAppStore().getState().appStateInBuilder.appConfig&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is then possible to get all of the pages, layouts and widgets that are already defined in the app&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const internalAppConfig = getAppStore().getState().appStateInBuilder.appConfig
const appWidgets = internalAppConfig .widgets&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 16 Jan 2024 11:12:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/get-other-widgets-in-arcgis-experience-builder/m-p/1370406#M10328</guid>
      <dc:creator>bogind</dc:creator>
      <dc:date>2024-01-16T11:12:18Z</dc:date>
    </item>
  </channel>
</rss>

