Flex with Java - DB data access

Hello, people.

I developed a Java application and realized that I need some advice. My request is simple:
I have a MSSQL, tomcat 5.5 server, flex data services.

In my application, I have two areas of combo... country, city...
I filled the combobox countries with the values of the DB (country table) obtained using the fill (list ListArgs) in the assembler class.
Now, according to the selected country in forced to fill my city combobox (city table)
How can I fill combobox city from the database based on the country code?
Y at - it a function to pass the selected index and fill the list box drop-down town... ???

My code is as below:
<? XML version = "1.0" encoding = "utf-8"? >
"" < mx:Application xmlns:mx = ' http://www.adobe.com/2006/mxml ' layout = "absolute" >
< mx:DataService id = "ds" destination = 'quick-search-countries' autoCommit = 'false' autoSyncEnabled = "false" / >
< mx:DataService id = "tds" destination = 'quick-search-city' autoCommit = 'false' autoSyncEnabled = "false" / >
< mx:ArrayCollection id = "cntry_list" / >
< mx:ArrayCollection id = "town_list" / >
MX:Panel layout = "absolute" backgroundColor = "#c6daf5" horizontalCenter = "0" "0" = red >
< mx:Form id = "SearchForm" >
< mx:TabNavigator >
< mx:Canvas label = 'Hotel' width = '339' height = '234' backgroundColor = "#ffffff" >
< mx:Label x = "10" y = "91" text = "" country: "alpha ="0.12"/ >"
< mx:ComboBox = "93" x = "89" fontSize = "10" id = "Country" dataProvider = "{cntry_list}".
labelField = "countryName" creationComplete = "ds.fill (cntry_list)" "
change prompt = "TDS. GetItem (Country.SelectedItem)"="United Kingdom">
< / mx:ComboBox >
< mx:Label x = "10" y = "126" text = "' town / city:" fontFamily = "Georgia" alpha = "0.12" / > "
< mx:ComboBox id = "City" x = "94" y = "124" fontSize = "10" dataProvider = "{town_list}".
labelField = prompt "name" = "London WC1" >
< / mx:ComboBox >
< / mx:Canvas >
< / mx:TabNavigator >
< / mx:Form >
< / mx:Panel >
< / mx:Application >
It's my main.mxml. I CountryAssembler to populate the drop-down list country and a DAO class. Have an assembler of city...

Please advice me on how to populate the drop-down list from the countries selected DB city...
I am really stuck place... and also have no documentation on Flex data services with Java support...
Please give me some suggestions on this.

Thanks in advance,
Raphael


Candy,

Mete is suggesting that, because Country.selectedItem is the object of your country.
the country_code should be accessible through Country.selectedItem.country_code
(although I'm personally not much direct link syntax, one fan
thing I've seen in your messages was to have different conventions for how
you name it these properties, sometimes you refer to them in the style of country_name
and then others like countryName... well depending on how you have implemented
She can be Country.selectedItem.countryCode or Country.selectedItem.country_code).

Pete

Tags: Adobe LiveCycle

Similar Questions

  • How to use the funds application Flex with java

    Hello

    I've seen a lot of tutorials on using web application with java flex but you will not see even a tutorial for the application Office Flex with java. If anyone have pls send the link.

    is it possible to create java application and desktop application without using application server?

    Thank you.

    Hello

    Please see the link below.

    http://forums.Adobe.com/thread/601342?decorator=print&displayFullThread=true

    It could anser your query.

    Anser another is "Merapi project" - This allows you to connect to the local application of Java of the AIR application.

  • Using Flex Performance Profiler for profiling Flex with Java Applications

    Hello

    I intend to use the Flex Profiler to profile my request.
    I have developed a model of application using Flex MXML, ActionScript classes for events and Cairngorm, Java , Oracle database and Blazeds.

    Can I use Flex Performance Profiler to profile my request. ??

    I ask this question as I have ad read the threshold to Adobe site and my Application includes java methods

    "You can use the Profiler to profile ActionScript 3.0 applications.

    Can someone please tell me what this means? and I can use the Performnace Flex Profiler.

    Season me please.

    If you want to evaluate the response time when you call a service, you can use Charles Web Debugging Proxy as it is able to control the calls using the AMF protocol.

    If you want to monitor is the ActionScript objects from Java in the class that retrieves the result in the service, you can use the Flex Profiler.

  • Need help with java script date

    Hi all

    Using Mac OS 10.6.8 and Adobe Acrobat 9.

    I am working on a form that has course date when you open the form.

    I have a field to enter an earlier date.

    If the effective date is = to or more than 3 years old (1095 days), then it will show a hidden field "sorry your registration has expired.

    If date enered is less than 3 years, then the field remains hidden.

    I have a field to display the result in days, I'm going to hide once the script works.

    Here is the shape right now.

    www.nixmailmac.com/register.PDF

    Any help would be appreciated.

    Ron has

    The code that I provided above is a compacted to if-then-else way. If you really want to, you can use this instead:

    If (event.value< 1095)="">

    getField("Enter_Field_Name_Here").display = display.hidden;

    } else {}

    getField("Enter_Field_Name_Here").display = display.visible;

    }

  • Data Access Manager and the views HTML

    Can I use Data Access Manager with user interface written for html-bridge? Or is it just a flex library?

    Data Access Manager is a Flex API, so it is not available via the HTML bridge, but you can make calls to application data using rest API as shown in our samples.

    The SDK HTML samples show how to retrieve properties of the object.  This can be extended to more complex queries of your choice.  This idea is to pass parameters but still calls and then bring them to applications in the java class DataAccessController with QueryUtil and DataService

    I can provide more examples later based on specific requests.

  • How to use Flex with EJB3?

    Anyone know how to integrate Flex with Java?

    I have a project EJB3 with JPA etc...

    Must use Eclipse with the Flex plugin or can I only use Flex Builder and Eclipse for java classes? (preferring the second option)

    I'm going crazy, this need for my college work, as quickly as possible.

    Please an explanation or a sample.

    Thank you all.

    1. I need to write any Servlet to use the HTTP protocol to connect with Flex, then create the wsdl for my EJB3.

    There are many free tools that helps you to convert a Java application to webservice.  Other tools

    2 - this wsdl will create client side of my application, so I create my Flex normally using Blaze DS HTTP interface?

    I never used to Blaze DS, but it is based on Java.

  • Flex data Access

    Hello

    I work in flex and java.

    I have used blazeds in my flex project

    I get data from mysql in the flex project.

    I retrieve the records using flex datagrid.

    but I want to retrieve records using textinput.

    How can I do?

    any body help me

    concerning

    Athi

    'yourobject' can be whatever it is based on the query or depends on the method of java data access...

    Put a breakpoint in the function resultHandler getZipCode and debug the application... you just know what needs to be used instead of yourobject... so adjust you the code...

    If this post answers your question or assistance, please mark it as such.

    Thank you

    Jean Claude Chari

  • Connectivity to MS Access database with java in vista Home premium 64-bit

    I made a dsn in vista home premium(64-bit) using Windows\syswow64\odbcad32.exe, to connect MS Access database to java, but the performance of the prog in java, it gives an error (no such driver found)

    Means of access:

    http://answers.Microsoft.com/en-us/Office/default.aspx

    Office at the above link forums

    http://social.answers.Microsoft.com/forums/en-us/addbuz

    Access support at the link above.

    They will help you with your questions of access when repost you in the Office Forums above.

    At soon Mick Murphy - Microsoft partner

  • can we use 32-bit components (ODAC) Oracle with oracle 64-bit data access

    Hi all


    Let me know for oracle 11G 64 bit the latest patches are available?

    Yet more can we use 32-bit components of Oracle (ODAC) with oracle 64-bit data access.


    Thank you
    Fadi

    Let me know for oracle 11G 64 bit the latest patches are available?

    Check on http://metalink.oracle.com

    Yet more can we use 32-bit components of Oracle (ODAC) with oracle 64-bit data access.

    I guess you mean to use 32-bit components ODAC on the client side. I've not seen this in practice, but it should be possible as long as we do not / cannot upgrade all clients to 64-bit.

  • What data access component download Oracle 64-bit should I use?

    Hello

    I have Visual Studio 2013 and I would use the latest data access components Oracle with Entity Framework 6.  There are three 64-bit downloads.  What one do need me?

    • ODP.NET_Managed121020.zip
    • ODAC121021Xcopy_x64.zip
    • ODAC121021_x64.zip

    There is a notice if you want to use DTC Entity Framework features, then the 32-bit Oracle Developer Tools for Visual Studio download is necessary. Okay, I like to use the design-time features, but does that mean I can use the 64-bit versions?

    Thank you

    Peter

    If you use Visual Studio data designers (first model EF or first database, for example) or the Configuration Wizard of TableAdapter, you must install Oracle Developer Tools for Visual Studio, which is 32-bit. This "ODTwithODAC" package includes both the unmanaged driver 32 bit as the ODP.NET ODP.NET, successful pilot.

    So, the first thing you need to decide is if you use ODP.NET, managed driver or ODP.NET, pilot managed. If you choose to use the successful pilot, or the driver for 32-bit unmanaged (at least during development) you can stop here, you have no need of anything else. Note that the successful pilot lacks a few features that the unmanaged driver has. On the other hand, the successful pilot is much easier to deploy.

    If you want to target the ODP.NET 64 - bit unmanaged pilot at design time, you also need to install a 64 bit choice.  At the time of the design, for the sake of simplicity, I would just use the version of installer of Oracle based, not the version of Xcopy. Note that your installation of 32-bit and 64-bit facilities cannot reside in the same Oracle home (directory).

    Versions of Xcopy are there to facilitate the deployment with pilot unmanaged. It allows you to integrate the pilot unmanaged with your application.

    Coming shortly is the version of the successful pilot Nuget. However, this gets you any time tools design and use so it is limited to the work "coding only" or deployment scenarios.

  • FDMEE VB API introduces not and gives "error of data access.

    Hello FDM gurus.

    While working with the FDMEE data integration tool, I had to test the capabilities of script VB to FDMEE and I tried the sample script of the ERPI Administrator's guide to copy a file from 1 place to another. Unfortunately the VB API does not work and generates an error "clsAppServerDM.fInitializeMainAPI: data access error." I don't know what am I missing here.

    Thank you in advance,

    VChakravarthy

    If you format this SQL query and you attempt to run in the SQL tool like SQL Developer, you can see how there is a SQL syntax error. There is a missing expression in the "BOLD"

    PV. LEVEL_VALUE =

      ),

    He expects something like pv. LEVEL_VALUE = 1005 so the SQL query should return the file application root.

    What I would do:

    -Update FDMEE to 11.1.2.3.510

    -Raise a SR with Oracle's Support.

    SELECT MERGE)

    SELECT pv. PROFILE_OPTION_VALUE

    AIF_PROFILE_OPTION_VALUES PV

    WHERE (PV. PROFILE_OPTION_NAME = p.PROFILE_OPTION_NAME)

    AND the pv. LEVEL_ID = 1010

    AND the pv. LEVEL_ID<=>

    AND the pv. LEVEL_VALUE = 1005

    ), (

    SELECT pv. PROFILE_OPTION_VALUE

    AIF_PROFILE_OPTION_VALUES PV

    WHERE (PV. PROFILE_OPTION_NAME = p.PROFILE_OPTION_NAME)

    AND the pv. LEVEL_ID = 1005

    AND the pv. LEVEL_ID<=>

    AND pv. LEVEL_VALUE =

      ), (

    SELECT pv. PROFILE_OPTION_VALUE

    AIF_PROFILE_OPTION_VALUES PV

    WHERE (PV. PROFILE_OPTION_NAME = p.PROFILE_OPTION_NAME)

    AND the pv. LEVEL_ID = 1000

    AND the pv. LEVEL_ID<=>

    ) PROFILE_OPTION_VALUE

    OF AIF_PROFILE_OPTIONS p

    WHERE p.PROFILE_OPTION_NAME = N 'PROFILE_APP_ROOT_DIRECTORY '.

  • Unable to launch the Client Application-vCO and strange error - "exception on Hibernate JDBC data access...". "

    Hello

    We have an integrated vCO 5.5.1 installation with vCAC 6.0.1. The installation worked very well. Recently, we encountered a problem where we were not able to run that any associated workflow vCAC. The following error is thrown " " "JDBC Hibernate data access exception: SQLException for SQL [?]; State SQL [null]; error code [0]; Cannot release the connection; "the nested exception is org.hibernate.exception.GenericJDBCException: cannot release the connection in vCO. Do not know what is happening with the vCO. Can someone help me on this? It's urgent!


    To resolve this problem, all plug-ins have been recharged and services were restarted. That has not helped.

    There is another issue that is to appear after that. We cannot launch the vCO Client. Fig. 1

    We are not able to access the following URL: https://<vCO-IP-Address>: 8281 Fig. 2

    We are able to access the configuration of the vCO page (https://<vCO-IP-Address>: 8283) and the application of the vCO page (https://<vCO-IP-Address>: 5480)

    Your help would be appreciated. Thank you.

    -SK

    Not many details have been given to us. I just resolution. In the Configuration of the vCO page, under the network tab fair value 0.0.0.0 IP address and restart the Server Configurator vCO. Login back to the Configuration of the vCO page and restart the service. It worked like a charm! It is the resolution for the vCO is not opening in port 8281. Once this is done, even the vCO Client began to open.

    Come to the JDBC error, as soon as this problem has been resolved, did not appear the JDBC error. So, I'm not sure about the exact resolution for this.

    -SK

  • POS 5.5 could not obtain data with analytical performance data warehouses

    Hi all

    I have two devices POS running version: 5.5.5.180.

    All of a sudden I can not connect to the Web Client for each device.

    POS status show all services in green on the two Pdvs.

    root@vdp:~/#: dpnctl status all
    Identity added: /home/dpn/.ssh/dpnid (/home/dpn/.ssh/dpnid)
    dpnctl: INFO: gsan status: up
    dpnctl: INFO: MCS status: up.
    dpnctl: INFO: Backup scheduler status: up.
    dpnctl: INFO: axionfs status: up.
    dpnctl: INFO: Maintenance windows scheduler status: enabled.
    dpnctl: INFO: Unattended startup status: enabled.
    
    

    By clicking on the Storage tab, displays the error message: "Unable to get data with analytical performance data warehouses" and no data warehouses are listed.

    • VCenter restarts, Pdvs, doesn't change anything.
    • I can connect to Pdvs very well.
    • CP are created.

    I found similar topics but no response... (POS 5.5 ERROR)

    Open a support case and turned out that the POS password user (a user defined in the domain of the @vsphere.local) that was used to access the vCenter has expired. Apparently, there's a bug in vCenter for some versions that makes them expire in 65 days.

  • In general, is it better to use java.sql.Date and java.sql.Timestamp instead of oracle.jbo.domain.Date?

    Hello world

    During playback of Oracle ADF Real World Developer's Guide, I noticed the dates match occurring in JDeveloper is different from what is the list in the book. JDeveloper is failing to oracle.jbo.domain.Date, but according to the book:

    DATEjava.sql.DateDATE type is mapped to java.sql.Date if the column in the table is a no time didn't need information zone.
    DATEjava.sql.TimestampDATE type is mapped to java.sql.Timestamp if the column in the table has a component "time" and that the client needs to zone information.
    TIMESTAMPjava.sql.TimestampThe TIMESTAMP type is mapped to java.sql.Timestamp if nanosecond precision is used in the database.

    In general, is it better to use java.sql.Date and java.sql.Timestamp instead of oracle.jbo.domain.Date? Using java.sql.Date and java.sql.Timestamp could save me some headaches conversion date. And, is there a place in JDeveloper to display these maps? I looked around and didn't see anything.

    Thank you.

    James

    User, what version of jdev we are talking about?

    In GR 11, 1 material versions db types date and timestamp are mapped to types of domain data that represents a wrapper for the native data types. The reason was that the framework can work with the domain types regardless of the underlying data type.

    Since Oracle 11 GR 2 maps the types DB to java types (default selection, you can change it when you create a model project, you can set the Data Type Mapping). Once the pilot has business components define you cannot change this setting it would break existing components such as eo or vo.

    So if you are working wit 11 GR 1 subject, you must use the domain types, if you work with GR 11, 2 or 12 c, you can use the domain types, but it is recommended to use the java type mapping.

    Timo

  • With the help of TLSv1.2 with Java 7

    Hello
    We are trying to migrate our server so it can use TLSv1.2 in Java 7, but we have some difficulty to operate. I took the example of EchoServer/EchoClient http://stilius.net/java/java_ssl.php, I ran and it worked fine (by default using SSL). I modified the code to get a SSLContext and get TLSv1.2 Protocol:

    SSLContext ret = SSLContext.getInstance ("TLSv1.2");
    RET.init (null, null, null);

    It does not, when the client sent to the server data, we obtained a SSLHandShakeException. Through some research, it seemed to me that I had to use my own default keystore that comes with Java, so I created an and changed the echo test to use as the keystore (to the server) and the TrustStore (for the client).

    It worked as expected when you use the default encryption algorithms. Now, I changed the server and the client to call "setEnabledCiphers" in him passing TLSv1.2 encryption ("TLS_DHE_DSS_WITH_AES_128_CBC_SHA256", to be precise). The customer can 'connect', but when I type something that I have an excepiton of the handshake, the server displays

    javax.net.ssl.SSLHandshakeException: no shared cipher suites


    Here is the code updated to the server:
    -----
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.security.KeyManagementException;
    import java.security.KeyStore;
    import java.security.NoSuchAlgorithmException;
    import java.util.Arrays;
    
    import javax.net.ssl.KeyManager;
    import javax.net.ssl.KeyManagerFactory;
    import javax.net.ssl.SSLContext;
    import javax.net.ssl.SSLServerSocket;
    import javax.net.ssl.SSLServerSocketFactory;
    import javax.net.ssl.SSLSocket;
    
    public class EchoServer {
         
         private static KeyManager[] getKeyManagerArray(String keystore,
                   String keystorePasswd) {
              KeyManager[] ret = null;
              String keyFile = "mySrvKeystore";
    
              if (null != keystore) {
                   keyFile = keystore;
              } else {
                   keyFile = "mySrvKeystore";
                   File t = new File(keyFile);
                   if (!t.exists()) {
                        keyFile = "../" + keyFile;
                        t = new File(keyFile);
                        if (!t.exists()) {
                             throw new RuntimeException("Could not find key manager file");
                        }
                   }
              }
              if (null == keystorePasswd) {
                   keystorePasswd = "123456";
              }
              try {
                   System.out.println("Using keystore: " + keyFile);
                   KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
                   KeyStore ks = KeyStore.getInstance("JKS");
                   // initialize KeyStore object using keystore name
                   ks.load(new FileInputStream(keyFile), null);
                   kmf.init(ks, keystorePasswd.toCharArray());
                   ret = kmf.getKeyManagers();
              } catch (Exception e) {
                   e.printStackTrace();
              }
    
              return ret;
         }
         
         private static SSLContext getSSLContext() throws NoSuchAlgorithmException, KeyManagementException {
              SSLContext ret = SSLContext.getInstance("TLSv1.2");
              KeyManager[] km = getKeyManagerArray(null, null);
              ret.init(km, null, null);
              return ret;
         }
         
         public static void main(String[] arstring) {
              try {
                   SSLContext sc = getSSLContext();
                   
                   SSLServerSocketFactory sslserversocketfactory = (SSLServerSocketFactory) sc.getServerSocketFactory();
                   SSLServerSocket sslserversocket = (SSLServerSocket) sslserversocketfactory
                             .createServerSocket(9999);
                   
                   final String[] enabledCipherSuites = { "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256" };
                   sslserversocket.setEnabledCipherSuites(enabledCipherSuites);
                   
                   System.out.println("Enabled ciphers: " + Arrays.toString(sslserversocket.getEnabledCipherSuites()));
                   
                   SSLSocket sslsocket = (SSLSocket) sslserversocket.accept();
    
                   InputStream inputstream = sslsocket.getInputStream();
                   InputStreamReader inputstreamreader = new InputStreamReader(
                             inputstream);
                   BufferedReader bufferedreader = new BufferedReader(
                             inputstreamreader);
    
                   String string = null;
                   while ((string = bufferedreader.readLine()) != null) {
                        System.out.println(string);
                        System.out.flush();
                   }
              } catch (Exception exception) {
                   exception.printStackTrace();
              }
         }
    }
    -----
    Here's the customer update
    -----
    import java.io.BufferedReader;
    import java.io.BufferedWriter;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.OutputStream;
    import java.io.OutputStreamWriter;
    import java.security.KeyManagementException;
    import java.security.KeyStore;
    import java.security.NoSuchAlgorithmException;
    import java.util.Arrays;
    
    import javax.net.ssl.SSLContext;
    import javax.net.ssl.SSLSocket;
    import javax.net.ssl.SSLSocketFactory;
    import javax.net.ssl.TrustManager;
    import javax.net.ssl.TrustManagerFactory;
    
    public class EchoClient {
         
         private static TrustManager[] getTrustManagerArray(String truststore,
                   String pwd) {
              TrustManager[] ret = null;
              String trustFile = "mySrvKeystore";
              if (null != truststore) {
                   trustFile = truststore;
              } else {
                   File t = new File(trustFile);
                   if (!t.exists()) {
                        trustFile = "../" + trustFile;
                        t = new File(trustFile);
                        if (!t.exists()) {
                             throw new RuntimeException("Could not find trust file");
                        }
                   }
                   pwd = "123456";
              }
    
              try {
                   System.out.println("Using " + trustFile + " as truststore");
                   TrustManagerFactory tmf = TrustManagerFactory
                             .getInstance("SunX509");
                   KeyStore ts = KeyStore.getInstance("JKS");
                   // initialize truststore object using truststore name
                   ts.load(new FileInputStream(trustFile), pwd.toCharArray());
                   tmf.init(ts);
                   ret = tmf.getTrustManagers();
              } catch (Exception e) {
                   e.printStackTrace();
              }
              return ret;
         }
         
         private static SSLContext getSSLContext() throws NoSuchAlgorithmException, KeyManagementException {
              SSLContext ret = SSLContext.getInstance("TLSv1.2");
              TrustManager[] tm = getTrustManagerArray(null, null);
              ret.init(null, tm, null);
              return ret;
         }
         
         public static void main(String[] arstring) {
              try {
                   SSLContext sc = getSSLContext();
                   
                   SSLSocketFactory sslsocketfactory = (SSLSocketFactory) sc.getSocketFactory();
                   
                   SSLSocket sslsocket = (SSLSocket) sslsocketfactory.createSocket(
                             "localhost", 9999);
                   
                   final String[] enabledCipherSuites = { "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256" };
                   sslsocket.setEnabledCipherSuites(enabledCipherSuites);
                   
                   System.out.println("Enabled ciphers: " + Arrays.toString(sslsocket.getEnabledCipherSuites()));
                   
                   InputStream inputstream = System.in;
                   InputStreamReader inputstreamreader = new InputStreamReader(
                             inputstream);
                   BufferedReader bufferedreader = new BufferedReader(
                             inputstreamreader);
    
                   OutputStream outputstream = sslsocket.getOutputStream();
                   OutputStreamWriter outputstreamwriter = new OutputStreamWriter(
                             outputstream);
                   BufferedWriter bufferedwriter = new BufferedWriter(
                             outputstreamwriter);
    
                   String string = null;
                   while ((string = bufferedreader.readLine()) != null) {
                        bufferedwriter.write(string + '\n');
                        bufferedwriter.flush();
                   }
              } catch (Exception exception) {
                   exception.printStackTrace();
              }
         }
    }

    Outside the inecure 'solutions' that I will not address it here, JSSE and actually TLS and SSL themselves have always required at least a peer to be authenticated. This means that this peer must have a private key and the certificate in a keystore. By default, that peer are the server, but you can turn around with the API. The certificate must be approved by other peers, that is by default of the customer, which means that it must be signed by a CA or self-signed and imported in the client's truststore.

Maybe you are looking for