Connect JavaFx(Applets) to J2EE - best practice & browser session

Hi there,
I’m new to JavaFX and Applet programming but highly interested.
What I don’t get at the moment is how you connect the locally executed code of the applet to your system running on a server (J2EE).
Of course there seem to be different ways but I would like to avoid using RMI or things like that because of the problem with firewalls and proxies.
So I would like to prefer using HTTP(s) connection.
And here my questions:
1.) Is there any best practice around? For example: using HTTP because of the problems I mentioned above. Sample code for offering java method via HTTP?
2.) Is there a possibility to use the browser session? My J2EE applications are normally secured. If the user opens pages he has to login first and has than a valid session.
Can I use the applet in one of those pages and use the browser environment to connect? I don’t want the user to input his credentials on every applet I provide. I would like to use the existing session.
Thanks in advance
Tom

1) Yes. If you look at least at the numerous JavaFX official samples, you will find a number of them using HttpRequest to get data from various servers (Flickr, Amazon, Yahoo!, etc.). Actually, using HTTP quite insulates you from the kind of server: it doesn't matter if it run servlets or other Java EE stuff, PHP, Python or other. The applet only knows the HTTP API (GET and POST methods, perhaps some other REST stuff).
2) It is too long since I last did Java EE (was still J2EE...), so I can't help much, perhaps somebody will shed more light on the topic. If the Web page can use JavaScript to access this browser session, it can provide this information to the JavaFX applet (JS <-> JavaFX communication works as well as with Java applets).

Similar Messages

  • SAP Upgrade from 4.7 to ECC 6.0 connected to BW 7.0 Best Practices

    We are upgrading SAP R/3 4.7 to ECC 6.0.  We have been running live in a BW 7.0 environment. We have done some enhancements for 2LIS_11_VAITM -  Sales Document Item Data  and 2LIS_13_VDITM - Billing Document Item Data datasources.   We currently have a test instance that has been upgraded to ECC6.0.
    What are the best business practices for testing BW to insure data transfer and enhancements are working correctly?
    Eg. Should we connect the ECC6 instance to BWD and test there OR upgrade R/3 TST that is connected BWD  and test there OR Upgrade QAS and test in BWQ.
    Thanks in advance . . .
    Edited by: RWC on May 4, 2011 6:26 PM

    Hi RWC,
    the plug-in will change slightly, you may notice differences in the screens of RSA2 and others after the upgrade.
    Regarding best practices: In a recent upgrade our project team decided to create a parallel landscape with a new, additional Dev and QA on the R/3 side.
    We connected these new systems to a BW Sandbox and the BW QA.
    We identified all datasources, transfer rules and infopackages in use in production and recorded them with related objects onto transports in BW Dev. Before the import into BW Sandbox and BW QA we adjusted the system name conversion table to convert from old R/3 Dev to new R/3 Dev in order set up all the required connections for testing with the upgraded R/3 systems.
    After the go LIVE of the upgrade we renamed the old R/3 Dev system in BW Dev and ran BDLS to convert everything (speak to your Basis team). That way we made sure not to lose any Development and we got rid of the old R/3 Dev system.
    Take a look at this post for issues we encountered during this project and test everything you load in production.
    Re: Impact on BI 7.0 due to ECC 5.0 to ECC 6.0 Upgrade
    Best,
    Ralf

  • Feedback: ACME - J2EE Best Practices Sample

    Hi!
    Today I'd like to provide some feedback on the aforementioned samples one can download
    from the following location:
    http://otn.oracle.com/products/ias/files/J2EE_Best_Practices_Sample_Code.zip
    I hope you'll find it useful...
    I unzipped the file and followed the instructions given in ReadMe.html, created the database user and tables (Create_User.sql, Best_Practices_DDL.sql).
    Well no problems so far. Just a question. Why not using something like NUMBER(10,2) instead of FLOAT(10)
    for the cost of a product? But this is just a sidenote.
    Lets come to the real big mistakes in this example which make it hard to call this an example of best practices.
    1)
    Sign in as admin/admin and try to edit your profile! It won't work. In your browser you'll see the following message:
    "Validation Error
    You must correct the following error(s) before proceeding:
    Invalid Username, already exists. Please try again."
    And on your console:
    javax.ejb.ObjectNotFoundException: No such entity: admin
    javax.ejb.ObjectNotFoundException: No such entity: admin
    Digging into the source the flow is:
    UserEditAction.java -> UserForm.java -> user.jsp -> UserSaveAction.java (getting action "edit") ->
    User.java -> CustomerUtility.java -> UserFacadeBean.java -> ...
    Lets have a look in the reverse order starting with UserFacadeBean.updateCustomer(User user):
    Line 54: CustomerEJBLocal customerLocal = userLocalHome.findByPrimaryKey(user.getID());
    Looks good, as far as user.getID() returns the primary key. Lets skip CustomerUtitity because it only
    locates the SessionFacade and passes the user object without modifications.
    User.java is the value object created in UserSaveAction.perform:
    Line 25: user.setID(((UserForm) form).getUserName());
    Line 26: user.setUserName(((UserForm) form).getUserName());
    Line 25 is obviously wrong. There are different possibilities to fix this. One quick (and dirty) change would be to alter
    CustomerEJBLocal customerLocal = userLocalHome.findByPrimaryKey(user.getID());
    in:
    CustomerEJBLocal customerLocal = userLocalHome.findByUsername(user.getID());
    or effectly the same and far better to understand:
    CustomerEJBLocal customerLocal = userLocalHome.findByUsername(user.getUserName());
    May be this was the intended solution. By the way there is no unique key on customer.username in the database. Another solution is to use the primary key. But then you have to alter the application starting at UserEditAction.java. You'll probably know what to do...
    2)
    This problem should only occur if your NLS_NUMERIC_CHARACTERS is set to ",.". Nevertheless the root cause is bad programming. Look for
    String getCost() and setCost(String ...)
    or
    String getTotalCost() and setTotalCost(String ...)
    or
    return "" + _cost;
    and so on.
    Ugly... and remember the database field is a FLOAT(10)!
    The mapping in orion-ejb-jar.xml looks like that:
    <cmp-field-mapping name="totalcost" persistence-name="TOTALCOST" persistence-type="FLOAT(10)"/>
    That's why you'll get an ORA-01722:INVALID NUMBER exception during the cast.
    A String '123.12' is wrong if you have a database with German NLS settings for example.
    Anyway one should NEVER use Strings in such a place. I'd strongly recommend that you remove both issues!
    Besides this, I would like to thank you for providing samples on OTN. They are of great value for beginners like me. Perhaps you could just try to test the examples more seriously. Especially for beginners it's hard to believe that there should be something wrong in those samples.
    This could end up in frustrated users thinking they are as thick as two short planks. :-)
    Regards,
    Eric

    Hello Eric -
    Thanks for the feedback, it is very helpful and appreciated.
    1)Sign in as admin/admin and try to edit your profile! It >won't work. In your browser you'll see the following >message:"Validation ErrorWe've rectified this problem and the new zip file should appear on OTN within 24 hours.
    The root cause was an error in one of the SQL scripts that populated the "customer" table.
    The response from the developer responsible for this application is pasted below.
    The first error is a data >error. I did make it where >username and id are both actually the username, so the >code referencing the username as the id was just a >shortcut. There really is not a need for both the >username and id fields in this example.
    Both should be constrained to be unique with the id >actually being the key. I originally
    was going to allow users to change their usernames, that >is why both the username and id fields.
    In the released version of the DDL file the id is not set >to the username.[it should read]
    insert into "ACMEADMIN"."CUSTOMER" values ('admin',
    'Administrator', '555 Elm St. NoWhere USA', >'555-555-5555', 'admin', 'admin');cheers
    -steve-

  • JavaFX applet and embedded font. Browser compatibility?

    I'm trying to embed font to the JavaFX applet. I'm following instructions from [JavaFX Tutorial|http://download.oracle.com/javafx/1.3/tutorials/custom_fonts/index.html]
    It works fine on Mac OS X using Safari and Firefox browsers, but doesn't work in Chrome and Opera. As well it doesn't work in window's browsers!
    How to get it to work?
    Edited by: 842622 on Mar 8, 2011 4:29 AM

    Only workable solution yet is:
    def awtFont = java.awt.Font.createFont(java.awt.Font.TRUETYPE_FONT, Main.class.getResourceAsStream("custom font.ttf"));
    def m = java.awt.GraphicsEnvironment.class.getMethod("registerFont", java.awt.Font.class);
    m.invoke(java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(), awtFont);
    def fxFont = Font {name: awtFont.getName() size: 18}seems ugly, but works
    Edited by: fedotows on Mar 25, 2011 4:40 AM

  • J2EE Best Practices on Cache (I know there's a lot of answers but...)

    Hello friends,
    i'm developing a JSP-Servlet MVC application and I have the following problem. I want to control errors at low level, so i want to permit send a form, presenting a error message in a new window with a back button that cals history.back(). The problem is that I want that user data must not be rewrited. I hope that form backs to exactly the same point before user submits. When i play with the cache headers, all i get is have the data back, but when i try to submit from selects or change anything ans submits, the response is the same, like if I repaeat the same inputs.
    I tried cache-control: no-cache,no-store,post-check=0,pre-ceck=0
    and the HTTP1.0 pragma no-cache
    all with expires clausule. But i can't get what I want. Browser disables submit button, and if not I have problems with selects onchange (which acts in fact like a submit by the button) and when I fight that troubles, then I find that user must rewrite the form data during a histroy.back() event.
    So my question is, once i said all this things, which is the best way to implement that functionality??
    Please help me it's very improtant for me, i've read HTTP RFC inclusive, but I just don't get it after combine everything from my JSP filter (setResponse).
    Thank you very much in advance, hope you can help me

    What kind of TV is it?
    The most common way to hook up a laptop to an external display is with the VGA connection.
    VGA connections are fairly common on modern flat panels. If you're trying to connect to a standard definition CRT(tube) TV, an s-video video connection may be possible if both the laptop and TV support s-video. Quality will be poor, however.
    Disclosure: Former BBY employee.

  • New to J2EE; Best Practices

    Hi everyone, and thanks in advance for all of your help.
    I'm somewhat new to J2EE, at least in the sense of creating my own application. I work for a small software company in New England, and have to work on an enterprise application as part of my job; unfortunately, I don't get much exposure to the total of J2EE. Instead, most of my work is on small extensions, database scripts, or external projects that don't quite give me the exposure I'm looking for.
    As an exercise, I've decided to put together a sample J2EE application. I've spent time reading the (many) J2EE tutorials out there, but I'm having trouble putting it all together. This application works, but I know that I've used some bad patterns, and was hoping to get some feedback. My application consists of 4 Java classes and 8 JSPs, but none over 100 lines, and only 1 above 50.
    One final note before I start: yes, I know there are some frameworks out there that would help; I plan on migrating to Struts at some point. However, I wanted to make sure I understand the core J2EE structure before I delved into that.
    My application simply allows a user to add, edit, or delete entries in a database. The database consists of 1 table (Projects), with two fields: an id, and a name.
    The first page, Projects.jsp, lists the current projects in the database for the user:
    <%@ page contentType="text/html; charset=UTF-8" %>
    <%@ page pageEncoding="UTF-8" %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <jsp:useBean id="projectsDAO"
                 class="com.emptoris.dataAccess.ProjectsDataAccessObject"
                 scope="application" />
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
      <head>
        <title>Projects</title>
      </head>
      <body>
        <form name="projectsForm"
              action="<%= response.encodeURL("ProjectsController.jsp") %>"
              method="post">
          <c:if test="${projectsDAO.projects.numberOfProjects > 0}">
            <table>
              <tr>
                <th>Select</th>
                <th>ID</th>
                <th>Name</th>
              </tr>
              <c:forEach items="${projectsDAO.projects.projects}" var="project"
                         step="1">
                <tr>
                  <td>
                    <input type="radio" name="projectId" value="${project.id}" />
                  </td>
                  <td><c:out value="${project.id}" /></td>
                  <td><c:out value="${project.name}" /></td>
                </tr>
              </c:forEach>
            </table>
            <input type="submit" name="action" value="Edit Project" />
            <input type="submit" name="action" value="Delete Project" />
          </c:if>
          <input type="submit" name="action" value="Add New Project" />
        </form>
      </body>
    </html>The ProjectsDataAccessObject is a class that simply mirrors the table in the database. Adding, editing, or removing entries in this class will modify the database accordingly:
    package com.emptoris.dataAccess;
    import java.sql.*;
    import com.emptoris.model.*;
    public class ProjectsDataAccessObject {
        private Connection connection;
        private Statement statement;
        private Projects projects;
        public ProjectsDataAccessObject() throws ClassNotFoundException,
            SQLException {
            Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
            connection =
                DriverManager.getConnection(
                    "jdbc:microsoft:sqlserver://AFRASSO:1433", "sa", "password"
            statement = connection.createStatement();
            statement.execute("USE test");
        public Project getProject(int id) throws SQLException {
            Projects projects = getProjects();
            Project project = projects.getProject(id);
            return project;
        public Projects getProjects() throws SQLException {
            if (projects == null) {
                projects = new Projects();
                String query = "SELECT id, name FROM Projects";
                ResultSet resultSet = statement.executeQuery(query);
                Project project;
                while(resultSet.next()) {
                    project = new Project();
                    project.setId(resultSet.getInt(1));
                    project.setName(resultSet.getString(2));
                    projects.addProject(project);
            return projects;
        public void addNewProject(Project project) throws SQLException {
            String query =
                "INSERT INTO Projects (name) VALUES ('" + project.getName() + "')";
            statement.execute(query);
            query =
                "SELECT MAX(id) FROM Projects";
            ResultSet resultSet = statement.executeQuery(query);
            resultSet.next();
            project.setId(resultSet.getInt(1));
            projects.addProject((Project) project.clone());
        public void removeExistingProject(int id) throws SQLException {
            String query =
                "DELETE FROM Projects WHERE id = " + id;
            statement.execute(query);
            projects.removeProject(id);
        public void updateExistingProject(Project project) throws SQLException {
            String query =
                "UPDATE Projects SET name = '" + project.getName() +
                    "' WHERE id = " + project.getId();
            statement.execute(query);
            projects.getProject(project.getId()).setName(project.getName());
    }So the first question I have is: is this appropriate? I've set up the data access object correctly? I feel like I'm basically reproducing the Projects class... do I even need this class anymore? I certainly don't use it in any of the JSP pages (as you will see).
    Also, I've simply added it to the application context here. Is that the correct way to create and access a data access object like this one?
    The second question is: the form's action parameter is a JSP page that acts as a semi-controller, reads the parameters from the form, and passes that information to a class, which then determines where next to send the application. Does this make sense? I'm not really sure of the idea of using a JSP page as a controller, but I don't know any other way to get the results of the form to the controller class.
    Here is the controller JSP, ProjectsController.jsp:
    <%@ page contentType="text/html; charset=UTF-8" %>
    <%@ page pageEncoding="UTF-8" %>
    <jsp:useBean id="projectsDAO"
                 class="com.emptoris.dataAccess.ProjectsDataAccessObject"
                 scope="application" />
    <jsp:useBean id="projectsController"
                 class="com.emptoris.controller.ProjectsController"
                 scope="request">
      <jsp:setProperty name="projectsController" param="action" property="action" />
    </jsp:useBean>
    <jsp:forward page="<%= response.encodeURL(
                               projectsController.getDestinationPage()
                           ) %>" />and here is the ProjectsController class:
    package com.emptoris.controller;
    public class ProjectsController {
        private String action;
        public ProjectsController() {
        public String getDestinationPage() {
            if (action.equals("Add New Project"))
                return "AddProject.jsp";
            else if (action.equals("Edit Project"))
                return "EditProject.jsp";
            else if (action.equals("Delete Project"))
                return "DeleteProject.jsp";
            return null;
        public void setAction(String action) {
            this.action = action;
    }I'll stop there. I think this is enough information to give me feedback on what I've done thus far. If I've been unclear about something, please let me know and I'll fill in the blanks, or post more code if necessary. Also, feel free to comment on other aspects of the design and style that you see in this code; I'm here to learn, so even if I haven't brought it up, that just means I don't yet see the issues of what I've done yet. :)
    Thanks again for all of your help!
    Regards,
    Anthony Frasso

    hi,
    My best advise not to for any IDE.
    If you do all the things manually, you will get the idea of the reason of doing. if you go with IDE, for ex, if you are creating session bean, IDE itself will create some files for you, these things you will not get to know.
    if you create these things manually, usually you will get lot of errors, so you will get lot of experience than using any IDE.
    if you are going to develop any project or application at that time you can use NetBeans or eclipse or some other ide u like.

  • JavaFX applet JNLP not working in browser

    Hi,
    I have developed a JFX applet with multiple stages, which get visible and not visible at different times.
    I have a search bar on the main stage which shows up at the beginning. However, on searching, i am not getting any response from the widget when i search.
    I am running the jnlp in the browser.
    I am doing the right thing ? Anything more needs to be done in terms of creating the jnlp ?
    Kedar

    Perhaps you can make a simple mockup application illustrating how you do your stage management, so we can see how you do (if that's "the right thing"...).

  • Best Practices?

    I have an application which has several EJBs that make JDBC connections.
    What is considered best practice for passing parameters like class, url,
    username and password to these EJBs? The basic structure is a servlet which
    uses one class that makes all the calls to the EJBs. I've come up with a
    couple ideas for passing these JDBC parameters around. Have I missed any
    thing and what are the pros/cons of each?
    1. Read <init-param> from WEB-INF/web.xml for the servlet. Pass these to
    the helper/wrapper class, which then passes them to all of the EJBs.
    2. Specify all the parameters in META-INF/ejb-jar.xml for each EJB.
    3. Somehow specify these parameters on a global or application level on the
    application server and have all EJBs use these.
    #1 seems like it should work, but also seems awkward, as business logic is
    now on the web side. Also, database connection data would be passed across
    the firewall between the web and app server. Is this a security risk?
    #2 will work, but changes to our JDBC pool would require changing the
    META-INF/ejb-jar.xml for each EJB.
    #3 sounds the best to me, as no database information is passed though
    between the app and web server and we would only have to change the
    parameters in one location to get all EJBs to now connect to the new JDBC
    pool. How can this be implemented?
    On a related note, what's the difference between a <contex-param> and
    <env-entry> in the WEB-INF/web.xml? We are using <contex-param> to read a
    URL for our JSPs for image locations, while we are using <env-entry> to read
    in the URL to our application server.
    Thanks,
    Eric

    I believe you already posted this question in a different newsgroup. Please
    only post in one newsgroup.
    Peace,
    Cameron Purdy
    Tangosol Inc.
    << Tangosol Server: How Weblogic applications are customized >>
    << Download now from http://www.tangosol.com/download.jsp >>
    "Eric Fenderbosch" <[email protected]> wrote in message
    news:3b86afae$[email protected]..
    I have an application which has several EJBs that make JDBC connections.
    What is considered best practice for passing parameters like class, url,
    username and password to these EJBs? The basic structure is a servletwhich
    uses one class that makes all the calls to the EJBs. I've come up with a
    couple ideas for passing these JDBC parameters around. Have I missed any
    thing and what are the pros/cons of each?
    1. Read <init-param> from WEB-INF/web.xml for the servlet. Pass these to
    the helper/wrapper class, which then passes them to all of the EJBs.
    2. Specify all the parameters in META-INF/ejb-jar.xml for each EJB.
    3. Somehow specify these parameters on a global or application level onthe
    application server and have all EJBs use these.
    #1 seems like it should work, but also seems awkward, as business logic is
    now on the web side. Also, database connection data would be passedacross
    the firewall between the web and app server. Is this a security risk?
    #2 will work, but changes to our JDBC pool would require changing the
    META-INF/ejb-jar.xml for each EJB.
    #3 sounds the best to me, as no database information is passed though
    between the app and web server and we would only have to change the
    parameters in one location to get all EJBs to now connect to the new JDBC
    pool. How can this be implemented?
    On a related note, what's the difference between a <contex-param> and
    <env-entry> in the WEB-INF/web.xml? We are using <contex-param> to read a
    URL for our JSPs for image locations, while we are using <env-entry> toread
    in the URL to our application server.
    Thanks,
    Eric

  • Best Practice EJB 3.0 Question

    I have a web application consisting of 3 projects:
    - Model (EJB 3.0 Session Beans connected to two different databases)
    - TagLibrary (custom tag library)
    - ViewController (Web App / GUI)
    Currently I am connecting to the EJB Beans using code that Jdeveloper generates for a test client:
    env.put( Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory" );
    env.put(Context.PROVIDER_URL, "t3://localhost:7101");
    However would like to move these to a properties file (I believe jndi.properties) such that they can be modified based on app server.
    My question is following:
    What is best practice for Session beans in the Model project to access other session beans in the same project? Do I also need to specify JNDI prop file and settings? (This occurs when Bean from one database needs to access bean from another database).
    Or should I really put these in two separate projects / EJB libraries?
    Thanks,
    Kris

    You have two options, first is to use JNDI lookup (you should be able to use just new InitialContext(), without the environment map).
    Second one is more elegant and, as far as I'm concerned, should be referred to as best practice, that is using dependency injection:
    @EJB
    YourSesionBeanInterface yourEJB;
    If you get stuck, there is plenty of documentation about this on the internet.
    Pedja

  • BEST PRACTICES FOR CREATING DISCOVERER DATABASE CONNECTION -PUBLIC VS. PRIV

    I have enabled SSO for Discoverer. So when you browse to http://host:port/discoverer/viewer you get prompted for your SSO
    username/password. I have enabled users to create their own private
    connections. I log in as portal and created a private connection. I then from
    Oracle Portal create a portlet and add a discoverer worksheet using the private
    connection that I created as the portal user. This works fine...users access
    the portal they can see the worksheet. When they click the analyze link, the
    users are prompted to enter a password for the private connection. The
    following message is displayed:
    The item you are requesting requires you to enter a password. This could occur because this is a private connection or
    because the public connection password was invalid. Please enter the correct
    password now to continue.
    I originally created a public connection...and then follow the same steps from Oracle portal to create the portlet and display the
    worksheet. Worksheet is displayed properly from Portal, when users click the
    analyze link they are taken to Discoverer Viewer without having to enter a
    password. The problem with this is that when a user browses to
    http://host:port/discoverer/viewer they enter their SSO information and then
    any user with an SSO account can see the public connection...very insecure!
    When private connections are used, no connection information is displayed to
    SSO users when logging into Discoverer Viewer.
    For the very first step, when editing the Worksheet portlet from Portal, I enter the following for Database
    Connections:
    Publisher: I choose either the private or public connection that I created
    Users Logged In: Display same data to all users using connection (Publisher's Connection)
    Users Not Logged In: Do no display data
    My question is what are the best practices for creating Discoverer Database
    Connections.
    Is there a way to create a public connection, but not display it in at http://host:port/discoverer/viewer?
    Can I restrict access to http://host:port/discoverer/viewer to specific SSO users?
    So overall, I want roughly 40 users to have access to my Portal Page Group. I then want to
    display portlets with Discoverer worksheets. Certain worksheets I want to have
    the ability to display the analyze link. When the SSO user clicks on this they
    will be taken to Discoverer Viewer and prompted for no logon information. All
    SSO users will see the same data...there is no need to restrict access based on
    SSO username...1 database user will be set up in either the public or private
    connection.

    You can make it happen by creating a private connection for 40 users by capi script and when creating portlet select 2nd option in Users Logged in section. In this the portlet uses there own private connection every time user logs in.
    So that it won't ask for password.
    Another thing is there is an option of entering password or not in ASC in discoverer section, if your version 10.1.2.2. Let me know if you need more information
    thnaks
    kiran

  • What is the best practice for full browser video to achieve the highest quality?

    I'd like to get your thoughts on the best way to deliver full-browser (scale to the size of the browser window) video. I'm skilled in the creation of the content but learning to make the most out of Flash CS5 and would love to hear what you would suggest.
    Most of the tutorials I can find on full browser/scalable video are for earlier versions of Flash; what is the best practice today? Best resolution/format for the video?
    If there is an Adobe guide to this I'm happy to eat humble pie if someone can redirect me to it; I'm using CS5 Production Premium.
    I like the full screen video effect they have on the "Sounds of pertussis" web-site; this is exactly what I'm trying to create but I'm not sure what is the best way to approach it - any hints/tips you can offer would be great?
    Thanks in advance!

    Use the little squares over your video to mask the quality. Sounds of Pertussis is not full screen video, but rather full stage. Which is easier to work with since all the controls and other assets stay on screen. You set up your html file to allow full screen. Then bring in your video (netstream or flvPlayback component) and scale that to the full size of your stage  (since in this case it's basically the background) . I made a quickie demo here. (The video is from a cheapo SD consumer camera, so pretty poor quality to start.)
    In AS3 is would look something like
    import flash.display.Loader;
    import flash.net.URLRequest;
    import flash.display.Bitmap;
    import flash.display.BitmapData;
    import flash.ui.Mouse;
    import flash.events.Event;
    import flash.events.MouseEvent;
    import flash.display.StageDisplayState;
    stage.align = StageAlign.TOP_LEFT;
    stage.scaleMode = StageScaleMode.NO_SCALE;
    // determine current stage size
    var sw:int = int(stage.stageWidth);
    var sh:int = int(stage.stageHeight);
    // load video
    var nc:NetConnection = new NetConnection();
    nc.connect(null);
    var ns:NetStream = new NetStream(nc);
    var vid:Video = new Video(656, 480); // size off video
    this.addChildAt(vid, 0);
    vid.attachNetStream(ns);
    //path to your video_file
    ns.play("content/GS.f4v"); 
    var netClient:Object = new Object();
    ns.client = netClient;
    // add listener for resizing of the stage so we can scale our assets
    stage.addEventListener(Event.RESIZE, resizeHandler);
    stage.dispatchEvent(new Event(Event.RESIZE));
    function resizeHandler(e:Event = null):void
    // determine current stage size
        var sw:int = stage.stageWidth;
        var sh:int = stage.stageHeight;
    // scale video size depending on stage size
        vid.width = sw;
        vid.height = sh;
    // Don't scale video smaller than certain size
        if (vid.height < 480)
        vid.height = 480;
        if (vid.width < 656)
        vid.width = 656;
    // choose the smaller scale property (x or y) and match the other to it so the size is proportional;
        (vid.scaleX > vid.scaleY) ? vid.scaleY = vid.scaleX : vid.scaleX = vid.scaleY;
    // add event listener for full screen button
    fullScreenStage_mc.buttonMode = true;
    fullScreenStage_mc.mouseChildren = false;
    fullScreenStage_mc.addEventListener(MouseEvent.CLICK, goFullStage, false, 0, true);
    function goFullStage(event:MouseEvent):void
        //vid.fullScreenTakeOver = false; // keeps flvPlayer component from becoming full screen if you use it instead  
        if (stage.displayState == StageDisplayState.NORMAL)
            stage.displayState=StageDisplayState.FULL_SCREEN;
        else
            stage.displayState=StageDisplayState.NORMAL;

  • Best Practices for Connecting to WebHelp via an application?

    Greetings,
    My first post on these forums, so I appologize if this has already been covered (I've done some limited searching w/o success).  I'm developing a .Net application which is accessing my orginazation's RoboHelp-generated webhelp.  My organization's RoboHelp documentation team is still new with the software and so it's been up to me to chart the course for establishing the workflow for connecting to the help from the application.  I've read up on Peter Grange's 'calling webhelp' section off his blog, but I'm still a bit unclear about what might be the best practices approach for connecting to webhelp.
    To date, my org. has been delayed in letting me know their TopicIDs or MapIDs for their various documented topics.  However, I have been able to acquire the relative paths to those topics (I achieved this by manually browsing their online help and extracting out the paths).  And I've been able to use the strategy of creating the link via constructing a URL (following the strategy of using the following syntax: "<root URL>?#<relative URI path>" alternating with "<root URL>??#<relative URI path>").  It strikes me, however, that this approach is somewhat of a hack - since RoboHelp provides other approaches to linking to their documentation via TopicID and MapID.
    What is the recommended/best-practices approach here?  Are they all equally valid or are there pitfalls I'm missing.  I'm inclined to use the URI methodology that I've established above since it works for my needs so far, but I'm worried that I'm not seeing the forest for the trees...
    Regards,
    Brett
    contractor to the USGS
    Lakewood, CO
    PS: we're using RoboHelp 9.0

    I've been giving this some thought over the weekend and this is the best answer I've come up with from a developer's perspective:
    (1) Connecting via URL is convenient if (#1) you have an established naming convention that works for everyone (as Peter mentioned in his reply above)
    (2) Connecting via URL has the disadvantage that changes to the file names and/or folder structure by the author will break connectivity
    (3) Connecting via TopicID/MapID has the advantage that if there is no naming convention or if it's fluid or under construction, the author can maintain that ID after making changes to his/her file or folder structure and still maintain the application connectivity.  Another approach to solving this problem if you're working with URLs would be to set up a web service that would match file addresses to some identifier utilized by the developer (basically a TopicID/MapID coming from the other direction).
    (4) Connecting via TopicID has an aesthetic appeal in the code since it's easy to provide a more english-readable identifier.  As a .Net developer, I find it easy and convenient to construct an enum that matches my TopicIDs and to utilize that enum to construct my identifier when it comes time to make the documentation call.
    (5) Connecting via URL is more convenient for the author, since he/she doesn't have to worry about maintaining IDs
    (6) Connecting via TopicIDs/MapIDs forces the author to maintain those IDs and allows the documentation to be more easily used into the future by other applications worked by developers who might have their own preference in one direction or another as to how they make their connection.
    Hope that helps for posterity.  I'd be interested if anyone else had thoughts to add.
    -Brett

  • JSF DB Connection Best Practices

    During the life of a JavaServer Faces request, what are some best practices for storing a db connection?
    For the duration of the transaction, a single connection should be created before db updates, made available to (possibly) multiple model objects, and closed at the conclusion of the request. The connection would only live during the request.
    Right now each model object gets and releases it's own dbCon but that doesn't satisfy the (logical unit of work) requirements of a transaction when multiple objects are required for updating the database.
    What is a good technique to get a dbCon and release it, and, where should it be stored?
    TIA,
    Al Malin

    Hi,
    I'd like to ask a follow-up question.
    How do I close the connection after the session timed out or the user leaves the application by closing the browser?
    Thanks,
    Achim

  • Best practices for using Query Browser

    Hi,
    I started getting along with "Query Browser" option to embed data directly from Bex queries to the dashboard.
    I am looking for the Best practices which are recommended and needs to be followed from performance point of view and from reporting point of view.
    I went through some of documents but was not convincingly sure about the measures which they suggested.
    So, would be thankful for any help points or documents received in relation with it.
    Regards,
    Jaywant Kulkarni.

    Hi JK,
    All above links are given general rules and tips & tricks to boost your dashboard performance.
    Keep the dashboard simple and clean, dashboards are for summarized level not to the detailed level.
    try to understand the KPI for the client based on the write your model in paper first and go through the dashboards.
    Maximum of number of rows allowed by the dashboard is 512, you can increase the rows but that too hampers your dashboard, if the result set of the query is too big.
    Connections i have seen people using more than 10 - 15 connections into the dashboards, but these many connections. really your dashboard will take time to retrieve the data.
    Things you need to consider:
    - Reduce the components in your DD.
    - Make the font name similar across the dashboard.
    - Enable the option show loading status in document properties, this will increase your loading time.
    - Use refresh type as "Refresh after components loaded".
    - Use simple formula as if-else & sum,indexes.
    - Remove formatting in your query's.
    These are the few things you can consider while designing the dashboard. Do search in scn and blog there lot many tips and tricks are available.
    Regards,
    Suman

  • Error while Connecting report Best Practices v1.31 with SAP

    Hello experts,
    I'm facing an issue while trying to connect some of my reports from Best Practices for BI with SAP.
    It only happens when it's about info sets, the other ones that are with SAP tables go smoothly without a problem.
    The most interesting is I have already one of the reports connected to SAP info sets.
    I have already verified the document of steps of creation of additional database that comes with BP pack. They seem ok.
    Here goes what Crystal Reports throws to me after changing the data source to SAP:
    For report "GL Statement" one of the Financial Analysis one which uses InfoSet: /KYK/IS_FIGL_I3:
    - Failed to retrieve data from the database; - click ok then...
    - Database connector error: It wasn't indicated any variant for exercise (something like this after translating) - click ok then
    - Database connector error: RFC_INVALID_HANDLE
    For report "Cost Analysis: Planned vs. Actual Order Costs" one of the Financial Analysis one which uses InfoSet: ZBPBI131_INFO_ODVR and ZBPBI131_INFO_COAS; and also the Query CO_OM_OP_20_Q1:
    - Failed to retrieve data from the database; - click ok then...
    - Database connector error: check class for selections raised errors - click ok then
    - Database connector error: RFC_INVALID_HANDLE
    Obs.: Those "Z" infosets are already created in SAP environment.
    The one that works fine is one of the Purchasing Analysis reports:
    - Purchasing Group Analysis -> InfoSet: /KYK/IS_MCE1
    I'm kind of lost to solve this, because I'm not sure if it can be in the SAP JCO or some parameter that was done wrongly in SAP and I have already check possible solutions for both.
    Thanks in advance,
    Carlos Henrique Matos da Silva - SAP BusinessObjects BI - Brazil.

    I re-checked step 3.2.3 - Uploading Crystal User Roles (transaction PFCG) - of the manual where it talks about CRYSTAL_ENTITLEMENT and CRYSTAL_DESIGNER roles, I noticed in the Authorizations tab that the status was saying it hadn't been generated and I had a yellow sign, so then that was what I did (I generated) as it says in the manual.
    Both statuses are now saying "Authorization profile is generated" and the sign is now green on the tab.
    I had another issue in the User tab (it was yellow as Authorizations one before generating)....all I needed to do to change to green was comparing user (User Comparison button).
    After all that, I tried once more to refresh the Crystal report and I still have the error messages being thrown.
    There's one more issue in one of the tabs of PFCG transaction, it is on the Menu one where it is with a red sign, but there's nothing talking about it in the manual. I just have a folder called "Role menu" without anything in it.
    Can it be the reason why I'm facing errors when connecting the report to SAP infoSets? (remember one of my reports which is connected to an infoSet works good)
    Thanks in advance,
    Carlos Henrique Matos da Silva - SAP BusinessObjects BI - Brazil.

Maybe you are looking for

  • Error accessing web application in OC4J-reg.

    Hi All, We deployed a web application into oc4j 903. We got the ERROR 1 when trying to access the application. Then we replaced the jaxb-rt-1.0-ea.jar & jaxp.jar in oc4j with the latest version from jwsdk1.1. Then we got the ERROR 2. This error is th

  • Tried restoring to factory settings...

    I had been having trouble with my windows. Internet explorer was crashing. I ran every virus program I had and nothing was found. I tried restoring the system to a previous date, before everything was acting odd. When the laptop rebooted, a window po

  • Itunes wont burn SD 11 anymore

    I am on panther and did an update of my Logic 7 QT and Itunes the other day. I would always bounce my Logic 7 files to an SD11 file and burn through Itunes but since I did the update Itunes wont burn sd11 it just has a message saying itunes cant reco

  • Firewire 800 express card 34

    I'm finding it impossible to purchase one of these cards in the UK Anyone had any luck? products to avoid? compatibility issues? Would be very grateful S

  • Upgrade Oracle 9.2.0.5 to Oracle 11g

    Hi, Any one done a upgrade of oracle 9.2.0.5 to 11g R2 ? I have two databases : 1. 9.2.0.5 in RAC mode 2. 9.2.0.7 Any idea how long would if take to upgrade the RAC instance ? I also need to know if PRO*C programs can be directly upgraded to the 11gR