Autocomplete template

22 Dec '16, 03:09 PM
No Forum Badges

I'm trying to use the autocomplete template, but I cannot find detailed instructions about it...

Let's use the Acme project as reference:

  • site view: "Shop"
  • page: "Search Products" (the default page for "Shop" with id "page4")
  • unit: "Search" (form unit)
  • field: "product" (where I would like to show some product name suggestions)

I made the following changes:

  • add a new page "Suggestion page" with page template "autocomplete"
  • add a simple list "Suggestions" (also with autocomplete template) showing the attribute "name" of the entity "product" with a condition expression like "name Contains ?"
  • add an ajax link from the form "Search" to the the simple list "Suggestions", binding the field "product" as input to the condition "name" of the simple list "Suggestions"
  • enable ajax for the form
  • thicked the "Enable Autocompletion" checkbox for the field "product" of the form
  • set "Normal" as "Autocompletion type" ( I actually need to use "Selection field" but I couldn't make it work with either value..)
  • set as "Autocompletion flow" the newly created ajax link (from the form to the suggestions)

When I type any letter in the field "product" of the form, ajax fires but gives the following error:

ERROR [wr.nav.Request] Error handling failure of request [object Object] ReferenceError: display is not defined at D.<anonymous>(http://localhost:8080/Acme/WRResources/ajax/webratio/widgets.js?s=ceGDtb2EF9nqow1H-LiC8w:474:46) at o(http://localhost:8080/Acme/WRResources/ajax/jquery/jquery.min.js?s=oT9-IIulNGgd6tsex6LlSg:2:14733) at Object.fireWith(http://localhost:8080/Acme/WRResources/ajax/jquery/jquery.min.js?s=oT9-IIulNGgd6tsex6LlSg:2:15502) at D._triggerListeners(http://localhost:8080/Acme/WRResources/ajax/webratio/wr.js?createDocumentApp=true&s=vzXmSEvUpK553nxIXktpVA:176:202) at D.failure(http://localhost:8080/Acme/WRResources/ajax/webratio/wr.js?createDocumentApp=true&s=vzXmSEvUpK553nxIXktpVA:175:334) at Object.Ie.h.error(http://localhost:8080/Acme/WRResources/ajax/webratio/wr.js?createDocumentApp=true&s=vzXmSEvUpK553nxIXktpVA:284:312) at o(http://localhost:8080/Acme/WRResources/ajax/jquery/jquery.min.js?s=oT9-IIulNGgd6tsex6LlSg:2:14733) at w(http://localhost:8080/Acme/WRResources/ajax/jquery/jquery.min.js?s=oT9-IIulNGgd6tsex6LlSg:4:12497) at XMLHttpRequest.d(http://localhost:8080/Acme/WRResources/ajax/jquery/jquery.min.js?s=oT9-IIulNGgd6tsex6LlSg:4:18318)

What's wrong with it? Did I miss something?

Many thanks


x 0
Answer Answer at this question and get points!
Forum Expert - Level 5

Hi Giacomo,

the problem is related to the layout of the suggestion page. When you apply the "Autocomplete" template on the page, it is added the "source" Custom Location to allow to create a list under the field where you want to show. In this custom location, you need to add the simple list.

To correct the layout follow this procedure:
- Select the suggestion page
- Remove from the grid the Simple List component
- Open the Locations Overview in the Layout View
- Click on the "source" custom location
- Drag the Simple List component in its grid
- Apply the "Autocomplete" template on the Simple List
- To remove in the Locations Overview the "Top" and "User" location highlighted in red, select the suggestion page in the work area
- Go to its Properties View and check the "Ignore Master Page" property

Generate the project and check if the autocompletion event works properly.

Best regards,
Ombretta Malinverno

x 2
No Forum Badges

Hi Ombretta,

I completely missed the "source" custom location of the template!

Thanks for yuor quick answer, it works like a charm.

Kind regards,


x 0
Answer at this question and get points!

Related questions

Ajax and FCK Editor (WebRatio 5.x) ajax and javascript AJAX events problem to external JavaScript Ajax is not working in own style project Ajax link success callback? Ajax onchange and jQuery 2.x (with migrate plugin) incompatible Ajax on change selection field and modify units Ajax web app with javascript history object using the WebRatio Automatic date in form Automatic file upload BPMN: URL field ckeditor - change directory for the browser Clean a form Como abrir una ventana en ajax desde una master page Como crear cambio de contraseƱa Como tener dos botones juntos en un formulario independientes de una accion? Como usar la funciĆ³n autocomplete en un field Compare with the current time coupled mandatory fields Cryptic error when submitting a form Custom Unit and AJAX / SOAP Disabilitare campi durante evento AJAX Drop down menu question Dudas sobre modelado(Data Flow,Forms y Operation Create) Dynamic attribute/field names. Possible? Dynamic instantiation of fields on a page for any Class type Empty record mistakenly saved entry form logic. Entry Unit - Default field timestamp Entry Unity, Field Date Type Error Field as link soruce Form element Form template forward/backward navigation and bookmark in ajax web app Generation errors on ajax enabled page with many components, ajax links and selective refresh Getting the absolute path of a RTXBLOBData Hide form until a flow is triggered Hiding form components based on page conditions Hierarchy component How I can receive the primary key value after adding into database from OK Port. How to add an image in a modal/pop-up window? How to get a wr:AjaxURL tag working How to keep current page/block of List/Hierarchy (Index) components after ajax link clickwith selective refresh? How to localize AJAX waiting dialog? How to open a window ajax in a BPM activity? How to redirect to the correct site view after a successful login attempt How to use LandmarkMenu as AJAX navigation how to use the landmark menu as AJAX navigation input mask javascript history object Multi Entry Unit: How to forward only checked rows? Multi-Image Upload Multiple forms on one page. HTML5 input attributes. Possible? (2 questions) multi selections field problem Multi Selects didn't work in update page Prelevare la chiave del record da una Selection Field in una Multiple Form Problem saving multi selection from input Problem with application runnung Progress bar when uploading big file(s) in a form? Pulire URL Redirecting users to another site view Resize fields Scroll ajax problem Search by Selector component does not work selection fields on cascade Select multiple files for upload Selezione sul giorno "Events Planning" Setting Upload directory Showing items that have a relation with an entity Slot in Selection Field Update fields based on selection of other fields Updating attributes of an entity upload file and the move it to other location upload file html Uppercase Uso de la componente chart de webRatio Validacion validation fields Value Length (Min) fails to validate when field is empty? WebRation - Create Navigation diagram What are the new features of WebRatio 6.1? which of these three models is closer to webratio/ifml way of creating web applications wr-ajaxDivs break layout on ajax pages.