1 Reply Latest reply: Nov 14, 2013 4:31 AM by Alejandro Tovar Lanz RSS

    insert manually


      I am a beginner in ADF programming , my web site have google map component . I have a page for insert a customer , I want to get lat an long of customer from map and other property from form on page.

      I get lat and long of point and put it in a hidden text input how to send this data to back end and how to set them on a entity for insert ?

      please help me how can I insert a new customer to table ?


        • 1. Re: insert manually
          Alejandro Tovar Lanz



          So I assume your 'CustomerVO' is based on an Entity Object and it has the attributes lat and long. You have many options to do that but I will give you what I consider will be easier for you (not necessarily the best approach though) 


          You need to store your Lat and Long into a binding variable (or a backing bean) or whatever you like. I assume you are using 'CreateInsert' operation to generate the empty form of customer (which will contain you lat and log attributes). You don't want to show those to the user so you hide them from the page but leave the bindings.


          Then, before you press the Save Button (to commit), you can put a af:setPropertyListener from=#{wherever.your.lat.point.is} to=#{bindings.LatitudePoint.inputValue} type=Action} and put another one for Longitude.


          Let me know if this helped.