Form.IO: Use the Select component static search as the input to dynamically update the list - select

If I have a Form.IO Select component, pulling data from a URL, is there a way to use the static search as the input for further paginated debounce?
Essentially I would like a single field, which as you type uses the search to pull data from the URL, and update the select list.
Any help would be awesome!

Related

algolia search box: how to add filters within searchbox

I am using lagolia and have categorie field in the record added as facet and also location field
I want to create a search box something like
How can i do this
With both of those, the easiest way is going to be to use InstantSearch.js and the built-in widgets.
For the Categories, you'll use the refinementList widget. This will pull the categories based on the attribute name for the data. You can use the templates property to define how the categories get displayed.
GeoSearch will always be a bit trickier. To do this with InstantSearch, you'll want to refine your search based on Latitude and Longitude. You can create a custom parameter to be inserted into the search when search is run. To do that, you'll customize the searchBox widget with the queryHook parameter. In the query hook, you can add the aroundLatLng parameter to your search.

jcr sql-2 get node name

i am working on aem 6.3 and would like to get page name
SELECT * FROM [cq:Page] WHERE ISDESCENDANTNODE("/content/Product/Silhouettes/Accessories/Bands/Headband")
If I need to retrieve name of the nodes using sql-2 , how do I achieve it?
You can specify column constraints like title, node name, etc this way -
SELECT nodeSet.name, nodeset.title
FROM [cq:Page] AS nodeSet
WHERE ISDESCENDANTNODE("/content/Product/Silhouettes/Accessories/Bands/Headband")
Note: the query tool in AEM(Tools -> Query) will not list the query results according to the columns you've mentioned, it will only list the node paths.
You can look at using /etc/importers/bulkeditor.html or AEM fiddle tool to visualize the query results based on column constraints.
If you want to achieve this programmatically, you can use the same query as you've mentioned in your question and use javax.jcr.query.* and javax.jcr.Node.* API's to retrieve just about any property from the query result. This article here should help you achieve this programatically.
Use the ResourceResolver API to execute and obtain the query results:
final Iterator<Resource> pagesIterator = resolver.findResources('<your_query_here>', javax.jcr.query.Query.JCR_SQL2);
while (pagesIterator.hasNext()) {
final Resource pageResource = pagesIterator.next();
LOG.info(pageResource.getName());
}
However, please note that if you are using any version higher then CQ 5.6, you should use instead the Page API.
In this case, the listChildren(Filter<Page> filter, boolean deep) method will do the job.
The PageFilter parameter may be used if you want to filter through pages of some kind. So if no extra criteria for your page finding algorithm, your may pass null or a new empty object.
The boolean parameter: if false it returns only direct child pages, and if true would list all the descendant pages of the given page.
Therefore, the equivalent solution of the SQL Query which would provide you the same end results would be:
Iterator<Page> rootPageIterator = rootPage.listChildren(null, true);

Get more product field value in Algolia json data

We are using Algolia extension for Magento 2. We added 2-3 field in the products, so we want to show the value of those fields on instant search result page. As we checking the view/frontend/templates/instant/hit.phtml is in use, we want to add the custom attributes to the JSON data so we can fetch those attributes value and show in listing page.
First you have to add new fields to Algolia product index if not already added. You can use one of the custom backend events. e.g. algolia_after_create_product_object
Once your fields are indexed properly (verify from Algolia account console), you should be able to get those in hit.phtml

Filtering a list lookup in Nintex Forms using an inline function

I am building a list form for SharePoint 2010 using Nintex Forms 2010.
The user must select an item from a different list, so I have added a List Lookup control. But the user can only select among items that starts with a specific string.
For example, the lookup list could contain items with titles 'foo1','foo2','bar1','bar2'. I only want the user to be able to select 'foo1' or 'foo2'.
In the filtering section of the List Lookup control I have specified the following:
Filter available selections = By a specific value
Where field = fn-Substring("Title",0,3)
Filtered by value = foo
Unfortunately this does not result in any options for the user to select - just an empty control.
If I change the filter to:
Where feild = Title
Filtered by value = foo1
Then I get the foo1 option - and only that one. Trying something like
Filtered by value = foo*
does not work either.
So how should I define the filter to get it to work. Or is what I am trying not possible in Nintex Forms?
The inline function won't work in your case, because it is a client side function, and your parameter is a server side object.
There two alternative ways can help with your request in server side.
1.Add a calculated value column to your list, use LEFT function to cut the search key for yourself:LEFT([Title],3). In nintex form, you can use this column to filter the list items.
Filter the list items in a view instead of nintex form. Suppose you have already known the [source view] property in List Lookup control.

struts2 select tag, second select based on value of first select

I have 2 select, I want the second select list loads based on selected value of first select. In another word first select is a list of objects, those objects each has a list of another objects. so I want load second list based on selected object of first select. I know that can be done using JQuery, but can I do this without JavaScript/JQuery?
Thanks in advance.
There is a tag that does this for you http://struts.apache.org/2.x/docs/doubleselect.html
Out of the box it probably uses Dojo API or uses a server side request to generate the second list. I have not used any of the JQuery UI in Struts.
No, you can't do this without Javascript. With static HTML you can't achieve this effect; drop-down fields on HTML forms come pre-loaded with their options, and are independent of other fields on the form.