Ajax on change selection field and modify units

08 Aug '12, 11:55 AM
23,217 Views
No Forum Badges

Hi,

I´ve created a form with 3 selection fields (Country, Province, City) which are connected by the on change ajax event. Everything is working fine as long as I only use the create unit with the forms.

When I want to use the modify unit the dependent selection fields stay empty in the form. So the question is how can transport the data of the dependent field from the index unit to the fields of the form?

Thank´s a lot for your help!

Felix

 
x 0
Follow
Answer Answer at this question and get points!
Forum Hero - Level 9

Hi,

the problem seems to be related to the execution of the Selector Units (Regions and Cities). In fact these units return values after the execution of the onchange event. When you fill the form for a new hotel the model works because there are not previous data to load, but when you try to edit an existing hotel you have to retrieve the list of elements from each Selector Unit.

You can follow the logic of this example and try to solve your problem. alt text

  • The Product Selector Unit retrieves the information about the selected product
  • The Products from Category Selector Unit (in page) retrieves the list of products related to the category of the selected product
  • The Categories Selector Unit retrieves the categories
  • The Products from Category Selector Unit (outside the page) retrieves the list of products related to the selected category when the onchange event is fired.

   
x 0
No Forum Badges

Hi,

could you better explain what is the result you wish to obtain ? Could you describe the model of your application, for example by using some screenshots, related to the form and the operation chain activated by the on change Ajax event ?

 
x 0
No Forum Badges

Hi, Thank´s for your response!

Following is the extract of the data model: alt text

I have a index unit to show all hotels. These index unit is connected to a page to open a form to modify the attributes of the hotels:

alt text

Following the list of hotels and the modify form of the application:

alt text

& alt text

The problem is now that (as you see in the alst screenshot) the preselection for the Region and City is not working.

Have you any idea how to change this?

Cheers,

Felix

 
x 0
No Forum Badges

Sry for reviving this, but im tryng to get this :I´ve created a form with 3 selection fields (Country, Province, City) which are connected by the on change ajax event ,but im gettin a error. I only have country and province, and i want, then choose some country, only show the provinces related to that counter. Any help on setting ajax?

 
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 web app with javascript history object using the WebRatio Autocomplete template 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.